/* Sofias Cafe. The colours of the house itself: olive walls, brass picture frames, cream porcelain, the dark green
   of the evening outside the arched window. The logo and its colours: brain/marke in the ordering app (the design
   system). EB Garamond for headings, Figtree for reading; the name only ever as the logo's script, never typed.
   Large type and big targets: many of our guests read without the glasses they forgot at home. */
@font-face { font-family: "EB Garamond"; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/eb-garamond-latin-variable.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap; src: url("/assets/fonts/figtree-latin-variable.woff2") format("woff2"); }

:root {
  --cream: #f4efe4;
  --paper: #fbf8f1;
  --ink: #1d2620;
  --ink-soft: #565e55;
  --line: #e0d8c8;
  --night: #1b241e;
  --night-soft: #c9cfc4;
  --wall: #5b6541;          /* the olive of the café's walls */
  --wall-deep: #434b2f;
  --brass: #c39a52;
  --brass-light: #e6cb92;
  --brass-ink: #7a5b1f;     /* brass dark enough for text on cream (≥ 4.5:1) */
  --open: #8cc56f;
  --display: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header: 76px;
  color-scheme: light;
}

* { box-sizing: border-box; }
/* "hidden" always wins over a display set further down. */
[hidden] { display: none !important; }
/* There for screen readers and search engines, not on screen (the logo shows the same words). */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header); }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.1875rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
/* Brass ink on the light sections (brass itself is only 2.3:1 on cream), light brass on the dark ones. */
:focus-visible { outline: 3px solid var(--brass-ink); outline-offset: 3px; border-radius: 6px; }
.top :focus-visible, .hero :focus-visible, .visit :focus-visible, .foot :focus-visible { outline-color: var(--brass-light); }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.08; text-wrap: balance; }
h1, h2, h3 { font-family: var(--display); }
p { margin: 0; text-wrap: pretty; }
.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; padding: 10px 16px; background: var(--paper); border-radius: 10px; z-index: 20; }
.skip:focus { left: 16px; }

/* ---------- Header: dark glass; on the start page it fades in as the hero scrolls away ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 10; color: var(--cream); background: rgba(27, 36, 30, 0.9); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); box-shadow: 0 1px 0 rgba(230, 203, 146, 0.16); }
@supports (animation-timeline: scroll()) {
  .home .top { animation: top-glass linear both; animation-timeline: scroll(root); animation-range: 0 60vh; }
  @keyframes top-glass {
    from { background: rgba(27, 36, 30, 0); box-shadow: 0 1px 0 rgba(230, 203, 146, 0); -webkit-backdrop-filter: none; backdrop-filter: none; }
    to { background: rgba(27, 36, 30, 0.9); box-shadow: 0 1px 0 rgba(230, 203, 146, 0.16); }
  }
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header); }
.mark { display: flex; align-items: center; padding: 10px 0; }
.mark img { width: auto; height: 50px; }
.top nav { display: flex; align-items: center; gap: 4px; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; white-space: nowrap; border-radius: 999px; font-weight: 600; text-decoration: none; transition: background-color 0.2s ease; }
.top nav a:hover { background: rgba(244, 239, 228, 0.12); }
@media (max-width: 560px) { .top nav .nav-haus { display: none; } .top nav a { padding: 0 11px; } .mark img { height: 42px; } }
@media (max-width: 370px) { .mark img { height: 38px; } .top nav a { padding: 0 8px; } }
body:not(.home) main { padding-top: var(--header); }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; max-width: 100%; padding: 0 26px; border-radius: 999px; font-weight: 700; text-align: center; text-decoration: none; transition: background-color 0.2s ease, color 0.2s ease, scale 0.15s ease; }
.btn:active { scale: 0.96; }
.btn.primary { background: var(--brass); color: var(--night); }
.btn.primary:hover { background: var(--brass-light); }
.btn.ghost { color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(244, 239, 228, 0.55); }
.btn.ghost:hover { background: rgba(244, 239, 228, 0.12); }
.btn.map { gap: 10px; }
.btn .brand { flex: none; width: auto; height: 1.25em; }
@media (max-width: 380px) { .btn { padding: 0 18px; } }

/* ---------- Hero: the café, full screen, the photos melting into each other ---------- */
.hero { position: relative; min-height: max(620px, 100svh); display: grid; grid-template-rows: 1fr auto; color: var(--cream); background: var(--night); overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img, .hero-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media canvas { opacity: 0; transition: opacity 1.2s ease; }
.hero-media canvas.ready { opacity: 1; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 27, 22, 0.55) 0%, rgba(20, 27, 22, 0) 22%),
    linear-gradient(0deg, rgba(20, 27, 22, 0.92) 0%, rgba(20, 27, 22, 0.55) 34%, rgba(20, 27, 22, 0) 62%),
    linear-gradient(90deg, rgba(20, 27, 22, 0.45) 0%, rgba(20, 27, 22, 0) 55%); }
.hero-inner { align-self: end; padding: calc(var(--header) + 40px) 0 clamp(28px, 4vw, 44px); }
.hero-title { display: flex; flex-direction: column; }
/* The name as the logo's script (the wordmark, in the text colour); its f and y reach far below the line. */
.t-name svg { display: block; width: min(100%, clamp(300px, 62vw, 820px)); height: auto; overflow: visible; }
.t-tag { margin-top: clamp(14px, 2vw, 22px); font-family: var(--sans); font-size: clamp(0.95rem, 1.6vw, 1.25rem); font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; color: var(--brass-light); }
/* Under the text: which room this is and a thin line per photo that fills while it shows. */
.hero-ctrl { display: flex; align-items: center; gap: 18px; padding: 0 0 clamp(20px, 3vw, 32px); }
.hero-caption { font-family: var(--display); font-size: 1.15rem; min-width: 9.5em; color: var(--brass-light); }
.hero-bars { display: flex; gap: 6px; flex: 1; max-width: 320px; margin-left: auto; }
.bar { flex: 1; height: 2px; background: rgba(244, 239, 228, 0.25); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--cream); transform-origin: left; transform: scaleX(var(--fill, 0)); }
@media (max-width: 560px) { .hero-caption { min-width: 0; flex: 1; } .hero-bars { display: none; } }

/* ---------- Intro: one sentence that lights up word by word ---------- */
.intro { padding: clamp(88px, 13vw, 180px) 0; }
.statement { max-width: 28ch; font-family: var(--display); font-size: clamp(2rem, 4.6vw, 3.8rem); line-height: 1.16; }
.reveal-words .w { opacity: 0.16; transition: opacity 0.35s ease; }
.reveal-words .w.on { opacity: 1; }

/* ---------- Das Haus: the photos hung like the paintings on our walls ---------- */
.haus { position: relative; padding: clamp(80px, 11vw, 150px) 0 clamp(96px, 12vw, 170px); color: var(--cream); overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(0, 0, 0, 0.28), transparent 70%),
    var(--wall); }
/* the brass picture rail along the top of the wall */
.haus::before { content: ""; position: absolute; inset: 28px 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--brass) 12%, var(--brass-light) 50%, var(--brass) 88%, transparent); opacity: 0.55; }
.haus-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }
.haus h2, .offer h2, .visit h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.note { color: inherit; opacity: 0.85; max-width: 36ch; }
.wall { list-style: none; margin: clamp(48px, 7vw, 88px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 40px); align-items: start; }
.piece figure { margin: 0; will-change: transform; }
.gilt { position: relative; padding: clamp(8px, 1vw, 12px); border-radius: 2px;
  background: linear-gradient(135deg, #ecd39b 0%, #a37b33 22%, #f3dfa9 46%, #8d6727 70%, #dcbb73 100%);
  box-shadow: 0 2px 0 rgba(255, 240, 200, 0.35) inset, 0 40px 60px -30px rgba(0, 0, 0, 0.6), 0 12px 22px -10px rgba(0, 0, 0, 0.45); }
.gilt img { width: 100%; height: auto; object-fit: cover; aspect-ratio: 4 / 5; box-shadow: 0 0 0 3px rgba(60, 42, 10, 0.45); }
.label { display: inline-block; margin-top: 18px; padding: 6px 12px; background: var(--paper); color: var(--ink); font-family: var(--display); font-size: 1.05rem; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.5); }
/* A salon hang: different sizes, edges that don't line up, like the wall in the photo. */
.piece-1 { grid-column: 1 / 5; margin-top: 48px; }
.piece-2 { grid-column: 5 / 9; }
.piece-2 img { aspect-ratio: 1 / 1; }
.piece-3 { grid-column: 9 / 13; margin-top: 112px; }
.piece-3 img { aspect-ratio: 3 / 4; }
.piece-4 { grid-column: 2 / 6; margin-top: 40px; }
.piece-5 { grid-column: 6 / 12; margin-top: 88px; }
.piece-5 img { aspect-ratio: 4 / 3; }
@media (max-width: 860px) {
  /* Phones: the wall becomes a row to swipe through. */
  .wall { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 8px 20px 24px; margin-inline: -20px; scroll-padding-inline: 20px; }
  .wall::-webkit-scrollbar { display: none; }
  .piece { flex: 0 0 76%; scroll-snap-align: start; margin-top: 0 !important; }
  .piece img { aspect-ratio: 4 / 5 !important; }
}

/* ---------- Bei uns: three chapters, each photo under the arch of our front window ---------- */
.offer { padding: clamp(88px, 12vw, 160px) 0 clamp(64px, 8vw, 110px); }
.chapter { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 7vw, 110px); align-items: center; margin-top: clamp(56px, 8vw, 110px); }
.chapter.flip .arch { order: 2; }
.arch { position: relative; padding: clamp(10px, 1.4vw, 16px); }
.arch img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 50% 50% 0 0 / 40% 40% 0 0; }
/* The vitrine photo is a wide one: a lower arch, so it isn't blown up. */
.arch-vitrine img { aspect-ratio: 1 / 1; border-radius: 50% 50% 0 0 / 34% 34% 0 0; }
.arch-vitrine::after { border-radius: 50% 50% 0 0 / 34% 34% 0 0; }
.arch::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--brass); border-radius: 50% 50% 0 0 / 40% 40% 0 0; pointer-events: none; }
.chapter-text h3 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.sub { margin-top: 10px; color: var(--brass-ink); font-weight: 700; }
.chapter-body { margin-top: 18px; max-width: 38ch; color: var(--ink-soft); font-size: 1.25rem; }
.dishes { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.dish-photo { overflow: hidden; border-radius: 14px; background: var(--line); }
.dish-photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; transition: scale 0.6s var(--ease); }
.dish:hover .dish-photo img { scale: 1.05; }
.dish-name { margin-top: 10px; font-weight: 700; font-size: 1rem; line-height: 1.3; }
.dish-note { margin-top: 2px; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.4; }
@media (max-width: 860px) {
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .chapter.flip .arch { order: 0; }
  .arch { max-width: 460px; }
}
@media (max-width: 480px) { .dishes { gap: 12px; } .dish-note { display: none; } }

/* ---------- Besuch ---------- */
.visit { padding: clamp(88px, 11vw, 150px) 0; background: var(--night); color: var(--cream); }
.visit-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 100px); align-items: start; }
address { display: flex; flex-direction: column; margin-top: 26px; font-style: normal; }
address .street { font-family: var(--display); font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.1; color: var(--brass-light); }
address span:last-child { margin-top: 6px; font-size: 1.25rem; }
.facts { margin: 36px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--night-soft); }
.facts a { display: inline-block; padding: 8px 0; color: var(--cream); font-weight: 700; }
.small-note { margin-top: 18px; font-size: 0.95rem; color: var(--night-soft); }
.hours-card { padding: clamp(24px, 3vw, 36px); border-radius: 22px; background: rgba(244, 239, 228, 0.05); box-shadow: inset 0 0 0 1px rgba(244, 239, 228, 0.12); }
.hours-card h3 { font-size: 1.9rem; }
.hours { width: 100%; margin-top: 16px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 12px 0; border-top: 1px solid rgba(244, 239, 228, 0.12); text-align: left; font-weight: 500; color: var(--night-soft); }
.hours td { text-align: right; }
.hours tr:first-child th, .hours tr:first-child td { border-top: 0; }
.hours tr.today th, .hours tr.today td { color: var(--cream); font-weight: 800; }
.hours tr.today th::after { content: "heute"; margin-left: 10px; padding: 2px 9px; border-radius: 999px; background: var(--brass); color: var(--night); font-size: 0.78rem; font-weight: 800; vertical-align: 2px; }
@media (max-width: 860px) { .visit-grid { grid-template-columns: minmax(0, 1fr); } }

/* Things settle in once, as they come into view. */
.rise { opacity: 0; translate: 0 28px; transition: opacity 0.9s var(--ease), translate 0.9s var(--ease); }
.rise.in { opacity: 1; translate: 0 0; }

/* ---------- Preview code page (test.…, before launch) ---------- */
.preview-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--night); }
.preview { width: min(420px, 100%); padding: 36px 32px; background: var(--paper); border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.preview-name { font-family: var(--display); font-size: 1.6rem; color: var(--brass-ink); }
.preview h1 { margin-top: 6px; font-size: 2.6rem; }
.preview-text { margin-top: 10px; color: var(--ink-soft); }
.preview form { display: grid; gap: 10px; margin-top: 24px; }
.preview label { font-weight: 700; }
.preview input { min-height: 56px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 14px; font: inherit; font-size: 1.3rem; color: var(--ink); background: var(--paper); }
.preview input:focus { outline: 3px solid var(--brass); outline-offset: 2px; border-color: var(--brass-ink); }
.preview-error { color: #a3304b; font-weight: 700; }
.preview .btn { margin-top: 6px; }

/* ---------- Legal ---------- */
.legal { padding: clamp(48px, 7vw, 96px) 0; }
.legal h1 { font-size: clamp(2.6rem, 6vw, 3.8rem); margin-bottom: 18px; }
.legal h2 { font-family: var(--sans); font-weight: 800; font-size: 1.15rem; margin-top: 30px; margin-bottom: 6px; }
.legal p { color: var(--ink-soft); }
.legal a { color: var(--brass-ink); }
.legal .lede { color: var(--ink); }

/* ---------- Footer ---------- */
.foot { padding: clamp(56px, 8vw, 96px) 0 40px; background: #141b16; color: var(--night-soft); overflow: hidden; }
.foot-mark { width: clamp(150px, 20vw, 220px); height: auto; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: clamp(36px, 5vw, 64px); padding-top: 32px; border-top: 1px solid rgba(244, 239, 228, 0.12); }
.foot-label { margin-bottom: 8px; color: var(--brass-light); font-weight: 700; }
.foot a { display: inline-block; padding: 6px 0; color: var(--cream); }
.foot-days { display: inline-block; min-width: 4.2em; font-weight: 700; color: var(--cream); }
.foot-legal { display: flex; gap: 24px; margin-top: 40px; font-size: 0.95rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }

/* No glass where it can't be or shouldn't be. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .top { background: var(--night); } }
@media (prefers-reduced-transparency: reduce) {
  .top { background: var(--night); -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; }
}
@media (forced-colors: active) { .gilt { border: 2px solid CanvasText; } /* The vitrine photo is a wide one: a lower arch, so it isn't blown up. */
.arch-vitrine img { aspect-ratio: 1 / 1; border-radius: 50% 50% 0 0 / 34% 34% 0 0; }
.arch-vitrine::after { border-radius: 50% 50% 0 0 / 34% 34% 0 0; }
.arch::after { border-color: CanvasText; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .dish-photo img { transition: none; }
  .dish:hover .dish-photo img { scale: none; }
  .piece figure { will-change: auto; }
}
