:root {
  --cream: #f4ecdb;
  --paper: #fbf6ec;
  --ink: #1f1a17;
  --ink-2: #4a413a;
  --muted: #7a6e63;
  --rust: #b4532a;
  --rust-d: #93421f;
  --mustard: #d9a03f;
  --olive: #6d6b3b;
  --beige: #cdbb9c;
  --line: #e2d6bf;
  --radius: 14px;
  --display: "Alfa Slab One", Georgia, serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--rust); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); }
.center { text-align: center; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 10px 16px;
  background: rgba(31, 26, 23, .94);
  backdrop-filter: blur(8px);
  color: var(--cream);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex-shrink: 0; }
.brand-mark {
  font-family: var(--display); font-size: 15px; letter-spacing: .5px;
  background: var(--rust); color: var(--cream);
  padding: 4px 8px 3px; border-radius: 6px;
}
.brand-text { font-weight: 700; font-size: 15px; letter-spacing: .3px; }
.brand-text em { font-style: normal; color: var(--mustard); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--cream); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap; opacity: .85;
}
.nav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 6px; padding: 8px 12px 6px; }
  .brand-text { display: none; }
  .nav { margin-left: 0; flex: 1; }
  .nav a { font-size: 13px; padding: 5px 9px; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; color: var(--cream); overflow: hidden; background: var(--ink); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 45% 60%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,13,.15) 0%, rgba(20,16,13,.25) 40%, rgba(20,16,13,.88) 100%); }
.hero-copy { position: relative; padding: 120px 0 56px; }
.eyebrow { margin: 0 0 6px; text-transform: uppercase; letter-spacing: 3px; font-size: 13px; font-weight: 700; color: var(--mustard); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(42px, 9vw, 96px); line-height: .95; margin: 0 0 14px; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.lede { font-size: clamp(18px, 2.4vw, 22px); max-width: 34ch; margin: 0 0 18px; color: #f1e7d3; }
.status { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 24px; padding: 6px 14px; border-radius: 999px; background: rgba(244,236,219,.12); border: 1px solid rgba(244,236,219,.25); font-size: 14px; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mustard); box-shadow: 0 0 0 0 rgba(217,160,63,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(217,160,63,0); } 100% { box-shadow: 0 0 0 0 rgba(217,160,63,0); } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } html { scroll-behavior: auto; } }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 600 15px var(--body); text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--rust); color: var(--cream); }
.btn-primary:hover { background: var(--rust-d); }
.btn-ghost { border-color: rgba(244,236,219,.6); color: var(--cream); background: transparent; }
.btn-ghost:hover { background: rgba(244,236,219,.1); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { background: #000; }

/* ---------- stripes ---------- */
.stripes { display: grid; grid-template-rows: repeat(3, 7px); }
.stripes i:nth-child(1) { background: var(--rust); }
.stripes i:nth-child(2) { background: var(--mustard); }
.stripes i:nth-child(3) { background: var(--olive); }
.stripes.small { grid-template-rows: repeat(3, 4px); width: 90px; margin: 0 auto 14px; }

/* ---------- facts ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 28px 0; }
.facts div { text-align: center; padding: 6px; }
.facts b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 5vw, 40px); color: var(--rust); line-height: 1.1; }
.facts span { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .facts { grid-template-columns: repeat(2, 1fr); row-gap: 18px; } }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.band { background: var(--cream); }
.dark { background: var(--ink); color: var(--cream); }
.h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; margin: 0 0 28px; }
.h2 span { background: linear-gradient(transparent 62%, rgba(217,160,63,.45) 62%); padding: 0 4px; }
.h2.light span { background: linear-gradient(transparent 62%, rgba(180,83,42,.6) 62%); }
.sub { margin: -14px 0 26px; color: var(--muted); }
#story p { font-size: 18px; color: var(--ink-2); }
#story p:first-of-type::first-letter { font-family: var(--display); float: left; font-size: 62px; line-height: .9; padding: 6px 10px 0 0; color: var(--rust); }
.sig { font-weight: 700; color: var(--olive) !important; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 3px; background: var(--line); border-radius: 3px; }
.entry { position: relative; padding: 0 0 44px 44px; }
.entry::before { content: ""; position: absolute; left: 2px; top: 4px; width: 21px; height: 21px; border-radius: 50%; background: var(--paper); border: 4px solid var(--rust); }
.entry:last-child::before { background: var(--mustard); border-color: var(--mustard); }
.entry time { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--olive); }
.entry h3 { font-size: 22px; line-height: 1.25; margin: 4px 0 8px; }
.entry p { margin: 0 0 14px; max-width: 62ch; color: var(--ink-2); }
.entry-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; max-width: 760px; }
.entry-media button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; }
.entry-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.entry-media button:hover img { transform: scale(1.04); }
.entry .video { max-width: 560px; }

/* ---------- videos ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-bottom: 32px; }
.vcard h3 { font-size: 17px; line-height: 1.3; margin: 12px 0 4px; }
.vcard p { margin: 0; font-size: 15px; color: var(--muted); }
.vcard time { font-size: 13px; font-weight: 600; color: var(--olive); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video button { all: unset; cursor: pointer; position: absolute; inset: 0; display: block; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s; }
.video button:hover img { opacity: 1; }
.video .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); border-radius: 14px; background: var(--rust); display: grid; place-items: center; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.video .play::after { content: ""; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent var(--cream); margin-left: 4px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- engine ---------- */
.engine { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 40px; align-items: start; }
.engine > * { min-width: 0; }
@media (max-width: 860px) { .engine { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .peaks b { font-size: 34px; }
  .peaks div { padding: 14px; }
  .peaks span { display: block; margin: 4px 0 0; }
  .specs dd { overflow-wrap: anywhere; }
}
.peaks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.peaks div { background: rgba(244,236,219,.06); border: 1px solid rgba(244,236,219,.14); border-radius: var(--radius); padding: 16px 18px; }
.peaks b { font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1; color: var(--mustard); }
.peaks span { margin-left: 6px; font-weight: 600; }
.peaks small { display: block; margin-top: 6px; color: #b9ab98; font-size: 13px; }
.specs { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.specs dt, .specs dd { padding: 9px 0; border-bottom: 1px solid rgba(244,236,219,.12); margin: 0; font-size: 15px; }
.specs dt { color: #b9ab98; padding-right: 18px; }
.dyno { margin: 0; background: rgba(244,236,219,.04); border: 1px solid rgba(244,236,219,.12); border-radius: var(--radius); padding: 14px 14px 10px; }
.dyno svg { width: 100%; height: auto; display: block; }
.dyno figcaption { font-size: 13px; color: #b9ab98; padding: 6px 4px 0; }
.key { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: middle; margin: 0 6px 0 4px; }
.key.hp { background: var(--mustard); }
.key.tq { background: #e0764a; margin-left: 12px; }

/* ---------- plan ---------- */
.plan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .plan { grid-template-columns: 1fr; } }
.col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 14px; border-top: 6px solid; }
.col.done { border-top-color: var(--olive); }
.col.shelf { border-top-color: var(--mustard); }
.col.next { border-top-color: var(--rust); }
.col h3 { margin: 0 0 10px; font-size: 18px; }
.col ul { list-style: none; margin: 0; padding: 0; }
.col li { padding: 8px 0 8px 26px; position: relative; border-bottom: 1px dashed var(--line); font-size: 15px; }
.col li:last-child { border-bottom: 0; }
.col li::before { position: absolute; left: 0; top: 8px; font-weight: 700; }
.done li::before { content: "✓"; color: var(--olive); }
.shelf li::before { content: "▣"; color: var(--mustard); font-size: 13px; top: 10px; }
.next li::before { content: "→"; color: var(--rust); }

/* ---------- costs ---------- */
.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.total { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.total b { font-family: var(--display); font-weight: 400; font-size: 32px; color: var(--rust); }
.total span { display: block; font-size: 14px; color: var(--muted); }
@media (max-width: 600px) {
  .totals { grid-template-columns: 1fr 1fr; gap: 10px; }
  .total { padding: 12px 14px; }
  .total b { font-size: 22px; }
  .total:last-child { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; }
  .total:last-child span { display: inline; }
}
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.costs { width: 100%; border-collapse: collapse; font-size: 15px; }
.costs th, .costs td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.costs tr:last-child td { border-bottom: 0; }
.costs th { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); background: var(--paper); }
.costs .r { text-align: right; white-space: nowrap; }
.costs .cat { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--olive); margin-bottom: 2px; }
.costs .date { white-space: nowrap; color: var(--muted); }
.costs .pending { color: var(--muted); font-style: italic; }
.fine { font-size: 13px; color: var(--muted); margin-top: 12px; }
@media (max-width: 600px) {
  .costs thead { display: none; }
  .costs tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .costs tr:last-child { border-bottom: 0; }
  .costs td { border: 0; padding: 0; }
  .costs td.date { grid-column: 1; grid-row: 1; font-size: 13px; }
  .costs td.what { grid-column: 1 / -1; grid-row: 2; padding-top: 2px; }
  .costs td.from { grid-column: 1 / -1; grid-row: 3; font-size: 13px; color: var(--muted); }
  .costs td.r { grid-column: 2; grid-row: 1; font-weight: 700; }
}

/* ---------- gallery ---------- */
.gallery { columns: 3 260px; column-gap: 14px; }
.gallery button { display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; break-inside: avoid; position: relative; }
.gallery img { width: 100%; height: auto; transition: transform .35s ease; }
.gallery button:hover img { transform: scale(1.03); }
.gallery span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; font-size: 14px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.7)); opacity: 0; transition: opacity .2s; }
.gallery button:hover span, .gallery button:focus-visible span { opacity: 1; }
@media (hover: none) { .gallery span { opacity: 1; } }

/* ---------- contact / footer ---------- */
.contact p { font-size: 18px; color: #e6dac5; margin-bottom: 26px; }
.email-out { display: block; margin-top: 18px; font-size: 18px; font-weight: 600; }
.email-out a { color: var(--mustard); }
.footer { background: var(--ink); color: #9d907f; text-align: center; padding: 10px 16px 34px; font-size: 14px; border-top: 1px solid rgba(244,236,219,.08); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12,10,8,.97); display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 100vh; padding: 56px 0 24px; }
.lightbox img { max-height: calc(100vh - 130px); width: auto; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: var(--cream); font-size: 15px; text-align: center; }
.lightbox button { background: none; border: 0; color: var(--cream); font-size: 44px; line-height: 1; cursor: pointer; padding: 8px; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lb-close { position: absolute; top: 8px; right: 12px; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
@media (max-width: 600px) {
  .lightbox { grid-template-columns: 1fr; }
  .lightbox figure { grid-column: 1; padding-inline: 8px; }
  .lb-prev, .lb-next { position: absolute; bottom: 14px; font-size: 38px; }
  .lb-prev { left: 18px; } .lb-next { right: 18px; }
}

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