/* ==========================================================================
   Do Sushi Haus – Design System
   Concept: "Gold on Slate" – the printed menu, translated to the web.
   ========================================================================== */

/* ---------- Fonts (self-hosted, DSGVO) ---------- */
@font-face { font-family: "Alegreya"; src: url("../fonts/alegreya-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../fonts/alegreya-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../fonts/alegreya-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/alegreya-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Slate */
  --bg: #111111;
  --surface: #1a1a1a;
  --surface-2: #232323;
  --line: #343434;

  /* Ink */
  --ink: #f2ede3;
  --muted: #a39c90;

  /* Accents */
  --gold: #d4a72c;
  --gold-soft: #e8c766;
  --gold-line: rgba(212, 167, 44, .38);
  --koi: #c62a1f;           /* ≤ 5 % of any screen */
  --lantern: #e07a2e;       /* warm glow, Asia & closing CTA only */
  --ok: #6ba368;

  /* Type */
  --font-serif: "Alegreya", Georgia, "Times New Roman", serif;
  --font-sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;

  --fs-display: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);
  --fs-h2: clamp(1.875rem, 1.5rem + 1.6vw, 2.75rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --fs-body: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --fs-small: .875rem;
  --fs-label: .75rem;

  /* Space (8-pt) */
  --s-1: .25rem; --s-2: .5rem; --s-3: 1rem; --s-4: 1.5rem;
  --s-5: 2rem; --s-6: 3rem; --s-7: 4rem; --s-8: 6rem; --s-9: 8rem;
  --section-y: clamp(4rem, 2.5rem + 6vw, 8rem);
  --gutter: clamp(1rem, .5rem + 2vw, 1.5rem);

  --container: 1200px;
  --measure: 720px;
  --radius: 3px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 600ms;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; line-height: 1.15; margin: 0; }
p { margin: 0 0 var(--s-3); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: var(--measure); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Surfaces & textures ---------- */
/* Slate stone: seamless generated texture (assets/img/slate.webp, 8 KB) */
.slate { background: var(--bg) url("../assets/img/slate.webp") repeat; background-size: 768px; }
/* Seigaiha wave pattern – very faint, for alternating sections */
.waves {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30' viewBox='0 0 60 30'%3E%3Cg fill='none' stroke='%23d4a72c' stroke-opacity='.07'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3Ccircle cx='30' cy='30' r='12'/%3E%3Ccircle cx='0' cy='15' r='28'/%3E%3Ccircle cx='0' cy='15' r='20'/%3E%3Ccircle cx='0' cy='15' r='12'/%3E%3Ccircle cx='60' cy='15' r='28'/%3E%3Ccircle cx='60' cy='15' r='20'/%3E%3Ccircle cx='60' cy='15' r='12'/%3E%3C/g%3E%3C/svg%3E");
}
/* Warm lantern wash – Asia side & closing CTA */
.warm { background-image: radial-gradient(ellipse at 50% 120%, rgba(224,122,46,.18), transparent 60%); }

/* ---------- Typography helpers ---------- */
.display { font-size: var(--fs-display); letter-spacing: .01em; }
.h2 { font-size: var(--fs-h2); color: var(--gold); }
.h3 { font-size: var(--fs-h3); }
.lead { font-family: var(--font-serif); font-style: italic; font-size: 1.15em; color: var(--muted); }
.label { font-size: var(--fs-label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }

/* Outline word running vertically along a section edge (SUSHI / ASIA) */
.edge-word {
  position: absolute; top: 50%; right: -.15em;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  font-family: var(--font-serif); font-weight: 500;
  font-size: clamp(3.5rem, 2rem + 6vw, 8.5rem);
  letter-spacing: .08em; line-height: 1; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(212,167,44,.22);
  pointer-events: none; user-select: none;
}
@media (max-width: 767px) { .edge-word { opacity: .5; } }

/* ---------- Signature title frame (from the printed menu) ---------- */
.title-frame { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-2); margin-bottom: var(--s-5); }
.title-frame__box {
  position: relative;
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  padding: .2em .9em .3em;
  font-family: var(--font-serif); font-weight: 500;
  font-size: var(--fs-h2); color: var(--gold); line-height: 1.1;
}
.title-frame__sub {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 50%);
  background: var(--bg); padding: 0 .7em;
  font-family: var(--font-sans); font-size: var(--fs-label);
  letter-spacing: .14em; color: var(--ink); white-space: nowrap;
}
.title-frame__desc { max-width: 34rem; margin-top: var(--s-3); color: var(--ink); opacity: .85; }

/* ---------- Brush stroke divider (draws on scroll) ---------- */
.brush { display: block; width: min(320px, 70%); height: auto; margin: var(--s-4) auto; overflow: visible; }
.brush path { fill: none; stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.is-visible .brush path, .brush.is-visible path { animation: draw 1.4s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .8em 1.75em;
  font-family: var(--font-sans); font-weight: 700; font-size: .9rem;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--gold); border-radius: var(--radius);
  cursor: pointer; transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.btn--primary { background: var(--gold); color: #111; }
.btn--primary:hover { background: var(--gold-soft); }
.btn--ghost { background: transparent; color: var(--gold); }
.btn--ghost:hover { background: rgba(212,167,44,.1); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- Menu item row ---------- */
.menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.dish { display: grid; grid-template-columns: 2.6rem 1fr auto; column-gap: var(--s-2); align-items: baseline; }
.dish__code { font-weight: 700; color: var(--ink); font-size: .95rem; }
.dish__head { display: flex; align-items: baseline; gap: var(--s-2); min-width: 0; }
.dish__name { font-family: var(--font-serif); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--gold); }
.dish__head::after { content: ""; flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-.3em); min-width: 1rem; }
.dish__price { font-family: var(--font-serif); font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dish__desc { grid-column: 2 / -1; color: var(--muted); font-size: .95rem; margin-top: .15rem; }
.dish__desc b { color: var(--ink); font-weight: 500; }
.dish__options { grid-column: 2 / -1; list-style: none; padding: 0; margin: var(--s-2) 0 0; display: grid; gap: .25rem; }
.dish__options li { display: flex; gap: var(--s-2); align-items: baseline; }
.dish__options li::after { content: none; }
.dish__options > span:first-child { flex: 1; color: var(--ink); }

/* ---------- Tags ---------- */
.tag { display: inline-flex; align-items: center; gap: .3em; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .15em .55em; border-radius: 2px; border: 1px solid currentColor; vertical-align: middle; }
.tag--veg { color: var(--ok); }
.tag--hot { color: var(--koi); }
/* Seal stamp – red square like the 鮨 mark in the logo, Latin text only */
.seal {
  display: inline-grid; place-items: center;
  width: 3.25rem; height: 3.25rem;
  background: var(--koi); color: #fff3e6;
  font-family: var(--font-serif); font-weight: 700; font-size: .62rem;
  letter-spacing: .08em; text-transform: uppercase; text-align: center; line-height: 1.1;
  border-radius: 4px; transform: rotate(-6deg);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
  filter: url(#rough);
}

/* ---------- Plate card (sushi belt) ----------
   Driven by js/main.js: auto-runs slowly, drag / swipe / trackpad / arrows,
   inertia on release, endless loop. */
.belt {
  position: relative; overflow: hidden; padding-block: var(--s-4) var(--s-5);
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.belt.is-dragging { cursor: grabbing; }
.belt__track { display: flex; gap: clamp(1.25rem, 1rem + 1.5vw, 2.5rem); width: max-content; padding-inline: var(--gutter); will-change: transform; }
.belt { isolation: isolate; }
.belt__rail { /* the belt rail – moved with transform only (GPU) */
  position: absolute; left: 0; right: -40px; top: calc(var(--s-4) + 63px); height: 64px; z-index: -1;
  background: repeating-linear-gradient(90deg, #1d1d1d 0 38px, #191919 38px 40px);
  border-block: 1px solid var(--line); will-change: transform;
}
.plate { contain: layout paint; }
.plate__dish { backface-visibility: hidden; }
.plate { width: 210px; flex: none; text-align: center; }
.plate__dish {
  width: 190px; margin-inline: auto;
  aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 6px solid #0c0c0c; outline: 2px solid var(--plate, var(--gold)); outline-offset: -10px;
  box-shadow: 0 18px 30px rgba(0,0,0,.6);
  transition: translate .45s var(--ease, ease), box-shadow .45s;
}
.plate__dish img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.plate:hover .plate__dish { translate: 0 -8px; box-shadow: 0 28px 40px rgba(0,0,0,.7); }
.plate__kicker { margin: var(--s-3) 0 .15rem; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.plate__name { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; color: var(--gold); letter-spacing: .03em; }
.plate__meta { font-size: var(--fs-small); color: var(--muted); margin: .2rem 0 .3rem; line-height: 1.35; }
.plate__price { font-family: var(--font-serif); font-weight: 700; color: var(--ink); }
@media (max-width: 767px) { .plate { width: 170px; } .plate__dish { width: 156px; } .belt__rail { top: calc(var(--s-4) + 46px); } }

.belt__nav {
  position: absolute; top: calc(var(--s-4) + 95px); z-index: 2; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(17,17,17,.82); border: 1px solid var(--gold-line); color: var(--gold);
  font: 400 1.8rem/1 var(--font-serif); padding-bottom: 4px; cursor: pointer;
  transition: background-color .25s, transform .25s;
}
.belt__nav:hover { background: var(--gold); color: #111; }
.belt__nav:active { transform: translateY(-50%) scale(.94); }
.belt__nav--prev { left: max(1rem, 3vw); }
.belt__nav--next { right: max(1rem, 3vw); }
@media (max-width: 767px) { .belt__nav { display: none; } }

/* ---------- Set card (wooden tag) ---------- */
.set-card {
  position: relative; padding: var(--s-5) var(--s-4) var(--s-4);
  background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--gold);
  border-radius: var(--radius);
}
.set-card__price { font-family: var(--font-serif); font-weight: 700; font-size: 2rem; color: var(--gold); line-height: 1; }
.set-card__name { font-family: var(--font-serif); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: var(--s-2) 0; }
.set-card ul { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .95rem; }
.set-card li + li { border-top: 1px solid var(--line); padding-top: .3rem; margin-top: .3rem; }
.set-card .seal { position: absolute; top: -1rem; right: 1rem; }

/* ---------- Lantern ---------- */
.lantern { --size: 64px; --delay: 0s; width: var(--size); transform-origin: 50% 0; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .lantern { animation: sway 4.5s ease-in-out var(--delay) infinite alternate; }
  .lantern__glow { animation: flicker 3.2s ease-in-out infinite; }
}
.lantern svg { width: 100%; height: auto; overflow: visible; }
.lantern__glow { filter: blur(14px); opacity: .55; }
@keyframes sway { from { transform: rotate(-3.5deg); } to { transform: rotate(3.5deg); } }
@keyframes flicker { 0%,100% { opacity: .55; } 45% { opacity: .42; } 60% { opacity: .62; } }

/* ---------- Steam (hot dishes only: Pho, Udon, Wok, Ente) ---------- */
.steam-wrap { position: relative; }
.steam { position: absolute; left: 50%; bottom: 55%; width: 40%; height: 70%; transform: translateX(-50%); pointer-events: none; }
.steam span {
  position: absolute; bottom: 0; width: 18%; height: 60%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.35), transparent 70%);
  filter: blur(8px); opacity: 0; border-radius: 50%;
}
.steam span:nth-child(1) { left: 15%; --dx: -10px; animation-delay: 0s; }
.steam span:nth-child(2) { left: 41%; --dx: 8px;  animation-delay: 1.2s; }
.steam span:nth-child(3) { left: 67%; --dx: -6px; animation-delay: 2.4s; }
@media (prefers-reduced-motion: no-preference) {
  .steam span { animation: steam 3.6s ease-out infinite; }
}
@keyframes steam {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  20%  { opacity: .9; }
  100% { transform: translate(var(--dx), -120%) scale(1.6); opacity: 0; }
}

/* ---------- Open badge & hours ---------- */
.open-badge {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .35em .9em; border: 1px solid var(--line); border-radius: 999px;
  font-size: var(--fs-small); background: rgba(17,17,17,.6); backdrop-filter: blur(4px);
}
.open-badge::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--koi); }
.open-badge.is-open::before { background: var(--ok); box-shadow: 0 0 0 4px rgba(107,163,104,.2); }

.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: .6rem 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--gold); font-weight: 700; }
.hours tr.is-closed td { color: var(--koi); }

/* ---------- Placeholders (keep layout until data arrives) ---------- */
.ph {
  display: grid; place-items: center; text-align: center; gap: var(--s-2);
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); font-size: var(--fs-small);
}
.ph svg { width: 28px; height: 28px; opacity: .6; }
.insta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
@media (min-width: 768px) { .insta-grid { grid-template-columns: repeat(6, 1fr); } }
.insta-grid .ph { aspect-ratio: 1; }
.map-ph { aspect-ratio: 16 / 9; padding: var(--s-4); }
@media (max-width: 767px) { .map-ph { aspect-ratio: 4 / 5; } }

/* ---------- Noren curtain (page-entry transition) ---------- */
.noren { position: relative; overflow: hidden; }
.noren__panel {
  position: absolute; top: 0; bottom: 0; width: 50.5%; z-index: 2;
  background: linear-gradient(#141414, #0d0d0d);
  border-bottom: 2px solid var(--gold-line);
  transition: transform 1.1s var(--ease);
}
.noren__panel::after { /* stitched hem */
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 14px; border-bottom: 1px dashed var(--gold-line);
}
.noren__panel--l { left: 0; transform-origin: top left; }
.noren__panel--r { right: 0; transform-origin: top right; }
.noren.is-open .noren__panel--l { transform: translateX(-100%) skewY(-4deg); }
.noren.is-open .noren__panel--r { transform: translateX(100%) skewY(4deg); }

/* ---------- Mobile call button & bottom bar ---------- */
.call-fab {
  position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 50;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #111; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.call-fab svg { width: 24px; height: 24px; }
@media (min-width: 1024px) { .call-fab { display: none; } }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
  .reveal.is-visible { opacity: 1; transform: none; }
}
