/* Estate proposal — art-directed presentation. Content lives in HTML. */
:root {
  --night: #071412;
  --forest: #0e2a25;
  --pine: #1b4a42;
  --ink: #1a2421;
  --muted: #5d6a64;
  --linen: #f4efe4;
  --paper: #fbf7ef;
  --stone: #d8cfc0;
  --brass: #b8924a;
  --gold: #d4b56c;
  --mist: rgba(255, 250, 241, .72);
  --glass: rgba(255, 250, 241, .12);
  --glass-edge: rgba(255, 250, 241, .22);
  --shadow: 0 1.25rem 3.5rem rgba(7, 20, 18, .16);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --content: 78rem;
  --measure: 42rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--linen);
  font-family: Vazirmatn, Vazir, Shabnam, Tahoma, "Noto Naskh Arabic", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.9;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(212, 181, 108, .16), transparent 55%),
    radial-gradient(900px 600px at 0% 30%, rgba(27, 74, 66, .08), transparent 50%),
    linear-gradient(180deg, #efe8d9 0%, #f4efe4 28%, #ece4d4 100%);
  content: "";
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  background-image: radial-gradient(rgba(7, 20, 18, .08) 0.6px, transparent 0.7px);
  background-size: 3px 3px;
}

button,
a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: var(--pine); text-underline-offset: .18em; }
strong { color: var(--forest); font-weight: 800; }
em { font-style: italic; color: var(--muted); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  inset: .8rem auto auto 50%;
  z-index: 300;
  padding: .65rem 1.1rem;
  color: #fff;
  background: var(--night);
  border-radius: 999px;
  transform: translate(-50%, -220%);
}
.skip-link:focus { transform: translate(-50%, 0); }

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 160;
  height: 2px;
  background: transparent;
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brass), var(--gold));
}

.glass-panel {
  border: 1px solid var(--glass-edge);
  background: linear-gradient(165deg, rgba(255,250,241,.14), rgba(255,250,241,.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1rem 2.5rem rgba(7,20,18,.18);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.topbar {
  position: fixed;
  inset: 1rem max(1rem, 4vw) auto;
  z-index: 140;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 3.6rem;
  padding: .35rem .55rem .35rem 1.05rem;
  color: #fff7e8;
  background: linear-gradient(165deg, rgba(7,20,18,.86), rgba(14,42,37,.78));
  border: 1px solid rgba(255,247,232,.18);
  border-radius: 1.1rem;
  box-shadow: 0 .8rem 2.2rem rgba(7,20,18,.28), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.brand,
.toc-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  white-space: nowrap;
  color: inherit;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}
.brand::before {
  width: .62rem;
  height: .62rem;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 .22rem rgba(212,181,108,.22);
  content: "";
}

.topbar-progress {
  display: flex;
  gap: .55rem;
  justify-content: center;
  align-items: baseline;
  min-width: 0;
  color: rgba(255,247,232,.58);
  font-size: .72rem;
}
.topbar-progress span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-progress strong { color: var(--gold); font-size: .88rem; }

.menu-button,
.toc-close,
.back-to-top {
  min-width: 44px;
  min-height: 44px;
  color: inherit;
  border: 0;
  background: transparent;
}

.menu-button {
  display: flex;
  gap: .65rem;
  align-items: center;
  padding: 0 .75rem;
  border-radius: .8rem;
}
.menu-button:hover { background: rgba(255,255,255,.08); }
.menu-button i {
  position: relative;
  display: block;
  width: 1.1rem;
  height: 1px;
  background: currentColor;
}
.menu-button i::before,
.menu-button i::after {
  position: absolute;
  width: 100%;
  height: 1px;
  background: currentColor;
  content: "";
}
.menu-button i::before { transform: translateY(-5px); }
.menu-button i::after { transform: translateY(5px); }

.toc-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 180;
  width: min(28rem, 92vw);
  padding: 1.4rem 1.6rem 2rem;
  overflow-y: auto;
  color: #f6f0e4;
  background: linear-gradient(180deg, rgba(7,20,18,.88), rgba(14,42,37,.82));
  border-left: 1px solid rgba(212,181,108,.22);
  transform: translateX(108%);
  transition: transform .45s var(--ease);
}
.menu-open .toc-panel { transform: none; }

.toc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.toc-close { border-radius: 50%; background: rgba(255,255,255,.06); font-size: 1.5rem; }
.toc-label {
  margin: 1.7rem 0 .5rem;
  color: var(--gold);
  font-size: .72rem;
  letter-spacing: .16em;
}
.toc-panel ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc-panel li { counter-increment: toc; }
.toc-panel a:not(.toc-brand) {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: .7rem;
  padding: .62rem .45rem;
  color: rgba(246,240,228,.7);
  border-radius: .55rem;
  text-decoration: none;
  line-height: 1.55;
  transition: background .2s ease, color .2s ease;
}
.toc-panel a:not(.toc-brand)::before {
  color: var(--brass);
  content: counter(toc, decimal-leading-zero);
  direction: ltr;
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}
.toc-panel a:hover,
.toc-panel a[aria-current="true"] {
  color: #fff;
  background: rgba(255,255,255,.07);
}

.toc-overlay {
  position: fixed;
  inset: 0;
  z-index: 170;
  background: rgba(5,12,11,.55);
  backdrop-filter: blur(6px);
}
.menu-open { overflow: hidden; }

/* Hero */
.proposal-hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: clamp(6.5rem, 12vh, 9rem) max(1.2rem, 6vw) 4rem;
  overflow: hidden;
  color: #f7f1e4;
  background:
    radial-gradient(ellipse 70% 80% at 18% 110%, rgba(184,146,74,.18), transparent 55%),
    linear-gradient(160deg, #071412 0%, #0e2a25 58%, #12352e 100%);
}

.hero-atmosphere { position: absolute; inset: 0; pointer-events: none; }
.hero-grid {
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 7.5rem 7.5rem;
  mask-image: linear-gradient(180deg, #000, transparent 88%);
  transform: translate3d(var(--depth-x, 0), calc(var(--depth-y, 0) * .4 + var(--depth-scroll, 0)), 0);
}
.hero-orb {
  position: absolute;
  inset: 8% auto auto 8%;
  width: min(42vw, 36rem);
  aspect-ratio: 1;
  border: 1px solid rgba(212,181,108,.18);
  border-radius: 50%;
  transform: translate3d(calc(var(--depth-x, 0) * -1.4), calc(var(--depth-y, 0) * -1 + var(--depth-scroll, 0) * .6), 0);
}
.hero-orb::after {
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(212,181,108,.12);
  border-radius: 50%;
  content: "";
}
.hero-shaft {
  position: absolute;
  inset: -10% 42% auto 18%;
  height: 140%;
  background: linear-gradient(115deg, transparent, rgba(212,181,108,.12), transparent);
  transform: rotate(18deg) translate3d(var(--depth-x, 0), var(--depth-scroll, 0), 0);
}
.hero-frame {
  position: absolute;
  inset: 5.5rem max(1.2rem, 4vw) 2rem;
  border: 1px solid rgba(255,247,232,.08);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, .9fr);
  gap: clamp(1.4rem, 4vw, 4.5rem);
  align-items: center;
  width: min(100%, var(--content));
  margin: auto;
  min-width: 0;
}

.hero-title::before {
  display: block;
  width: 3.25rem;
  height: 1px;
  margin-bottom: 1.5rem;
  background: var(--gold);
  content: "";
}
.hero-title {
  min-width: 0;
  padding-inline-end: .25rem;
}
.hero-title h1 {
  max-width: 100%;
  margin: 0;
  color: #fffdf6;
  font-size: clamp(2.1rem, 3.8vw, 3.85rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -.03em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero-specs {
  padding: 1.5rem 1.6rem 1.2rem;
  border-radius: 1.4rem;
  background: linear-gradient(165deg, rgba(255,250,241,.16), rgba(255,250,241,.06));
}
.proposal-hero .hero-specs .section-heading {
  display: block;
  margin: 0 0 1.1rem;
}
.proposal-hero .hero-specs .section-heading::after,
.proposal-hero .hero-specs hr { display: none; }
.proposal-hero .hero-specs h2 {
  margin: 0;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.hero-specs ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .15rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-specs li {
  padding: .85rem 0 .7rem;
  color: rgba(255,247,232,.72);
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .9rem;
  line-height: 1.55;
}
.hero-specs strong { color: #fff; }

/* Shared section anatomy */
.proposal-section {
  position: relative;
  padding: clamp(4.2rem, 8vw, 7.5rem) max(1.2rem, 5.5vw);
  overflow: clip;
  scroll-margin-top: 5.75rem;
}
.section-inner {
  position: relative;
  width: min(100%, var(--content));
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, min(34rem, 100%)) minmax(2.5rem, 1fr);
  align-items: end;
  gap: 1.25rem;
  margin-bottom: clamp(2.2rem, 5vw, 4rem);
}
.section-heading::after {
  height: 1px;
  background: linear-gradient(90deg, var(--brass), transparent);
  content: "";
}
.section-heading h2 {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--forest);
  font-size: clamp(1.85rem, 3.2vw, 3.15rem);
  line-height: 1.22;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.chapter-mark {
  position: absolute;
  inset: -3.5rem auto auto 0;
  color: rgba(14,42,37,.06);
  font-size: clamp(8rem, 20vw, 17rem);
  font-weight: 900;
  line-height: .8;
  pointer-events: none;
}
.proposal-section > .section-inner > p,
.proposal-section .group-body > p {
  max-width: var(--measure);
  margin: 0 0 1.15rem;
}
.proposal-section hr {
  width: 3.2rem;
  height: 1px;
  margin: 3.5rem 0 0;
  background: var(--stone);
  border: 0;
}
.content-group { position: relative; margin: 0 0 3.5rem; }
.group-heading h3 {
  max-width: 22ch;
  margin: 0 0 1.25rem;
  color: var(--forest);
  font-size: clamp(1.35rem, 2.4vw, 2.15rem);
  line-height: 1.35;
  letter-spacing: -.03em;
}
.subgroup { margin: 0 0 1.8rem; }
.subgroup-heading h4 {
  margin: 0 0 .7rem;
  color: var(--forest);
  font-size: 1.12rem;
  line-height: 1.5;
}
.list-block ul,
.list-block ol {
  max-width: 50rem;
  margin: .8rem 0 1.3rem;
  padding: 0 1.2rem 0 0;
}
.list-block li { margin: .45rem 0; }
.list-block li::marker { color: var(--brass); font-weight: 800; }

.flow-block {
  width: min(100%, 34rem);
  margin: 1.3rem 0 2rem;
  overflow: hidden;
  color: #e8f2ee;
  background: var(--night);
  border: 1px solid rgba(212,181,108,.28);
  border-radius: 1.35rem 1.35rem 1.1rem 1.1rem;
  box-shadow: var(--shadow);
}
.flow-block::before {
  display: block;
  height: 1.9rem;
  background:
    radial-gradient(circle at 1.1rem 50%, #e08a7a 0 5px, transparent 6px),
    radial-gradient(circle at 2.1rem 50%, #d4b56c 0 5px, transparent 6px),
    radial-gradient(circle at 3.1rem 50%, #7dba9a 0 5px, transparent 6px),
    linear-gradient(#16332e, #122924);
  content: "";
}
.flow-block pre {
  margin: 0;
  padding: 1.2rem 1.3rem 1.4rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.flow-block code {
  font-family: Vazirmatn, Vazir, Tahoma, monospace;
  font-size: .9rem;
  line-height: 1.95;
}

.table-wrap {
  margin: 1.6rem 0 2rem;
  overflow-x: auto;
  background: rgba(255,250,241,.55);
  border: 1px solid var(--stone);
  border-radius: 1rem;
}
table { width: 100%; min-width: 46rem; border-collapse: collapse; }
th, td { padding: .95rem 1rem; text-align: right; border-bottom: 1px solid var(--stone); }
th { color: #f7f1e4; background: var(--forest); font-weight: 800; }
tbody tr:last-child td { border: 0; }
tbody tr:hover { background: rgba(184,146,74,.08); }

/* Summary: editorial intro + staggered stages */
.layout-summary {
  background:
    radial-gradient(ellipse at 12% 0%, rgba(184,146,74,.08), transparent 42%),
    linear-gradient(180deg, #efe7d7, #f4efe4 40%, #ebe3d3);
}
.layout-summary > .section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 1.8rem;
  align-items: stretch;
}
.layout-summary .section-heading { grid-column: 1 / -1; }
.layout-summary > .section-inner > p { grid-column: 1 / -1; }
.layout-summary > .section-inner > p:first-of-type {
  max-width: 38rem;
  margin-bottom: .4rem;
  padding: 1.4rem 1.5rem;
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.8;
  background: linear-gradient(165deg, rgba(255,250,241,.7), rgba(255,250,241,.28));
  border: 1px solid rgba(212,181,108,.28);
  border-radius: 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
  backdrop-filter: blur(14px);
}
.layout-summary > .section-inner > p:nth-of-type(2) {
  max-width: none;
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}
.layout-summary .content-group {
  margin: 0;
  padding: 1.7rem 1.6rem 1.4rem;
  background: var(--paper);
  border: 1px solid rgba(14,42,37,.08);
  border-radius: 1.25rem;
  box-shadow: 0 1rem 2.2rem rgba(7,20,18,.06);
}
.layout-summary .content-group:nth-of-type(1) {
  background: linear-gradient(165deg, rgba(255,250,241,.72), rgba(255,250,241,.28));
  border: 1px solid rgba(212,181,108,.32);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transform: translateY(1.4rem);
}
.layout-summary .content-group:nth-of-type(2) {
  background: var(--forest);
  color: #f6f0e4;
}
.layout-summary .content-group:nth-of-type(2) .group-heading h3,
.layout-summary .content-group:nth-of-type(2) strong { color: var(--gold); }
.layout-summary .content-group:nth-of-type(2) .list-block li::marker { color: var(--gold); }

/* Manifesto: cinematic dark essay */
.layout-manifesto {
  color: #f4eee2;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(184,146,74,.16), transparent 46%),
    var(--night) !important;
}
.layout-manifesto .section-heading h2,
.layout-manifesto .group-heading h3 { color: #fffdf6; }
.layout-manifesto strong { color: var(--gold); }
.layout-manifesto .section-heading::after { background: linear-gradient(90deg, var(--gold), transparent); }
.layout-manifesto > .section-inner {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 1rem 8vw;
}
.layout-manifesto .section-heading { grid-column: 1 / -1; }
.layout-manifesto > .section-inner > p {
  margin: 0 0 1.6rem;
  font-size: clamp(1.12rem, 1.8vw, 1.38rem);
  line-height: 1.85;
}
.layout-manifesto .content-group {
  grid-column: 1 / -1;
  margin: 1.5rem 0 0;
  padding: 1.8rem 1.8rem 1.2rem;
  background: linear-gradient(165deg, rgba(255,250,241,.1), rgba(255,250,241,.04));
  border: 1px solid rgba(255,247,232,.14);
  border-radius: 1.25rem;
  backdrop-filter: blur(16px);
}
.layout-manifesto .content-group p { max-width: none; font-size: 1.05rem; }

/* Challenges: numbered case studies, not identical cards */
.layout-challenges .content-group:first-of-type .group-body {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 0;
  border-top: 1px solid var(--stone);
}
.layout-challenges .subgroup {
  margin: 0;
  padding: 2rem 1.6rem 2rem 1.2rem;
  border-bottom: 1px solid var(--stone);
}
.layout-challenges .subgroup:nth-child(odd) { background: rgba(255,250,241,.35); }
.layout-challenges .subgroup-heading h4 {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  align-items: baseline;
  font-size: 1.28rem;
}
.layout-challenges .content-group:last-of-type {
  margin-top: 2.5rem;
  padding: 2.2rem 2rem;
  color: #f6f0e4;
  background: linear-gradient(145deg, rgba(14,42,37,.92), rgba(7,20,18,.88));
  border: 1px solid rgba(212,181,108,.22);
  border-radius: 1.4rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.layout-challenges .content-group:last-of-type h3,
.layout-challenges .content-group:last-of-type strong { color: var(--gold); }

/* Capabilities: sticky narrative + device screens */
.layout-capabilities .content-group {
  display: grid;
  grid-template-columns: minmax(14rem, .62fr) minmax(0, 1.38fr);
  gap: 1.5rem 6vw;
  margin: 0;
  padding: 3.2rem 0;
  border-top: 1px solid var(--stone);
}
.layout-capabilities .group-heading { position: sticky; top: 6.5rem; align-self: start; }
.layout-capabilities .content-group:nth-of-type(even) {
  grid-template-columns: minmax(0, 1.38fr) minmax(14rem, .62fr);
}
.layout-capabilities .content-group:nth-of-type(even) .group-heading { grid-column: 2; }
.layout-capabilities .content-group:nth-of-type(even) .group-body { grid-column: 1; grid-row: 1; }
.layout-capabilities .flow-block { margin-inline-start: auto; }

/* Website: bento mosaic */
.layout-website { background: rgba(232, 222, 204, .45); }
.layout-website .content-group:nth-of-type(1) .group-body,
.layout-website .content-group:nth-of-type(2) .group-body {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.layout-website .subgroup {
  margin: 0;
  padding: 1.4rem 1.3rem;
  background: var(--paper);
  border: 1px solid rgba(14,42,37,.08);
  border-radius: 1.1rem;
}
.layout-website .content-group:nth-of-type(1) .subgroup:nth-child(1) { grid-column: span 3; }
.layout-website .content-group:nth-of-type(1) .subgroup:nth-child(2) { grid-column: span 3; }
.layout-website .content-group:nth-of-type(1) .subgroup:nth-child(3) { grid-column: span 2; }
.layout-website .content-group:nth-of-type(2) .subgroup { grid-column: span 2; min-height: 11rem; }
.layout-website .content-group:nth-of-type(2) .subgroup:nth-child(1) {
  grid-column: span 4;
  background: var(--forest);
  color: #f6f0e4;
}
.layout-website .content-group:nth-of-type(2) .subgroup:nth-child(1) h4,
.layout-website .content-group:nth-of-type(2) .subgroup:nth-child(1) strong { color: var(--gold); }
.layout-website .content-group:nth-of-type(3) {
  padding: 2rem;
  background: var(--paper);
  border-radius: 1.3rem;
}
.layout-website .flow-block { width: min(100%, 42rem); }

/* Pricing: magazine rate cards */
.layout-pricing {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(184,146,74,.14), transparent 45%),
    linear-gradient(180deg, #e4d8c0, #efe6d4) !important;
}
.layout-pricing > .section-inner > p:first-of-type {
  max-width: 28rem;
  font-size: 1.2rem;
}
.layout-pricing .content-group {
  padding: 2rem 2rem 1.4rem;
  background: rgba(255,250,241,.78);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 1.35rem;
  box-shadow: 0 1.1rem 2.4rem rgba(7,20,18,.08);
  backdrop-filter: blur(14px);
}
.layout-pricing .content-group:nth-of-type(1) { max-width: 54rem; }
.layout-pricing .content-group:nth-of-type(2) {
  max-width: 48rem;
  margin-right: auto;
  margin-left: 8vw;
}
.layout-pricing p strong,
.layout-pricing li strong {
  color: var(--forest);
  font-size: 1.22em;
  background: linear-gradient(transparent 62%, rgba(212,181,108,.42) 62%);
}
.layout-pricing .content-group:last-of-type {
  max-width: none;
  margin-left: 0;
  color: #f6f0e4;
  background: linear-gradient(160deg, rgba(14,42,37,.94), rgba(7,20,18,.9));
  border: 1px solid rgba(212,181,108,.24);
  backdrop-filter: blur(16px);
}
.layout-pricing .content-group:last-of-type h3,
.layout-pricing .content-group:last-of-type strong { color: var(--gold); }

/* ROI */
.layout-roi > .section-inner {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 2rem 7vw;
}
.layout-roi .section-heading { grid-column: 1 / -1; }
.layout-roi .content-group:first-of-type {
  grid-row: span 2;
  padding: 2rem 0 0;
  border-top: 3px solid var(--brass);
}
.layout-roi .content-group:nth-of-type(n + 2) {
  padding: 1.5rem 0 1.5rem 0;
  border-right: 1px solid var(--stone);
  padding-right: 1.6rem;
}

/* FAQ: large questions, quiet answers */
.layout-faq .content-group {
  display: grid;
  grid-template-columns: minmax(16rem, .7fr) 1.3fr;
  gap: 1.5rem 3rem;
  margin: 0;
  padding: 1.7rem 0;
  border-top: 1px solid var(--stone);
}
.layout-faq .group-heading h3 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}
.layout-faq .group-body p { margin: 0; color: var(--muted); }

/* Future: irregular mosaic */
.layout-future > .section-inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.layout-future .section-heading,
.layout-future > .section-inner > p,
.layout-future > .section-inner > hr { grid-column: 1 / -1; }
.layout-future .content-group {
  grid-column: span 6;
  margin: 0;
  padding: 1.5rem 1.4rem;
  background: var(--paper);
  border: 1px solid rgba(14,42,37,.08);
  border-radius: 1.1rem;
}
.layout-future .content-group:nth-of-type(1) { grid-column: span 7; }
.layout-future .content-group:nth-of-type(2) { grid-column: span 5; min-height: 14rem; }
.layout-future .content-group:nth-of-type(3) { grid-column: span 4; }
.layout-future .content-group:nth-of-type(4) { grid-column: span 8; }
.layout-future .content-group:nth-of-type(5) { grid-column: span 6; }
.layout-future .content-group:nth-of-type(6) { grid-column: span 6; }
.layout-future .content-group:nth-of-type(7) { grid-column: 3 / span 8; }

/* Legal */
.layout-legal {
  color: #f3eee3;
  background: #121c1a !important;
}
.layout-legal .section-heading h2,
.layout-legal .group-heading h3 { color: #fffdf6; }
.layout-legal strong { color: var(--gold); }
.layout-legal > .section-inner > p {
  max-width: 58rem;
  padding: 1.5rem 1.7rem;
  background: linear-gradient(165deg, rgba(255,250,241,.1), rgba(255,250,241,.04));
  border: 1px solid rgba(212,181,108,.28);
  border-radius: 1.15rem;
  backdrop-filter: blur(16px);
}
.layout-legal .content-group {
  margin: 0;
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,.1);
}
.layout-legal .content-group:nth-of-type(3) {
  padding: 1.6rem 1.5rem;
  background: rgba(124, 52, 45, .16);
  border: 1px solid rgba(208, 120, 108, .28);
  border-radius: 1.1rem;
}

/* Process rails */
.layout-support .content-group,
.layout-changes .content-group,
.layout-assumptions .content-group {
  margin: 0;
  padding: 1.6rem 2.2rem 1.6rem 0;
  border-right: 1px solid var(--brass);
}
.layout-support .content-group::before,
.layout-changes .content-group::before,
.layout-assumptions .content-group::before {
  position: absolute;
  inset: 1.85rem -.42rem auto auto;
  width: .7rem;
  height: .7rem;
  background: var(--gold);
  border-radius: 50%;
  content: "";
}
.layout-assumptions > .section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem 3rem;
}
.layout-assumptions .section-heading,
.layout-assumptions > .section-inner > p,
.layout-assumptions > .section-inner > hr { grid-column: 1 / -1; }

/* Closing climax */
.layout-closing {
  min-height: 100svh;
  color: #f6f0e4;
  background:
    radial-gradient(ellipse at 20% 100%, rgba(184,146,74,.2), transparent 42%),
    linear-gradient(160deg, #071412, #0e2a25) !important;
}
.layout-closing .section-heading h2,
.layout-closing .group-heading h3,
.layout-closing .subgroup-heading h4 { color: #fffdf6; }
.layout-closing strong { color: var(--gold); }
.layout-closing .content-group {
  padding: 1.7rem 1.6rem;
  background: linear-gradient(165deg, rgba(255,250,241,.08), rgba(255,250,241,.03));
  border: 1px solid rgba(255,247,232,.12);
  border-radius: 1.2rem;
  backdrop-filter: blur(14px);
}
.layout-closing .subgroup {
  margin: 1.3rem 0 0;
  padding-right: 1.2rem;
  border-right: 2px solid var(--brass);
}

/* Questionnaire */
.layout-questionnaire .content-group {
  padding: 1.5rem 1.5rem 1.1rem;
  background: var(--paper);
  border: 1px solid var(--stone);
  border-radius: 1.1rem;
}
.layout-questionnaire .choice { list-style: none; }
.layout-questionnaire .choice label {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  min-height: 44px;
  padding: .5rem .35rem;
  cursor: pointer;
}
.choice-box {
  appearance: none;
  flex: 0 0 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: .35rem;
  border: 1.5px solid var(--pine);
  border-radius: .25rem;
  background: transparent;
}
.choice-box:checked {
  background: var(--pine);
  box-shadow: inset 0 0 0 .22rem var(--paper);
}

/* Contact */
.layout-contact {
  color: #f6f0e4;
  background: var(--night) !important;
}
.layout-contact .section-heading h2,
.layout-contact strong { color: #fff; }
.layout-contact .section-inner { max-width: 46rem; }
.layout-contact a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,181,108,.45);
}
.layout-contact a:hover { border-bottom-color: var(--gold); }
.layout-contact .list-block {
  padding: 1.6rem 1.5rem;
  background: linear-gradient(165deg, rgba(255,250,241,.08), rgba(255,250,241,.03));
  border: 1px solid rgba(212,181,108,.24);
  border-radius: 1.15rem;
  backdrop-filter: blur(16px);
}

.back-to-top {
  position: fixed;
  inset: auto auto 1.4rem 1.4rem;
  z-index: 90;
  color: #fff;
  background: var(--forest);
  border-radius: 50%;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(.8rem);
  transition: opacity .25s ease, transform .25s var(--ease);
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-title h1 { max-width: 12ch; }
  .hero-specs { width: min(100%, 36rem); }
  .layout-summary > .section-inner,
  .layout-manifesto > .section-inner { grid-template-columns: 1fr 1fr; }
  .layout-summary .content-group:nth-of-type(1) { transform: none; }
  .layout-website .content-group:nth-of-type(1) .group-body,
  .layout-website .content-group:nth-of-type(2) .group-body { grid-template-columns: 1fr 1fr; }
  .layout-website .content-group:nth-of-type(1) .subgroup:nth-child(n),
  .layout-website .content-group:nth-of-type(2) .subgroup:nth-child(n) { grid-column: auto; }
  .layout-future > .section-inner { grid-template-columns: 1fr 1fr; }
  .layout-future .content-group:nth-of-type(n) { grid-column: auto; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 4.6rem; }
  .topbar {
    inset: .55rem .55rem auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .35rem;
    min-height: 3.3rem;
    padding-inline: .65rem .4rem;
  }
  .topbar-progress {
    display: flex;
    justify-content: center;
    gap: .25rem;
    font-size: .68rem;
  }
  .topbar-progress span { display: none; }
  .topbar-progress strong {
    font-size: .92rem;
    font-variant-numeric: tabular-nums;
  }
  .brand { font-size: .92rem; }
  .proposal-hero {
    min-height: auto;
    padding: 6.2rem 1rem 2.4rem;
  }
  .hero-frame { inset: 4.8rem .7rem 1.2rem; }
  .hero-title h1 {
    font-size: clamp(2.35rem, 11vw, 3.6rem);
    letter-spacing: -.04em;
  }
  .hero-specs {
    width: 100%;
    padding: 1.15rem 1.1rem;
  }
  .hero-specs ul { grid-template-columns: 1fr; }
  .proposal-section { padding: 3.6rem 1rem; }
  .section-heading {
    grid-template-columns: 1fr;
    margin-bottom: 1.8rem;
  }
  .section-heading::after {
    width: 3.2rem;
    margin-top: 1rem;
  }
  .section-heading h2 { font-size: clamp(1.7rem, 8.5vw, 2.45rem); }
  .chapter-mark { font-size: 5.5rem; inset: -2rem auto auto 0; }
  .layout-summary > .section-inner,
  .layout-manifesto > .section-inner,
  .layout-challenges .content-group:first-of-type .group-body,
  .layout-capabilities .content-group,
  .layout-capabilities .content-group:nth-of-type(even),
  .layout-roi > .section-inner,
  .layout-faq .content-group,
  .layout-assumptions > .section-inner,
  .layout-website .content-group:nth-of-type(1) .group-body,
  .layout-website .content-group:nth-of-type(2) .group-body,
  .layout-future > .section-inner { display: block; }
  .layout-capabilities .group-heading,
  .layout-capabilities .content-group:nth-of-type(even) .group-heading,
  .layout-capabilities .content-group:nth-of-type(even) .group-body {
    position: static;
    grid-column: auto;
  }
  .layout-summary > .section-inner > p:first-of-type {
    padding: 1.1rem 1rem;
    font-size: 1.08rem;
  }
  .layout-summary .content-group:nth-of-type(n),
  .layout-pricing .content-group:nth-of-type(2) {
    margin: 1rem 0;
    transform: none;
  }
  .layout-challenges .subgroup { padding: 1.25rem 0; }
  .layout-manifesto .content-group,
  .layout-closing .content-group,
  .layout-questionnaire .content-group {
    padding: 1.2rem 1.1rem;
  }
  .flow-block { width: 100%; }
  .table-wrap {
    margin-inline: -1rem;
    border-radius: 0;
    border-inline: 0;
  }
  .layout-support .content-group,
  .layout-changes .content-group,
  .layout-assumptions .content-group { padding: 1.2rem 1.25rem 1.2rem 0; }
  .back-to-top { inset: auto auto 1rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  .js-ready .reveal { opacity: 1; transform: none; }
  .hero-grid, .hero-orb, .hero-shaft { transform: none; }
}

@page { size: A4; margin: 14mm 13mm 16mm; }

@media print {
  body { background: #fff !important; color: #111; font-size: 10pt; line-height: 1.6; }
  .ambient,
  .topbar,
  .reading-progress,
  .toc-panel,
  .toc-overlay,
  .back-to-top,
  .skip-link,
  .hero-atmosphere,
  .chapter-mark { display: none !important; }
  .proposal-hero,
  .proposal-section,
  .layout-manifesto,
  .layout-pricing,
  .layout-legal,
  .layout-closing,
  .layout-contact { color: #111 !important; background: #fff !important; }
  .proposal-hero { min-height: auto; padding: 0 0 10mm; }
  .hero-inner { display: block; }
  .hero-title h1 { color: #111; font-size: 28pt; }
  .hero-specs, .content-group, .subgroup, .list-block, .layout-legal > .section-inner > p {
    color: #111 !important;
    background: #fff !important;
    border-color: #bbb !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  .section-heading h2, .group-heading h3, strong { color: #111 !important; }
  .proposal-section { padding: 9mm 0; break-before: page; }
  .flow-block { color: #111; background: #f3f3f3; box-shadow: none; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; font-size: 8pt; }
  th { color: #fff; background: #222 !important; print-color-adjust: exact; }
  .js-ready .reveal { opacity: 1 !important; transform: none !important; }
}
