/* Foundation: reset, tokens, fluid type steps, states and motion helpers. */

/* ---------- tokens (replace with the dealt palette and type system) ---------- */
:root {
  --bg: #ffffff;
  --surface: #f2f2f2;
  --ink: #111111;
  --muted: #5c5c5c;
  --accent: #111111;
  --accent-ink: #ffffff;

  --font-display: system-ui, sans-serif;
  --font-text: system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3rem, 1rem + 9vw, 9rem); /* set from the hero blueprint */

  --margin: clamp(1rem, 2.2vw, 2rem);    /* page side margin: tight, so content reaches the edges */
  --gutter: clamp(1rem, 2vw, 2rem);      /* column gap */
  --section: clamp(5rem, 12vw, 13rem);   /* space between sections */
  --radius: 0px;                          /* one radius for the whole page: 0, or large, decided once */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);        /* entrances, moving hovers, UI under 600ms */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);        /* reveals of 800ms and longer, line rises, openings */
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);     /* wipes, panels, things that travel while visible */
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);       /* slow scale and drift on photographs */
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5; font-kerning: normal; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 1rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: inherit; text-wrap: balance; hyphens: none; }
p { max-width: 62ch; text-wrap: pretty; }
p + p { margin-top: 0.9em; }
.nums { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- controls ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.4rem; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.button:active { transform: scale(0.97); }

/* ---------- motion helpers (content stays visible without JavaScript) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}


/* Applyne – Skint But Sound. The well-kept board (tiles, 8px gaps). Type: General Sans.
   Palette: charcoal of the late street, concrete, and the green of the kebab-shop fridge sign as the one accent. */
:root {
  --step-small: 0.9375rem;
  --bg: #161616;
  --surface: #232323;
  --surface-2: #2b2b2b;
  --ink: #f1f1ef;
  --muted: #a9aaa5;
  --accent: #79c86f;
  --accent-ink: #141414;
  --concrete: #cfccc2;
  --concrete-2: #a9a69c;
  --dark-ink: #161616;
  --pink: #e8a3b4;
  --amber: #d9ad57;

  --font-display: "General Sans", system-ui, sans-serif;
  --font-text: "General Sans", system-ui, sans-serif;
  --gap: 8px;
  --radius: 0px;
  --step-head: clamp(2.25rem, 1.2rem + 3.6vw, 4rem);
}
body { overflow-x: clip; }
.board { padding: var(--gap); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(6rem, 10vw, 9rem); }
.board > * { min-width: 0; }
.tile { margin: 0; background: var(--surface); padding: 20px 22px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }
.button--accent { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .button--accent:hover { background: #8ed784; transform: translateY(-2px); } }

/* HERO */
.hero > * { min-width: 0; }
.mosaic, .mosaic__grid { min-width: 0; }
.hero { height: calc(100svh - 2 * var(--gap)); min-height: 640px; display: grid; gap: var(--gap);
  grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 15vw 64px minmax(0, 1fr); }
.band { grid-column: 1 / -1; padding: 0; overflow: hidden; display: grid; place-items: center; background: var(--surface); }
.band__word { text-transform: uppercase; font-size: 21.5vw; line-height: 0.72; letter-spacing: -0.045em; white-space: nowrap; transform: translateY(0.035em); }
.links { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.tile--link { text-decoration: none; padding: 16px 22px; font-size: var(--step-body); transition: background-color var(--t-hover) ease; }
.tile--link:hover { background: var(--surface-2); }
.rail { display: grid; gap: var(--gap); min-height: 0; }
.rail--left { grid-column: 1 / 3; grid-template-rows: 1fr auto; }
.tile--photo { padding: 0; overflow: hidden; min-height: 0; }
.tile--photo img, .main__img img { width: 100%; height: 100%; object-fit: cover; }
.tile--photo img { object-position: 30% 30%; }
.tile--facts { display: grid; gap: 0.35rem; font-size: var(--step-body); line-height: 1.3; }
.tile--facts div { display: flex; justify-content: space-between; gap: 0.5rem; }
.tile--facts dt { color: var(--muted); }
.tile--facts dd { margin: 0; text-align: right; }
.tile--main { grid-column: 3 / 11; padding: 0; position: relative; display: grid; grid-template-rows: 1fr auto; gap: var(--gap); background: none; min-height: 0; }
.main__img { overflow: hidden; min-height: 0; }
.main__img img { object-position: 50% 35%; }
.statement { background: var(--surface); padding: 22px 24px; font-size: clamp(1.5rem, 1rem + 1.2vw, 2.25rem); line-height: 1.12; letter-spacing: -0.015em; font-weight: 500; max-width: none; }
.rail--right { grid-column: 11 / 13; grid-template-rows: repeat(4, 1fr) 1.6fr; }
.rail--right .tile { font-size: var(--step-body); font-weight: 500; }
.tone-1 { background: var(--concrete); color: var(--dark-ink); }
.tone-2 { background: var(--concrete-2); color: var(--dark-ink); }
.tone-3 { background: #3a3a38; }
.tone-4 { background: var(--surface-2); }
.tile--action { background: var(--accent); color: var(--accent-ink); text-decoration: none; font-size: var(--step-lead) !important; line-height: 1.1; display: flex; align-items: flex-end; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.tile--action:hover { background: #8ed784; }
.tile--action:active { transform: scale(0.98); }
@media (prefers-reduced-motion: no-preference) {
  .js .main__img img { animation: v2-settle 1600ms var(--ease-soft) both; }
}
@keyframes v2-settle { from { transform: scale(1.12); } to { transform: none; } }

/* MOSAIC */
.mosaic__grid { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: var(--gap); }
.m-cell { aspect-ratio: 1; overflow: hidden; background: var(--surface); }
.m-cell i { display: block; width: 100%; height: 100%; background-repeat: no-repeat; transition: transform 500ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .m-cell:hover i { transform: scale(1.08); } }
.m-text { min-height: 0; overflow: hidden; margin: 0; padding: 18px 20px; background: var(--concrete); color: var(--dark-ink); font-size: var(--step-lead); font-weight: 500; line-height: 1.15; max-width: none; }
.m-head { background: var(--surface); color: var(--ink); font-size: clamp(1.75rem, 0.6rem + 2.6vw, 3rem); line-height: 0.98; font-weight: 700; }
.m-action { background: var(--accent); color: var(--accent-ink); text-decoration: none; display: flex; align-items: flex-end; font-weight: 700; font-size: clamp(1.75rem, 0.6rem + 2.6vw, 3rem); transition: background-color var(--t-hover) ease; }
.m-action:hover { background: #8ed784; }

/* ORDER / RECEIPT */
.order { padding-inline: clamp(0.5rem, 1.5vw, 1.5rem); }
.order__head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.order__title { font-size: var(--step-head); line-height: 1; }
.order__title span { color: var(--muted); }
.order__intro { display: grid; gap: 1.25rem; }
.order__desc { font-size: var(--step-lead); line-height: 1.3; max-width: 44ch; }
.m-link { text-decoration: none; transition: background-color var(--t-hover) ease; }
.m-link:hover { background: #dedbd1; }
.order__body { display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 3.5rem; align-items: start; }
.receipt { position: sticky; top: 1rem; background: #e9e9e7; color: var(--dark-ink); padding: 26px 24px 24px; display: grid; gap: 1rem; font-variant-numeric: tabular-nums; }
.receipt__cover img { width: 96px; height: 96px; object-fit: cover; margin-inline: auto; background: none; }
.receipt__shop { font-weight: 700; font-size: var(--step-lead); line-height: 1.1; text-align: center; max-width: none; }
.receipt__meta { font-size: var(--step-small); text-align: center; color: #44443f; max-width: none; }
.receipt__items { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; min-height: 3rem; font-size: var(--step-body); }
.receipt__items li { display: flex; justify-content: space-between; gap: 1rem; }
.receipt__items .empty { color: #5b5b55; justify-content: center; }
.receipt__total { display: flex; justify-content: space-between; font-weight: 700; font-size: var(--step-lead); padding-block: 0.6rem; background: #dcdcd9; margin-inline: -24px; padding-inline: 24px; max-width: none; }
.embed { display: block; width: 100%; border: 0; border-radius: 12px; margin-top: 0.5rem; }
.embed-load { text-decoration: none; display: grid; gap: 0.25rem; align-content: center; justify-items: start; width: 100%; min-height: 152px; margin-top: 0.5rem; padding: 20px 22px; border-radius: 12px; background: var(--bg); color: var(--ink); text-align: left; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.embed-load strong { font-size: var(--step-lead); font-weight: 700; }
.embed-load span { font-size: var(--step-small); color: var(--muted); }
.embed-load:hover { background: #000; }
.embed-load:active { transform: scale(0.98); }
.bands { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.bands li { display: grid; grid-template-columns: 5rem 1fr auto; align-items: center; gap: 1.25rem; min-height: 76px; padding: 12px 14px 12px 20px; background: var(--surface); }
.bands li:nth-child(even) { background: var(--surface-2); }
.b-time { font-size: var(--step-lead); color: var(--muted); }
.b-title { font-size: var(--step-lead); font-weight: 500; display: grid; }
.b-add { min-height: 44px; min-width: 6.5rem; padding: 0 1rem; background: var(--ink); color: var(--dark-ink); font-weight: 500; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.b-add:active { transform: scale(0.96); }
.b-add[aria-pressed="true"] { background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .b-add:hover { background: #fff; } .b-add[aria-pressed="true"]:hover { background: #8ed784; } }

/* BOOTH */
.booth { padding-inline: clamp(0.5rem, 1.5vw, 1.5rem); }
.booth__title { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); line-height: 1.05; }
.booth__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 2.5rem; }
.booth__tile { margin: 0; }
.tint { aspect-ratio: 4 / 5; overflow: hidden; }
.tint img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.15); mix-blend-mode: multiply; transition: transform 500ms var(--ease-out); }
.booth__tile:hover .tint img { transform: scale(1.04); }
.t1 { background: var(--accent); } .t2 { background: var(--concrete); } .t3 { background: var(--pink); } .t4 { background: var(--amber); }
.booth__tile figcaption { margin-top: 10px; display: grid; }
.booth__tile strong { font-size: var(--step-body); font-weight: 500; }
.booth__tile span { font-size: var(--step-body); color: var(--muted); }

/* FOOTER */
.foot { padding: 2rem var(--gap) 1.25rem; }

/* CLOSE */
.close { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); background: var(--concrete); color: var(--dark-ink); padding: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 2vw, 2rem); align-items: end; }
.close__title { grid-column: 1 / 7; font-size: var(--step-head); line-height: 1; }
.close__actions { grid-column: 7 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.close__btn { display: flex; flex-direction: column; justify-content: flex-end; min-height: 140px; padding: 20px 22px; background: var(--dark-ink); color: var(--ink); text-decoration: none; font-size: var(--step-lead); font-weight: 700; line-height: 1.1; transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.close__btn span { font-size: var(--step-small); font-weight: 400; color: var(--muted); }
.close__btn--main { background: var(--accent); color: var(--accent-ink); }
.close__btn--main span { color: #1f3d1b; }
.close__btn:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .close__btn:hover { background: #2b2b2b; } .close__btn--main:hover { background: #8ed784; } }
@media (max-width: 760px) { .close { display: flex; flex-direction: column; align-items: stretch; gap: 1.5rem; } .close__title { font-size: 10vw; } .close__btn { min-height: 96px; } }
.blocks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; height: 34svh; min-height: 220px; align-items: end; }
.blocks span { height: var(--h); background: var(--accent); color: var(--bg); display: grid; place-items: end center; font-weight: 700; font-size: clamp(4rem, 12vw, 13rem); line-height: 0.78; letter-spacing: -0.04em; overflow: hidden; }
.blocks span:nth-child(2n) { background: var(--concrete); }
.blocks span:nth-child(3n) { background: var(--pink); }
.foot__cols { margin-top: 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; padding-inline: clamp(0.5rem, 1.5vw, 1.5rem); font-size: var(--step-body); }
.foot__cols div { display: grid; gap: 0.3rem; align-content: start; }
.foot__cols p { font-weight: 500; }
.foot__cols a { text-decoration: none; color: var(--muted); }
.foot__cols a:hover { color: var(--ink); }
.foot__last { margin-top: 4rem; display: flex; justify-content: space-between; align-items: center; padding-inline: clamp(0.5rem, 1.5vw, 1.5rem); font-size: var(--step-small); color: var(--muted); }

.sticky-cta { display: none; }
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { left: 8px; top: 8px; z-index: 50; width: auto; height: auto; clip-path: none; padding: 0.75rem 1rem; background: var(--accent); color: var(--accent-ink); font-weight: 500; }

/* PHONE */
@media (max-width: 1100px) and (min-width: 761px) { .m-text { font-size: var(--step-body); padding: 14px; } .m-head, .m-action { font-size: var(--step-lead); } }

@media (max-width: 760px) {
  .board { gap: 5rem; padding: 6px; --gap: 6px; }
  .hero { height: auto; min-height: 0; grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: 6px; }
  .band { grid-column: 1 / -1; height: 110px; }
  .band__word { font-size: 30vw; }
  .links { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 6px; }
  .tile--main { grid-column: 1 / -1; order: 1; }
  .main__img { aspect-ratio: 4 / 3; }
  .statement { font-size: 1.5rem; }
  .rail--right { grid-column: 1 / -1; order: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto; }
  .rail--right .tile--action { grid-column: 1 / -1; min-height: 64px; }
  .rail--right .tile { padding: 12px; font-size: var(--step-small); min-height: 84px; }
  .tile--action { font-size: var(--step-body) !important; }
  .rail--left { grid-column: 1 / -1; order: 3; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .tile--photo { aspect-ratio: 4 / 5; }

  .order, .booth, .foot__cols, .foot__last { padding-inline: 10px; }
  .order__head { flex-direction: column; align-items: stretch; }
  .order__head .button { width: 100%; }
  .order__body { grid-template-columns: 1fr; }
  .receipt { position: static; order: 2; }
  .bands li { grid-template-columns: 1fr auto; padding: 14px 12px 14px 16px; row-gap: 4px; }
  .b-time { grid-column: 1; font-size: var(--step-body); }
  .b-title { grid-column: 1; }
  .b-add { grid-column: 2; grid-row: 1 / 3; }

  .booth__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .m-text { padding: 10px 12px; font-size: var(--step-small); }
  .m-head, .m-action { font-size: 6vw; }


  .blocks { height: 22svh; min-height: 150px; }
  .blocks span { font-size: 9vw; letter-spacing: 0; }
  .foot__cols { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .foot__last { margin-bottom: 4.5rem; }

  .sticky-cta { display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; transform: translateY(140%); visibility: hidden; transition: transform var(--t-ui) var(--ease-out), visibility 0s linear var(--t-ui); }
  .sticky-cta .button { width: 100%; min-height: 3.5rem; }
  .sticky-cta.is-on { transform: none; visibility: visible; transition-delay: 0s; }
}

/* entrances */
@media (prefers-reduced-motion: no-preference) {
  .js .blocks span { transform: scaleY(0); transform-origin: bottom; transition: transform 900ms var(--ease-expo); transition-delay: calc(var(--n, 0) * 70ms); }
  .js .blocks.is-in span { transform: none; }
  .js .bands li[data-reveal] { transition-delay: calc(min(var(--i, 0), 5) * 60ms); }
}

/* 404 */
.lost { min-height: 100svh; display: grid; align-content: center; gap: 1.5rem; padding: clamp(1.25rem, 4vw, 3rem); }
.lost__title { font-size: clamp(3rem, 1rem + 9vw, 9rem); line-height: 0.9; letter-spacing: -0.04em; }
.lost__text { font-size: var(--step-lead); }
.lost__links { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.lost__link { color: var(--ink); text-underline-offset: 0.2em; }

/* focus ring that shows on the light surfaces */
.close :focus-visible, .receipt :focus-visible, .m-text:focus-visible, .tone-1:focus-visible, .tone-2:focus-visible { outline-color: var(--dark-ink); }

/* keep the album board's height while the script cuts the cover, so nothing below it jumps */
.js .mosaic__grid:not(.is-built) { aspect-ratio: 6 / 4; }
@media (max-width: 760px) { .js .mosaic__grid:not(.is-built) { aspect-ratio: 3 / 6; } }

/* fail-safe: if site.js never runs, revealed content still appears after 3 seconds */
@media (prefers-reduced-motion: no-preference) {
  .js:not(.js-ready) [data-reveal]:not(.is-in) { animation: reveal-failsafe 0s 3s forwards; }
}
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
