/* =========================================================
   Storm Cloud Systems — stylesheet
   Dark Swiss-minimalism with teal accents. Pure CSS.
   Design system informed by UI UX Pro Max + Magic MCP refs.
   ========================================================= */

:root {
  /* ----- Theme-stable tokens ----- */
  /* Brand (teal base — identical across themes) */
  --brand-primary: #0891b2;        /* teal-600 */
  --brand-primary-dark: #0e7490;   /* teal-700, CTA bg */
  --brand-primary-deeper: #155e75; /* teal-800, hover */

  /* Status (identical across themes) */
  --status-success: #10b981;
  --status-warning: #f59e0b;
  --status-danger: #ef4444;

  /* ----- Fallback: pure-dark tokens for browsers without light-dark() ----- */
  --brand-primary-light: #22d3ee;
  --bg-base: #020617;
  --bg-surface: #0b1222;
  --bg-elevated: #111a2e;
  --bg-card: #0f172a;
  --bg-card-hover: #131d36;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #78889f;
  --border-subtle: #1f2a44;
  --border-strong: #2d3a5a;
  --chip-bg: rgba(34, 211, 238, 0.10);
  --chip-border: rgba(34, 211, 238, 0.28);
  --chip-icon: var(--brand-primary-light);
  --header-bg: rgba(2, 6, 23, 0.7);
  --header-bg-scrolled: rgba(2, 6, 23, 0.92);
  --nav-hover-bg: rgba(255, 255, 255, 0.04);
  --focus-ring: 0 0 0 3px rgba(34, 211, 238, 0.55);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 40px -16px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 22px 60px -22px rgba(34, 211, 238, 0.4);

  /* Layout */
  --section-padding-y: 6rem;
  --section-padding-x: 1.5rem;
  --container-max: 1120px;
  --container-wide: 1280px;

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms var(--ease);
  --t-med: 250ms var(--ease);
  --t-slow: 400ms var(--ease-out);

  color-scheme: dark;
}

/* ----- Theme-aware tokens (modern browsers) ----- */
@supports (color: light-dark(black, white)) {
  :root {
    --brand-primary-light: light-dark(#0e7490, #22d3ee);

    --bg-base:        light-dark(#ffffff, #020617);
    --bg-surface:     light-dark(#f8fafc, #0b1222);
    --bg-elevated:    light-dark(#f1f5f9, #111a2e);
    --bg-card:        light-dark(#ffffff, #0f172a);
    --bg-card-hover:  light-dark(#f8fafc, #131d36);

    --text-primary:   light-dark(#0f172a, #f1f5f9);
    --text-secondary: light-dark(#475569, #94a3b8);
    --text-muted:     light-dark(#64748b, #78889f);

    --border-subtle:  light-dark(#e2e8f0, #1f2a44);
    --border-strong:  light-dark(#cbd5e1, #2d3a5a);

    --chip-bg:        light-dark(rgba(8, 145, 178, 0.08), rgba(34, 211, 238, 0.10));
    --chip-border:    light-dark(rgba(8, 145, 178, 0.28), rgba(34, 211, 238, 0.28));

    --header-bg:           light-dark(rgba(255, 255, 255, 0.78), rgba(2, 6, 23, 0.7));
    --header-bg-scrolled:  light-dark(rgba(255, 255, 255, 0.92), rgba(2, 6, 23, 0.92));
    --nav-hover-bg:        light-dark(rgba(15, 23, 42, 0.05), rgba(255, 255, 255, 0.04));

    --focus-ring: 0 0 0 3px light-dark(rgba(14, 116, 144, 0.45), rgba(34, 211, 238, 0.55));

    --shadow-sm:   light-dark(0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(0, 0, 0, 0.25));
    --shadow-md:   light-dark(0 6px 20px -8px rgba(15, 23, 42, 0.12), 0 6px 20px -8px rgba(0, 0, 0, 0.5));
    --shadow-lg:   light-dark(0 18px 40px -16px rgba(15, 23, 42, 0.14), 0 18px 40px -16px rgba(0, 0, 0, 0.5));
    --shadow-glow: light-dark(0 18px 50px -18px rgba(8, 145, 178, 0.22), 0 22px 60px -22px rgba(34, 211, 238, 0.4));
  }

  :root[data-theme="light"]  { color-scheme: light; }
  :root[data-theme="dark"]   { color-scheme: dark; }
  :root[data-theme="system"] { color-scheme: light dark; }
}

/* ---------------------------------------------------------
   Reset
   --------------------------------------------------------- */

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}

img, picture, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brand-primary-light);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: #67e8f9; }

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

/* Unified focus-visible — applies to all interactive elements */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* Reduced motion (UI UX Pro Max requirement) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------
   Typography
   --------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 4.8vw + 0.5rem, 3.75rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.875rem, 2.6vw + 0.75rem, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.028em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { color: var(--text-secondary); }

p.lead {
  font-size: clamp(1.125rem, 0.8vw + 0.9rem, 1.3125rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 38rem;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-primary-light);
  margin-bottom: 1rem;
}

.text-accent { color: var(--brand-primary-light); }

/* ---------------------------------------------------------
   Layout
   --------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

.container--wide { max-width: var(--container-wide); }

.section {
  padding: var(--section-padding-y) 0;
  position: relative;
}

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

.section--hero {
  padding-top: 8rem;
  padding-bottom: 6rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Geometric hero accents — skewed, blurred gradient bars (Magic MCP Hero 1 pattern) */
.section--hero::before,
.section--hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  filter: blur(96px);
  will-change: transform;
}

.section--hero::before {
  top: -15%;
  right: -20%;
  width: 70%;
  height: 55%;
  background: linear-gradient(100deg, transparent 10%, var(--brand-primary-light) 55%, transparent 90%);
  opacity: 0.22;
  transform: rotate(-22deg) skew(-38deg);
}

.section--hero::after {
  top: 25%;
  right: -40%;
  width: 55%;
  height: 40%;
  background: linear-gradient(100deg, var(--brand-primary) 10%, transparent 80%);
  opacity: 0.18;
  transform: rotate(-22deg) skew(-38deg);
}

.section--hero > .container {
  position: relative;
  z-index: 1;
}

.section__header {
  max-width: 46rem;
  margin-bottom: 3rem;
}

.section__header p { margin-top: 0.85rem; }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  letter-spacing: -0.005em;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  line-height: 1.2;
}

.btn-primary {
  background: var(--brand-primary-dark);          /* teal-700 — 5.36:1 white text, AA body passes */
  color: #fff;
  border-color: var(--brand-primary-dark);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 6px 14px -6px rgba(14, 116, 144, 0.55);
}

.btn-primary:hover {
  background: var(--brand-primary-deeper);        /* teal-800 */
  border-color: var(--brand-primary-deeper);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 10px 22px -8px rgba(14, 116, 144, 0.7);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--brand-primary-light);
  border-color: var(--brand-primary);
}

.btn-secondary:hover {
  background: rgba(8, 145, 178, 0.12);
  color: var(--brand-primary-light);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--text-muted);
}

.btn-large {
  padding: 0.95rem 1.7rem;
  font-size: 1rem;
}

.btn-group {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------------------------------------------------------
   Cards
   --------------------------------------------------------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: transform var(--t-med), border-color var(--t-med), box-shadow var(--t-med), background var(--t-med);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0), rgba(34, 211, 238, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  transition: background var(--t-med);
}

.card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card:hover::after {
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.5), rgba(34, 211, 238, 0.05));
}

a.card {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.card:hover .card__title { color: var(--brand-primary-light); }

/* Icon chip — Magic MCP FeatureGrid pattern (tinted bg + border + primary icon) */
.card__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-icon);
  flex-shrink: 0;
  margin-bottom: 0.25rem;
  transition: background var(--t-med), border-color var(--t-med);
}

.card:hover .card__icon {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.5);
}

.card__icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.75;
}

/* Stat / metric line (eyebrow-styled, above title) */
.card__stat {
  font-family: var(--font-display);
  color: var(--brand-primary-light);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card__title {
  margin: 0.25rem 0 0;
  transition: color var(--t-fast);
  font-size: 1.25rem;
  line-height: 1.3;
}

.card__body {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.card__link {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--brand-primary-light);
  font-weight: 600;
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap var(--t-fast);
}

.card:hover .card__link { gap: 0.55rem; }

/* Corner arrow — whole-card-as-link affordance (Magic MCP Grid-List-Link pattern) */
.card__arrow {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  opacity: 0.6;
  transition: opacity var(--t-fast), transform var(--t-fast), color var(--t-fast);
}

.card:hover .card__arrow {
  opacity: 1;
  color: var(--brand-primary-light);
  transform: translate(2px, -2px);
}

/* ---------------------------------------------------------
   Badges
   --------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--brand-primary-light);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
  animation: badge-pulse 3s var(--ease) infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2); }
  50%      { box-shadow: 0 0 0 5px rgba(34, 211, 238, 0); }
}

/* ---------------------------------------------------------
   Header & Nav
   --------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}

.header--scrolled {
  background: var(--header-bg-scrolled);
  border-bottom-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.25rem 0.35rem;
  margin-left: -0.35rem;
  border-radius: var(--radius-sm);
}

.header__logo:hover { color: var(--text-primary); }

.logo-mark {
  width: 28px;
  height: 28px;
  color: var(--brand-primary-light);
  flex-shrink: 0;
}

.logo-text { white-space: nowrap; }
.logo-accent { color: var(--brand-primary-light); }

.header__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header__nav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  transition: color var(--t-fast), background var(--t-fast);
}

.header__nav a:hover {
  color: var(--text-primary);
  background: var(--nav-hover-bg);
}

.header__nav .btn-primary {
  color: #fff;
  font-size: 0.9375rem;
  padding: 0.55rem 1.1rem;
  margin-left: 0.6rem;
}

.header__nav .btn-primary:hover { color: #fff; background: var(--brand-primary-dark); }

.header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-md);
}

.header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.header__toggle.toggle--active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header__toggle.toggle--active span:nth-child(2) { opacity: 0; }
.header__toggle.toggle--active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 820px) {
  .header__nav {
    position: fixed;
    inset: 4.5rem 0 0 0;
    background: var(--bg-base);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    transition: transform var(--t-med);
    border-top: 1px solid var(--border-subtle);
  }

  .header__nav.nav--open { transform: translateX(0); }

  .header__nav a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 1.125rem;
    border-radius: 0;
  }

  .header__nav a:hover { background: transparent; }

  .header__nav .btn-primary {
    margin: 1.5rem 0 0;
    padding: 0.95rem 1.25rem;
    font-size: 1rem;
    border-bottom: 0;
    justify-content: center;
  }

  .header__toggle { display: flex; }
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero { max-width: 54rem; }

.hero h1 { margin-bottom: 1.5rem; }

.hero .lead { line-height: 1.6; }

/* ---------------------------------------------------------
   Problem grid (homepage)
   --------------------------------------------------------- */

.problem-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ---------------------------------------------------------
   Service flow (Assess → Build → Operate)
   --------------------------------------------------------- */

.service-flow {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
  position: relative;
}

@media (min-width: 900px) {
  .service-flow { grid-template-columns: repeat(3, 1fr); }
}

.flow-step {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  transition: border-color var(--t-med), transform var(--t-med);
}

.flow-step:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.flow-step__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--brand-primary-light);
  letter-spacing: 0.18em;
  margin-bottom: 0.55rem;
}

.flow-step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.flow-step__meta {
  color: var(--brand-primary-light);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.flow-step__body {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.flow-step__arrow {
  display: none;
  position: absolute;
  right: -1.35rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--border-strong);
  width: 1.35rem;
}

@media (min-width: 900px) {
  .service-flow .flow-step:not(:last-child) .flow-step__arrow { display: block; }
}

/* ---------------------------------------------------------
   Services table (homepage)
   --------------------------------------------------------- */

.service-table {
  margin-top: 3rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-card);
}

.service-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  font-size: 0.9375rem;
  transition: background var(--t-fast);
}

.service-row:hover { background: var(--nav-hover-bg); }

.service-row:last-child { border-bottom: 0; }

.service-row--head {
  background: var(--bg-elevated);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.service-row--head:hover { background: var(--bg-elevated); }

.service-row__name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.service-row__name a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}

.service-row__name a:hover { color: var(--brand-primary-light); }

.service-row__cell {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.service-row__price {
  color: var(--brand-primary-light);
  font-weight: 500;
  display: block;
  margin-top: 0.15rem;
}

@media (max-width: 820px) {
  .service-row,
  .service-row--head {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.35rem 1.25rem;
  }

  .service-row--head { display: none; }

  .service-row__cell::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-display);
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
  }
}

/* ---------------------------------------------------------
   Value props (Why SCS)
   --------------------------------------------------------- */

.value-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
}

@media (min-width: 720px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
}

.value {
  padding: 1.5rem 1.75rem;
  border-left: 2px solid var(--brand-primary);
  background: var(--bg-surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  transition: border-color var(--t-med), transform var(--t-med);
}

.value:hover {
  border-color: var(--brand-primary-light);
  transform: translateX(3px);
}

.value h3 {
  font-size: 1.25rem;
  margin-bottom: 0.55rem;
  color: var(--text-primary);
}

.value p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ---------------------------------------------------------
   CTA banner
   --------------------------------------------------------- */

.cta-banner {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-elevated));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(34, 211, 238, 0.15), transparent 70%),
    radial-gradient(ellipse 40% 50% at 100% 100%, rgba(8, 145, 178, 0.12), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.cta-banner h2 { margin-bottom: 0.85rem; }

.cta-banner p {
  max-width: 42rem;
  margin: 0 auto 2rem;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.cta-banner .btn-group {
  justify-content: center;
  margin-top: 0;
}

/* ---------------------------------------------------------
   Pricing tiers (service pages)
   --------------------------------------------------------- */

.pricing-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-top: 2.5rem;
  align-items: stretch;
}

@media (min-width: 900px) {
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}

.pricing-tier {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med);
}

.pricing-tier:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

/* Featured middle tier — subtle gradient tint + pill badge + glow */
.pricing-tier--featured {
  background:
    linear-gradient(160deg, rgba(8, 145, 178, 0.14), rgba(15, 23, 42, 0) 55%),
    var(--bg-card);
  border-color: var(--brand-primary);
  box-shadow:
    0 0 0 1px var(--brand-primary) inset,
    var(--shadow-glow);
}

.pricing-tier--featured:hover {
  border-color: var(--brand-primary-light);
  transform: translateY(-5px);
  box-shadow:
    0 0 0 1px var(--brand-primary-light) inset,
    0 30px 70px -20px rgba(34, 211, 238, 0.45);
}

.pricing-tier--featured::before {
  content: "Most Popular";
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 16px -4px rgba(8, 145, 178, 0.5);
  white-space: nowrap;
}

.pricing-tier__label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-primary-light);
}

.pricing-tier__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pricing-tier__tagline {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.pricing-tier__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.875rem;
  color: var(--text-primary);
  line-height: 1.1;
  margin-top: 0.25rem;
  letter-spacing: -0.03em;
}

.pricing-tier__duration {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-family: var(--font-display);
  font-weight: 500;
  margin-top: 0.15rem;
}

.pricing-tier__divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.5rem 0;
}

.pricing-tier--featured .pricing-tier__divider { background: rgba(34, 211, 238, 0.2); }

.pricing-tier__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.pricing-tier__list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  line-height: 1.5;
}

.pricing-tier__list li::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322d3ee' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
}

.pricing-tier__outcome {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.05rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pricing-tier--featured .pricing-tier__outcome {
  background: rgba(34, 211, 238, 0.06);
  border-color: rgba(34, 211, 238, 0.2);
}

.pricing-tier__outcome strong {
  color: var(--brand-primary-light);
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-display);
}

.pricing-tier .btn {
  margin-top: auto;
  width: 100%;
}

.risk-reversal {
  margin-top: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.55;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.risk-reversal::before {
  content: "";
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/></svg>") center/contain no-repeat;
}

/* ---------------------------------------------------------
   Process timeline
   --------------------------------------------------------- */

.process {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .process { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

.process-step {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  position: relative;
  transition: border-color var(--t-med);
}

.process-step:hover { border-color: var(--border-strong); }

.process-step__day {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-primary-light);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
}

.process-step__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.process-step__body {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

/* ---------------------------------------------------------
   Cross-sell
   --------------------------------------------------------- */

.cross-sell {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .cross-sell { grid-template-columns: 1fr 1fr; }
}

.cross-sell a.card {
  gap: 0.5rem;
  padding: 1.5rem;
}

.cross-sell .card__title { font-size: 1.125rem; }

/* ---------------------------------------------------------
   Bulleted lists (signal / cost bullets)
   --------------------------------------------------------- */

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 0.85rem;
}

.bullet-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.bullet-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 0.7rem;
  background: var(--brand-primary-light);
  border-radius: 50%;
  flex-shrink: 0;
}

.bullet-list--warn li::before { background: var(--status-warning); }
.bullet-list--danger li::before { background: var(--status-danger); }

.dollar {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------------------------------------------------------
   Forms
   --------------------------------------------------------- */

.form {
  display: grid;
  gap: 1rem;
  max-width: 38rem;
  margin-top: 2rem;
}

.form__row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .form__row { grid-template-columns: 1fr 1fr; }
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form input,
.form textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
}

.form input:hover,
.form textarea:hover { border-color: var(--border-strong); }

.form input:focus,
.form textarea:focus {
  outline: 0;
  border-color: var(--brand-primary);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.25);
}

/* Validation — only after user has typed & field is invalid */
.form input:not(:placeholder-shown):invalid,
.form textarea:not(:placeholder-shown):invalid {
  border-color: rgba(239, 68, 68, 0.6);
}

.form input:not(:placeholder-shown):invalid:focus,
.form textarea:not(:placeholder-shown):invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.form textarea {
  min-height: 150px;
  resize: vertical;
}

.form button[type="submit"] {
  justify-self: start;
}

.form button[type="submit"][data-loading="true"] {
  pointer-events: none;
  opacity: 0.7;
}

.form-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--text-primary);
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  line-height: 1.55;
}

/* biz/forms status element — set by submit-form.js */
.form-status {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.form-status[hidden] {
  display: none;
}

.form-status[data-biz-state="pending"] {
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

.form-status[data-biz-state="success"] {
  color: var(--text-primary);
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.form-status[data-biz-state="error"] {
  color: var(--text-primary);
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.35);
}

/* ---------------------------------------------------------
   Booking CTA (external link to Tymeslot scheduler)
   --------------------------------------------------------- */

.booking-cta {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med), background var(--t-med);
  box-shadow: var(--shadow-sm);
}

.booking-cta:hover {
  border-color: var(--brand-primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  color: inherit;
}

.booking-cta__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-md);
  color: var(--brand-primary-light);
}

.booking-cta__icon svg {
  width: 24px;
  height: 24px;
}

.booking-cta__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1 1 auto;
  min-width: 0;
}

.booking-cta__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1.3;
}

.booking-cta:hover .booking-cta__title {
  color: var(--brand-primary-light);
}

.booking-cta__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.booking-cta__host {
  color: var(--brand-primary-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--bg-elevated);
  padding: 0.08rem 0.4rem;
  border-radius: var(--radius-sm);
}

.booking-cta__arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--t-fast), transform var(--t-fast);
}

.booking-cta:hover .booking-cta__arrow {
  color: var(--brand-primary-light);
  transform: translate(3px, -3px);
}

@media (max-width: 640px) {
  .booking-cta {
    padding: 1.25rem 1.35rem;
    gap: 0.9rem;
  }
  .booking-cta__arrow {
    align-self: flex-start;
  }
}

/* ---------------------------------------------------------
   Expectations list
   --------------------------------------------------------- */

.expect {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.85rem;
  counter-reset: expect;
}

.expect li {
  counter-increment: expect;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem 1.1rem 3.75rem;
  color: var(--text-secondary);
  position: relative;
  line-height: 1.55;
  transition: border-color var(--t-fast);
}

.expect li:hover { border-color: var(--border-strong); }

.expect li::before {
  content: counter(expect);
  position: absolute;
  left: 1rem;
  top: 1.05rem;
  width: 1.85rem;
  height: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--brand-primary-light);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer__inner {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 820px) {
  .footer__inner { grid-template-columns: 1.5fr 1fr 1fr; }
}

.footer__col h4 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer__col p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 0.85rem;
  max-width: 28rem;
}

.footer__col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  padding: 0.35rem 0;
  transition: color var(--t-fast);
}

.footer__col a:hover { color: var(--brand-primary-light); }

.footer__sagacitec {
  font-size: 0.875rem !important;
  color: var(--text-muted) !important;
}

.footer__sagacitec a {
  display: inline !important;
  color: var(--brand-primary-light) !important;
  padding: 0 !important;
}

.footer__bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------------
   Utility
   --------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stack-lg > * + * { margin-top: 1.5rem; }
.stack-xl > * + * { margin-top: 2.5rem; }

@media (max-width: 820px) {
  :root {
    --section-padding-y: 4rem;
  }
  .section--hero {
    padding-top: 5rem;
    padding-bottom: 4rem;
  }
  .pricing-tier--featured::before { font-size: 0.6875rem; }
}

/* ---------------------------------------------------------
   Theme switcher (segmented: light / system / dark)
   --------------------------------------------------------- */

.theme-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  margin-left: 0.4rem;
}

.theme-switch button {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: 0;
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}

.theme-switch button:hover {
  color: var(--text-primary);
  background: var(--nav-hover-bg);
}

.theme-switch button[aria-pressed="true"] {
  background: var(--bg-base);
  color: var(--brand-primary-light);
  box-shadow: var(--shadow-sm);
}

.theme-switch svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

@media (max-width: 820px) {
  .theme-switch {
    margin: 1rem 0 0;
    align-self: flex-start;
  }
}

