/* ==========================================================
   USS Constitution model: draft site styles
   ========================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f1621;          /* deep navy-charcoal */
  --bg-alt: #141d2a;
  --surface: #1a2433;
  --line: rgba(201, 169, 106, 0.22);
  --text: #ede6d8;        /* warm off-white */
  --text-muted: #b9b2a4;
  --brass: #c9a96a;       /* muted brass */
  --brass-bright: #dcc08a;
  --brass-dark: #8f7442;
  --serif: "Cormorant Garamond", Garamond, "Times New Roman", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --nav-h: 64px;
  --radius: 4px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brass-bright); text-underline-offset: 3px; }
a:hover { color: var(--text); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--text);
}
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.55rem; }

p { margin: 0 0 1.1em; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(820px, 100% - 2.5rem); }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 0.9rem;
}

.lead { font-size: 1.2rem; color: var(--text); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--brass); color: var(--bg); padding: 0.5rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--brass);
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--brass); color: #16110a; }
.btn-primary:hover { background: var(--brass-bright); border-color: var(--brass-bright); color: #16110a; }
.btn-ghost { background: transparent; color: var(--brass-bright); }
.btn-ghost:hover { background: rgba(201,169,106,.12); color: var(--text); }
.btn[disabled], .btn[disabled]:hover { background: transparent; color: var(--text-muted); border: 1px dashed rgba(255,255,255,.25); cursor: not-allowed; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12, 18, 27, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--serif); font-size: 1.4rem; font-weight: 600;
  color: var(--text); text-decoration: none; letter-spacing: .02em;
}
.brand-mark { color: var(--brass); font-size: 1.15rem; }
.nav-links { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
.nav-links a:hover { color: var(--brass-bright); }
.nav-links .nav-cta {
  color: var(--brass-bright); border: 1px solid var(--brass-dark);
  padding: .5rem 1rem; border-radius: var(--radius);
}
.nav-links .nav-cta:hover { border-color: var(--brass); background: rgba(201,169,106,.1); }

.nav-toggle {
  display: none; background: none; border: 0; padding: .6rem; cursor: pointer;
  flex-direction: column; gap: 5px;
}
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(ellipse at 75% 40%, rgba(201,169,106,.10), transparent 60%),
    linear-gradient(180deg, #111a27 0%, var(--bg) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(3rem, 6.5vw, 5.2rem); margin-bottom: .1em; letter-spacing: .01em; }
.hero-sub {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--brass-bright); margin-bottom: 1rem;
}
.hero-lede { font-size: 1.2rem; color: var(--text-muted); max-width: 30ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-figure { margin: 0; }
.plate {
  display: block; width: 100%; padding: 0; cursor: zoom-in;
  background: #fff;
  border: 1px solid var(--brass-dark);
  outline: 1px solid var(--line); outline-offset: 8px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
  border-radius: 2px;
}
.plate img { width: 100%; }

/* ---------- Facts strip ---------- */
.facts { border-block: 1px solid var(--line); background: var(--bg-alt); }
.facts-list {
  list-style: none; margin-block: 0; padding: 1.8rem 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; text-align: center;
}
.facts-list li { display: flex; flex-direction: column; gap: .2rem; position: relative; }
.facts-list li + li::before {
  content: ""; position: absolute; left: -.5rem; top: 15%; bottom: 15%;
  width: 1px; background: var(--line);
}
.fact-value { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 600; color: var(--brass-bright); line-height: 1.1; }
.fact-label { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid rgba(255,255,255,.03); }
.section-head { max-width: 720px; margin-bottom: 2.75rem; }
.section-head .lead { color: var(--text-muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.prose p { color: var(--text-muted); }
.prose .lead { color: var(--text); }
.prose p:first-of-type:not(.eyebrow) { }

.framed { margin: 0; }
/* Story: longer text column, image stays in view on desktop */
.split-story { align-items: start; }
.split-story .framed { position: sticky; top: calc(var(--nav-h) + 2rem); }
.pull-quote { margin: 1.8rem 0; padding: .2rem 0 .2rem 1.25rem; border-left: 2px solid var(--brass); }
.prose .pull-quote p { margin: 0; font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.6rem); font-style: italic; line-height: 1.35; color: var(--text); }
.pull-quote footer { margin-top: .5rem; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); }
.pull-quote footer::before { content: "\2014\00a0"; }
.img-btn { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.img-btn img { transition: transform .4s; }
.img-btn:hover img { transform: scale(1.02); }
.framed figcaption { font-size: .85rem; color: var(--text-muted); margin-top: .7rem; font-style: italic; }

/* ---------- Build details ---------- */
.build-grid { columns: 2; column-gap: 1.5rem; }
.build-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--brass-dark);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem 1.4rem;
  break-inside: avoid;
  margin: 0 0 1.5rem;
  display: inline-block; width: 100%; /* keeps cards intact inside columns */
}
.build-card h3 { color: var(--brass-bright); margin-bottom: .8rem; }
.build-card dl { margin: 0; display: grid; grid-template-columns: minmax(9rem, 40%) 1fr; }
.build-card dt, .build-card dd {
  padding: .6rem 0; border-top: 1px solid rgba(255,255,255,.07); margin: 0; font-size: .95rem; line-height: 1.5;
}
.build-card dt { color: var(--text-muted); padding-right: 1rem; font-weight: 500; }
.build-card dd { color: var(--text); }
.build-card dt:first-of-type, .build-card dd:first-of-type { border-top: 0; }

/* ---------- Gallery ---------- */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.gallery button {
  display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: #0a0f17;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .3s; }
.gallery button:hover img { transform: scale(1.04); }
/* Portrait bow shot: show the whole ship rather than cropping */
.gallery:not(.gallery-captioned) li:nth-child(8) img { object-fit: contain; background: #0a0f17; }

/* Detail photos: captioned grid that continues the gallery above */
.section-continued { padding-top: 0; }
.section-continued .section-head { border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 4.5rem); max-width: none; }
.gallery-captioned { row-gap: 1.75rem; }
.gallery-captioned figure { margin: 0; }
.gallery-captioned button { aspect-ratio: 3 / 2; }
.gallery-captioned figcaption {
  margin-top: .65rem; font-size: .9rem; line-height: 1.5; color: var(--text-muted);
}

/* ---------- Builder ---------- */
#builder .lead { color: var(--text); }
.credits { list-style: none; padding: 0; margin: 2.25rem 0 2rem; display: grid; gap: 1.25rem; }
.credits li { border-left: 2px solid var(--brass-dark); padding: .2rem 0 .2rem 1.4rem; }
.credits h3 { margin-bottom: .35rem; }
.credits .year { font-family: var(--sans); font-size: .85rem; color: var(--brass); letter-spacing: .1em; margin-left: .4rem; font-weight: 500; }
.credits p { color: var(--text-muted); margin-bottom: .5rem; }
.sources { font-size: .92rem; }
.sources a { margin: 0 .25rem; }
.more-link a { font-weight: 500; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.location { display: flex; gap: .8rem; align-items: baseline; color: var(--text) !important; margin: 1.5rem 0 2rem; }
.loc-label { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.placeholder-btn { text-transform: none; letter-spacing: .02em; font-size: 1rem; word-break: break-word; }
.placeholder-note { font-size: .85rem; color: #e5a15c !important; margin-top: .75rem; }

.contact-form {
  background: var(--surface); border: 1px dashed rgba(229,161,92,.55); border-radius: var(--radius);
  padding: 1.75rem;
}
.form-status {
  font-size: .9rem; color: #f0c08a; background: rgba(229,161,92,.1);
  border: 1px solid rgba(229,161,92,.35); border-radius: var(--radius);
  padding: .7rem .9rem; margin-bottom: 1.4rem;
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .4rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  background: #0f1621; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius);
  padding: .7rem .8rem;
}
.field input:disabled, .field textarea:disabled { opacity: .7; cursor: not-allowed; }
.contact-form .btn { width: 100%; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; font-size: .85rem; color: var(--text-muted); }
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--brass-bright); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(6, 9, 14, 0.95);
  display: flex; align-items: center; justify-content: center;
  padding: 3.5rem 4.5rem;
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-img { max-width: 100%; max-height: calc(100vh - 9rem); width: auto; height: auto; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-caption { margin-top: 1rem; color: var(--text); font-family: var(--serif); font-size: 1.3rem; text-align: center; }
.lb-close, .lb-nav {
  position: absolute; background: rgba(20,29,42,.8); color: var(--text);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  width: 48px; height: 48px; font-size: 1.9rem; line-height: 1; display: grid; place-items: center;
}
.lb-close:hover, .lb-nav:hover { border-color: var(--brass); color: var(--brass-bright); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .split-story .framed { position: static; }
  .hero-figure { order: -1; }
  .hero-text { text-align: left; }
  .build-grid { columns: 1; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .facts-list { grid-template-columns: repeat(3, 1fr); row-gap: 1.5rem; }
  .facts-list li:nth-child(4)::before { display: none; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0c121b;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -10px rgba(0,0,0,.6);
    padding: .5rem 1.25rem 1.25rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: .9rem; }
  .nav-links .nav-cta { margin-top: .9rem; text-align: center; padding: .8rem; }
  .brand { font-size: 1.25rem; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .facts-list { grid-template-columns: repeat(2, 1fr); padding: 1.5rem 0; }
  .facts-list li::before { display: none; }
  .facts-list li:last-child { grid-column: 1 / -1; }
  .gallery { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .gallery li:last-child { grid-column: 1 / -1; }
  .gallery-captioned { row-gap: 1.25rem; }
  .gallery-captioned li:last-child { grid-column: auto; }
  .gallery-captioned figcaption { font-size: .82rem; margin-top: .45rem; }
  .build-card { padding: 1.3rem 1.2rem 1.1rem; }
  .build-card dl { grid-template-columns: 1fr; }
  .build-card dt { padding-bottom: 0; }
  .build-card dd { border-top: 0; padding-top: .15rem; }
  .lightbox { padding: 3.5rem .5rem 4.5rem; }
  .lb-nav { top: auto; bottom: 1rem; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lb-img { max-height: calc(100vh - 11rem); }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }
}
.builder-bio { margin-top: 1.25rem; }
.builder-bio p { color: var(--text-muted); }

.hero-caption { margin-top: .6rem; font-size: .8rem; font-style: italic; color: var(--text-muted); }

.builder-photo { margin: 1.75rem 0 1.5rem; }
.builder-photo img { width: 100%; height: auto; display: block; border: 1px solid rgba(201,168,106,.35); border-radius: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.builder-photo figcaption { margin-top: .6rem; font-size: .8rem; font-style: italic; color: var(--text-muted); }
