/* ============================================================
   HCU
   Shared design system
   Palette: deep navy / charcoal / ivory-cream / restrained brass
   Type: Fraunces (display serif) + Manrope (body & UI)
   Signature motif: tailor's chalk dash + basting-stitch dividers
   ============================================================ */

:root {
  /* Color tokens */
  --ink:      #101826;   /* deep navy-ink, primary text on light */
  --navy:     #16233A;   /* primary dark surface */
  --navy-2:   #1D2C47;   /* raised dark surface */
  --charcoal: #2E3138;
  --ivory:    #F4EFE6;   /* page background */
  --cream:    #EAE2D2;   /* alternate section background */
  --paper:    #FBF8F1;   /* cards on ivory */
  --brass:    #A9873F;   /* accent — used sparingly */
  --brass-2:  #8F7134;   /* accent hover / on-cream */
  --line:     rgba(16, 24, 38, 0.16);
  --line-soft:rgba(16, 24, 38, 0.09);
  --ivory-70: rgba(244, 239, 230, 0.72);

  /* Type */
  --serif: "Fraunces", Georgia, serif;
  --sans:  "Manrope", "Helvetica Neue", Arial, sans-serif;

  /* Rhythm */
  --max: 1160px;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 2px; /* tailoring is crisp — near-square corners */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Type scale ---------- */
h1, h2, h3, .display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.5rem, 5.8vw, 4.5rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p  { margin: 0 0 1em; max-width: 62ch; }
a  { color: inherit; }

/* Eyebrow label — set like a tape-measure notation */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-2);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--brass);
  display: inline-block;
}

/* Chalk-mark underline for section headings */
.chalk::after {
  content: "";
  display: block;
  width: 52px; height: 3px;
  background: var(--brass);
  margin-top: 18px;
  transform: rotate(-0.4deg); /* the hand of the cutter */
}

/* Basting-stitch divider — the signature motif */
.stitch {
  border: none;
  border-top: 2px dashed rgba(169, 135, 63, 0.55);
  margin: 0;
}

.muted { color: rgba(16, 24, 38, 0.62); }
.small { font-size: 0.86rem; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section.cream { background: var(--cream); }
.section.dark { background: var(--navy); color: var(--ivory); }
.section.dark .muted { color: var(--ivory-70); }
.section.dark .eyebrow { color: var(--brass); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 34px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}
.btn-primary { background: var(--navy); color: var(--ivory); }
.btn-primary:hover { background: var(--brass-2); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { border-color: var(--brass-2); color: var(--brass-2); }
.section.dark .btn-primary { background: var(--brass); color: var(--navy); }
.section.dark .btn-primary:hover { background: var(--ivory); }
.section.dark .btn-outline { color: var(--ivory); border-color: var(--ivory-70); }
.section.dark .btn-outline:hover { border-color: var(--brass); color: var(--brass); }
.btn:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(244, 239, 230, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.logo span { color: var(--brass-2); }
.logo small {
  display: block;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(16,24,38,.55);
}
.nav-links { display: flex; gap: 26px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-links a:hover { color: var(--brass-2); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--brass); color: var(--brass-2); }
.nav-links .nav-cta { border: 1px solid var(--ink); padding: 9px 18px; border-radius: var(--radius); }
.nav-links .nav-cta:hover { border-color: var(--brass-2); }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .12em;
  color: var(--ink);
}
@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 72px;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 18px var(--pad) 26px;
    align-items: flex-start;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--ivory-70); }
.site-footer .top {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  padding: 64px 0 44px;
}
@media (max-width: 860px) { .site-footer .top { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--brass); margin: 0 0 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--ivory-70); text-decoration: none; }
.site-footer a:hover { color: var(--ivory); }
.site-footer .brandline { font-family: var(--serif); font-size: 1.5rem; color: var(--ivory); margin-bottom: 12px; }
.site-footer .sourcing-line { max-width: 46ch; font-size: 0.95rem; }
.site-footer .legal {
  border-top: 1px dashed rgba(169,135,63,.4);
  padding: 22px 0 30px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.8rem;
}

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 9vw, 130px) 0 clamp(56px, 8vw, 110px); }
.hero .lede { font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 50ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 22px; font-size: .84rem; color: rgba(16,24,38,.6); }

/* Placeholder photography slot — art-directed duotone panel with brass mat.
   Swap in real photography by setting a background-image on .photo-slot
   (object-fit cover via an <img>) and deleting the inner SVG. */
.photo-slot {
  background:
    radial-gradient(130% 110% at 28% 18%, #24334F 0%, #16223A 52%, #0C1322 100%);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 5;
}
.photo-slot::before {
  content: "";
  position: absolute; inset: 14px;
  border: 1px solid rgba(169, 135, 63, 0.4);
  pointer-events: none;
}
.photo-slot::after {
  content: "HCU";
  position: absolute; right: 20px; top: 16px;
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: rgba(169, 135, 63, 0.55);
}
.photo-slot.wide { aspect-ratio: 16 / 9; }
.photo-slot .caption {
  position: absolute; left: 22px; bottom: 20px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(234, 226, 210, 0.5);
}
.photo-slot svg { width: 58%; height: auto; opacity: .85; }
.photo-slot svg [stroke] { stroke: rgba(234, 226, 210, 0.55); }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
}
.card h3 { margin-top: 6px; }
.price-tag {
  font-family: var(--serif);
  font-size: 1.85rem;
  color: var(--brass-2);
  margin: 6px 0 2px;
}
.tier-flag {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--brass-2);
  border: 1px solid rgba(169,135,63,.5);
  border-radius: var(--radius);
  padding: 4px 10px;
}
.card ul { padding-left: 18px; margin: 14px 0 0; }
.card li { margin-bottom: 8px; }
.card.featured { border-color: var(--brass); box-shadow: 0 14px 34px -22px rgba(16,24,38,.35); }

/* ---------- Process steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: clamp(18px, 3vw, 40px);
  padding: 34px 0;
  border-bottom: 2px dashed rgba(169,135,63,.35);
}
.steps > li:last-child { border-bottom: none; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 2.1rem;
  color: var(--brass-2);
  line-height: 1;
}
.steps h3 { margin-bottom: 6px; }
.steps .duration { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(16,24,38,.5); }

/* ---------- FAQ ---------- */
details.faq {
  border-bottom: 1px solid var(--line-soft);
  padding: 6px 0;
}
details.faq summary {
  font-family: var(--serif);
  font-size: 1.15rem;
  padding: 18px 34px 18px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--sans);
  color: var(--brass-2);
  font-size: 1.3rem;
  transition: transform .2s ease;
}
details.faq[open] summary::after { content: "–"; }
details.faq .answer { padding: 0 0 20px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.field textarea { min-height: 130px; resize: vertical; }
.field .error-msg { color: #8C3B2E; font-size: 0.8rem; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #8C3B2E; }
.field.invalid .error-msg { display: block; }
.form-success {
  display: none;
  background: var(--paper);
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  padding: 26px;
  margin-top: 22px;
}
.form-success.visible { display: block; }

/* ---------- Builder ---------- */
.builder-shell {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 900px) { .builder-shell { grid-template-columns: 1fr; } }

.preview-pane {
  position: sticky; top: 96px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
}
@media (max-width: 900px) { .preview-pane { position: static; } }
.preview-pane svg { width: min(300px, 76%); margin: 0 auto; }
.preview-meta { margin-top: 16px; border-top: 2px dashed rgba(169,135,63,.35); padding-top: 14px; }
.preview-meta .label { font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: rgba(16,24,38,.5); }
.live-price { font-family: var(--serif); font-size: 2.1rem; color: var(--brass-2); line-height: 1.1; }
.preview-choices { font-size: .85rem; color: rgba(16,24,38,.65); margin-top: 6px; min-height: 1.2em; }

.step-indicator { display: flex; gap: 6px; margin-bottom: 26px; flex-wrap: wrap; }
.step-indicator button {
  font-family: var(--sans); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line); background: transparent; color: rgba(16,24,38,.55);
  border-radius: var(--radius); padding: 7px 12px; cursor: pointer;
  transition: all .2s ease;
}
.step-indicator button.active { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.step-indicator button.done { border-color: var(--brass); color: var(--brass-2); }
.step-indicator button:disabled { opacity: .45; cursor: not-allowed; }

.builder-step { display: none; }
.builder-step.active { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.option-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.option-card:hover { border-color: var(--brass); }
.option-card[aria-pressed="true"] {
  border-color: var(--brass);
  box-shadow: 0 0 0 1px var(--brass), 0 10px 24px -18px rgba(16,24,38,.4);
}
.option-card .opt-name { font-weight: 700; font-size: .95rem; }
.option-card .opt-desc { font-size: .8rem; color: rgba(16,24,38,.6); margin-top: 3px; }
.option-card .opt-price { font-size: .78rem; font-weight: 700; color: var(--brass-2); margin-top: 6px; }
.option-card svg { margin-bottom: 10px; }

.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.swatch {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 10px;
  cursor: pointer;
  font-family: var(--sans);
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.swatch:hover { border-color: var(--brass); }
.swatch[aria-pressed="true"] { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.swatch .chip { height: 62px; border-radius: var(--radius); border: 1px solid rgba(16,24,38,.12); }
.swatch .sw-name { font-size: .78rem; font-weight: 700; margin-top: 8px; }
.swatch .sw-desc { font-size: .7rem; color: rgba(16,24,38,.55); }

.builder-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.builder-hint { font-size: .82rem; color: rgba(16,24,38,.55); margin-top: 14px; }

.summary-list { list-style: none; margin: 18px 0; padding: 0; }
.summary-list li {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(169,135,63,.3);
  font-size: .95rem;
}
.summary-list li strong { font-weight: 700; }
.summary-list li .sum-price { color: var(--brass-2); font-weight: 700; white-space: nowrap; }
.summary-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 0 4px;
  font-family: var(--serif); font-size: 1.5rem;
}

/* Vents mini-diagram */
.vent-diagrams { display: flex; gap: 10px; }
.vent-diagrams svg { width: 44px; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.center p, .center .eyebrow { margin-left: auto; margin-right: auto; }
.center .eyebrow { justify-content: center; }
.center .chalk::after { margin-left: auto; margin-right: auto; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 34px; }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brass); color: var(--navy);
  padding: 10px 16px; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Suit preview: studio stage + rotate toggle ---------- */
.suit-stage-wrap { text-align: center; }
.suit-stage {
  perspective: 900px;
}
.suit-stage svg {
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 18px 22px rgba(16, 24, 38, 0.16));
  border-radius: var(--radius);
  animation: suit-in 0.55s ease both;
}
@keyframes suit-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.suit-stage.turning svg {
  transform: rotateY(90deg) scale(0.96);
}
.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(16, 24, 38, 0.6);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.view-toggle svg { transition: transform 0.35s ease; }
.view-toggle:hover { color: var(--brass-2); border-color: var(--brass); }
.view-toggle:hover svg { transform: rotate(180deg); }
.view-toggle[aria-pressed="true"] {
  color: var(--ivory);
  background: var(--navy);
  border-color: var(--navy);
}
