/* 18grams.vn — the page is the Cà Phê Pha Máy poster: electric blue field, heavy yellow display,
 * white rows. Paper appears once, where the bottle photography needs air.
 *
 * Every colour, face and size is a token from brand/tokens.css. A hex literal here is a bug and
 * `node brand/check-brand.mjs` names it by line. */

*, *::before, *::after { 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(--surface-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--text-accent); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }
.measure { max-width: var(--measure); }

.skip {
  position: absolute;
  left: -9999px;
  background: var(--surface-fill);
  color: var(--text-on-fill);
  padding: 0.6rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 20; }

/* ---- the blue field ----------------------------------------------------------------------- */
.deep {
  background: var(--surface-accent);
  color: var(--text-on-accent);
}
.deep h2, .deep h3 { color: var(--display-on-accent); }
.deep a { color: var(--display-on-accent); }
.deep :focus-visible { outline-color: var(--fill-on-accent); }

/* ---- display type ------------------------------------------------------------------------- */
/* Set like a price board: heavy, tight, uppercase, lines stacked hard. Negative tracking because
 * at this weight and size the default gaps read as holes. */
.shout {
  font-family: var(--font-display);
  font-weight: var(--weight-heavy);
  line-height: var(--leading-display);
  letter-spacing: var(--track-shout);
  text-transform: uppercase;
  margin: 0;
}
.shout span { display: block; }

h2.shout { font-size: clamp(2rem, 7vw, 3.25rem); }

.label {
  font-family: var(--font-data);
  font-size: var(--size-small);
  font-weight: var(--weight-strong);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}

/* ---- top bar ------------------------------------------------------------------------------ */
.topbar {
  background: var(--surface-accent);
  color: var(--text-on-accent);
}
.topbar > .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2.5rem, 70rem);
  margin-inline: auto;
  padding: 0.9rem 0;
}
/* No plate: the artwork carries its own knockout, and that outline reads on blue at 6.16:1. Red
 * TYPE on blue is still refused — a different thing from the mark. */
.topbar .brand { display: inline-block; }
.topbar .brand img { width: clamp(7.5rem, 20vw, 10.5rem); display: block; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.topbar nav a {
  color: var(--text-on-accent);
  text-decoration: none;
  font-family: var(--font-data);
  font-size: var(--size-small);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.topbar nav a:hover { color: var(--display-on-accent); }

/* ---- hero --------------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  mix-blend-mode: luminosity;
}
/* A stated contrast ratio is text against a flat token; moving film under the same text is a
 * pairing nobody can state. A gradient, not a flat scrim: opaque behind the type, clear over the
 * right, where the film is all there is. The stops sit where the copy ends. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--surface-accent) 0%,
    var(--surface-accent) 38%,
    color-mix(in srgb, var(--surface-accent) 50%, transparent) 62%,
    color-mix(in srgb, var(--surface-accent) 6%, transparent) 100%);
}
@media (max-width: 52rem) {
  /* Stacked, the type sits over the whole width, so the scrim covers it vertically instead. */
  .hero::after {
    background: linear-gradient(
      to bottom,
      var(--surface-accent) 0%,
      var(--surface-accent) 42%,
      color-mix(in srgb, var(--surface-accent) 35%, transparent) 100%);
  }
}
@media (prefers-reduced-motion: reduce) { .hero video { display: none; } }

.hero .wrap {
  position: relative;
  z-index: 1;
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(2.5rem, 7vw, 4.5rem);
}
/* Type left, film right. Capped, not columned: a photograph in the right half covers the video. */
.hero-copy { max-width: 40rem; }
.hero .kicker {
  font-family: var(--font-data);
  font-size: var(--size-small);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-on-accent-soft);
  margin: 0 0 1.25rem;
}
.hero h1.shout {
  font-size: clamp(3rem, 15vw, var(--size-shout));
  color: var(--display-on-accent);
}
.hero .tagline {
  font-size: clamp(1.05rem, 2.4vw, var(--size-h2));
  color: var(--text-on-accent);
  max-width: 30ch;
  margin: 0 0 2rem;
}

/* The pulse from the mark's tail. It traces, holds, sweeps out, and repeats; nothing else animates. */
.pulse {
  display: block;
  width: min(100%, 30rem);
  height: 3.25rem;
  margin: 1rem 0 1.5rem -0.15rem;
  overflow: visible;
}
.pulse path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 470;
  stroke-dashoffset: 470;
  animation: trace 3s cubic-bezier(0.6, 0, 0.2, 1) 0.25s infinite;
}
/* Light stroke under, the mark's red on top — the mark's own construction. */
.pulse .under { stroke: var(--text-on-accent); stroke-width: 13; }
.pulse .over { stroke: var(--display-mark); stroke-width: 6; }
.paper .pulse .under { stroke: var(--surface-canvas); }
/* The dash is 470 on, 470 off. Offset 470 hides it before the start, 0 draws it whole, and -470
   pulls it out past the end — so one cycle traces, holds, and sweeps away without ever jumping. */
@keyframes trace {
  0%   { stroke-dashoffset: 470; }
  40%  { stroke-dashoffset: 0; }
  62%  { stroke-dashoffset: 0; }
  92%  { stroke-dashoffset: -470; }
  100% { stroke-dashoffset: -470; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse path { stroke-dashoffset: 0; }
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }
.btn {
  display: inline-block;
  background: var(--fill-on-accent);
  color: var(--label-on-fill-accent);
  border: 2px solid var(--fill-on-accent);
  border-radius: 0;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-data);
  font-size: var(--size-small);
  font-weight: var(--weight-strong);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
}
.btn--ghost {
  background: transparent;
  color: var(--text-on-accent);
  border-color: var(--border-on-accent);
}
.deep .btn { color: var(--label-on-fill-accent); }
.deep .btn--ghost { color: var(--text-on-accent); }
.btn:hover { filter: brightness(1.08); }

/* ---- sections ----------------------------------------------------------------------------- */
section { padding: clamp(2.75rem, 8vw, 5rem) 0; }
.hero { padding: 0; }
.lede { color: var(--text-secondary); }
.deep .lede { color: var(--text-on-accent-soft); }
.note { color: var(--text-on-accent-soft); font-family: var(--font-data); font-size: var(--size-small); }

/* ---- the price board ---------------------------------------------------------------------- */
/* Rows, not cards: name left, price right, a rule between them. */
.board {
  list-style: none;
  margin: 2rem 0 1.25rem;
  padding: 0;
  border-top: 2px solid var(--border-on-accent);
}
.board li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-on-accent);
}
.board .name {
  font-family: var(--font-display);
  font-weight: var(--weight-heavy);
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.board .dots { border-bottom: 1px dotted var(--text-on-accent-soft); transform: translateY(-0.25em); }
.board .amount {
  font-family: var(--font-data);
  font-weight: var(--weight-strong);
  font-size: clamp(1.05rem, 3vw, 1.4rem);
  font-variant-numeric: tabular-nums;
  color: var(--display-on-accent);
  white-space: nowrap;
}
.board .amount .unit {
  font-size: var(--size-small);
  font-weight: var(--weight-body);
  color: var(--text-on-accent-soft);
  margin-left: 0.4rem;
}
.board .blurb {
  grid-column: 1 / -1;
  color: var(--text-on-accent-soft);
  font-size: var(--size-small);
  margin-top: 0.15rem;
  max-width: 46ch;
}

/* ---- paper sections ----------------------------------------------------------------------- */
/* The one place the page stops shouting. Both bottle photographs live here. */
.paper { background: var(--surface-canvas); color: var(--text-primary); }
.paper h2 {
  /* --display-mark, not --text-accent: that resolves to the rose in the dark theme. Display sizes
   * only, where 3:1 applies — 3.99 on paper, 5.03 on ink. Body copy takes --text-accent. */
  color: var(--display-mark);
  font-weight: var(--weight-heavy);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.statement { text-align: center; }
.statement h2.shout { font-size: clamp(1.9rem, 5.5vw, 3rem); max-width: 20ch; margin-inline: auto; }
.statement .pulse { margin-inline: auto; }
.statement .measure { margin-inline: auto; }
.statement .lede { font-size: clamp(1rem, 2.2vw, 1.15rem); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
}
.split--flip img { order: -1; }
/* NO CROP. The bottles are 3:4; object-fit:cover in a landscape box cuts the cap and the ice. */
.split img {
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}
.split h2 { margin-bottom: 0.75rem; }
/* Both bottles side by side, aligned at the bottom: same object at two sizes. */
.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.5rem, 2vw, 1.25rem);
  align-items: end;
}
.shots img { max-width: 14rem; }

/* ---- stores ------------------------------------------------------------------------------- */
.outlets {
  list-style: none;
  margin: 1.75rem 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: 1rem;
}
.outlet {
  border: 2px solid var(--border-on-accent);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
}
.outlet .label { color: var(--text-on-accent-soft); margin: 0 0 0.45rem; }
.outlet .addr { margin: 0; font-size: clamp(1rem, 2.2vw, 1.2rem); font-weight: var(--weight-strong); }
/* Directions sit on the shop, not on the chain. margin-top:auto so the link lands on the same line
 * in both cards when one address wraps and the other does not. */
.outlet .map {
  margin: auto 0 0;
  padding-top: 0.9rem;
  font-family: var(--font-data);
  font-size: var(--size-small);
  font-weight: var(--weight-strong);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.outlet .map a { text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---- contact ------------------------------------------------------------------------------ */
/* Each label and its value are ONE grid item: dt and dd alone become independent items and the
 * columns pull a label away from the value it names. */
#lien-he { color: var(--text-on-accent-soft); margin: 2.75rem 0 0; }
.contact-list {
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1.75rem 2.5rem;
}
.contact-list dt {
  font-family: var(--font-data);
  font-size: var(--size-small);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-on-accent-soft);
  margin-bottom: 0.3rem;
}
.contact-list dd {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: var(--weight-strong);
}
.contact-list dd a { text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---- footer ------------------------------------------------------------------------------- */
.foot {
  background: var(--surface-accent);
  color: var(--text-on-accent-soft);
  border-top: 1px solid var(--border-on-accent);
  padding: 2.25rem 0;
  font-family: var(--font-data);
  font-size: var(--size-small);
}
.foot .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.foot .line { color: var(--text-on-accent); margin: 0; letter-spacing: var(--track-label); text-transform: uppercase; }
.foot p { margin: 0; }
/* The six accounts do not exist yet. The list stays in the markup and renders nothing. */
.socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 1rem; }
.social[hidden] { display: none; }
