/* ═══════════════════════════════════════════════════════════
   CLEARFORK AUTOMATION — v2 Design System
   Ranch-modern: cream / espresso / copper, drawn from the brand mark.
   Tokens carried over from the v1 site so the two never drift.
   ═══════════════════════════════════════════════════════════ */

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

/* The [hidden] attribute must always win. Several components below set
   `display` unconditionally (buttons, flex/grid containers, table cells) —
   without this rule, toggling `.hidden = true` in JS stops actually hiding
   anything on those elements, because an author rule with an explicit
   `display` value overrides the browser's default `[hidden]{display:none}`
   regardless of selector specificity. */
[hidden] { display: none !important; }

:root {
  /* Brand */
  --cream:      #F7F1E6;
  --cream-2:    #EFE6D5;
  --paper:      #FDFBF6;
  --espresso:   #2B2118;
  --espresso-2: #3C2E20;
  --ink:        #241C13;
  --copper:     #A65A24;
  --copper-2:   #C87A33;
  --copper-3:   #E09A50;
  --copper-soft:rgba(166,90,36,0.1);
  --sage:       #6B7A5E;
  --gray:       #7A6F62;

  /* Lines & shadows */
  --line:       rgba(43,33,24,0.12);
  --line-soft:  rgba(43,33,24,0.07);
  --line-dark:  rgba(247,241,230,0.14);
  --shadow-lg:  0 24px 60px rgba(43,33,24,0.14);
  --shadow-md:  0 14px 36px rgba(43,33,24,0.10);
  --shadow-sm:  0 6px 20px rgba(43,33,24,0.08);

  /* Rhythm */
  --gutter:     5vw;
  --radius:     14px;
  --radius-lg:  18px;
  --nav-h:      72px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: 'Fraunces', Georgia, serif; font-weight: 560; letter-spacing: -0.015em; }
a { color: inherit; }
img, svg { max-width: 100%; }
button { font-family: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--espresso); color: var(--cream);
  padding: 0.8rem 1.4rem; border-radius: 0 0 8px 0;
  font-size: 0.9rem; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Visible to screen readers only */
.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;
}

:focus-visible { outline: 2px solid var(--copper-2); outline-offset: 3px; border-radius: 4px; }

/* ═══════════ NAV ═══════════ */
.nav {
  position: sticky; top: 0; z-index: 300;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.85rem var(--gutter);
  background: rgba(253,251,246,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  min-height: var(--nav-h);
}
.nav-logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 42px; width: auto; display: block; }
.nav-logo .wordmark {
  font-family: 'Fraunces', serif; font-size: 1.15rem; font-weight: 600;
  color: var(--espresso); letter-spacing: 0.06em; line-height: 1;
}
.nav-logo .wordmark small {
  display: block; font-family: 'Inter', sans-serif; font-size: 0.55rem;
  font-weight: 600; letter-spacing: 0.32em; color: var(--copper); margin-top: 0.25rem;
}
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 9px;
  background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--espresso); border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links { display: flex; gap: 1.75rem; list-style: none; align-items: center; }
.nav-links a {
  color: rgba(36,28,19,0.72); text-decoration: none;
  font-size: 0.875rem; font-weight: 500; transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--copper); }
.nav-cta { padding: 0.62rem 1.3rem !important; font-size: 0.83rem !important; }
.nav-links a.nav-cta { color: var(--cream); }
.nav-links a.nav-cta:hover { color: #fff; }

/* ═══════════ BUTTONS ═══════════ */
.btn-primary, .btn-copper, .btn-outline, .btn-ghost, .btn-light {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  text-decoration: none; font-family: 'Inter', sans-serif; font-weight: 600;
  border-radius: 7px; cursor: pointer; border: 0;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s, filter 0.2s, gap 0.2s;
}
.btn-primary { background: var(--espresso); color: var(--cream); padding: 0.8rem 1.7rem; font-size: 0.9rem; }
.btn-primary:hover { background: var(--copper); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-copper { background: linear-gradient(135deg, var(--copper) 0%, var(--copper-2) 100%); color: #fff; padding: 0.92rem 2rem; font-size: 0.9375rem; }
.btn-copper:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(166,90,36,0.35); filter: brightness(1.05); }

.btn-outline { background: transparent; color: var(--espresso); border: 1px solid var(--line); padding: 0.88rem 1.8rem; font-size: 0.9375rem; }
.btn-outline:hover { border-color: var(--copper); color: var(--copper); transform: translateY(-2px); }
.dark .btn-outline, .btn-outline.on-dark { color: var(--cream); border-color: rgba(247,241,230,0.3); }
.dark .btn-outline:hover, .btn-outline.on-dark:hover { border-color: var(--copper-2); color: var(--copper-3); background: rgba(247,241,230,0.05); }

.btn-light { background: var(--cream); color: var(--espresso); padding: 0.92rem 2rem; font-size: 0.9375rem; }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost { color: var(--espresso); font-size: 0.9375rem; padding: 0.9rem 0.25rem; background: none; }
.btn-ghost:hover { color: var(--copper); gap: 0.8rem; }
.dark .btn-ghost { color: var(--cream); }
.dark .btn-ghost:hover { color: var(--copper-3); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.6rem 1.15rem !important; font-size: 0.82rem !important; }

/* ═══════════ SECTION PRIMITIVES ═══════════ */
section { padding: 6rem var(--gutter); }
.section-tight { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.wrap { max-width: 1240px; margin: 0 auto; }
.wrap-narrow { max-width: 880px; margin: 0 auto; }

.eyebrow {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--copper); display: block; margin-bottom: 1rem;
}
.dark .eyebrow { color: var(--copper-3); }

.title { font-size: clamp(2rem, 3.6vw, 3.05rem); line-height: 1.08; margin-bottom: 1.3rem; max-width: 22ch; color: var(--espresso); }
.title em { font-style: italic; color: var(--copper); }
.title-lg { font-size: clamp(2.4rem, 4.6vw, 3.8rem); max-width: 18ch; }
.dark .title { color: var(--cream); }
.dark .title em { color: var(--copper-3); }

.intro { color: var(--gray); font-size: 1.05rem; max-width: 58ch; line-height: 1.8; margin-bottom: 3rem; }
.dark .intro { color: rgba(247,241,230,0.66); }

.center { text-align: center; }
.center .title, .center .intro { margin-left: auto; margin-right: auto; }

.dark { background: var(--espresso); color: var(--cream); }
.tinted { background: var(--cream); }
.paper { background: var(--paper); }

.sec-head { margin-bottom: 3rem; }
.sec-head .intro { margin-bottom: 0; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.head-row .title, .head-row .intro { margin-bottom: 0; }

/* ═══════════ CARDS ═══════════ */
.card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 2rem; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(166,90,36,0.25); }
.dark .card { background: rgba(247,241,230,0.05); border-color: var(--line-dark); }
.dark .card:hover { border-color: rgba(200,122,51,0.4); box-shadow: none; }

/* ═══════════ BREADCRUMBS ═══════════ */
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.78rem; color: var(--gray); padding: 1.1rem var(--gutter) 0; }
.crumbs li { display: flex; align-items: center; gap: 0.5rem; }
.crumbs li + li::before { content: '›'; color: var(--copper); }
.crumbs a { color: var(--gray); text-decoration: none; }
.crumbs a:hover { color: var(--copper); }
.crumbs [aria-current] { color: var(--espresso); font-weight: 600; }

/* ═══════════ PAGE HERO ═══════════ */
.page-hero {
  padding: 4.2rem var(--gutter) 3.6rem;
  background: radial-gradient(900px 420px at 82% -15%, rgba(200,122,51,0.1), transparent 62%), var(--paper);
}
.page-hero .title { max-width: 20ch; }
.page-hero .intro { margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* Trust pips under a hero */
.pips { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; font-size: 0.82rem; color: var(--gray); }
.pips span { display: inline-flex; align-items: center; gap: 0.45rem; }
.dark .pips { color: rgba(247,241,230,0.6); }

/* ═══════════ HOME HERO ═══════════ */
.hero {
  position: relative; overflow: hidden;
  padding: 4.5rem var(--gutter) 4rem;
  background:
    radial-gradient(1100px 520px at 78% -12%, rgba(200,122,51,0.13), transparent 60%),
    var(--paper);
}
.hero-grid { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: 3.5rem; align-items: center; max-width: 1240px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1.03; color: var(--espresso); margin-bottom: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--copper); }
.hero-sub { font-size: 1.1rem; color: var(--gray); max-width: 48ch; margin-bottom: 2.2rem; line-height: 1.8; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--copper-soft); border: 1px solid rgba(166,90,36,0.25);
  color: var(--copper); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.45rem 1rem; border-radius: 100px; margin-bottom: 1.5rem;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--copper-2); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.8); } }

/* ═══════════ STAT COUNTERS ═══════════ */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; border-top: 1px solid var(--line-soft); padding-top: 2rem; margin-top: 2.8rem; }
.stat b { font-family: 'Fraunces', serif; font-size: clamp(1.6rem, 2.6vw, 2.2rem); color: var(--espresso); display: block; line-height: 1.1; }
.stat span { font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gray); display: block; margin-top: 0.35rem; }
.dark .stat b { color: var(--copper-3); }
.dark .stat span { color: rgba(247,241,230,0.5); }
.dark .stat-strip { border-top-color: var(--line-dark); }
.stat-note { font-size: 0.75rem; color: var(--gray); margin-top: 1.3rem; }
.dark .stat-note { color: rgba(247,241,230,0.4); }

/* ═══════════ BENTO / WHY GRID ═══════════ */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.bento-cell {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 2rem; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 210px; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.bento-cell:hover { transform: translateY(-4px); border-color: rgba(166,90,36,0.25); box-shadow: var(--shadow-md); }
.bento-cell.span-2 { grid-column: span 2; }
.bento-cell.dark-cell { background: var(--espresso); border-color: transparent; color: var(--cream); }
.bento-cell.copper-cell { background: linear-gradient(150deg, var(--copper) 0%, var(--copper-2) 100%); border-color: transparent; color: #fff; }
.bento-cell h3 { font-size: 1.15rem; margin-bottom: 0.55rem; }
.bento-cell p { font-size: 0.88rem; line-height: 1.7; color: var(--gray); }
.bento-cell.dark-cell p { color: rgba(247,241,230,0.68); }
.bento-cell.copper-cell p { color: rgba(255,255,255,0.85); }
.bento-cell .big { font-family: 'Fraunces', serif; font-size: 2.6rem; line-height: 1; color: var(--copper); }
.bento-cell.dark-cell .big { color: var(--copper-3); }
.bento-cell.copper-cell .big { color: #fff; }
.bento-cell .big small { font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 500; opacity: 0.7; letter-spacing: 0.02em; }
.bento-kv { display: flex; justify-content: space-between; align-items: baseline; padding: 0.55rem 0; border-top: 1px solid rgba(247,241,230,0.12); font-size: 0.83rem; }
.bento-cell:not(.dark-cell):not(.copper-cell) .bento-kv { border-top-color: var(--line-soft); }
.bento-kv b { font-family: 'Fraunces', serif; font-size: 1rem; }

/* ═══════════ SERVICE CARDS ═══════════ */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.svc-card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 2rem; display: flex; flex-direction: column; text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; position: relative;
}
.svc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(166,90,36,0.25); }
.svc-icon {
  width: 46px; height: 46px; border-radius: 11px; background: var(--copper-soft);
  color: var(--copper); display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem; flex-shrink: 0;
}
.svc-card h3 { font-size: 1.18rem; color: var(--espresso); margin-bottom: 0.55rem; }
.svc-card p { font-size: 0.89rem; color: var(--gray); line-height: 1.7; }
.svc-card ul { list-style: none; margin: 1.1rem 0 1.4rem; display: flex; flex-direction: column; gap: 0.45rem; }
.svc-card li { font-size: 0.84rem; color: #4A4036; display: flex; gap: 0.55rem; line-height: 1.5; }
.svc-card li::before { content: '◆'; color: var(--copper-2); font-size: 0.58rem; padding-top: 0.35rem; flex-shrink: 0; }
.svc-price { margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.svc-price b { font-family: 'Fraunces', serif; font-size: 1.3rem; color: var(--espresso); }
.svc-price b small { font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 500; color: var(--gray); letter-spacing: 0.02em; }
.svc-price .go { font-size: 0.84rem; font-weight: 600; color: var(--copper); }

.tag-new {
  position: absolute; top: 1.1rem; right: 1.1rem;
  background: var(--sage); color: #fff; font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 0.28rem 0.6rem; border-radius: 100px;
}

/* ═══════════ TOGGLE (Websites / Automations) ═══════════
   Horizontally scrollable with a hidden scrollbar rather than wrapping —
   a 2-button toggle never needs it, but a 3+-button tab bar (the live
   demo) can exceed a narrow screen's width with long labels, and this
   keeps it a single tidy row (swipeable) instead of breaking to a second
   line or forcing the whole page to scroll sideways. */
.seg {
  display: inline-flex; gap: 0.3rem; padding: 0.32rem;
  background: rgba(43,33,24,0.06); border-radius: 100px; border: 1px solid var(--line-soft);
  margin-bottom: 2.6rem; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.dark .seg { background: rgba(247,241,230,0.07); border-color: var(--line-dark); }
.seg button {
  border: 0; background: none; cursor: pointer; border-radius: 100px;
  padding: 0.6rem 1.5rem; font-size: 0.85rem; font-weight: 600; color: var(--gray);
  transition: background 0.22s, color 0.22s, box-shadow 0.22s; white-space: nowrap;
}
.seg button[aria-selected="true"] { background: #fff; color: var(--espresso); box-shadow: var(--shadow-sm); }
.dark .seg button { color: rgba(247,241,230,0.6); }
.dark .seg button[aria-selected="true"] { background: var(--copper); color: #fff; box-shadow: none; }

.pane[hidden] { display: none; }

/* ═══════════ PRICING TIERS ═══════════ */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.tier {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 2.2rem 1.9rem 1.9rem; display: flex; flex-direction: column; position: relative;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.tier:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tier.popular { border-color: rgba(166,90,36,0.45); box-shadow: 0 18px 46px rgba(166,90,36,0.14); }
.dark .tier { background: rgba(247,241,230,0.05); border-color: var(--line-dark); }
.dark .tier.popular { background: rgba(200,122,51,0.13); border-color: rgba(200,122,51,0.5); box-shadow: none; }
.tier-flag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--copper) 0%, var(--copper-2) 100%); color: #fff;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.34rem 0.95rem; border-radius: 100px; white-space: nowrap;
}
.tier-name { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--copper); margin-bottom: 0.9rem; }
.dark .tier-name { color: var(--copper-3); }
.tier-price { font-family: 'Fraunces', serif; font-size: 2.5rem; color: var(--espresso); line-height: 1; display: flex; align-items: baseline; gap: 0.35rem; }
.tier-price small { font-family: 'Inter', sans-serif; font-size: 0.78rem; font-weight: 500; color: var(--gray); }
.dark .tier-price { color: var(--cream); }
.dark .tier-price small { color: rgba(247,241,230,0.5); }
.tier-for { font-size: 0.87rem; color: var(--gray); line-height: 1.7; margin: 0.9rem 0 1.4rem; }
.dark .tier-for { color: rgba(247,241,230,0.6); }
.tier-label { font-size: 0.63rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray); margin-bottom: 0.9rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); }
.dark .tier-label { color: rgba(247,241,230,0.4); border-top-color: var(--line-dark); }
.tier ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1.6rem; }
.tier li { font-size: 0.86rem; color: #4A4036; line-height: 1.5; display: flex; gap: 0.6rem; align-items: flex-start; }
.tier li::before { content: '✓'; color: var(--sage); font-weight: 700; flex-shrink: 0; font-size: 0.85rem; }
.tier li.off { color: rgba(122,111,98,0.55); }
.tier li.off::before { content: '—'; color: rgba(122,111,98,0.4); }
.dark .tier li { color: rgba(247,241,230,0.82); }
.dark .tier li.off { color: rgba(247,241,230,0.35); }
.tier .tier-cta { margin-top: auto; }
.tier-addon { font-size: 0.76rem; color: var(--gray); text-align: center; margin-top: 0.9rem; }
.dark .tier-addon { color: rgba(247,241,230,0.45); }

/* ═══════════ CEILING ITEM (Owner Dashboard) ═══════════
   Not a tier — a different kind of build. It sits below the ladder
   rather than as a 4th/5th box in .tiers because it isn't a flat price
   the way the tiers are: cost depends on how many systems it has to
   connect to, so it's scoped in the audit instead of published. */
.ceiling-card {
  background: rgba(247,241,230,0.05); border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg); padding: 2.4rem 2.6rem; margin-top: 1.8rem; position: relative;
}
.ceiling-badge {
  position: absolute; top: -12px; left: 2.4rem;
  background: linear-gradient(135deg, var(--copper) 0%, var(--copper-2) 100%); color: #fff;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.35rem 0.95rem; border-radius: 100px;
}
.ceiling-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.6rem; align-items: center; }
.ceiling-body h3 { font-family: 'Fraunces', serif; font-size: 1.4rem; color: var(--cream); margin-bottom: 0.6rem; }
.ceiling-for { font-size: 0.9rem; color: rgba(247,241,230,0.65); line-height: 1.7; margin-bottom: 1.2rem; max-width: 56ch; }
.ceiling-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.ceiling-list li { font-size: 0.86rem; color: rgba(247,241,230,0.8); line-height: 1.5; display: flex; gap: 0.6rem; align-items: flex-start; }
.ceiling-list li::before { content: '◆'; color: var(--copper-3); font-size: 0.58rem; padding-top: 0.4rem; flex-shrink: 0; }
.ceiling-price-box { text-align: center; padding-left: 1.8rem; border-left: 1px solid var(--line-dark); }
.ceiling-price-box .cb-from { font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(247,241,230,0.45); display: block; margin-bottom: 0.5rem; }
.ceiling-price { font-family: 'Fraunces', serif; font-size: 2rem; color: var(--cream); line-height: 1.15; }
.ceiling-price small { font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 500; color: rgba(247,241,230,0.5); display: block; margin-top: 0.4rem; }
.ceiling-note { font-size: 0.78rem; color: rgba(247,241,230,0.45); line-height: 1.65; margin: 1rem 0 1.2rem; }
@media (max-width: 900px) {
  .ceiling-body { grid-template-columns: 1fr; }
  .ceiling-price-box { border-left: 0; border-top: 1px solid var(--line-dark); padding-left: 0; padding-top: 1.5rem; margin-top: 0.4rem; }
}

/* ═══════════ NOTE / CALLOUT ═══════════ */
.note {
  border-radius: 12px; padding: 1.3rem 1.6rem; font-size: 0.89rem; line-height: 1.75;
  background: var(--copper-soft); border: 1px solid rgba(166,90,36,0.22); border-left: 3px solid var(--copper);
  color: var(--espresso-2); max-width: 900px;
}
.note strong { color: var(--espresso); }
.dark .note { background: rgba(247,241,230,0.05); border-color: var(--line-dark); border-left-color: var(--copper-2); color: rgba(247,241,230,0.75); }
.dark .note strong { color: var(--cream); }

/* ═══════════ COMPARISON TABLE ═══════════ */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--line-soft); background: #fff; }
.dark .table-scroll { background: rgba(247,241,230,0.04); border-color: var(--line-dark); }
.cmp { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 0.87rem; }
.cmp th, .cmp td { padding: 0.95rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line-soft); }
.dark .cmp th, .dark .cmp td { border-bottom-color: var(--line-dark); }
.cmp thead th { background: var(--cream); font-family: 'Inter', sans-serif; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); font-weight: 700; }
.dark .cmp thead th { background: rgba(247,241,230,0.06); color: rgba(247,241,230,0.55); }
.cmp thead th b { display: block; font-family: 'Fraunces', serif; font-size: 1.05rem; letter-spacing: -0.01em; text-transform: none; color: var(--espresso); margin-bottom: 0.15rem; }
.dark .cmp thead th b { color: var(--cream); }
.cmp thead th em { font-style: normal; color: var(--copper); font-size: 0.82rem; letter-spacing: 0; text-transform: none; }
.cmp tbody th { font-weight: 500; color: var(--espresso); }
.dark .cmp tbody th { color: rgba(247,241,230,0.85); }
.cmp td { color: var(--gray); text-align: center; }
.dark .cmp td { color: rgba(247,241,230,0.7); }
.cmp .yes { color: var(--sage); font-weight: 700; }
.cmp .no { color: rgba(122,111,98,0.45); }
.dark .cmp .no { color: rgba(247,241,230,0.3); }
.cmp tbody tr:hover { background: rgba(166,90,36,0.03); }
.dark .cmp tbody tr:hover { background: rgba(247,241,230,0.03); }
.cmp .col-pop { background: rgba(166,90,36,0.05); }
.dark .cmp .col-pop { background: rgba(200,122,51,0.09); }
.scroll-hint { font-size: 0.75rem; color: var(--gray); text-align: center; margin-bottom: 0.8rem; letter-spacing: 0.08em; }
.dark .scroll-hint { color: rgba(247,241,230,0.4); }

/* ═══════════ PROCESS STEPS ═══════════ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; counter-reset: step; }
.step { padding: 1.8rem 1.6rem; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: 'Fraunces', serif; font-size: 2.3rem; color: var(--copper-soft);
  -webkit-text-stroke: 1px rgba(166,90,36,0.45); display: block; line-height: 1; margin-bottom: 0.85rem;
}
.step h3 { font-size: 1.03rem; margin-bottom: 0.5rem; color: var(--espresso); }
.step p { font-size: 0.85rem; color: var(--gray); line-height: 1.7; }
.step ul { list-style: none; margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.4rem; }
.step li { font-size: 0.79rem; color: var(--gray); display: flex; gap: 0.5rem; line-height: 1.5; }
.step li::before { content: '✓'; color: var(--sage); flex-shrink: 0; }
.dark .step { background: rgba(247,241,230,0.05); border-color: var(--line-dark); }
.dark .step h3 { color: var(--cream); }
.dark .step p, .dark .step li { color: rgba(247,241,230,0.62); }
.dark .step::before { color: rgba(200,122,51,0.22); -webkit-text-stroke: 1px rgba(200,122,51,0.5); }

/* ═══════════ MARQUEE ═══════════ */
.marquee { overflow: hidden; position: relative; padding: 0.4rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 0.9rem; width: max-content; animation: slide 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.chip {
  border: 1px solid var(--line); border-radius: 100px; padding: 0.6rem 1.35rem;
  font-size: 0.85rem; color: var(--espresso); white-space: nowrap; background: #fff;
}
.dark .chip { background: rgba(247,241,230,0.05); border-color: var(--line-dark); color: rgba(247,241,230,0.8); }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } .marquee { -webkit-mask-image: none; mask-image: none; } .marquee-track { flex-wrap: wrap; width: 100%; justify-content: center; } }

/* Big wordmark marquee in footer */
.word-marquee { overflow: hidden; padding: 2.5rem 0 0; opacity: 0.055; pointer-events: none; user-select: none; }
.word-marquee div { display: flex; gap: 3rem; width: max-content; animation: slide 30s linear infinite; font-family: 'Fraunces', serif; font-size: clamp(3rem, 9vw, 7rem); color: var(--cream); white-space: nowrap; letter-spacing: 0.03em; }

/* ═══════════ CASE / WORK CARDS ═══════════ */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.work-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s, box-shadow 0.25s; }
.work-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.work-top { background: linear-gradient(150deg, #1A1B1C 0%, #2e2013 100%); padding: 1.8rem; color: var(--cream); }
.work-kind { font-size: 0.63rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper-3); margin-bottom: 0.7rem; display: block; }
.work-top h3 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.work-top .where { font-size: 0.8rem; color: rgba(247,241,230,0.55); }
.work-body { padding: 1.7rem 1.8rem; flex: 1; }
.work-body dt { font-size: 0.63rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper); margin-bottom: 0.35rem; }
.work-body dd { font-size: 0.88rem; color: var(--gray); line-height: 1.7; margin-bottom: 1.1rem; }
.work-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-soft); }
.work-metrics div { padding: 1.1rem 0.8rem; text-align: center; border-right: 1px solid var(--line-soft); }
.work-metrics div:last-child { border-right: 0; }
.work-metrics b { font-family: 'Fraunces', serif; font-size: 1.2rem; color: var(--espresso); display: block; line-height: 1.1; }
.work-metrics span { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }

/* ═══════════ FILTER CHIPS ═══════════ */
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.filter {
  border: 1px solid var(--line); background: #fff; border-radius: 100px; cursor: pointer;
  padding: 0.55rem 1.2rem; font-size: 0.83rem; font-weight: 500; color: var(--gray);
  transition: all 0.2s;
}
.filter:hover { border-color: var(--copper); color: var(--copper); }
.filter[aria-pressed="true"] { background: var(--espresso); border-color: var(--espresso); color: var(--cream); }

/* ═══════════ TEMPLATE CARDS ═══════════ */
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.tpl {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 1.8rem; display: flex; flex-direction: column; position: relative;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.tpl:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(166,90,36,0.25); }
.tpl[hidden] { display: none; }
.tpl-cat { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper); margin-bottom: 0.8rem; display: block; }
.tpl h3 { font-size: 1.1rem; color: var(--espresso); margin-bottom: 0.5rem; line-height: 1.25; }
.tpl .flow { font-size: 0.85rem; color: var(--gray); line-height: 1.65; margin-bottom: 1.1rem; }
.tpl-stack { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.tpl-stack span { font-size: 0.68rem; background: var(--cream-2); color: var(--espresso-2); padding: 0.25rem 0.6rem; border-radius: 5px; }
.tpl-foot { margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.tpl-foot b { font-family: 'Fraunces', serif; font-size: 1.4rem; color: var(--espresso); line-height: 1; }
.tpl-foot b small { font-family: 'Inter', sans-serif; display: block; font-size: 0.66rem; font-weight: 500; color: var(--gray); margin-top: 0.2rem; letter-spacing: 0.02em; }
.badge-pop {
  position: absolute; top: -9px; right: 1.4rem;
  background: var(--copper); color: #fff; font-size: 0.56rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 0.27rem 0.65rem; border-radius: 100px;
}

/* ═══════════ FLOW DIAGRAM ═══════════ */
.flow-steps { display: flex; align-items: stretch; gap: 0.7rem; flex-wrap: wrap; }
.flow-node {
  flex: 1; min-width: 150px; background: #fff; border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 1.2rem 1.1rem; position: relative;
}
.flow-node b { display: block; font-family: 'Fraunces', serif; font-size: 0.95rem; color: var(--espresso); margin-bottom: 0.3rem; }
.flow-node span { font-size: 0.78rem; color: var(--gray); line-height: 1.55; }
.flow-node em { position: absolute; top: 0.7rem; right: 0.9rem; font-style: normal; font-size: 0.62rem; font-weight: 700; color: var(--copper-soft); font-family: 'Fraunces', serif; }
.flow-arrow { display: flex; align-items: center; color: var(--copper); font-size: 1.1rem; position: relative; }
.flow-node.on-dark { background: rgba(247,241,230,0.05); border-color: rgba(247,241,230,0.14); }

/* ═══════════ LIVE AUTOMATION DEMO ═══════════
   A tabbed flow diagram that visibly "runs": each node lights up in turn,
   a signal dot travels the connecting arrow, and a simulated log fills in
   below — then the whole thing clears and loops. The timing is pure CSS
   (animation-duration is shared, position is encoded per element via
   nth-child keyframes) so it never drifts or needs JS to keep time; JS
   only starts/restarts the `.running` class and swaps in `.done` for
   prefers-reduced-motion. Without JS, nodes and the log show fully and
   statically — nothing here is required reading. */
.demo-stage { margin-bottom: 1.6rem; }
.demo-flow { position: relative; }
.demo-node { transition: border-color 0.3s, box-shadow 0.3s; }
.demo-dot {
  position: absolute; top: 50%; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--copper-2); box-shadow: 0 0 10px 2px rgba(200,122,51,0.7);
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none;
}
.demo-log {
  list-style: none; margin-top: 1.4rem;
  background: #15110c; border: 1px solid rgba(247,241,230,0.1); border-radius: 12px;
  padding: 1.1rem 1.3rem; font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.8rem; line-height: 2; color: rgba(247,241,230,0.55);
}
.demo-log li { opacity: 1; } /* default: fully visible — the no-JS / pre-JS state */
.demo-log li::before { content: '›'; color: var(--copper-2); margin-right: 0.6rem; }
.demo-outcome {
  margin-top: 1.4rem; padding: 1rem 1.3rem; border-radius: 10px;
  background: rgba(107,122,94,0.12); border: 1px solid rgba(107,122,94,0.35);
  color: rgba(247,241,230,0.85); font-size: 0.88rem; line-height: 1.65;
}
.demo-outcome b { color: var(--sage); }
.demo-replay-row { text-align: center; margin-top: 2rem; }

/* Reduced motion / no-JS: show the completed state, no looping */
.demo-stage.done .flow-node { border-color: var(--copper-2); box-shadow: 0 0 0 1px rgba(200,122,51,0.4); }
.demo-stage.done .demo-dot { display: none; }

/* Running: four fixed positions, shared 7s cycle. Disappear point (97%) is
   the same for every position so all four converge and clear together —
   only the appear point is staggered, which is what makes it read as a
   sequence rather than four things blinking at random. */
.demo-stage.running .demo-log li { opacity: 0; transform: translateY(3px); animation-duration: 7s; animation-iteration-count: infinite; }
.demo-stage.running .demo-log li:nth-child(1) { animation-name: demoReveal0; }
.demo-stage.running .demo-log li:nth-child(2) { animation-name: demoReveal1; }
.demo-stage.running .demo-log li:nth-child(3) { animation-name: demoReveal2; }
.demo-stage.running .demo-log li:nth-child(4) { animation-name: demoReveal3; }
@keyframes demoReveal0 { 0%, 4.3%  { opacity: 0; transform: translateY(3px); } 6%, 97% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: translateY(3px); } }
@keyframes demoReveal1 { 0%, 24.3% { opacity: 0; transform: translateY(3px); } 26%, 97% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: translateY(3px); } }
@keyframes demoReveal2 { 0%, 44.3% { opacity: 0; transform: translateY(3px); } 46%, 97% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: translateY(3px); } }
@keyframes demoReveal3 { 0%, 64.3% { opacity: 0; transform: translateY(3px); } 66%, 97% { opacity: 1; transform: none; } 99%, 100% { opacity: 0; transform: translateY(3px); } }

.demo-stage.running .flow-node { animation-duration: 7s; animation-iteration-count: infinite; }
.demo-stage.running .flow-node:nth-child(1) { animation-name: demoNode0; }
.demo-stage.running .flow-node:nth-child(3) { animation-name: demoNode1; }
.demo-stage.running .flow-node:nth-child(5) { animation-name: demoNode2; }
.demo-stage.running .flow-node:nth-child(7) { animation-name: demoNode3; }
@keyframes demoNode0 { 0%, 4.3%  { border-color: var(--line-dark); box-shadow: none; } 6%, 97% { border-color: var(--copper-2); box-shadow: 0 0 0 1px rgba(200,122,51,0.4), 0 0 20px rgba(200,122,51,0.22); } 99%, 100% { border-color: var(--line-dark); box-shadow: none; } }
@keyframes demoNode1 { 0%, 24.3% { border-color: var(--line-dark); box-shadow: none; } 26%, 97% { border-color: var(--copper-2); box-shadow: 0 0 0 1px rgba(200,122,51,0.4), 0 0 20px rgba(200,122,51,0.22); } 99%, 100% { border-color: var(--line-dark); box-shadow: none; } }
@keyframes demoNode2 { 0%, 44.3% { border-color: var(--line-dark); box-shadow: none; } 46%, 97% { border-color: var(--copper-2); box-shadow: 0 0 0 1px rgba(200,122,51,0.4), 0 0 20px rgba(200,122,51,0.22); } 99%, 100% { border-color: var(--line-dark); box-shadow: none; } }
@keyframes demoNode3 { 0%, 64.3% { border-color: var(--line-dark); box-shadow: none; } 66%, 97% { border-color: var(--copper-2); box-shadow: 0 0 0 1px rgba(200,122,51,0.4), 0 0 20px rgba(200,122,51,0.22); } 99%, 100% { border-color: var(--line-dark); box-shadow: none; } }

/* Signal dot travels each arrow just after the node before it lights up */
.demo-stage.running .flow-arrow:nth-of-type(2) .demo-dot { animation: demoDot0 7s infinite; }
.demo-stage.running .flow-arrow:nth-of-type(4) .demo-dot { animation: demoDot1 7s infinite; }
.demo-stage.running .flow-arrow:nth-of-type(6) .demo-dot { animation: demoDot2 7s infinite; }
@keyframes demoDot0 { 0%, 8%  { opacity: 0; left: 0%; } 9%  { opacity: 1; left: 0%; } 22%  { opacity: 1; left: 100%; } 23%,  100% { opacity: 0; left: 100%; } }
@keyframes demoDot1 { 0%, 28% { opacity: 0; left: 0%; } 29% { opacity: 1; left: 0%; } 42%  { opacity: 1; left: 100%; } 43%,  100% { opacity: 0; left: 100%; } }
@keyframes demoDot2 { 0%, 48% { opacity: 0; left: 0%; } 49% { opacity: 1; left: 0%; } 62%  { opacity: 1; left: 100%; } 63%,  100% { opacity: 0; left: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .demo-stage.running .flow-node, .demo-stage.running .demo-log li, .demo-stage.running .demo-dot { animation: none !important; }
}

/* ═══════════ BRAND / INTEGRATIONS GRID ═══════════
   Simple, original pictograms — not reproductions of official logo
   artwork — tinted in each brand's associated color and labelled by name.
   Works on light or dark section backgrounds since the tile itself always
   carries its own near-black surface. */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 0.9rem; }
.brand-tile {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  background: #15110c; border: 1px solid rgba(247,241,230,0.09); border-radius: 16px;
  padding: 1.2rem 0.7rem 1rem; text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.brand-tile:hover { transform: translateY(-4px); border-color: var(--bc, var(--copper-2)); box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.brand-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(166,90,36,0.16); background: color-mix(in srgb, var(--bc, var(--copper-2)) 20%, transparent);
  color: var(--bc, var(--copper-2));
}
.brand-icon svg { width: 22px; height: 22px; }
.brand-tile span { font-size: 0.72rem; font-weight: 500; color: rgba(247,241,230,0.72); line-height: 1.3; }

/* ═══════════ TESTIMONIALS ═══════════ */
.quote-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 2rem; min-width: 340px; max-width: 380px; display: flex; flex-direction: column; }
.quote-card .stars { color: var(--copper-2); font-size: 0.9rem; letter-spacing: 0.15em; margin-bottom: 1rem; }
.quote-card blockquote { font-size: 0.95rem; color: #4A4036; line-height: 1.75; margin-bottom: 1.4rem; flex: 1; }
.quote-who { display: flex; align-items: center; gap: 0.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--copper-soft); color: var(--copper); display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 0.9rem; flex-shrink: 0; }
.quote-who b { display: block; font-size: 0.88rem; color: var(--espresso); font-family: 'Fraunces', serif; font-weight: 560; }
.quote-who span { font-size: 0.76rem; color: var(--gray); }
.placeholder-card { border-style: dashed; border-color: rgba(166,90,36,0.35); background: rgba(166,90,36,0.03); }
.placeholder-card blockquote { color: var(--gray); font-style: italic; }

/* ═══════════ FAQ ═══════════ */
.faq { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.35rem 0.25rem; }
.faq details[hidden] { display: none; }
.faq summary {
  font-family: 'Fraunces', serif; font-size: 1.1rem; color: var(--espresso); cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; color: var(--copper); transition: transform 0.25s; flex-shrink: 0; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--gray); font-size: 0.93rem; line-height: 1.8; padding-top: 0.9rem; max-width: 68ch; }
.faq details p + p { padding-top: 0.7rem; }
.faq a { color: var(--copper); }
.dark .faq summary { color: var(--cream); }
.dark .faq details { border-bottom-color: var(--line-dark); }
.dark .faq details p { color: rgba(247,241,230,0.65); }

/* ═══════════ FORMS ═══════════ */
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--espresso); margin-bottom: 0.45rem; letter-spacing: 0.01em; }
.dark .field label { color: rgba(247,241,230,0.8); }
.field input, .field select, .field textarea {
  width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 0.85rem 1.05rem; color: var(--ink); font-family: 'Inter', sans-serif; font-size: 0.94rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--copper); box-shadow: 0 0 0 3px rgba(166,90,36,0.1); }
.field input:hover:not(:focus), .field select:hover:not(:focus), .field textarea:hover:not(:focus) { border-color: rgba(166,90,36,0.4); }
.field input::placeholder, .field textarea::placeholder { color: rgba(122,111,98,0.6); }
/* Native select arrow varies wildly across browsers and clashes with the
   copper palette — replace it with an inline chevron in the brand colour. */
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A65A24' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.05rem center; padding-right: 2.6rem;
}
.dark .field input, .dark .field select, .dark .field textarea {
  background: rgba(247,241,230,0.06); border-color: var(--line-dark); color: var(--cream);
}
.dark .field input::placeholder, .dark .field textarea::placeholder { color: rgba(247,241,230,0.4); }
.dark .field select option { color: var(--ink); background: var(--paper); }
/* Lighter chevron so it stays visible against the dark field background */
.dark .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23E09A50' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-err { color: #B4472F; font-size: 0.78rem; margin-top: 0.35rem; display: none; }
.field.invalid .field-err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #B4472F; }
.form-card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 2.6rem 2.5rem; box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
/* Copper hairline along the top edge — ties the card to the brand without
   adding chrome, and visually anchors it as the primary object on the page. */
.form-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--copper) 0%, var(--copper-2) 50%, var(--copper-3) 100%);
}
.dark .form-card { background: rgba(247,241,230,0.05); border-color: var(--line-dark); box-shadow: none; }
/* Mobile padding is handled by the shared 720px breakpoint further down. */
.form-note { font-size: 0.78rem; color: var(--gray); margin-top: 1rem; line-height: 1.6; }
.dark .form-note { color: rgba(247,241,230,0.45); }

/* ═══════════ WIZARD ═══════════ */
.wizard { max-width: 800px; margin: 0 auto; }

/* Progress rail. The connecting lines fill left-to-right as steps complete,
   so progress reads as one continuous track rather than four separate pips. */
.wiz-bar {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 2.4rem;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 100px;
  padding: 0.85rem 1.4rem; box-shadow: var(--shadow-sm);
}
.wiz-node { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.wiz-dot {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; background: rgba(43,33,24,0.06); color: var(--gray);
  border: 1px solid transparent; flex-shrink: 0;
  transition: background 0.35s, color 0.35s, box-shadow 0.35s, transform 0.35s;
}
.wiz-node.active .wiz-dot {
  background: linear-gradient(135deg, var(--copper) 0%, var(--copper-2) 100%); color: #fff;
  box-shadow: 0 0 0 4px rgba(166,90,36,0.14); transform: scale(1.06);
}
.wiz-node.done .wiz-dot { background: var(--sage); color: #fff; }
/* Completed steps show a tick instead of their number — the number has served
   its purpose once you're past it, and the tick reads as progress at a glance. */
.wiz-node.done .wiz-dot { font-size: 0; }
.wiz-node.done .wiz-dot::after { content: '✓'; font-size: 0.85rem; line-height: 1; }
/* Scoped off .wiz-dot deliberately — the dot is itself a <span>, so a bare
   `.wiz-node span` also captures it and overrides its own sizing. */
.wiz-node span:not(.wiz-dot) { font-size: 0.78rem; font-weight: 600; color: var(--gray); transition: color 0.3s; }
.wiz-node.active span:not(.wiz-dot) { color: var(--espresso); }
.wiz-node.done span:not(.wiz-dot) { color: var(--sage); }
.wiz-line { flex: 1; height: 3px; background: rgba(43,33,24,0.08); border-radius: 3px; min-width: 14px; position: relative; overflow: hidden; }
.wiz-line::after {
  content: ''; position: absolute; inset: 0; border-radius: 3px;
  background: var(--sage); transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1);
}
.wiz-line.done::after { transform: scaleX(1); }

.wiz-step[hidden] { display: none; }
.wiz-step h2 { font-size: 1.6rem; color: var(--espresso); margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.wiz-step .hint { font-size: 0.9rem; color: var(--gray); margin-bottom: 1.8rem; line-height: 1.7; }
/* Steps fade up as they arrive, so advancing feels like moving forward
   rather than the page swapping content underneath you. */
@media (prefers-reduced-motion: no-preference) {
  .wiz-step:not([hidden]) { animation: wizIn 0.4s cubic-bezier(0.16,1,0.3,1) both; }
  @keyframes wizIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-bottom: 1.8rem; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt label {
  display: block; cursor: pointer; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 1.2rem 1.3rem 1.2rem 2.9rem; height: 100%; position: relative;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
}
/* Radio affordance: an actual ring the user can see fill, rather than relying
   on the whole card changing colour to signal what's selected. */
.opt label::before {
  content: ''; position: absolute; left: 1.15rem; top: 1.35rem;
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--line); background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.opt label::after {
  content: ''; position: absolute; left: 1.44rem; top: 1.64rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--copper);
  transform: scale(0); transition: transform 0.2s cubic-bezier(0.16,1,0.3,1);
}
.opt label b { display: block; font-family: 'Fraunces', serif; font-size: 1rem; color: var(--espresso); margin-bottom: 0.25rem; }
.opt label span { font-size: 0.82rem; color: var(--gray); line-height: 1.55; }
.opt label:hover { border-color: var(--copper); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.opt label:hover::before { border-color: var(--copper); }
.opt input:checked + label {
  border-color: var(--copper); background: var(--copper-soft);
  box-shadow: 0 0 0 2px rgba(166,90,36,0.18), var(--shadow-sm);
}
.opt input:checked + label::before { border-color: var(--copper); }
.opt input:checked + label::after { transform: scale(1); }
.opt input:focus-visible + label { outline: 2px solid var(--copper-2); outline-offset: 2px; }

.wiz-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line-soft);
}
/* Forward action gets visual weight; Back stays quiet. On mobile the two
   stack with the primary action on top, where the thumb already is. */
.wiz-nav [data-wiz-next], .wiz-nav [data-wiz-submit],
.wiz-nav [data-brief-next], .wiz-nav [data-brief-submit] { min-width: 190px; }
@media (max-width: 560px) {
  .wiz-nav { flex-direction: column-reverse; align-items: stretch; }
  .wiz-nav button { width: 100%; }
}
.wiz-summary { background: var(--cream); border-radius: 12px; padding: 1.3rem 1.5rem; margin-bottom: 1.6rem; }
/* Styled as a heading but rendered as a div — these blocks are injected by JS
   mid-page, where a real <h4> would skip levels under the step's <h2>. */
.wiz-summary .sum-head { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--copper); margin-bottom: 0.8rem; font-family: 'Inter', sans-serif; font-weight: 700; }
.wiz-summary dl { display: flex; flex-direction: column; gap: 0.5rem; }
.wiz-summary .row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.86rem; }
.wiz-summary dt { color: var(--gray); }
.wiz-summary dd { color: var(--espresso); font-weight: 600; text-align: right; }

/* ═══════════ BUILD BRIEF QUESTIONNAIRE ═══════════ */
.q-help { font-size: 0.8rem; color: var(--gray); margin: -0.2rem 0 0.55rem; line-height: 1.6; }
.q-optional { font-weight: 400; color: var(--gray); }
/* Label for a radio/checkbox group — styled like .field label, but a span,
   because a <label> with no single control to point at is meaningless. */
.group-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--espresso); margin-bottom: 0.45rem; letter-spacing: 0.01em; }

.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.5rem; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check label {
  display: flex; gap: 0.65rem; align-items: flex-start; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.75rem 0.9rem; font-size: 0.87rem; color: var(--espresso);
  line-height: 1.45; transition: border-color 0.2s, background 0.2s; height: 100%;
}
.check label::before {
  content: ''; width: 16px; height: 16px; border: 1.5px solid var(--line);
  border-radius: 4px; flex-shrink: 0; margin-top: 0.12rem; transition: all 0.2s;
}
.check label:hover { border-color: var(--copper); }
.check input:checked + label { border-color: var(--copper); background: var(--copper-soft); }
.check input:checked + label::before { background: var(--copper); border-color: var(--copper); box-shadow: inset 0 0 0 2.5px #fff; }
.check input:focus-visible + label { outline: 2px solid var(--copper-2); outline-offset: 2px; }

/* Readiness badge — how much of a build this questionnaire can actually specify */
.feas { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.35rem 0.85rem; border-radius: 100px; }
.feas.full { background: rgba(107,122,94,0.16); color: #4C5A41; }
.feas.partial { background: rgba(200,122,51,0.16); color: var(--copper); }
.feas.discovery { background: rgba(43,33,24,0.09); color: var(--espresso-2); }

.feas-note { font-size: 0.85rem; color: var(--gray); line-height: 1.7; margin: 0.9rem 0 1.6rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line-soft); }

.review-block { background: var(--cream); border-radius: 12px; padding: 1.3rem 1.5rem; margin-bottom: 0.9rem; }
.review-block .rv-head { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--copper); margin-bottom: 0.85rem; }
.review-block dl { display: flex; flex-direction: column; gap: 0.6rem; }
.review-block .row { display: grid; grid-template-columns: 40% 1fr; gap: 1rem; font-size: 0.86rem; align-items: baseline; }
.review-block dt { color: var(--gray); }
.review-block dd { color: var(--espresso); font-weight: 500; white-space: pre-wrap; }

.brief-raw {
  background: #15110c; color: rgba(247,241,230,0.82);
  border: 1px solid rgba(247,241,230,0.12); border-radius: 12px;
  padding: 1.4rem 1.6rem; margin-top: 1.6rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.75rem; line-height: 1.75; white-space: pre-wrap;
  max-height: 420px; overflow: auto;
}

@media (max-width: 720px) {
  .check-grid { grid-template-columns: 1fr; }
  .review-block .row { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ═══════════ TIMELINE (about) ═══════════ */
.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--copper), rgba(166,90,36,0.1)); }
.tl-item { position: relative; padding-bottom: 2.2rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ''; position: absolute; left: -2.2rem; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--copper); }
.tl-when { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--copper); display: block; margin-bottom: 0.35rem; }
.tl-item h3 { font-size: 1.15rem; color: var(--espresso); margin-bottom: 0.4rem; }
.tl-item p { font-size: 0.9rem; color: var(--gray); line-height: 1.75; max-width: 60ch; }

/* ═══════════ VALUES / GENERIC 2-UP ═══════════ */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }

/* ═══════════ BLOG ═══════════ */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.post { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 1.9rem; text-decoration: none; display: flex; flex-direction: column; transition: transform 0.25s, box-shadow 0.25s; }
.post:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.post .cat { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper); margin-bottom: 0.8rem; }
.post h3 { font-size: 1.2rem; color: var(--espresso); line-height: 1.3; margin-bottom: 0.6rem; }
.post p { font-size: 0.88rem; color: var(--gray); line-height: 1.7; flex: 1; }
.post .meta { font-size: 0.76rem; color: var(--gray); margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }

/* ═══════════ PROSE (legal / long form) ═══════════ */
.prose { max-width: 740px; }
.prose p, .prose li { color: #4A4036; font-size: 1rem; line-height: 1.9; }
.prose p { margin-bottom: 1.35rem; }
.prose h2 { font-size: 1.5rem; color: var(--espresso); margin: 2.6rem 0 1rem; }
.prose h3 { font-size: 1.15rem; color: var(--espresso); margin: 2rem 0 0.7rem; }
.prose ul, .prose ol { margin: 0 0 1.35rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; }
.prose a { color: var(--copper); }
.prose strong { color: var(--espresso); }
.prose .updated { font-size: 0.85rem; color: var(--gray); margin-bottom: 2rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line-soft); }

/* ═══════════ BLOG POST DETAIL ═══════════ */
.post-meta-row { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--gray); margin-bottom: 0.5rem; }
.post-meta-row a { color: var(--copper); text-decoration: none; font-weight: 600; }
.prose .num { color: var(--copper); font-weight: 700; margin-right: 0.3rem; }
.toc { background: var(--cream); border-radius: 12px; padding: 1.5rem 1.8rem; margin-bottom: 2.5rem; max-width: 740px; }
.toc .toc-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--copper); margin-bottom: 0.8rem; }
.toc ol { margin: 0 0 0 1.2rem; color: var(--espresso-2); display: flex; flex-direction: column; gap: 0; }
.toc a { color: var(--espresso-2); text-decoration: none; font-size: 0.95rem; line-height: 2; }
.toc a:hover { color: var(--copper); }
.post-cta { background: var(--espresso); color: var(--cream); border-radius: 16px; padding: 2.6rem; text-align: center; margin-top: 3.5rem; max-width: 740px; }
.post-cta h3 { font-size: 1.5rem; margin-bottom: 0.7rem; font-family: 'Fraunces', serif; }
.post-cta p { color: rgba(247,241,230,0.7); font-size: 0.93rem; margin-bottom: 1.5rem; }
.post-cta .btn-copper { color: #fff; } /* .prose a otherwise outranks .btn-copper's own white text */
.related-posts { max-width: 740px; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line-soft); }
.related-posts h3 { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--copper); margin-bottom: 1rem; }
.related-posts ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.related-posts a { color: var(--espresso); font-size: 0.95rem; text-decoration: none; font-weight: 500; }
.related-posts a:hover { color: var(--copper); }

/* ═══════════ CTA BAND ═══════════ */
.cta-band { text-align: center; }
.cta-band .title { margin-left: auto; margin-right: auto; }
.cta-band .intro { margin: 0 auto 2.2rem; }
.cta-list { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 2.4rem; }
.cta-list span { font-size: 0.8rem; color: rgba(247,241,230,0.7); background: rgba(247,241,230,0.07); border: 1px solid var(--line-dark); border-radius: 100px; padding: 0.45rem 1.05rem; }

/* ═══════════ COOKIE BANNER ═══════════ */
.cookie {
  position: fixed; bottom: 1rem; left: 1rem; right: 1rem; z-index: 500;
  max-width: 720px; margin: 0 auto;
  background: var(--espresso); color: rgba(247,241,230,0.8);
  border: 1px solid var(--line-dark); border-radius: 14px;
  padding: 1.1rem 1.4rem; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  font-size: 0.85rem; line-height: 1.6;
  transform: translateY(140%); transition: transform 0.45s cubic-bezier(0.16,1,0.3,1);
}
.cookie.show { transform: none; }
.cookie p { flex: 1; min-width: 240px; }
.cookie a { color: var(--copper-3); }
.cookie .actions { display: flex; gap: 0.6rem; flex-shrink: 0; }

/* ═══════════ FOOTER ═══════════ */
footer { background: var(--espresso); color: rgba(247,241,230,0.62); padding: 4rem var(--gutter) 1.5rem; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 2.4rem; margin-bottom: 3rem; max-width: 1240px; margin-inline: auto; }
.footer-brand img { height: 52px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.87rem; line-height: 1.75; max-width: 32ch; margin-bottom: 1.2rem; }
.footer-contact { font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; }
.footer-contact a { color: rgba(247,241,230,0.75); text-decoration: none; }
.footer-contact a:hover { color: var(--copper-3); }
.footer-col h3 { font-family: 'Inter', sans-serif; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--copper-2); margin-bottom: 1.1rem; font-weight: 700; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { color: rgba(247,241,230,0.6); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  border-top: 1px solid var(--line-dark); padding-top: 1.5rem; margin-top: 1rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  font-size: 0.79rem; color: rgba(247,241,230,0.4); max-width: 1240px; margin-inline: auto;
}

/* ═══════════ ANIMATION ═══════════ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-cell.span-2 { grid-column: span 2; }
  .svc-grid, .tpl-grid, .trio { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
  .nav-links { gap: 1.2rem; }
  .nav-links a { font-size: 0.83rem; }
}
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .tiers { grid-template-columns: 1fr; max-width: 460px; }
  .tiers .tier-flag { left: 2rem; transform: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .duo { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); padding: 0.6rem var(--gutter) 1.2rem;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line-soft); }
  .nav-links li:last-child { border-bottom: 0; padding-top: 0.9rem; }
  .nav-links a { display: block; padding: 0.9rem 0.2rem; font-size: 0.98rem; }
  .nav-links a.nav-cta { text-align: center; }
}
@media (max-width: 720px) {
  section { padding: 4.2rem var(--gutter); }
  .stat-strip { grid-template-columns: 1fr 1fr; gap: 1.6rem 1rem; }
  .svc-grid, .tpl-grid, .trio, .bento { grid-template-columns: 1fr; }
  .bento-cell.span-2 { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .opt-grid, .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .quote-card { min-width: 280px; max-width: 300px; }
  .form-card { padding: 1.6rem; }
  /* Hide the step LABEL on narrow screens, never the numbered dot — without
     the :not(), the progress bar collapses to disconnected lines. */
  .wiz-node span:not(.wiz-dot) { display: none; }
  .wiz-bar { gap: 0.35rem; }
}
@media (max-width: 520px) {
  :root { --gutter: 6vw; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .cookie { flex-direction: column; align-items: stretch; }
  .cookie .actions { justify-content: stretch; }
  .cookie .actions .btn-primary, .cookie .actions .btn-outline { flex: 1; }
  .work-metrics { grid-template-columns: 1fr; }
  .work-metrics div { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .work-metrics div:last-child { border-bottom: 0; }
}

@media print {
  .nav, footer, .cookie, .cta-band { display: none; }
}
