/* Café Mamahood. Brand pack: Milk & Cream, Coffee Bean, Strawberry Milk, Baby Blue,
   Sage (sparingly). Baked Apple is deliberately never used. Fonts: Fredoka (labels),
   DM Serif Display (headlines), Lora (body). Three families, the brand pack's cap. */

@font-face { font-family: "Fredoka"; src: url("fonts/fredoka-normal.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url("fonts/dmserifdisplay-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url("fonts/dmserifdisplay-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/lora-normal.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Lora"; src: url("fonts/lora-italic.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }

:root {
  --milk: #F8F1E8; --coffee: #5A392C; --pink: #EBC4C0; --blue: #BFD4D8; --sage: #AEBBA8;
  --sc-canvas: var(--milk);
  --sc-surface: #FCF8F2;
  --sc-ink: var(--coffee);
  --sc-ink-soft: #74564A;          /* 5.9:1 on milk */
  --sc-accent: var(--coffee);
  --sc-accent-ink: var(--milk);
  --sc-font-display: "DM Serif Display", Georgia, serif;
  --sc-font-text: "Lora", Georgia, serif;
  --font-label: "Fredoka", system-ui, sans-serif;
  --sc-shadow-color: 18 35% 24%;
  --sc-edge: inset 0 1px 0 rgb(255 255 255 / .6);
  --sc-track-tight: -0.012em;       /* DM Serif is already tight; the default -0.035 crushes it */
}
/* never give html a background: body's colour must stay on the root canvas so the
   pour canvas (z-index -1) paints above it and below the content */
body { background: var(--milk); }
.sc-display { font-weight: 400; }
::selection { background: var(--pink); color: var(--coffee); }

.label {
  font-family: var(--font-label); font-weight: 500; font-size: var(--sc-t-xs);
  letter-spacing: .09em; text-transform: uppercase; color: var(--sc-ink-soft); margin: 0;
}

/* ------------------------------------------------------------ chrome -- */
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 80; background: var(--coffee); color: var(--milk);
  padding: .6rem 1rem; border-radius: 999px; font-family: var(--font-label); text-decoration: none; }
.skip:focus-visible { top: 1rem; }

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: max(.9rem, env(safe-area-inset-top)) var(--sc-gutter) .9rem;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar__mark {
  font-family: var(--font-label); font-weight: 600; font-size: 1.1rem; letter-spacing: -.005em;
  color: var(--coffee); text-decoration: none;
  background: var(--milk); padding: .45rem .95rem; border-radius: 999px;
  box-shadow: var(--sc-e1);
}
.follow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-label); font-weight: 500; text-decoration: none; white-space: nowrap;
  background: var(--coffee); color: var(--milk); border-radius: 999px;
  transition: transform 140ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out);
}
.follow--bar { font-size: .95rem; padding: .55rem 1.05rem; box-shadow: var(--sc-e1); }
.follow--main { font-size: 1.1rem; padding: .95rem 1.55rem; box-shadow: var(--sc-e2); }
.follow svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; }
.follow:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .follow:hover { background: #4A2E23; } }
:focus-visible { outline: 2px solid var(--coffee); outline-offset: 3px; }
.follow:focus-visible { outline-offset: 4px; box-shadow: 0 0 0 2px var(--milk); }
.bar__mark:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--coffee), 0 0 0 5px var(--milk); }
@media (max-width: 520px) {
  .bar__mark { font-size: 1rem; padding: .4rem .8rem; }
  .follow--bar { font-size: .85rem; padding: .5rem .85rem; }
}

/* -------------------------------------------------------------- hero -- */
.hero-media {
  position: absolute; inset: 0;
  /* torn bottom edge: the photo is a print, and the coffee drips off its torn edge */
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 22px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 24' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V9L1188 14 1170 8 1151 15 1130 10 1112 17 1090 11 1066 16 1049 9 1027 13 1004 18 985 10 962 15 941 9 918 16 897 12 872 19 851 11 830 15 807 9 786 17 764 12 741 16 720 10 698 18 676 12 653 15 632 9 611 16 588 11 566 18 545 12 522 16 500 9 478 15 456 11 433 19 411 12 390 16 367 10 346 17 323 11 301 15 279 9 257 17 235 12 212 16 190 10 168 18 146 12 123 15 101 9 80 17 57 11 36 16 15 10 0 13Z'/%3E%3C/svg%3E") bottom / 100% 24px no-repeat;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 22px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 24' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V9L1188 14 1170 8 1151 15 1130 10 1112 17 1090 11 1066 16 1049 9 1027 13 1004 18 985 10 962 15 941 9 918 16 897 12 872 19 851 11 830 15 807 9 786 17 764 12 741 16 720 10 698 18 676 12 653 15 632 9 611 16 588 11 566 18 545 12 522 16 500 9 478 15 456 11 433 19 411 12 390 16 367 10 346 17 323 11 301 15 279 9 257 17 235 12 212 16 190 10 168 18 146 12 123 15 101 9 80 17 57 11 36 16 15 10 0 13Z'/%3E%3C/svg%3E") bottom / 100% 24px no-repeat;
}
.hero-a, .hero-loop {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
}
/* stack: poster, B (engine scrub), A (the one-scroll spill), loop (steam) */
.hero-loop { transition: opacity 240ms var(--sc-ease-out); }
[data-hero=rest] .hero-loop, [data-hero=arming] .hero-loop { transition-duration: 600ms; }
[data-hero=spill] .hero-loop, [data-hero=scrub] .hero-loop, [data-hero=off] .hero-loop { opacity: 0; }
/* A→B is a hard cut between consecutive frames, and waits for the engine's own painted flag */
[data-hero=scrub] #hero.sc-has-clip .hero-a { opacity: 0; transition: opacity 0s 380ms; }   /* cut only once B has faded fully in */
[data-hero=off] .hero-a { opacity: 0; }
[data-hero=rest] .hero-a { transition: opacity 0s 600ms; }
[data-hero=off] .hero-a, [data-hero=off] .hero-loop { display: none; }
.steam-toggle {
  position: absolute; z-index: 21; right: var(--sc-gutter); bottom: 2.4rem; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in oklab, var(--milk) 82%, transparent); color: var(--coffee); box-shadow: var(--sc-e1);
  transition: opacity 200ms var(--sc-ease-out);
}
.steam-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.steam-toggle .i-play, .steam-toggle[aria-pressed=true] .i-pause { display: none; }
.steam-toggle[aria-pressed=true] .i-play { display: inline; }
.steam-toggle[hidden], [data-hero=off] .steam-toggle { display: none; }
[data-hero=spill] .steam-toggle, [data-hero=scrub] .steam-toggle { opacity: 0; visibility: hidden; transition: opacity 200ms var(--sc-ease-out), visibility 0s 200ms; }

.hero-scrim {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(62% 58% at 16% 24%, color-mix(in oklab, var(--milk) 72%, transparent) 0%, color-mix(in oklab, var(--milk) 34%, transparent) 55%, transparent 80%);
}
.hero-copy { top: clamp(5.5rem, 16vh, 10rem); bottom: auto; max-width: min(34rem, 44vw); }
.hero-title { font-size: clamp(2.6rem, 1.4rem + 3.6vw, 5.2rem); margin: .9rem 0 1.1rem; line-height: 1.02; }
.hero-sub { font-size: var(--sc-t-lg); line-height: 1.5; max-width: 30ch; margin: 0; color: var(--coffee); text-wrap: pretty; }
@media (max-width: 860px) {
  .hero-scrim { background: linear-gradient(to bottom, color-mix(in oklab, var(--milk) 80%, transparent) 0%, color-mix(in oklab, var(--milk) 55%, transparent) 26%, transparent 42%); }
  .hero-copy { top: 4.6rem; max-width: none; }
  .hero-title { font-size: clamp(2rem, 1.2rem + 3.8vw, 2.7rem); margin: .5rem 0 .5rem; }
  .hero-sub { font-size: 1rem; max-width: 34ch; }
}

/* ------------------------------------------------------------- pour -- */
.pour-zone { position: relative; }
.pour-canvas {
  position: sticky; top: 0; display: block;
  width: 100%; height: 100vh; height: 100lvh;
  margin-top: -16px;                               /* tuck under the photo's transparent tear strip */
  margin-bottom: calc(16px - 100vh); margin-bottom: calc(16px - 100lvh);
  z-index: -1; pointer-events: none; background: var(--milk);
}
.pour-line { position: absolute; margin: 0; color: var(--coffee); text-wrap: balance; }
.pour-line--one { left: var(--sc-gutter); top: 20%; max-width: 13ch; font-size: clamp(2.2rem, 1.2rem + 3.4vw, 4.6rem); line-height: 1.04; }
.pour-line--two { right: var(--sc-gutter); bottom: 16%; max-width: 12ch; text-align: right; font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5.8rem); line-height: 1; }
@media (max-width: 860px) {
  .pour-line--one { top: 16%; right: var(--sc-gutter); }
  .pour-line--two { left: var(--sc-gutter); bottom: 14%; text-align: left; }
}
/* No WebGL, or reduced motion: static grounds carry the same three colours.
   The section scrolls under its transparent pinned stage; bands sit where no copy lands. */
.no-pour .pour-canvas { display: none; }
.no-pour #pour { background:
  linear-gradient(to bottom, var(--milk) 3%, var(--coffee) 3% 40%, transparent 40% 66%, var(--milk) 66%),
  linear-gradient(to right, var(--pink) 50%, var(--blue) 50%); }

/* ------------------------------------------------------------ words -- */
.words { padding-block: clamp(1.5rem, 4vh, 3rem) clamp(4rem, 10vw, 9rem); }
.words__inner { text-align: center; }
.words__quote { margin: 0 auto; }
.words__quote p { font-size: clamp(2rem, 1.1rem + 3vw, 4rem); line-height: 1.1; max-width: 19ch; margin-inline: auto; }
.words__sign {
  display: inline-flex; align-items: center; gap: .6rem; margin: 2.25rem 0 0;
  font-style: italic; font-size: var(--sc-t-lg); color: var(--coffee);
}
.heart { width: 1.3rem; height: 1.3rem; fill: var(--pink); stroke: var(--coffee); stroke-width: 1.4; transform: rotate(-8deg); }

/* --------------------------------------------------------- envelope -- */
.envelope { padding-block: clamp(3rem, 8vw, 7rem) clamp(4rem, 9vw, 8rem); }
.envelope__head { max-width: calc(var(--sc-maxw)); }
.envelope__title { font-size: clamp(2rem, 1.2rem + 2.8vw, 3.8rem); margin: .8rem 0 1rem; max-width: 16ch; }
.envelope__intro { margin: 0; max-width: 42ch; font-size: var(--sc-t-lg); line-height: 1.5; }
.envelope__note { margin-top: clamp(2rem, 5vw, 4rem); font-style: italic; color: var(--sc-ink-soft); max-width: 60ch; }

.spread {
  position: relative; max-width: var(--sc-maxw); margin: clamp(2rem, 5vw, 4rem) auto 0;
  height: clamp(44rem, 64vw, 60rem);
}
.piece { position: absolute; margin: 0; width: clamp(14rem, 22vw, 20rem); }
.piece img { width: 100%; height: auto; transform: rotate(var(--r, 0deg)); }
.piece figcaption { margin-top: .4rem; font-size: .98rem; line-height: 1.45; color: var(--coffee); max-width: 26ch; }
.piece figcaption strong { display: block; font-family: var(--font-label); font-weight: 500; font-size: 1.05rem; }
/* washi tape, sparingly: three pieces, not five */
.piece--letter::before, .piece--recipe::before, .piece--print::before {
  content: ""; position: absolute; z-index: 1; top: .6rem; left: 50%; width: 5.5rem; height: 1.5rem;
  translate: -50% 0; rotate: var(--t, -4deg); opacity: .78; border-radius: 2px;
  background: var(--tape, var(--pink));
  -webkit-mask: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent 0);
          mask: linear-gradient(90deg, transparent 0 3px, #000 3px calc(100% - 3px), transparent 0);
}
.piece--letter  { left: 2%;  top: 2%;  --r: -4deg; }
.piece--table   { left: 27%; top: 22%; --r: 3deg; }
.piece--recipe  { left: 52%; top: 0;   --r: -2deg; --tape: var(--blue); --t: 5deg; }
.piece--print   { left: 76%; top: 18%; --r: 4deg; --tape: var(--sage); }
.piece--sticker { left: 60%; top: 62%; width: clamp(9rem, 12vw, 11rem); --r: -10deg; }
@media (max-width: 860px) {
  .spread { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2.25rem 1.1rem; padding-inline: var(--sc-gutter); }
  .piece { position: relative; left: auto; top: auto; width: auto; }
  .piece--table, .piece--print { margin-top: 2.5rem; }
  .piece--sticker { width: 62%; justify-self: center; grid-column: 1 / -1; }
  .piece figcaption { font-size: .9rem; }
}

/* ------------------------------------------------------------ close -- */
.close { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(1.5rem, 4vw, 4rem);
  padding: 5rem var(--sc-gutter) 4rem; max-width: var(--sc-maxw); margin-inline: auto; }
.close__art { position: relative; }
.close__tilt { position: relative; }
.close__envelope { width: 100%; height: auto; }
.close__ring { position: absolute; width: 34%; height: auto; right: 6%; top: 6%; opacity: calc(var(--sc-p, 0) * 1.4); transform: rotate(18deg); }
.close__title { font-size: clamp(2.8rem, 1.6rem + 4.4vw, 6rem); margin: 0 0 1rem; }
.close__facts { font-family: var(--font-label); font-weight: 500; font-size: var(--sc-t-lg); margin: 0 0 1.8rem; }
.close__small { margin: 1.1rem 0 0; color: var(--sc-ink-soft); font-size: .98rem; max-width: 34ch; }
.foot {
  position: absolute; left: var(--sc-gutter); right: var(--sc-gutter); bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--sc-ink-soft);
}
@media (max-width: 860px) {
  .close { grid-template-columns: 1fr; align-content: center; gap: 1.2rem; padding: 4.5rem var(--sc-gutter) 3.5rem; }
  .close__art { max-width: 20rem; justify-self: center; width: 78%; }
  .close__title { font-size: clamp(2.4rem, 1.4rem + 5vw, 3.4rem); }
  .close__facts { margin-bottom: 1.2rem; font-size: 1.05rem; }
  .foot { font-size: .78rem; }
}
