/* =========================================================
   DreamBox Landing Page
   Aesthetic: warm-industrial blueprint
   ========================================================= */

/* ---------- TOKENS ---------- */
:root {
  /* paper + ink palette */
  --paper:        #F0E9D9;
  --paper-deep:   #E5DCC5;
  --paper-warm:   #F7F1E2;
  --ink:          #0E1B2C;
  --ink-soft:     rgba(14, 27, 44, 0.78);
  --ink-muted:    rgba(14, 27, 44, 0.55);
  --ink-faint:    rgba(14, 27, 44, 0.30);
  --rule:         rgba(14, 27, 44, 0.14);
  --rule-strong:  rgba(14, 27, 44, 0.32);

  /* accents */
  --accent:       #D2541F;
  --accent-deep:  #A03D14;
  --accent-soft:  rgba(210, 84, 31, 0.10);
  --blue:         #6B92A8;
  --blue-soft:    rgba(107, 146, 168, 0.18);

  /* type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* scale */
  --container-max: 1240px;
  --gutter:        clamp(20px, 4vw, 56px);
  --grid-unit:     24px;
}

/* ---------- RESET + BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--paper); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
}

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

/* ---------- DECORATIVE BACKGROUND ---------- */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: var(--grid-unit) var(--grid-unit);
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 85%);
  z-index: 0;
}

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(rgba(14,27,44,0.04) 1px, transparent 1px),
    radial-gradient(rgba(14,27,44,0.03) 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 1px 2px;
}

main, .site-header, .site-footer { position: relative; z-index: 2; }

/* ---------- TYPOGRAPHY ---------- */
.display-xl {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  margin: 0 0 32px;
  color: var(--ink);
}
.display-xl em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  position: relative;
}

.display-l {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 96;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  max-width: 22ch;
}

.lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.35;
  color: var(--ink-soft);
  margin: 0 0 20px;
  max-width: 36ch;
}

.eyebrow,
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow-mark { color: var(--accent); font-size: 13px; }

.mono-fine-print {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 0;
}

/* ---------- HEADER ---------- */
.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.wordmark .bracket {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 22px;
  position: relative;
  top: 1px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--ink); }
.nav-cta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }
.nav-cta .arrow { transition: transform 0.2s; }
.nav-cta:hover .arrow { transform: translateX(2px); }

@media (max-width: 760px) {
  .nav-link { display: none; }
}

/* ---------- HERO ---------- */
.hero {
  padding: clamp(60px, 10vh, 120px) 0 clamp(40px, 8vh, 80px);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}
.hero-text {
  animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-text > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-text .eyebrow      { animation-delay: 0.0s; }
.hero-text .display-xl   { animation-delay: 0.06s; }
.hero-text .lede         { animation-delay: 0.16s; }
.hero-text .hero-body    { animation-delay: 0.22s; }
.hero-text .hero-cta-row { animation-delay: 0.30s; }

.hero-body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 36px;
  max-width: 40ch;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  animation: fadeIn 1.4s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  perspective: 1200px;
}
.hero-box {
  width: 100%;
  height: auto;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

/* SVG styling */
.face { stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.face-top { fill: rgba(245, 240, 224, 0.95); }
.face-left { fill: rgba(14, 27, 44, 0.05); }
.face-front { fill: url(#frontFace); }

.annotation line { stroke: var(--ink); stroke-width: 0.7; stroke-dasharray: 3 3; }
.annotation .annotation-dot { fill: var(--accent); }
.svg-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  fill: var(--ink);
}
.svg-mono-small { font-size: 10px; }
.svg-mono-faint { fill: var(--ink-muted); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; }

.hero-scrollcue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeIn 1.4s 1s both;
  pointer-events: none;
}
.scrollcue-line {
  width: 1px;
  height: 36px;
  background: var(--ink-faint);
  animation: pulseDown 2s ease-in-out infinite;
  transform-origin: top;
}
.scrollcue-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 480px; margin: 0 auto; }
  .hero-scrollcue { display: none; }
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 999px;
  text-transform: uppercase;
  position: relative;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  box-shadow: 0 2px 0 0 rgba(14,27,44,0.6);
}
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 4px 0 0 rgba(14,27,44,0.5);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 0 0 rgba(14,27,44,0.6);
}
.btn-primary .btn-arrow { transition: transform 0.2s; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }
.btn-primary-lg { padding: 18px 32px; font-size: 14px; }

/* ---------- SECTION HEADERS ---------- */
.section-header {
  margin-bottom: clamp(40px, 6vw, 80px);
  max-width: 800px;
}
.section-header-split {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.section-aside {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 28ch;
  margin: 0;
}

section {
  padding: clamp(80px, 12vh, 140px) 0;
  border-top: 1px solid var(--rule);
}

/* ---------- PROBLEM ---------- */
.problem-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  counter-reset: problem;
}
.problem-item {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--rule-strong);
}
.problem-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}
.problem-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  color: var(--ink);
}
.problem-body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 880px) {
  .problem-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- BUILDS ---------- */
.builds { background: var(--paper-warm); }
.build-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule-strong);
}
.build-card {
  padding: 36px 28px 32px;
  border-right: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  position: relative;
  background: var(--paper-warm);
  transition: background 0.3s, transform 0.3s;
}
.build-card:hover {
  background: var(--paper);
  z-index: 2;
}
.build-fig {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  display: block;
  margin-bottom: 24px;
}
.build-icon {
  width: 80px;
  height: 60px;
  margin-bottom: 24px;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.build-card:hover .build-icon { transform: translateY(-4px) rotate(-2deg); }
.build-icon .b-top { fill: rgba(245, 240, 224, 0.6); stroke: var(--ink); stroke-width: 0.8; }
.build-icon .b-left { fill: rgba(14, 27, 44, 0.06); stroke: var(--ink); stroke-width: 0.8; }
.build-icon .b-right { fill: rgba(210, 84, 31, 0.10); stroke: var(--ink); stroke-width: 0.8; }
.build-card-wild .build-icon polygon { fill: transparent; opacity: 0.65; }
.build-card-wild .build-fig { color: var(--accent); }
.build-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2vw, 22px);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.2;
}
.build-desc {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 1000px) { .build-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .build-grid { grid-template-columns: 1fr; } }

/* ---------- HOW ---------- */
.how-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.how-step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--rule);
}
.how-step:first-child { border-top: 1px solid var(--rule-strong); }
.how-step-marker {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
}
.step-divider {
  flex: 1;
  width: 1px;
  background: var(--rule);
}
.step-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 16px;
}
.step-text {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  max-width: 56ch;
}
.step-text em { font-style: italic; color: var(--ink); }

.step-example {
  margin: 24px 0 0;
  padding: 18px 22px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-warm);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 2px;
  max-width: 56ch;
  box-shadow: 3px 3px 0 0 var(--rule);
}
.example-prompt { color: var(--accent); }
.example-text { color: var(--ink-soft); }

@media (max-width: 720px) {
  .how-step { grid-template-columns: 1fr; gap: 20px; }
  .step-divider { display: none; }
}

/* ---------- TRUST ---------- */
.trust { background: var(--ink); color: var(--paper); }
.trust .section-eyebrow { color: rgba(240, 233, 217, 0.55); }
.trust .display-l { color: var(--paper); }

.trust-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(240, 233, 217, 0.18);
}
.trust-card {
  padding: 40px 32px;
  border-right: 1px solid rgba(240, 233, 217, 0.18);
}
.trust-card:last-child { border-right: none; }
.trust-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 24px;
}
.trust-icon * { stroke: var(--paper) !important; }
.trust-icon path[stroke="#D2541F"],
.trust-icon polygon[stroke="#D2541F"],
.trust-icon circle[fill="#D2541F"] { stroke: var(--accent) !important; fill: var(--accent) !important; }
.trust-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  color: var(--paper);
}
.trust-body {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(240, 233, 217, 0.72);
  margin: 0;
}

@media (max-width: 880px) {
  .trust-grid { grid-template-columns: 1fr; }
  .trust-card { border-right: none; border-bottom: 1px solid rgba(240, 233, 217, 0.18); }
  .trust-card:last-child { border-bottom: none; }
}

/* ---------- FAQ ---------- */
.faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule-strong);
}
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-item details {
  padding: 24px 0;
}
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.25;
  color: var(--ink);
  transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-q-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 60px;
}
.faq-q-text { flex: 1; }
.faq-q-icon {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-muted);
  transition: transform 0.3s;
}
.faq-item details[open] .faq-q-icon { transform: rotate(45deg); color: var(--accent); }
.faq-a {
  margin-top: 18px;
  margin-left: 80px;
  max-width: 60ch;
}
.faq-a p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.faq-a p:last-child { margin-bottom: 0; }
.faq-a em { font-style: italic; color: var(--ink); }

@media (max-width: 640px) {
  .faq-q-num { min-width: 0; }
  .faq-a { margin-left: 0; }
}

/* ---------- CTA ---------- */
.cta { background: var(--paper-deep); }
.cta-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 0;
}
.cta-card .section-eyebrow { justify-content: center; }
.cta-card .display-l { margin: 0 auto 20px; }
.cta-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-muted);
  margin: 0 0 40px;
}

.waitlist-form { margin: 0 auto; max-width: 580px; }
.form-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
  padding: 4px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}
.form-row:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }
.email-input {
  flex: 1;
  padding: 16px 24px;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.email-input::placeholder { color: var(--ink-faint); }
.btn-primary-lg { flex-shrink: 0; }
.form-fine-print { text-align: center; }
.form-error {
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  margin: 8px 0 0;
}

.form-state-submitted {
  text-align: center;
  padding: 32px 0;
  animation: fadeIn 0.6s ease both;
}
.confirmation-mark {
  font-family: var(--font-mono);
  font-size: 48px;
  color: var(--accent);
  margin: 0 0 16px;
  line-height: 1;
}
.confirmation-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.confirmation-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-muted);
  margin: 0;
}

@media (max-width: 560px) {
  .form-row { flex-direction: column; border-radius: 24px; padding: 8px; gap: 8px; }
  .email-input { text-align: center; }
  .btn-primary-lg { justify-content: center; }
}

/* ---------- FOOTER ---------- */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid var(--rule-strong);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-muted);
  margin: 0;
}
.footer-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-sep { color: var(--ink-faint); }
.footer-link { color: var(--ink); transition: color 0.2s; }
.footer-link:hover { color: var(--accent); }

/* ---------- ANIMATIONS ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulseDown {
  0%, 100% { transform: scaleY(0.3); transform-origin: top; opacity: 0.4; }
  50%      { transform: scaleY(1);   transform-origin: top; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* small responsive niceties */
@media (max-width: 480px) {
  .break-sm { display: none; }
  .hero-cta-row { flex-direction: column; align-items: flex-start; gap: 18px; }
}
