/* ==========================================================================
   EV Quotes — site 3 — "elegant"
   Dark luxury editorial. Near-black ground, gold hairlines, wide negative
   space, a single narrow measure, full-bleed plates between sections.
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
h1, h2, h3, h4,
p, figure,
blockquote, dl, dd,
ul, ol, table, th, td {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ---------- 2. Tokens ---------- */
:root {
  --bg:        #0e0e10;
  --bg-lift:   #131315;
  --ink:       #eeeae3;
  --ink-soft:  rgba(238, 234, 227, 0.74);
  --ink-faint: rgba(238, 234, 227, 0.56);
  --gold:      #c2a15c;
  --gold-dim:  rgba(194, 161, 92, 0.55);
  --hair:      rgba(194, 161, 92, 0.28);
  --hair-soft: rgba(194, 161, 92, 0.16);

  --display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --grotesk: "Inter", "Helvetica Neue", Arial, sans-serif;

  --measure: 35rem;          /* ~68ch at the body size */
  --gutter: clamp(1.25rem, 5vw, 3.25rem);
  --band: clamp(4.5rem, 11vw, 9rem);   /* 7–9rem section separation */
}

/* ---------- 3. Base ---------- */
html, body { overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.28rem;
  line-height: 1.78;
  letter-spacing: 0.004em;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

p + p { margin-top: 1.35em; }

a {
  color: var(--ink);
  text-decoration: none;
  text-decoration-color: var(--gold-dim);
}

.measure a,
.pull a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  text-decoration-color: var(--gold-dim);
  color: var(--ink);
  transition: color 160ms linear, text-decoration-color 160ms linear;
}

.measure a:hover { color: var(--gold); text-decoration-color: var(--gold); }

a:focus-visible,
.brand:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

strong { font-weight: 600; color: var(--ink); }

em { font-style: italic; }

/* ---------- 4. Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure {
  max-width: var(--measure);
  margin-inline: auto;
}

.band { padding-block: var(--band); }
.band + .band { padding-top: 0; }

/* the very first band after a full-bleed plate keeps its own air */
.plate + .band { padding-top: var(--band); }

/* ---------- 5. Header ---------- */
.site-header {
  border-bottom: 1px solid var(--hair);
  background: var(--bg);
  position: relative;
  z-index: 5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  min-height: 6.25rem;
  flex-wrap: wrap;
}

.brand { display: inline-flex; flex: 0 0 auto; }

.brand img {
  width: 186px;
  height: auto;
  opacity: 0.94;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 2.25rem;
}

.site-nav a {
  font-family: var(--grotesk);
  font-weight: 300;
  font-size: 0.7rem;
  line-height: 1.6;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 160ms linear, border-color 160ms linear;
}

.site-nav a:hover { color: var(--gold); }

.site-nav a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--hair);
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 6.25rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero--inner { min-height: min(62svh, 34rem); }

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  z-index: -2;
  filter: saturate(0.72) contrast(1.02) brightness(0.82);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, #0e0e10 2%, rgba(14, 14, 16, 0.86) 26%, rgba(14, 14, 16, 0.5) 58%, rgba(14, 14, 16, 0.66) 100%);
}

.hero-inner {
  padding-block: clamp(3rem, 9vw, 7rem) clamp(3.25rem, 8vw, 6rem);
}

.hero-copy { max-width: 44rem; }

.eyebrow {
  font-family: var(--grotesk);
  font-weight: 500;
  font-size: 0.66rem;
  line-height: 1.5;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.75rem;
}

h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.65rem, 7.4vw, 5.1rem);
  line-height: 1.03;
  letter-spacing: -0.012em;
  color: #fbf9f5;
}

h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
}

.rule {
  width: 5.5rem;
  height: 1px;
  background: var(--gold);
  margin-block: clamp(1.75rem, 4vw, 2.75rem) 0;
}

.hero-sub {
  margin-top: 1.9rem;
  max-width: 33rem;
  font-size: 1.22rem;
  line-height: 1.7;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- 7. Headings in the flow ---------- */
h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.95rem, 4.4vw, 2.85rem);
  line-height: 1.14;
  letter-spacing: -0.008em;
  color: #f6f3ee;
  margin-bottom: 1.9rem;
}

h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.42rem;
  line-height: 1.25;
  letter-spacing: 0.006em;
  color: var(--ink);
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
}

.sec-mark {
  display: block;
  font-family: var(--grotesk);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

/* ---------- 8. Prose furniture ---------- */
.lede {
  font-size: 1.5rem;
  line-height: 1.62;
  color: #f4f1ec;
}

.pull {
  margin-block: clamp(2.75rem, 6vw, 4.25rem);
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  font-size: 1.42rem;
  line-height: 1.55;
  font-style: italic;
  color: #f4f1ec;
  text-align: center;
}

.plain-list { margin-top: 1.6rem; }

.plain-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-top: 0.95rem;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.92em;
  width: 0.85rem;
  height: 1px;
  background: var(--gold);
}

dl.ledger { margin-top: 2.25rem; }

dl.ledger dt {
  font-family: var(--grotesk);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 1.5rem;
  border-top: 1px solid var(--hair-soft);
  margin-top: 1.5rem;
}

dl.ledger dt:first-child { margin-top: 0; }
dl.ledger dd { margin-top: 0.6rem; }

/* ---------- 9. Figures table ---------- */
.table-frame {
  margin-top: 2.5rem;
  overflow-x: auto;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  -webkit-overflow-scrolling: touch;
}

table.figures {
  width: 100%;
  min-width: 30rem;
  font-size: 1.02rem;
  line-height: 1.55;
}

table.figures caption {
  caption-side: bottom;
  padding-top: 1.15rem;
  font-family: var(--grotesk);
  font-weight: 300;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: left;
}

table.figures th,
table.figures td {
  padding: 1.15rem 1.5rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hair-soft);
}

table.figures thead th {
  font-family: var(--grotesk);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--hair);
  white-space: nowrap;
}

table.figures tbody th {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.14rem;
  color: var(--ink);
  white-space: nowrap;
}

table.figures td { color: var(--ink-soft); }

table.figures tbody tr:last-child th,
table.figures tbody tr:last-child td { border-bottom: 0; }

table.figures .amount {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--gold);
  white-space: nowrap;
  text-align: right;
}

table.figures thead th.amount { text-align: right; }

table.figures th:first-child,
table.figures td:first-child { padding-left: 0; }

table.figures th:last-child,
table.figures td:last-child { padding-right: 0; }

/* ---------- 10. Full-bleed plates ---------- */
.plate {
  margin-block: var(--band);
  width: 100%;
}

.plate-frame {
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--bg-lift);
}

.plate-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  filter: saturate(0.78) brightness(0.92);
}

/* portrait sources get a taller crop so faces/units are not sliced */
.plate--tall .plate-frame { aspect-ratio: 16 / 9; }

/* ---------- 11. Closing mark ---------- */
.endmark {
  width: 3.25rem;
  height: 1px;
  background: var(--hair);
  margin: var(--band) auto 0;
}

/* ---------- 12. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hair);
  margin-top: var(--band);
  padding-block: clamp(3rem, 7vw, 4.75rem);
  text-align: center;
}

.footer-mark {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 2rem;
  margin-top: 2rem;
}

.footer-nav a {
  font-family: var(--grotesk);
  font-weight: 300;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 160ms linear;
}

.footer-nav a:hover { color: var(--gold); }

.copyright {
  margin-top: 2.5rem;
  font-family: var(--grotesk);
  font-weight: 300;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

/* ---------- 13. Responsive ---------- */
@media (max-width: 980px) {
  .plate-frame { aspect-ratio: 16 / 9; }
  .plate--tall .plate-frame { aspect-ratio: 4 / 3; }
}

@media (max-width: 720px) {
  body { font-size: 1.2rem; line-height: 1.74; }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding-block: 1.5rem;
    gap: 1.15rem;
  }

  .brand img { width: 158px; }

  .site-nav { gap: 0.35rem 1.35rem; }
  .site-nav a { font-size: 0.64rem; letter-spacing: 0.2em; }

  .hero { min-height: 82svh; }
  .hero-sub { font-size: 1.1rem; }
  .lede { font-size: 1.32rem; }
  .pull { font-size: 1.2rem; }

  .plate-frame { aspect-ratio: 3 / 2; }
  .plate--tall .plate-frame { aspect-ratio: 1 / 1; }

  table.figures { min-width: 27rem; font-size: 0.96rem; }
  table.figures th,
  table.figures td { padding: 0.95rem 1rem; }
  table.figures th:first-child,
  table.figures td:first-child { padding-left: 0; }
}

@media (max-width: 420px) {
  h1 { font-size: 2.45rem; }
  .eyebrow { letter-spacing: 0.32em; }
}

/* ---------- 14. Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body { background: #fff; color: #111; }
  .hero-img, .plate-frame img { filter: none; }
}
