/* The Missing Half — brand tokens */
:root {
  --navy: #0A1929;
  --ivory: #F5F1E8;
  --gold: #C9A961;
  --gold-soft: rgba(201, 169, 97, 0.22);
  --gold-rule: rgba(201, 169, 97, 0.45);
  --charcoal: #1C1C1C;
  --ivory-70: rgba(245, 241, 232, 0.7);
  --ivory-55: rgba(245, 241, 232, 0.55);
  --navy-70: rgba(10, 25, 41, 0.7);
  --navy-55: rgba(10, 25, 41, 0.70);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.serif {
  font-family: 'Fraunces', 'EB Garamond', Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30, "WONK" 0;
  letter-spacing: -0.015em;
}

.sans { font-family: 'Inter', system-ui, sans-serif; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Sections */
section { position: relative; }

.bg-navy { background: var(--navy); color: var(--ivory); }
.bg-ivory { background: var(--ivory); color: var(--charcoal); }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) {
  .container { padding: 0 22px; }
}

/* HERO */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 72px 0 72px;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201,169,97,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,169,97,0.035) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 30% 40%, black 30%, transparent 75%);
  pointer-events: none;
}
.hero-corner-mark {
  position: absolute;
  top: 32px; right: 32px;
  width: 46px; height: 46px;
  opacity: 0.95;
}
.hero-eyebrow {
  color: var(--gold);
  margin-bottom: 40px;
  display: inline-flex; align-items: center; gap: 14px;
}
.hero-eyebrow::before {
  content: "";
  width: 28px; height: 1px; background: var(--gold);
  display: inline-block;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 360;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ivory);
  margin: 0 0 28px;
  max-width: 15ch;
  font-variation-settings: "SOFT" 40, "opsz" 144;
}
.hero h1 em {
  font-style: italic;
  color: var(--ivory);
}
.hero .sub {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--ivory-70);
  max-width: 56ch;
  margin: 0 0 44px;
  font-weight: 400;
}
.cta-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  padding: 20px 36px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.cta-primary:hover { background: #D4B56E; }
.cta-note {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ivory-55);
  letter-spacing: 0.01em;
}

/* META BANNER */
.meta-banner {
  background: var(--ivory);
  border-top: 1px solid var(--gold-rule);
  border-bottom: 1px solid var(--gold-rule);
  padding: 28px 24px;
  text-align: center;
}
.meta-banner p {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 360;
  font-size: clamp(15px, 1.5vw, 19px);
  color: var(--navy);
  letter-spacing: -0.005em;
  line-height: 1.5;
  max-width: 70ch;
  margin-inline: auto;
}

/* Generic section frame */
.sec {
  padding: 140px 0;
}
@media (max-width: 780px) {
  .sec { padding: 92px 0; }
}
.sec-eyebrow {
  color: var(--gold);
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 36px;
}
.sec-eyebrow::before {
  content: "";
  width: 24px; height: 1px; background: var(--gold);
  display: inline-block;
}
.bg-ivory .sec-eyebrow { color: #7D5C0F; }

h2.sec-title {
  font-family: 'Fraunces', serif;
  font-weight: 360;
  font-size: clamp(34px, 4.5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 0 0 56px;
  max-width: 22ch;
  font-variation-settings: "SOFT" 40, "opsz" 144;
}
.bg-navy h2.sec-title { color: var(--ivory); }
.bg-ivory h2.sec-title { color: var(--navy); }

.sec-lede {
  font-size: 18px;
  line-height: 1.55;
  max-width: 58ch;
  margin: 0 0 56px;
}
.bg-navy .sec-lede { color: var(--ivory-70); }
.bg-ivory .sec-lede { color: var(--navy-70); }

/* Problem 2-col */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 60px;
  align-items: start;
}
.two-col .rule {
  background: var(--gold-rule);
  width: 1px;
  align-self: stretch;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .two-col .rule {
    width: 100%; height: 1px; margin: 52px 0;
  }
}

.col h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(22px, 2.3vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin: 0 0 20px;
  max-width: 22ch;
}
.bg-navy .col h3 { color: var(--ivory); }

.col p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 26px;
  max-width: 44ch;
}
.bg-ivory .col p { color: var(--navy-70); }
.bg-navy .col p { color: var(--ivory-70); }

.gold-bullets {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.gold-bullets li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 14px;
  align-items: baseline;
  font-size: 15px;
  line-height: 1.55;
}
.gold-bullets li::before {
  content: "";
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(2px);
  margin-left: 4px;
}
.bg-ivory .gold-bullets li { color: var(--navy); }
.bg-navy .gold-bullets li { color: var(--ivory); }

.problem-closer {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 360;
  font-size: clamp(20px, 2vw, 26px);
  text-align: center;
  color: var(--navy);
  margin: 96px auto 0;
  letter-spacing: -0.01em;
}
.problem-closer::before,
.problem-closer::after {
  content: "";
  display: inline-block;
  width: 42px; height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin: 0 22px;
  transform: translateY(-4px);
}

/* Install section */
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 72px;
}
@media (max-width: 860px) {
  .install-grid { grid-template-columns: 1fr; gap: 40px; }
}
.install-card {
  padding: 40px 4px 0;
  border-top: 1px solid var(--gold-rule);
  position: relative;
}
.install-card .ic-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.install-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 360;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  color: var(--ivory);
  margin: 0 0 14px;
  letter-spacing: -0.018em;
}
.install-card .ic-for {
  font-size: 14px;
  color: var(--ivory-55);
  margin: 0 0 28px;
  font-style: italic;
  font-family: 'Fraunces', serif;
}

.price-panel {
  border: 1px solid var(--gold);
  padding: 44px 32px;
  margin-top: 80px;
  text-align: center;
  color: var(--ivory);
  position: relative;
}
.price-panel .pp-line {
  font-family: 'Fraunces', serif;
  font-weight: 360;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.price-panel .pp-line .pp-price {
  color: var(--gold);
}
.price-panel .pp-meta {
  display: flex; justify-content: center; gap: 28px;
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-55);
  flex-wrap: wrap;
}
.price-panel .pp-meta span { position: relative; }
.price-panel .pp-meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -16px; top: 50%;
  width: 3px; height: 3px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateY(-50%);
}

/* How built */
.stack-strip {
  border-top: 1px solid var(--gold-rule);
  border-bottom: 1px solid var(--gold-rule);
  padding: 22px 0;
  margin-top: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.stack-strip span {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  color: var(--navy);
  letter-spacing: 0.01em;
  padding: 4px 20px;
  position: relative;
}
.stack-strip span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -3px; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}
.how-subnote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 360;
  font-size: 16px;
  color: var(--navy-70);
  margin-top: 28px;
  max-width: 60ch;
  line-height: 1.55;
}

/* Why me */
.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--gold-rule);
  padding-top: 22px;
}
.credentials .cred {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ivory);
  padding: 4px 28px 4px 0;
  margin-right: 28px;
  position: relative;
}
.credentials .cred:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold);
  transform: translateY(-50%);
}

/* Form */
.form-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.form-wrap .sec-title,
.form-wrap .sec-lede {
  text-align: center;
  margin-left: auto; margin-right: auto;
}
.form-wrap .sec-lede { margin-bottom: 64px; }

.field {
  display: flex; flex-direction: column;
  margin-bottom: 36px;
}
.field label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 12px;
  font-weight: 500;
}
.field label .req { color: var(--gold); margin-left: 4px; }
.field input[type="text"],
.field input[type="email"],
.field textarea {
  background: #FAF7F0;
  border: 1px solid rgba(10, 25, 41, 0.14);
  padding: 16px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--navy);
  border-radius: 0;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(10,25,41,0.35);
}
.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.field textarea {
  resize: vertical;
  min-height: 120px;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}
.char-count {
  font-size: 11px;
  color: var(--navy-55);
  align-self: flex-end;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-group label {
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
  font-weight: 400;
  color: var(--navy);
  margin: 0;
  padding: 12px 20px;
  border: 1px solid rgba(10,25,41,0.14);
  background: #FAF7F0;
  cursor: pointer;
  transition: all 140ms ease;
  user-select: none;
}
.radio-group input[type="radio"] {
  position: absolute;
  opacity: 0; pointer-events: none;
}
.radio-group label:hover {
  border-color: var(--gold-rule);
}
.radio-group label.selected {
  background: var(--navy);
  color: var(--ivory);
  border-color: var(--navy);
}

.field-error {
  color: #8B2E1F;
  font-size: 12px;
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.submit-btn {
  width: 100%;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 22px 32px;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: background-color 160ms ease;
  margin-top: 12px;
}
.submit-btn:hover { background: #D4B56E; }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.submit-note {
  text-align: center;
  color: var(--navy-55);
  font-size: 13px;
  margin-top: 24px;
  line-height: 1.55;
  max-width: 48ch;
  margin-inline: auto;
}

.success-panel {
  background: var(--navy);
  color: var(--ivory);
  padding: 64px 40px;
  text-align: center;
  border: 1px solid var(--gold);
}
.success-panel .sp-mark {
  width: 44px; height: 44px; margin: 0 auto 28px;
}
.success-panel h3 {
  font-family: 'Fraunces', serif;
  font-weight: 360;
  font-size: clamp(26px, 2.8vw, 34px);
  margin: 0 0 20px;
  letter-spacing: -0.015em;
}
.success-panel p {
  color: var(--ivory-70);
  font-size: 16px;
  line-height: 1.6;
  max-width: 42ch;
  margin: 0 auto 18px;
}
.success-panel .sig {
  font-family: 'Fraunces', serif;
  font-style: italic;
  color: var(--gold);
  margin-top: 24px;
  font-size: 16px;
}

/* Footer */
.footer {
  background: var(--navy);
  color: var(--ivory);
  padding: 40px 0;
  border-top: 1px solid var(--gold-rule);
}
.footer .row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 24px;
}
.footer .left { display: flex; align-items: center; gap: 14px; }
.footer .left .mark { width: 22px; height: 22px; }
.footer .left .name {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  color: var(--ivory);
  letter-spacing: -0.005em;
}
.footer .center {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ivory-55);
}
.footer .right {
  display: flex; justify-content: flex-end; align-items: center; gap: 18px;
  font-size: 13px;
}
.footer .right a {
  color: var(--ivory-70);
  text-decoration: none;
  transition: color 140ms ease;
}
.footer .right a:hover { color: var(--gold); }
.footer .right svg { stroke: currentColor; }

@media (max-width: 720px) {
  .footer .row { grid-template-columns: 1fr; text-align: center; }
  .footer .left, .footer .right { justify-content: center; }
  .footer .center { order: 3; }
}

/* Tiny dev ribbon — discreet */
.dev-ribbon {
  position: fixed;
  bottom: 14px; left: 14px;
  background: rgba(10,25,41,0.92);
  color: var(--ivory);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  padding: 8px 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--gold-rule);
  z-index: 50;
  backdrop-filter: blur(8px);
  max-width: 360px;
  line-height: 1.5;
}
.dev-ribbon .k { color: var(--gold); }
.dev-ribbon.hidden { display: none; }
.dev-ribbon .close {
  background: none; border: none; color: var(--ivory-55);
  font-size: 14px; cursor: pointer; padding: 0 0 0 10px;
  font-family: inherit;
}

/* selection */
::selection {
  background: var(--gold);
  color: var(--navy);
}

/* subtle fade on scroll-in — CSS only */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(8px);
    animation: rise 700ms ease-out forwards;
  }
  .fade-in.d1 { animation-delay: 80ms; }
  .fade-in.d2 { animation-delay: 160ms; }
  .fade-in.d3 { animation-delay: 240ms; }
  .fade-in.d4 { animation-delay: 320ms; }
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
