/* turnkeytel.com — Premium Dark design system (Phase 2)
 * Inspired by Linear / Stripe-dark / Vercel.
 * Single typeface (Inter), no blueprint grid, hairline rules,
 * generous whitespace, restrained teal accent.
 */

/* ============================================================
 * 1. TOKENS
 * ============================================================ */
:root {
  /* Surface */
  --c-bg:           #0a0b14;
  --c-surface-1:    #10121f;
  --c-surface-2:    #171a2c;
  --c-surface-3:    #1f2238;

  /* Border */
  --c-border:        rgba(255, 255, 255, 0.07);
  --c-border-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --c-text:        #f5f5f7;
  --c-text-muted:  #9ca3af;
  --c-text-dim:    #6b7280;

  /* Accent */
  --c-accent:       #06b6d4;
  --c-accent-hover: #22d3ee;
  --c-accent-soft:  rgba(6, 182, 212, 0.12);
  --c-accent-glow:  rgba(6, 182, 212, 0.35);

  /* Status */
  --c-success: #4ade80;
  --c-warn:    #f59e0b;

  /* Type */
  --f-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
            Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-card-hover: 0 12px 40px -16px rgba(0, 0, 0, 0.7);
  --shadow-glow:       0 30px 80px -30px var(--c-accent-glow);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-med:  220ms;
}

/* ============================================================
 * 2. RESET / BASE
 * ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

body { min-height: 100vh; }

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

::selection { background: var(--c-accent); color: var(--c-bg); }

/* ============================================================
 * 3. TYPOGRAPHY
 * ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--f-sans);
  color: var(--c-text);
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
}
h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
}
h3 {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--c-text-muted); max-width: 65ch; }

p.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--c-text);
  max-width: 60ch;
  line-height: 1.55;
}

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
a:hover { color: var(--c-accent-hover); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 1.2em;
  font-feature-settings: "tnum";
}

/* ============================================================
 * 4. LAYOUT
 * ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

section {
  padding: clamp(96px, 14vw, 180px) 0;
  position: relative;
}

/* Hairline section divider — appears between consecutive sections only */
section + section {
  border-top: 1px solid var(--c-border);
}

/* Optional elevated section background */
.section-elevated {
  background: var(--c-surface-1);
}

/* ============================================================
 * 5. HERO
 * ============================================================ */
.hero {
  padding: clamp(120px, 18vw, 220px) 0 clamp(96px, 14vw, 160px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--c-bg);
  background-image:
    linear-gradient(
      180deg,
      rgba(10, 11, 20, 0.88) 0%,
      rgba(10, 11, 20, 0.5) 38%,
      rgba(10, 11, 20, 0.92) 100%
    ),
    radial-gradient(
      ellipse 85% 60% at 50% -5%,
      rgba(6, 182, 212, 0.2) 0%,
      rgba(6, 182, 212, 0.07) 32%,
      transparent 68%
    ),
    linear-gradient(
      135deg,
      transparent 0%,
      rgba(6, 182, 212, 0.04) 50%,
      transparent 100%
    ),
    url("../img/hero-dev.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero::before {
  /* extra radial lift for headline legibility */
  content: "";
  position: absolute;
  top: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1400px, 110%);
  height: 800px;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(6, 182, 212, 0.12) 0%,
    rgba(6, 182, 212, 0.04) 28%,
    transparent 65%
  );
  pointer-events: none;
  z-index: -2;
}

.hero::after {
  /* subtle vignette on edges of hero photo */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 120% 80% at 50% 40%,
    transparent 40%,
    rgba(10, 11, 20, 0.55) 100%
  );
  pointer-events: none;
  z-index: -1;
}

.hero-inner { position: relative; }

.hero h1 { max-width: 22ch; }

.hero p.lede { margin-top: 1.6em; max-width: 52ch; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 40px;
  font-size: 0.82rem;
  color: var(--c-text-dim);
  font-weight: 500;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-accent);
  opacity: 0.7;
}

/* ============================================================
 * 6. NAV
 * ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 11, 20, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--c-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--c-text); }
/* The approved brushed FLUX Phi (website/static/img/flux-phi.png is the canonical source; this is its
   transparent cut-out). Colour comes from currentColor. The glow is a filter on the OUTER span because a
   CSS filter runs before mask, so a glow on the masked element itself would be clipped away. This site
   has one (dark) theme; tune --phi-glow-core and --phi-glow-halo if a light theme is ever added. */
.brand-mark {
  --phi-glow-core: 0.55;
  --phi-glow-halo: 0.35;
  display: inline-block;
  width: 30px;
  height: 30px;
  color: var(--c-accent);
  flex: 0 0 auto;
  filter: drop-shadow(0 0 3px rgba(6, 182, 212, var(--phi-glow-core)))
          drop-shadow(0 0 10px rgba(6, 182, 212, var(--phi-glow-halo)));
}
.brand-mark > i {
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask: url("../img/flux-phi-mark.png") center / contain no-repeat;
  mask: url("../img/flux-phi-mark.png") center / contain no-repeat;
}
.brand-status {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-success);
  margin-left: 4px;
  position: relative;
}
.brand-status::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--c-success);
  opacity: 0;
  animation: brand-pulse 2.6s var(--ease-out) infinite;
}
@keyframes brand-pulse {
  0%   { transform: scale(0.8); opacity: 0.45; }
  100% { transform: scale(1.6); opacity: 0; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.92rem;
}
.nav-links a:not(.btn) {
  color: var(--c-text-muted);
  font-weight: 500;
  transition: color var(--t-fast) var(--ease-out);
}
.nav-links a:not(.btn):hover { color: var(--c-text); }
.nav-links a:not(.btn).active { color: var(--c-text); }
/* Belt + suspenders: force btn colors inside nav (defeats source-order issues). */
.nav-links a.btn-primary { color: #0a0b14; font-weight: 700; }
.nav-links a.btn-primary:hover { color: #0a0b14; }

/* ============================================================
 * 7. BUTTONS
 * ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--f-sans);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--c-accent);
  color: #0a0b14;
  font-weight: 700;
  letter-spacing: 0.005em;
}
.btn-primary:hover {
  background: var(--c-accent-hover);
  color: #0a0b14;
  box-shadow: 0 0 0 4px var(--c-accent-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border-strong);
}
.btn-ghost:hover {
  background: var(--c-accent-soft);
  border-color: var(--c-accent);
  color: var(--c-text);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* ============================================================
 * 8. SERVICES (3-up)
 * ============================================================ */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.service {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: clamp(32px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  transition:
    transform var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out),
    background var(--t-med) var(--ease-out);
}
.service:hover {
  transform: translateY(-3px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card-hover);
  background: var(--c-surface-3);
}

.service-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 28px;
  color: var(--c-accent);
}

.service-tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-bottom: 12px;
}

.service-name {
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--c-text);
}
.service-name span {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-dim);
  letter-spacing: 0;
  text-transform: none;
  margin-top: 4px;
}

.service-sub {
  color: var(--c-text);
  font-weight: 500;
  margin: 0 0 14px;
  font-size: 1rem;
}

.service > p {
  font-size: 0.95rem;
  flex: 1 1 auto;
  margin-bottom: 24px;
}

.service-proof {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
  line-height: 1.5;
}
.service-proof .proof-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 6px;
}

/* ============================================================
 * 9. SELECTED WORK
 * ============================================================ */
.work-feature {
  margin-top: 40px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface-1);
  box-shadow: var(--shadow-card-hover);
}
.work-feature picture,
.work-feature img {
  width: 100%;
  height: auto;
  display: block;
}
.work-feature-caption {
  padding: 16px 20px 18px;
  font-size: 0.85rem;
  color: var(--c-text-dim);
  text-align: center;
  border-top: 1px solid var(--c-border);
  margin: 0;
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 56px;
}

.work-row {
  display: grid;
  grid-template-columns: 64px 1fr 200px;
  gap: 32px;
  align-items: start;
  padding: 32px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition:
    border-color var(--t-med) var(--ease-out),
    background var(--t-med) var(--ease-out),
    transform var(--t-med) var(--ease-out);
}
.work-row:hover {
  border-color: var(--c-border-strong);
  background: var(--c-surface-3);
  transform: translateY(-2px);
}
.work-row .idx {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-accent);
  letter-spacing: 0.04em;
}
.work-row h3 { margin: 0 0 8px; font-size: 1.18rem; }
.work-row p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--c-text-muted);
}
.work-row .meta {
  text-align: right;
  font-size: 0.82rem;
  color: var(--c-text-dim);
  line-height: 1.55;
}

/* ============================================================
 * 10. STATS
 * ============================================================ */
.operator-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.operator-copy .stats {
  margin-top: 48px;
}

.operator-photo {
  margin: 0;
  position: sticky;
  top: 88px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface-2);
  box-shadow: var(--shadow-card-hover);
}
.operator-photo picture,
.operator-photo img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.95) contrast(1.02);
}
.operator-photo-caption {
  padding: 12px 16px 14px;
  font-size: 0.78rem;
  color: var(--c-text-dim);
  line-height: 1.45;
  border-top: 1px solid var(--c-border);
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 64px;
}

.stat {
  padding: 0;
  border: 0;
  position: relative;
}
.stat-num {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-text);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--c-text-dim);
  font-weight: 500;
}

/* ============================================================
 * 11. FLUXENGINE — architecture diagram
 * ============================================================ */
.flux-arch {
  margin: 56px 0 0;
  padding: clamp(20px, 2.5vw, 32px);
  background: var(--c-surface-1);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  position: relative;
}
.flux-arch picture,
.flux-arch img {
  display: block;
  width: 100%;
  max-width: 1040px;
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
}

.flux-arch-caption {
  font-size: 0.85rem;
  color: var(--c-text-dim);
  text-align: center;
  margin-top: 20px;
}

.digest-split {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  margin-top: 48px;
}
.digest-copy {
  max-width: 680px;
  width: 100%;
  text-align: center;
}
.digest-copy .eyebrow {
  margin-bottom: 0.8em;
}
.digest-copy .digest-h {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.digest-copy p {
  color: var(--c-text-muted);
  font-size: 1rem;
  margin: 0 auto 28px;
  max-width: 52ch;
}
.digest-points {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 640px;
  text-align: left;
  border-top: 1px solid var(--c-border);
}
.digest-points li {
  display: grid;
  grid-template-columns: auto 140px 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.95rem;
}
.digest-points li .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  flex: 0 0 auto;
  align-self: center;
}
.digest-points li .dot-amber { background: var(--c-warn); }
.digest-points li strong {
  color: var(--c-text);
  font-weight: 600;
}
.digest-points li > span:last-child {
  color: var(--c-text-muted);
}

.digest-shot {
  margin: 0 auto;
  max-width: 680px;
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface-1);
  box-shadow: var(--shadow-card-hover);
}
.digest-shot picture,
.digest-shot img {
  width: 100%;
  height: auto;
  display: block;
}
.digest-shot-caption {
  padding: 14px 18px 16px;
  font-size: 0.85rem;
  color: var(--c-text-dim);
  text-align: center;
  border-top: 1px solid var(--c-border);
  margin: 0;
}

@media (max-width: 720px) {
  .digest-split {
    gap: 40px;
  }
  .digest-shot {
    max-width: 480px;
  }
  .digest-points li {
    grid-template-columns: auto 1fr;
  }
  .digest-points li > span:last-child {
    grid-column: 2 / -1;
    margin-top: 4px;
  }
}

.flux-iso-shot {
  margin: 48px 0 0;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 50% 30%, rgba(6, 182, 212, 0.08), var(--c-surface-1));
}
.flux-iso-shot picture,
.flux-iso-shot img {
  width: 100%;
  height: auto;
  display: block;
}
.flux-iso-caption {
  padding: 14px 18px 16px;
  font-size: 0.85rem;
  color: var(--c-text-dim);
  text-align: center;
  border-top: 1px solid var(--c-border);
  margin: 0;
}

/* ============================================================
 * 12. TIER CARDS
 * ============================================================ */
.tier-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 56px;
  align-items: stretch;
}

.tier-card {
  position: relative;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 36px 28px 30px;
  display: flex;
  flex-direction: column;
  transition:
    transform var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out);
}
.tier-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card-hover);
}
.tier-card .tier-name {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}
.tier-card .tier-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1;
  margin-top: 12px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.tier-card .tier-price .currency {
  font-size: 1rem;
  color: var(--c-text-muted);
  font-weight: 500;
  vertical-align: super;
  margin-right: 2px;
}
.tier-card .tier-price .per {
  display: block;
  font-size: 0.72rem;
  color: var(--c-text-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}
.tier-card .tier-replaces {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--c-surface-1);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  color: var(--c-text-muted);
  line-height: 1.45;
}
.tier-card .tier-replaces strong {
  color: var(--c-accent);
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.tier-card .tier-features {
  list-style: none;
  padding: 0;
  margin: 24px 0 28px;
  flex: 1 1 auto;
}
.tier-card .tier-features li {
  font-size: 0.92rem;
  color: var(--c-text);
  padding: 9px 0 9px 24px;
  position: relative;
  border-bottom: 1px solid var(--c-border);
  line-height: 1.4;
}
.tier-card .tier-features li:last-child { border-bottom: 0; }
.tier-card .tier-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background: var(--c-accent-soft);
  border-radius: 50%;
}
.tier-card .tier-features li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 6px;
  height: 3px;
  margin-top: -1px;
  border-left: 1.5px solid var(--c-accent);
  border-bottom: 1.5px solid var(--c-accent);
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}
.tier-card .tier-cta { margin-top: auto; }

/* Recommended */
.tier-card.recommended {
  border-color: var(--c-accent);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.06) 0%, var(--c-surface-2) 50%);
  box-shadow: 0 0 0 1px var(--c-accent), var(--shadow-glow);
}
.tier-card.recommended:hover {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent), 0 30px 80px -20px var(--c-accent-glow);
}
.tier-card .tier-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-accent);
  color: #0a0b14;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

/* ============================================================
 * 13. FLUX EXTRAS — add-ons + industry packs
 * ============================================================ */
.flux-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
.flux-extra {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px 28px;
  transition: border-color var(--t-med) var(--ease-out), background var(--t-med) var(--ease-out);
}
.flux-extra:hover {
  border-color: var(--c-border-strong);
  background: var(--c-surface-3);
}
.flux-extra .extras-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 14px;
}
.flux-extra ul { list-style: none; padding: 0; margin: 0; }
.flux-extra ul li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.92rem;
  color: var(--c-text);
}
.flux-extra ul li:last-child { border-bottom: 0; }
.flux-extra ul li .price { color: var(--c-accent); font-weight: 500; flex: 0 0 auto; }
.flux-extra ul li.bundle {
  border-top: 1px solid var(--c-accent);
  margin-top: 8px;
  padding-top: 14px;
}
.flux-extra ul li.bundle .label { color: var(--c-accent); font-weight: 600; }

/* ============================================================
 * 14. PROCESS FLOW
 * ============================================================ */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  margin-top: 56px;
}
.flow .step {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition:
    transform var(--t-med) var(--ease-out),
    border-color var(--t-med) var(--ease-out),
    background var(--t-med) var(--ease-out);
}
.flow .step:hover {
  transform: translateY(-2px);
  border-color: var(--c-border-strong);
  background: var(--c-surface-3);
}
.flow .step .step-num {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--c-accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.flow .step h3 { font-size: 1.18rem; margin: 0 0 12px; }
.flow .step p { font-size: 0.95rem; margin-bottom: 16px; flex: 1 1 auto; }
.flow .step .step-meta {
  font-size: 0.78rem;
  color: var(--c-text-dim);
  padding-top: 14px;
  border-top: 1px solid var(--c-border);
}
.flow .step .step-meta strong { color: var(--c-text); font-weight: 600; }

.flow .arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}
.flow .arrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--c-border-strong), var(--c-accent));
}
.flow .arrow::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--c-accent);
}

/* ============================================================
 * 15. FAQ
 * ============================================================ */
.faq {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface-2);
  margin-top: 64px;
}
.faq details { border-bottom: 1px solid var(--c-border); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 28px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--c-accent);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  transition: transform var(--t-med) var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: var(--c-surface-3); }
.faq-body {
  padding: 4px 28px 24px;
  color: var(--c-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ============================================================
 * 16. FORM
 * ============================================================ */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 44px);
}
.form .full { grid-column: 1 / -1; }
.form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  margin-bottom: 8px;
}
.form input,
.form textarea {
  width: 100%;
  background: var(--c-surface-1);
  border: 1px solid var(--c-border-strong);
  color: var(--c-text);
  padding: 12px 14px;
  font-family: var(--f-sans);
  font-size: 0.95rem;
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.form input::placeholder, .form textarea::placeholder {
  color: var(--c-text-dim);
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.form textarea { min-height: 130px; resize: vertical; }
.form .submit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.form .note { font-size: 0.82rem; color: var(--c-text-dim); }

/* Flash messages */
.flashes { margin: 24px 0 0; padding: 0; list-style: none; }
.flashes li {
  padding: 12px 18px;
  border-radius: var(--r-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--c-text);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

/* ============================================================
 * 17. FOOTER
 * ============================================================ */
.footer {
  padding: 80px 0 32px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface-1);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.footer-col h4 {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-col ul li a {
  color: var(--c-text);
  font-weight: 400;
}
.footer-col ul li a:hover { color: var(--c-accent); }
.footer-tagline {
  color: var(--c-text-muted);
  font-size: 0.92rem;
  margin-top: 16px;
  max-width: 30ch;
  line-height: 1.55;
}
.footer-base {
  border-top: 1px solid var(--c-border);
  margin-top: 56px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--c-text-dim);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-base .status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
 * 18. UTILITIES — skip link, scroll progress, fade-up reveal
 * ============================================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-accent);
  color: var(--c-bg);
  padding: 12px 18px;
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 100;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
  outline: 2px solid var(--c-text);
  outline-offset: 2px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--c-accent);
  z-index: 70;
  pointer-events: none;
  transition: width 60ms linear;
  opacity: 0.85;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* fade-up reveal hook */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 600ms var(--ease-out),
    transform 600ms var(--ease-out);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* Mobile nav button (hidden on desktop) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--c-border-strong);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
}

/* ============================================================
 * 19. THANK-YOU CARD
 * ============================================================ */
.thanks-card {
  max-width: 560px;
  margin: 120px auto;
  text-align: center;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 64px 36px;
}
.thanks-card .mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 28px;
  color: var(--c-accent);
}

/* ============================================================
 * 20. RESPONSIVE
 * ============================================================ */
@media (max-width: 960px) {
  .services { grid-template-columns: 1fr; }
  .work-row { grid-template-columns: 1fr; gap: 12px; }
  .work-row .meta { text-align: left; }
  .flux-extras { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { padding: 12px 0; transform: rotate(90deg); }
  .operator-split {
    grid-template-columns: 1fr;
  }
  .operator-photo {
    position: static;
    order: -1;
  }
  .operator-copy .stats {
    margin-top: 40px;
  }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-surface-1);
    border-bottom: 1px solid var(--c-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--c-border);
  }
  .nav-links a:last-child { border-bottom: 0; margin-top: 12px; text-align: center; }
  section { padding: 80px 0; }
  .hero { padding: 96px 0 64px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .form { grid-template-columns: 1fr; }
}

/* ============================================================
 * 21. REDUCED MOTION + PRINT
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .nav, .footer, .scroll-progress, .skip-link { display: none; }
  body { background: white; color: black; }
}

/* ============================================================
 * 22. VI CHATBOT
 * ============================================================ */
.chat {
  margin: 56px auto 0;
  max-width: 760px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  height: min(620px, 80vh);
  overflow: hidden;
  box-shadow: var(--shadow-card-hover);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--c-surface-1);
  border-bottom: 1px solid var(--c-border);
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--c-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--c-surface-3);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.12);
}
.chat-avatar picture,
.chat-avatar img {
  width: 100%;
  height: 100%;
  display: block;
}
.chat-avatar img {
  object-fit: cover;
  object-position: center 25%; /* favor face over suit/tie */
}
.chat-id { flex: 1 1 auto; min-width: 0; }
.chat-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chat-status {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-success);
  position: relative;
}
.chat-status::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--c-success);
  opacity: 0;
  animation: brand-pulse 2.6s var(--ease-out) infinite;
}
.chat-sub {
  font-size: 0.78rem;
  color: var(--c-text-dim);
  margin-top: 2px;
}
.chat-clear {
  background: transparent;
  border: 1px solid var(--c-border-strong);
  color: var(--c-text-muted);
  font-family: var(--f-sans);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.chat-clear:hover { color: var(--c-text); border-color: var(--c-border-strong); }

.chat-stream {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  /* Firefox scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--c-border-strong) transparent;
  /* Wheel: when there's nothing to scroll inside, let it bubble to the page */
  overscroll-behavior: auto;
}
.chat-stream::-webkit-scrollbar { width: 8px; }
.chat-stream::-webkit-scrollbar-track { background: transparent; }
.chat-stream::-webkit-scrollbar-thumb {
  background: var(--c-border-strong);
  border-radius: 4px;
}

.msg {
  display: flex;
  max-width: 85%;
}
.msg-body {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg-body code {
  background: rgba(6,182,212,0.1);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.msg-body strong { color: var(--c-text); font-weight: 600; }
.msg-body em { color: var(--c-text); font-style: italic; }

.msg-bot {
  align-self: flex-start;
}
.msg-bot .msg-body {
  background: var(--c-surface-3);
  border: 1px solid var(--c-border);
  color: var(--c-text);
}

.msg-user {
  align-self: flex-end;
}
.msg-user .msg-body {
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent);
  color: var(--c-text);
}

.msg-system {
  align-self: center;
  max-width: 95%;
}
.msg-system .msg-body {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--c-text);
  font-size: 0.85rem;
  text-align: center;
}

/* streaming caret */
.msg-body .caret {
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--c-accent);
  animation: chat-caret 1s steps(1) infinite;
}
@keyframes chat-caret {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* typing indicator */
.msg-typing .msg-body {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.msg-typing .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-text-dim);
  animation: chat-dot 1.4s infinite ease-in-out both;
}
.msg-typing .dot:nth-child(1) { animation-delay: -0.32s; }
.msg-typing .dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes chat-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40%           { transform: scale(1.0); opacity: 1; }
}

.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface-1);
}
.chat-input input {
  flex: 1 1 auto;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border-strong);
  color: var(--c-text);
  padding: 12px 16px;
  font-family: var(--f-sans);
  font-size: 0.95rem;
  border-radius: var(--r-pill);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.chat-input input::placeholder { color: var(--c-text-dim); }
.chat-input input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.chat-input input:disabled { opacity: 0.6; cursor: not-allowed; }

.chat-send {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #0a0b14;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.chat-send svg { width: 18px; height: 18px; }
.chat-send:hover { background: var(--c-accent-hover); transform: translateY(-1px); }
.chat-send:active { transform: translateY(0); }
.chat-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.chat-foot {
  padding: 12px 20px 14px;
  font-size: 0.74rem;
  color: var(--c-text-dim);
  text-align: center;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface-1);
}

.chat-noscript {
  margin-top: 32px;
  padding: 18px 20px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  color: var(--c-text-muted);
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .chat { height: min(560px, 75vh); }
  .chat-header { padding: 12px 14px; }
  .chat-stream { padding: 18px 14px 10px; }
  .chat-input { padding: 12px; gap: 8px; }
  .chat-input input { padding: 10px 14px; font-size: 0.92rem; }
  .chat-send { width: 40px; height: 40px; }
  .msg { max-width: 92%; }
}

/* ============================================================
 * 23. AGENT LEGEND (under fluxengine-isometric image)
 * ============================================================ */
.agent-legend {
  margin-top: 32px;
}
.agent-legend-head {
  text-align: center;
  margin-bottom: 28px;
}
.agent-legend-head .eyebrow {
  margin-bottom: 8px;
}
.agent-legend-head p {
  color: var(--c-text-muted);
  font-size: 0.92rem;
  margin: 0 auto;
  max-width: 52ch;
}

.agent-legend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.agent-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition:
    transform var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    background var(--t-fast) var(--ease-out);
}
.agent-chip:hover {
  transform: translateY(-2px);
  border-color: var(--c-border-strong);
  background: var(--c-surface-3);
}
.agent-chip svg {
  width: 22px;
  height: 22px;
  color: var(--c-accent);
  flex: 0 0 auto;
}
.agent-chip-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.2;
}
.agent-chip-sub {
  font-size: 0.78rem;
  color: var(--c-text-dim);
  margin-top: 2px;
}

@media (max-width: 860px) {
  .agent-legend-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .agent-legend-grid {
    grid-template-columns: 1fr;
  }
}


/* ---- Polish pass 2026-08-06: iconography ---- */
.stat-icon {
  width: 26px;
  height: 26px;
  color: var(--c-accent);
  margin-bottom: 12px;
}

.flow .step .step-icon {
  width: 30px;
  height: 30px;
  color: var(--c-accent);
  margin-bottom: 16px;
}

.work-row .idx svg {
  width: 22px;
  height: 22px;
  color: var(--c-accent);
  display: block;
  margin-top: 10px;
  opacity: 0.85;
}
