/* ========== Base + Layout ========== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

:root {
  --sw-bg: #ffffff;
  --sw-bg-alt: #f7f7f7;
  --sw-border-subtle: #e5e5e5;
  --sw-border-strong: #000000;
  --sw-text-main: #111111;
  --sw-text-muted: #666666;
  --sw-text-soft: #999999;
  --sw-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.08);
  --sw-radius-card: 16px;
  --sw-radius-pill: 999px;
  --sw-transition-fast: 150ms ease-out;
  --sw-max-width: 1120px;
}

.sw-body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: var(--sw-bg);
  color: var(--sw-text-main);
  line-height: 1.5;
}

.sw-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Generic container */

.sw-container {
  width: 100%;
  max-width: var(--sw-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== Typography Helpers ========== */

.sw-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--sw-text-soft);
  margin: 0 0 0.6rem;
}

.sw-section-title {
  font-size: 1.8rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.sw-section-intro,
.sw-body-text {
  font-size: 0.98rem;
  color: var(--sw-text-muted);
  margin: 0.25rem 0 0;
}

/* Links */

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.sw-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sw-link:hover {
  text-decoration-thickness: 2px;
}

.sw-link-muted {
  font-size: 0.9rem;
  color: var(--sw-text-muted);
}

/* ========== Header / Nav ========== */

.sw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sw-border-subtle);
}

.sw-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.65rem 1.5rem;
}

/* Logo */

.sw-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* StableWire logo image */
.sw-logo-img {
  height: 46px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Nav */

.sw-nav {
  flex: 1;
}

.sw-nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.sw-nav-link {
  font-size: 0.9rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  color: var(--sw-text-muted);
  transition: color var(--sw-transition-fast), border-color var(--sw-transition-fast);
}

.sw-nav-link:hover {
  color: var(--sw-text-main);
  border-color: #000;
}

/* Header actions */

.sw-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Mobile nav toggle (hamburger) */

.sw-nav-toggle {
  display: none; /* shown only on small screens */
  border: 1px solid #000;
  background-color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.sw-nav-toggle-bar {
  width: 16px;
  height: 2px;
  background-color: #000;
  display: block;
  transition: transform var(--sw-transition-fast),
              opacity var(--sw-transition-fast);
}

/* Turn into an "X" when menu is open */
.sw-header.sw-nav-open .sw-nav-toggle-bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.sw-header.sw-nav-open .sw-nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.sw-header.sw-nav-open .sw-nav-toggle-bar:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* ========== Buttons ========== */

.sw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  border-radius: var(--sw-radius-pill);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--sw-transition-fast),
    color var(--sw-transition-fast),
    border-color var(--sw-transition-fast),
    transform var(--sw-transition-fast),
    box-shadow var(--sw-transition-fast);
}

.sw-btn-primary {
  background-color: #000000;
  color: #ffffff;
  border-color: #000000;
}

.sw-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--sw-shadow-soft);
}

.sw-btn-secondary {
  background-color: #ffffff;
  color: #000000;
  border-color: #000000;
}

.sw-btn-secondary:hover {
  background-color: #000000;
  color: #ffffff;
}

/* ========== Sections ========== */

.sw-main {
  flex: 1;
}

.sw-section {
  padding: 3.5rem 0;
}

.sw-section-alt {
  background-color: var(--sw-bg-alt);
}

.sw-section-header {
  max-width: 640px;
  margin-bottom: 2rem;
}

/* Two-column generic */

.sw-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
}

.sw-col {
  font-size: 0.98rem;
}

/* ========== Hero ========== */

.sw-hero {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.sw-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.sw-hero-title {
  font-size: 2.4rem;
  line-height: 1.1;
  margin: 0 0 0.25rem;
}

.sw-hero-subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0 0 0.8rem;
  color: var(--sw-text-muted);
}

.sw-hero-text {
  font-size: 0.98rem;
  margin: 0 0 1.1rem;
}

.sw-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.sw-hero-note {
  font-size: 0.85rem;
  color: var(--sw-text-soft);
  margin: 0;
}

/* Hero aside card */

.sw-hero-aside {
  display: flex;
  justify-content: flex-end;
}

.sw-hero-card {
  background-color: #ffffff;
  border-radius: var(--sw-radius-card);
  border: 1px solid var(--sw-border-subtle);
  box-shadow: var(--sw-shadow-soft);
  padding: 1.1rem 1.2rem;
  max-width: 360px;
}

.sw-hero-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.7rem;
}

.sw-hero-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.sw-hero-feed-item {
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--sw-border-subtle);
  background-color: #fafafa;
}

.sw-hero-feed-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sw-text-soft);
  margin: 0 0 0.25rem;
}

.sw-hero-feed-text {
  font-size: 0.85rem;
  margin: 0;
}

/* ========== Cards / Grids ========== */

.sw-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.sw-card {
  background-color: #ffffff;
  border-radius: var(--sw-radius-card);
  border: 1px solid var(--sw-border-subtle);
  padding: 1.2rem 1.25rem;
}

.sw-card-title {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.sw-card-text {
  font-size: 0.95rem;
  color: var(--sw-text-muted);
  margin: 0;
}

/* Steps */

.sw-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}

.sw-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: flex-start;
}

.sw-step-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #000;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.sw-step-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.sw-step-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--sw-text-muted);
}

/* Features grid */

.sw-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.sw-feature {
  background-color: #ffffff;
  border-radius: var(--sw-radius-card);
  border: 1px solid var(--sw-border-subtle);
  padding: 1.2rem 1.25rem;
}

.sw-feature-title {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
}

.sw-feature-text {
  margin: 0;
  font-size: 0.93rem;
  color: var(--sw-text-muted);
}

/* Plans */

.sw-plans-tabs {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sw-plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.sw-plan {
  background-color: #ffffff;
  border-radius: var(--sw-radius-card);
  border: 1px solid var(--sw-border-subtle);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sw-plan-highlight {
  border-color: #000000;
}

.sw-plan-name {
  font-size: 1rem;
  margin: 0;
}

.sw-plan-tagline {
  font-size: 0.85rem;
  color: var(--sw-text-muted);
  margin: 0;
}

.sw-plan-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--sw-text-muted);
}

.sw-plan-list li + li {
  margin-top: 0.25rem;
}

.sw-plans-footnote {
  font-size: 0.87rem;
  color: var(--sw-text-soft);
  margin: 0;
}

/* CTA section */

.sw-section-cta {
  background-color: #000000;
  color: #ffffff;
}

.sw-cta-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.7rem 1.8rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) auto;
  gap: 1.5rem;
  align-items: center;
}

.sw-cta-body .sw-section-title {
  margin-bottom: 0.5rem;
}

.sw-cta-body .sw-body-text {
  color: #f0f0f0;
}

.sw-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
}

/* Adjust buttons on dark */

.sw-section-cta .sw-btn-secondary {
  background-color: transparent;
  border-color: #ffffff;
  color: #ffffff;
}

.sw-section-cta .sw-btn-secondary:hover {
  background-color: #ffffff;
  color: #000000;
}

/* ========== Footer ========== */

.sw-footer {
  border-top: 1px solid var(--sw-border-subtle);
  background-color: #ffffff;
}

.sw-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
}

.sw-footer-text {
  font-size: 0.8rem;
  color: var(--sw-text-soft);
  margin: 0;
}

.sw-footer-nav {
  display: flex;
  gap: 1rem;
}

.sw-footer-link {
  font-size: 0.8rem;
  color: var(--sw-text-muted);
}

.sw-footer-link:hover {
  color: var(--sw-text-main);
}

/* ========== Responsive ========== */

@media (max-width: 960px) {
  .sw-header-inner {
    flex-wrap: wrap;
  }

  .sw-card-grid,
  .sw-feature-grid,
  .sw-plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sw-two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .sw-cta-card {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
  }

  .sw-cta-actions {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .sw-header-inner {
    padding-inline: 1rem;
    flex-wrap: wrap;
  }

  /* show hamburger on mobile */
  .sw-nav-toggle {
    display: inline-flex;
    margin-left: auto;
    order: 2;
  }

  .sw-nav {
    order: 3;
    width: 100%;
  }

  /* collapsed nav by default */
  .sw-nav-list {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--sw-border-subtle);
  }

  /* visible when header has .sw-nav-open */
  .sw-header.sw-nav-open .sw-nav-list {
    display: flex;
  }

  /* Request Demo button drops below nav */
  .sw-header-actions {
    order: 4;
    width: 100%;
    margin-top: 0.75rem;
    justify-content: flex-start;
  }

  .sw-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .sw-hero-aside {
    justify-content: flex-start;
  }

  .sw-hero-card {
    max-width: 100%;
  }

  .sw-card-grid,
  .sw-feature-grid,
  .sw-plans-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sw-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
