/* ============================================================
   THE CAPE ROOM — Phase One site styles
   Governance: pure black ground · gold rules · cape red, sparing
   Allura for script · Teachers for headings and body
   ============================================================ */

@font-face {
  font-family: "Allura";
  src: url("fonts/Allura-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Teachers";
  src: url("fonts/Teachers-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Teachers";
  src: url("fonts/Teachers-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Teachers";
  src: url("fonts/Teachers-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Teachers";
  src: url("fonts/Teachers-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Teachers";
  src: url("fonts/Teachers-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-Italic.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

:root {
  /* The headline size, named once: section eyebrows derive their
     font size and letter-spacing from it (fractions of it), so an
     eyebrow always spans exactly its headline's width. */
  --h2size: clamp(30px, 3.4vw, 42px);
  --black: #000000;
  --panel: #0c0a08;
  --cream: #f2e9d8;
  --cream-dim: #c9bda3;
  --gold: #c8a24e;
  --gold-bright: #e6cb84;
  --gold-line: rgba(200, 162, 78, 0.45);
  --gold-faint: rgba(200, 162, 78, 0.22);
  --red: #9e1b1e;
  --red-deep: #7c1414;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--cream);
  font-family: "Teachers", Georgia, serif;
  font-size: 17.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red-deep); color: var(--cream); }

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--cream); }

.wrap {
  /* Fluid frame: the page stretches with the viewport at any width.
     Side margins are a percentage of the window, never a fixed cap. */
  width: 100%;
  padding: 0 4.5%;
}

/* ---------- Top navigation ---------- */

.topbar {
  border-bottom: 1px solid var(--gold-faint);
  background: #000;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 12px;
  gap: 24px;
  flex-wrap: wrap;
}
.wordmark {
  font-family: "Allura", cursive;
  font-size: 36px;
  line-height: 1;
  color: var(--cream);
  white-space: nowrap;
}
.wordmark:hover { color: var(--gold-bright); }
nav.main {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}
nav.main a {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
nav.main a:hover, nav.main a.here {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

/* ---------- Hero (the v9 composition) ---------- */

.hero {
  padding: 54px 0 30px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(0, 56%);
  align-items: center;
}
.hero-book {
  text-align: center;
}
.hero-book img {
  /* Grows gently with the window; the master image itself is untouched. */
  width: clamp(300px, 33vw, 680px);
  max-width: 94%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.hero-right {
  padding-left: clamp(20px, 3.5vw, 72px);
  text-align: center;
}
/* The name block shrink-wraps the masthead, so the tagline's right
   edge is locked to the masthead's own right edge (the v9 relationship),
   while the block as a unit stays centered in the hero column. */
.name-block {
  display: inline-block;
  text-align: right;
}
.masthead {
  font-family: "Allura", cursive;
  font-weight: 400;
  font-size: clamp(70px, 8.2vw, 136px);
  line-height: 1.05;
  color: var(--cream);
  white-space: nowrap;
}
.hero-tag {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(22px, 2.2vw, 29px);
  color: var(--cream);
  margin-top: -8px;
  text-align: right;
}
.credit-block {
  margin: 44px auto 0;
  max-width: min(680px, 100%);
}
.credit-rule {
  border: none;
  border-top: 1px solid var(--gold);
  opacity: 0.85;
}
.credit-lines {
  padding: 24px 10px 22px;
  text-align: center;
}
.credit-lines p {
  font-size: 16.5px;
  letter-spacing: 0.06em;
  line-height: 1.65;
  color: var(--gold-bright);
}
.mission-line {
  font-family: "Allura", cursive;
  font-size: clamp(30px, 3vw, 48px);
  color: var(--cream);
  margin-top: 40px;
  text-align: center;
  line-height: 1.3;
}

/* ---------- Sections ---------- */

section { padding: 88px 0 8px; }

.eyebrow {
  /* Width-matched to the headline below it: font size and letter-spacing
     are fractions of the headline size (--ebk is set per eyebrow in the
     HTML, solved by measurement), so the eyebrow's rendered width equals
     the headline's at any viewport. 0.29762 × 42px = the classic 12.5px. */
  font-size: calc(var(--h2size) * 0.29762);
  font-weight: 600;
  letter-spacing: calc(var(--h2size) * var(--ebk, 0.0893));
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
}
h2 {
  font-weight: 600;
  font-size: var(--h2size);
  line-height: 1.25;
  text-align: center;
  color: var(--cream);
  margin-bottom: 30px;
}
/* Reading text keeps a humane measure inside the fluid frame:
   lines are capped in characters (ch), never stretched wall to wall.
   The measure is wide (85ch at 19px ≈ 935px on a desktop screen, about
   49% of the page) and the type a step larger; the exact width was
   chosen by a widow audit — within the wide band, it strands the
   fewest paragraph endings. */
.lede {
  max-width: 85ch;
  font-size: 19px;
  margin: 0 auto 18px;
  text-align: center;
  color: var(--cream);
}
.body-copy {
  max-width: 85ch;
  font-size: 19px;
  margin: 0 auto 18px;
  color: var(--cream-dim);
}
.body-copy strong, .lede strong { color: var(--cream); font-weight: 600; }

.ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 340px;
  margin: 74px auto 0;
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--gold-line);
}
.ornament span {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  display: block;
}

.pullquote {
  /* 72ch in Cormorant at display size ≈ 1008px — the quote runs a
     little wider than the body measure, as it did in the original
     design, and stretches with the paragraphs. The exact value comes
     from the widow audit: at this width neither quote strands its
     final word alone on the last line. */
  max-width: 72ch;
  margin: 42px auto 6px;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 31px);
  line-height: 1.5;
  color: var(--cream);
}
.pullquote .attr {
  display: block;
  margin-top: 14px;
  font-family: "Teachers", Georgia, serif;
  font-style: normal;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- The Two Rooms ---------- */

.rooms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 46px;
}
.room {
  background: var(--panel);
  border: 1px solid var(--gold-faint);
  padding: 42px clamp(28px, 2.8vw, 60px) 38px;
  display: flex;
  flex-direction: column;
}
.room.shelf { border-top: 3px solid var(--gold); }
.room.originals { border-top: 3px solid var(--red); }
.room .room-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.room.originals .room-eyebrow { color: #d98a8a; }
.room h3 {
  font-size: 27px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--cream);
}
.room p { color: var(--cream-dim); margin-bottom: 16px; }
.room p strong { color: var(--cream); font-weight: 600; }
.room .room-link { margin-top: auto; padding-top: 10px; }
.btn {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  padding: 11px 26px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  font-family: "Teachers", Georgia, serif;
}
.btn:hover { background: var(--gold); color: #141005; }

/* ---------- Standards / steps lists ---------- */

.standards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin: 44px auto 8px;
}
.standard {
  border: 1px solid var(--gold-faint);
  background: var(--panel);
  padding: 26px 22px 20px;
  text-align: center;
}
.standard .std-word {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  margin-bottom: 8px;
}
.standard p { font-size: 15.5px; line-height: 1.65; color: var(--cream-dim); }

.steps {
  max-width: 76ch;
  margin: 40px auto 0;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(200, 162, 78, 0.16);
}
.step:last-child { border-bottom: none; }
.step .num {
  font-family: "Allura", cursive;
  font-size: 44px;
  line-height: 1;
  color: var(--gold);
  text-align: center;
}
.step h3 {
  font-size: 21px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 6px;
}
.step p { color: var(--cream-dim); }

/* ---------- Inner page header ---------- */

.pagehead {
  padding: 64px 0 10px;
  text-align: center;
}
.pagehead img.book-small {
  width: 128px;
  height: auto;
  margin-bottom: 8px;
}
.pagehead .room-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.pagehead.originals-head .room-eyebrow { color: #d98a8a; }
.pagehead h1 {
  font-size: clamp(38px, 4.6vw, 56px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--cream);
}
.pagehead .script-sub {
  font-family: "Allura", cursive;
  font-size: clamp(27px, 3vw, 37px);
  color: var(--gold-bright);
  margin-top: 10px;
  line-height: 1.3;
}
.doctrine {
  /* The doctrine band spans the full fluid frame. */
  margin-top: 34px;
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
  padding: 26px 20px;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(23px, 2.5vw, 29px);
  color: var(--cream);
}

/* ---------- Contact form ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 4vw, 72px);
  margin-top: 40px;
  align-items: start;
}
.contact-info p { color: var(--cream-dim); margin-bottom: 16px; }
.contact-info .mail {
  font-size: 20px;
  color: var(--gold-bright);
}
form.contact label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 18px 0 7px;
}
form.contact input, form.contact select, form.contact textarea {
  width: 100%;
  background: #0a0806;
  border: 1px solid var(--gold-faint);
  color: var(--cream);
  font-family: "Teachers", Georgia, serif;
  font-size: 16.5px;
  padding: 11px 13px;
}
form.contact input:focus, form.contact select:focus, form.contact textarea:focus {
  outline: none;
  border-color: var(--gold);
}
form.contact textarea { min-height: 130px; resize: vertical; }
form.contact .btn { margin-top: 24px; }

/* ---------- Footer ---------- */

footer {
  margin-top: 110px;
  border-top: 1px solid var(--gold-faint);
  padding: 54px 0 46px;
  text-align: center;
}
footer .foot-mark {
  font-family: "Allura", cursive;
  font-size: 36px;
  color: var(--cream);
  line-height: 1.1;
}
footer .foot-tag {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 19px;
  color: var(--cream-dim);
  margin-bottom: 20px;
}
footer .foot-line { font-size: 15px; color: var(--cream-dim); }
footer .foot-doctrine {
  margin-top: 16px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
footer .foot-small { margin-top: 20px; font-size: 13.5px; color: #8d8168; }
footer nav.foot-nav { margin-bottom: 22px; display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }
footer nav.foot-nav a {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream-dim);
}
footer nav.foot-nav a:hover { color: var(--gold-bright); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  /* On narrow screens headlines wrap and the width-matching no longer
     applies; the eyebrow returns to its compact fixed form. */
  .eyebrow { font-size: 12.5px; letter-spacing: 0.3em; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-right { padding-left: 0; margin-top: 10px; }
  .masthead { white-space: normal; }
  .name-block { display: block; }
  .hero-tag { text-align: center; margin-top: 0; }
  .rooms { grid-template-columns: 1fr; }
  .standards { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .topbar .wrap { justify-content: center; text-align: center; }
  nav.main { justify-content: center; }
}
@media (max-width: 560px) {
  .standards { grid-template-columns: 1fr; }
  body { font-size: 16.5px; }
  .wrap { padding: 0 22px; }
}
