/* ==========================================================================
   Oliver Blaum — interactive résumé
   Identity: white paper, one yellow, Swiss grotesk, mono for metadata.
   ========================================================================== */

/* Self-hosted fonts (no third-party requests) — Schibsted Grotesk and JetBrains Mono, both variable */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../fonts/jetbrains-mono-normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../fonts/jetbrains-mono-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/schibsted-grotesk-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/schibsted-grotesk-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/schibsted-grotesk-normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/schibsted-grotesk-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Fallback'; src: local('Helvetica Neue'), local('HelveticaNeue'), local('Arial'), local('Liberation Sans'); size-adjust: 104.8%; ascent-override: 93.2%; descent-override: 24.6%; line-gap-override: 0%; }
@font-face { font-family: 'JetBrains Fallback'; src: local('Menlo'), local('Courier New'), local('Liberation Mono'); size-adjust: 99.8%; ascent-override: 102.2%; descent-override: 30%; line-gap-override: 0%; }

:root {
  --bg: #f5f5f3;
  --paper: #ffffff;
  --ink: #121212;
  --ink-2: #3d3d3b;
  --mute: #6d6d69;
  --line: #e1e1dd;
  --yellow: #F7EC0F;
  --yellow-2: #e9dd00;
  --dark: #0e0e0e;
  --dark-2: #171716;

  --font: "Schibsted Grotesk", "Schibsted Fallback", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "JetBrains Fallback", Menlo, Consolas, monospace;

  --pad: clamp(20px, 4.5vw, 72px);
  --max: 1520px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.5;
  font-feature-settings: "ss01", "kern";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* not `hidden`: that breaks position:fixed on iOS Safari */
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, blockquote, figure, address { margin: 0; }
address { font-style: normal; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--yellow); color: var(--ink); }

.mono { font-family: var(--mono); font-size: .78em; letter-spacing: .02em; }
.muted { color: var(--mute); }
.muted-light { color: rgba(255,255,255,.66); }
.sep { color: var(--mute); margin: 0 .5em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.scan :focus-visible, .nav.is-dark :focus-visible { outline-color: var(--yellow); }
.skip { position: absolute; left: var(--pad); top: -100px; z-index: 100; padding: 10px 16px; background: var(--yellow); color: var(--ink); font-weight: 700; }
.skip:focus { top: 12px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Looping decorations (grain, dots, blink, scroll hints) start 3 s after load: a page that animates from its very first frame
   sometimes has that frame reported ~1–2 s late by PageSpeed's headless test browser, which costs Speed Index. */
/* ---------- Chrome: progress, cursor, grain ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--yellow); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--yellow); mix-blend-mode: multiply;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transition: transform .25s var(--ease), opacity .3s;
  opacity: 0;
}
.cursor.is-active { opacity: 1; }
.cursor.is-hover { --s: 4; mix-blend-mode: multiply; opacity: .85; }
@media (pointer: coarse) { .cursor, .grain { display: none; } }

.grain {
  position: fixed; inset: -50%; z-index: 55; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) 3s infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0) } 10% { transform: translate(-5%,-10%) } 30% { transform: translate(3%,-15%) }
  50% { transform: translate(12%,9%) } 70% { transform: translate(9%,4%) } 90% { transform: translate(-1%,7%) }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 10px var(--pad);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
/* the frosted blur is costly to composite on a software GPU (PageSpeed's lab) — only once content actually sits under the bar */
.nav.is-scrolled, .nav.is-dark { backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav.is-dark { background: rgba(14,14,14,.72); color: #fff; }
.nav.is-dark.is-scrolled { border-bottom-color: rgba(255,255,255,.12); }
.nav { transition: border-color .4s, background .4s, color .4s; }
.nav__name { display: flex; flex-direction: column; line-height: 1.1; }
.nav__who, .nav__role { font-weight: 700; letter-spacing: -.02em; }
.nav__links { display: flex; gap: clamp(18px, 2.4vw, 36px); font-size: .92em; }
.nav__links a { position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--yellow); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease-out);
}
.nav__links a:hover::after, .nav__links a.is-current::after { transform: scaleX(1); }
.nav__cta {
  justify-self: end; padding: 8px 16px 8px 22px; font-weight: 700; font-size: .9em; color: var(--ink);
  background: var(--yellow); clip-path: polygon(0 50%, 11px 0, 100% 0, 100% 100%, 11px 100%);
  transition: background .3s;
}
.nav__cta:hover { background: var(--yellow-2); }
.nav__right { justify-self: end; display: flex; align-items: center; gap: clamp(10px, 1.4vw, 18px); }
.lang { position: relative; }
.lang__btn { font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .08em; padding: 8px 6px; display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.lang__chev { font-size: .7em; transition: transform .25s var(--ease-out); }
.lang__btn[aria-expanded="true"] .lang__chev { transform: rotate(180deg); }
.lang__menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.12); z-index: 5; }
.lang__menu a { display: block; padding: 10px 14px; font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; color: var(--ink); }
.lang__menu a:hover { background: var(--yellow); }
.nav.is-dark .lang__menu { background: var(--dark-2); border-color: rgba(255,255,255,.15); }
.nav.is-dark .lang__menu a { color: #fff; }
.nav.is-dark .lang__menu a:hover { background: var(--yellow); color: var(--ink); }
@media (max-width: 820px) {
  .nav { grid-template-columns: 1fr auto; gap: 12px; }
  .nav__links { display: none; }
  .nav__name { white-space: nowrap; }
  .nav__right { gap: 6px; }
  .lang__btn { padding: 8px 4px; }
  .nav__cta { padding: 8px 12px 8px 18px; font-size: .86em; }
}
@media (max-width: 360px) {
  .nav__who, .nav__role { font-size: .92em; }
}

/* ---------- Layout primitives ---------- */
.section { padding: clamp(48px, 5vw, 80px) var(--pad); max-width: var(--max); margin: 0 auto; }
.section__head { margin-bottom: clamp(28px, 3vw, 48px); }
.eyebrow {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--mute); margin-bottom: 18px;
}
.eyebrow--light { color: rgba(255,255,255,.66); }
.label { font-weight: 700; color: var(--mute); margin-bottom: 14px; font-size: .95em; }
.h2 {
  font-size: clamp(34px, 5.2vw, 84px); line-height: .98; letter-spacing: -.035em; font-weight: 800; text-wrap: balance;
}
.h3 { font-size: clamp(24px, 2.6vw, 40px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; margin-bottom: 28px; }

.dot {
  display: inline-block; width: .5em; height: .5em; border-radius: 50%; background: var(--yellow);
  margin-right: .45em; vertical-align: .1em; box-shadow: 0 0 0 0 rgba(247,236,15,.7); animation: pulse 2.2s 3s infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(247,236,15,.7) } 70% { box-shadow: 0 0 0 .55em rgba(247,236,15,0) } 100% { box-shadow: 0 0 0 0 rgba(247,236,15,0) } }

/* Tags — the notched yellow label from the PDF */
.tags { display: flex; flex-direction: column; gap: 14px; }
.tags__row { display: flex; flex-wrap: wrap; gap: 14px 12px; }
.tag {
  display: inline-block;
  padding: 7px 14px 7px 22px; font-weight: 700; font-size: .95em; line-height: 1.2;
  background: var(--yellow); clip-path: polygon(0 50%, 12px 0, 100% 0, 100% 100%, 12px 100%);
  transition: transform .35s var(--ease-out), background .3s;
}
@media (hover: hover) { .tag:hover { transform: translateX(6px); background: var(--yellow-2); } }
/* on touch screens the tags are labels, not buttons: no tap reaction */
@media (hover: none) { .tag { pointer-events: none; -webkit-user-select: none; user-select: none; } }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: clamp(24px, 5vw, 96px);
  align-items: end; padding: calc(72px + 2vw) var(--pad) clamp(40px, 5vw, 72px) 0;
}
.hero__figure { position: relative; align-self: end; }
.hero__body { max-width: 780px; align-self: center; padding-bottom: 4vh; }
.hero__img {
  position: relative; z-index: 1; width: 100%; height: auto; max-height: calc(100svh - 72px - 2vw - clamp(40px, 5vw, 72px)); object-fit: contain; object-position: 0% 100%;
}
/* the portrait is painted at once (LCP) and only settles into place */
.hero__img { transform: translateY(18px) scale(1.03); transform-origin: 50% 100%; animation: settle .9s var(--ease-out) forwards; }
@keyframes settle { to { transform: none; } }

.hero__body > * { opacity: 0; transform: translateY(18px); animation: up .6s var(--ease-out) var(--d, 0s) forwards; }
@keyframes up { to { opacity: 1; transform: none; } }
.hero__eyebrow { margin-bottom: 26px; }
.hero__name {
  font-size: clamp(64px, 9.6vw, 150px); line-height: .86; letter-spacing: -.055em; font-weight: 800;
  display: flex; flex-direction: column; margin-bottom: clamp(28px, 3vw, 44px);
}
.hero__name span:last-child { padding-left: .18em; }
.hero__quote p {
  font-size: clamp(24px, 2.6vw, 44px); line-height: 1.22; letter-spacing: -.025em; font-weight: 500; max-width: 19em; color: var(--ink);
  text-wrap: pretty;
}
.hero__sig {
  width: clamp(200px, 21vw, 330px); margin: 28px 0 40px auto;
  clip-path: inset(0 100% 0 0); animation: up .7s var(--ease-out) .25s forwards, write 1s var(--ease) .45s forwards;
}
@keyframes write { to { clip-path: inset(0 0 0 0); } }

.hero__scroll {
  position: fixed; right: var(--pad); bottom: clamp(24px, 3vw, 40px); z-index: 45;
  display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--mute);
  transition: opacity .4s, transform .4s var(--ease-out);
}
.hero__scroll.is-gone { opacity: 0; transform: translateY(12px); pointer-events: none; }
.hero__scroll .mono { writing-mode: vertical-rl; letter-spacing: .14em; text-transform: uppercase; font-size: .7rem; }
.hero__scroll-line { width: 1px; height: 56px; background: var(--ink); position: relative; overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--yellow); animation: slide 1.6s var(--ease) 3s infinite backwards; }
.hero__scroll-arrow { font-size: 1rem; line-height: 1; color: var(--ink); }
@keyframes slide { 0% { transform: translateY(-100%) } 60%,100% { transform: translateY(100%) } }
@keyframes nudge { 0%, 100% { transform: translateY(-2px) } 50% { transform: translateY(4px) } }

@media (max-width: 900px) {
  .hero {
    display: block; position: relative; min-height: 0; padding: 62px 0 0;
  }
  .hero__figure { position: absolute; top: 62px; left: 0; width: 100%; height: calc(100% - 62px); align-self: auto; }
  .hero__figure picture { position: absolute; inset: 0; }
  .hero__figure { overflow: hidden; }
  .hero__img { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: 0% 100%; }
  .hero__body {
    position: relative; z-index: 1; margin-left: 48%; max-width: none; min-height: calc(88vh - 62px); min-height: calc(88svh - 62px);
    display: flex; flex-direction: column; justify-content: center; padding: 20px var(--pad) 22px 0;
  }
  .hero__quote p { font-size: clamp(15px, 3.7vw, 20px); line-height: 1.3; letter-spacing: -.015em; max-width: none; }
  .hero__sig { width: clamp(150px, 42vw, 240px); margin: 18px 0 20px auto; }
  .hero__skills .label { margin-bottom: 6px; font-size: .72em; }
  .tags { flex-direction: row; flex-wrap: wrap; gap: 7px 6px; }
  .tags__row { display: contents; }
  .tag { font-size: .68em; padding: 4px 7px 4px 12px; clip-path: polygon(0 50%, 7px 0, 100% 0, 100% 100%, 7px 100%); }
  /* on phones only the arrow, in the bottom-right corner of the hero (padding keeps a finger-sized tap area) */
  .hero__scroll { position: absolute; right: 0; bottom: 2px; z-index: 2; padding: 12px; }
  .hero__scroll .mono, .hero__scroll-line { display: none; }
  .hero__scroll-arrow { font-size: 1.1rem; animation: nudge 1.8s ease-in-out 3s infinite backwards; } /* gentle up-and-down, no colour change */
}
@media (max-width: 370px) {
  .tag { font-size: .62em; padding: 3px 6px 3px 11px; }
}
/* ---------- References ---------- */
#references.section { padding-top: clamp(64px, 7vw, 112px); padding-bottom: clamp(64px, 7vw, 112px); }
.refs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.ref {
  position: relative; padding: 48px 22px 64px 0; border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate;
}
.ref:nth-child(3n+2), .ref:nth-child(3n+3) { padding-left: 22px; border-left: 1px solid var(--line); }
.ref::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow);
  transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s var(--ease-out);
}
.ref:hover::before { transform: scaleY(1); }
.ref__idx { display: block; color: var(--mute); margin-bottom: 56px; transition: color .3s; }
.ref:hover .ref__idx { color: var(--ink); }
.ref__ind { font-size: clamp(30px, 3.4vw, 54px); letter-spacing: -.03em; font-weight: 800; line-height: 1; margin-bottom: 14px; }
.ref__list { color: var(--ink-2); max-width: 26em; text-wrap: pretty; }
@media (max-width: 900px) {
  .refs { grid-template-columns: 1fr 1fr; }
  .ref:nth-child(n) { padding-left: 0; border-left: 0; }
  .ref:nth-child(2n) { padding-left: 18px; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .refs { grid-template-columns: 1fr; }
  .ref:nth-child(n) { padding-left: 0; border-left: 0; padding-top: 16px; padding-bottom: 18px; }
  .ref__idx { display: none; }
  .ref__ind { font-size: 26px; margin-bottom: 4px; }
  .ref__list { font-size: .95em; }
}

/* ---------- Experience ---------- */
.jobs { border-top: 1px solid var(--ink); }
.job {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px clamp(24px, 4vw, 80px);
  padding: 38px 0; border-bottom: 1px solid var(--line); position: relative;
}
.job::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease-out);
}
.job:hover::after { transform: scaleX(1); }
.job__when { display: flex; flex-direction: column; gap: 8px; }
.job__years { font-size: clamp(18px, 1.5vw, 22px); letter-spacing: -.01em; font-weight: 500; }
.job__years em { font-style: normal; color: var(--mute); }
.job__dur { color: var(--mute); }
.job__title { font-size: clamp(22px, 2.1vw, 32px); letter-spacing: -.025em; line-height: 1.12; font-weight: 700; }
.job__org { font-size: 1.06em; margin-top: 6px; }
.job__meta { color: var(--mute); margin-top: 6px; }
.job__desc { margin-top: 18px; max-width: 62ch; color: var(--ink-2); text-wrap: pretty; }
@media (max-width: 760px) {
  .section { padding: 44px var(--pad) 48px; }
  .section__head { margin-bottom: 28px; }
  .dot { display: none; }
  .job { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .job__when { flex-direction: row; align-items: baseline; gap: 14px; }
  .job__desc { margin-top: 12px; }
}

/* ---------- Education / Volunteering ---------- */
.section--split { padding-top: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 120px); }
.edu li { padding: 22px 0; border-top: 1px solid var(--line); }
.edu li:first-child { border-top: 1px solid var(--ink); }
.edu h3 { font-size: clamp(19px, 1.5vw, 24px); letter-spacing: -.02em; line-height: 1.2; margin-bottom: 4px; }
.edu__desc { margin-top: 10px; color: var(--ink-2); max-width: 48ch; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 56px; } }

/* ---------- AI Scan ---------- */
.scan {
  background: var(--dark); color: #fff; padding: clamp(48px, 5vw, 80px) var(--pad) clamp(56px, 6vw, 96px);
  position: relative; overflow: clip;
}
.scan::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
.scan > * { position: relative; max-width: var(--max); margin-inline: auto; }
.scan__head { margin-bottom: clamp(28px, 3vw, 40px); display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
.scan__head .h2 { font-size: clamp(32px, 3.6vw, 56px); }
.scan__head .eyebrow { margin-bottom: 12px; }
.scan__head .eyebrow { grid-column: 1 / -1; }
.scan__status { color: var(--yellow); }
.scan__status::before { content: "> "; color: rgba(255,255,255,.6); }
.blink { color: var(--yellow); animation: blink 1.2s steps(2) 3s infinite; margin-right: 6px; }
@keyframes blink { 50% { opacity: 0 } }

.scan__grid { display: grid; grid-template-columns: auto minmax(280px, 380px); gap: clamp(28px, 4vw, 72px); align-items: start; }
.scan__figure { position: relative; overflow: hidden; background: #000; width: min(100%, 68vh); }
.scan__img { width: 100%; filter: grayscale(1) contrast(1.05); }
.scan__svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.scan__svg .box rect.frame { fill: none; stroke: var(--yellow); stroke-width: 5; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); transition: stroke-dashoffset 1.1s var(--ease), opacity .3s; }
.scan__svg .box rect.lbl { fill: var(--yellow); transform: scaleX(0); transform-origin: var(--ox) var(--oy); transition: transform .45s var(--ease-out) .9s, opacity .3s; }
.scan__svg .box text { font-family: var(--mono); font-size: 17px; pointer-events: none; font-weight: 500; fill: var(--ink); letter-spacing: .06em; opacity: 0; transition: opacity .25s 1.15s; }
.scan__svg .box.on rect.frame { stroke-dashoffset: 0; }
.scan__svg .box.on rect.lbl { transform: scaleX(1); }
.scan__svg .box.on text { opacity: 1; }
.scan__svg .lbl--idx, .scan__svg .txt--idx { display: none; }
.scan__svg .box text.txt--idx { font-size: 36px; font-weight: 500; letter-spacing: .04em; }
.scan__figure.is-focus .box:not(.is-hot) { opacity: .28; transition: opacity .3s; }
.scan__figure .box { transition: opacity .3s; cursor: crosshair; }
.scan__figure .box.is-hot rect.frame { fill: rgba(247,236,15,.14); }

.scan__line {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--yellow);
  box-shadow: 0 0 24px 6px rgba(247,236,15,.55); opacity: 0; pointer-events: none;
}
.scan__line::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(to top, rgba(247,236,15,.22), transparent); }
.scan__figure.is-scanning .scan__line { animation: sweep 2.4s var(--ease) forwards; }
@keyframes sweep { 0% { top: 0; opacity: 1 } 90% { opacity: 1 } 100% { top: 100%; opacity: 0 } }

.scan__corners i { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(255,255,255,.6); pointer-events: none; }
.scan__corners i:nth-child(1) { left: 10px; top: 10px; border-right: 0; border-bottom: 0; }
.scan__corners i:nth-child(2) { right: 10px; top: 10px; border-left: 0; border-bottom: 0; }
.scan__corners i:nth-child(3) { left: 10px; bottom: 10px; border-right: 0; border-top: 0; }
.scan__corners i:nth-child(4) { right: 10px; bottom: 10px; border-left: 0; border-top: 0; }

.scan__legend { position: sticky; top: 104px; }
.scan__legend .mono { display: block; margin-bottom: 16px; }
.legend { border-top: 1px solid rgba(255,255,255,.18); }
.legend li { border-bottom: 1px solid rgba(255,255,255,.12); }
.legend button {
  width: 100%; text-align: left; color: inherit;
  display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 12px;
  padding: 12px 0; cursor: crosshair;
  opacity: .25; transform: translateX(-6px); transition: opacity .35s, transform .35s var(--ease-out), color .3s;
}
.legend button.on { opacity: 1; transform: none; }
.legend button.is-hot, .legend button:hover { color: var(--yellow); }
.legend__idx { font-family: var(--mono); font-size: .72rem; color: rgba(255,255,255,.6); }
.legend__lbl { font-family: var(--mono); font-size: .82rem; letter-spacing: .06em; }
.legend__reg { font-family: var(--mono); font-size: .68rem; color: rgba(255,255,255,.66); }

.btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 12px 20px 12px 26px; font-weight: 700; font-size: .92em;
  clip-path: polygon(0 50%, 12px 0, 100% 0, 100% 100%, 12px 100%); transition: background .3s, color .3s, transform .3s var(--ease-out);
}
.btn--ghost { background: var(--yellow); color: var(--ink); }
.btn--ghost:hover { background: #fff; transform: translateX(6px); }
.btn:disabled { opacity: .5; cursor: progress; }

@media (max-width: 900px) {
  .scan__grid { grid-template-columns: 1fr; }
  .scan__legend { position: static; }
  .legend button { padding: 10px 0; }
  .scan__head { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 680px) {
  .scan { padding-top: 26px; }
  .scan__head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
  .scan__head.rv { opacity: 1; transform: none; } /* the bar peeks under the tall hero: always visible, no reveal */
  .scan__head .eyebrow { margin-bottom: 0; }
  .scan__head .h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .scan__svg .lbl--full, .scan__svg .txt--full { display: none; }
  .scan__svg .lbl--idx, .scan__svg .txt--idx { display: block; }
  .scan__svg .box rect.frame { stroke-width: 7; }
}

/* ---------- About / Languages ---------- */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 120px); }
.facts li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 1.05em; }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.langs li { padding: 18px 0; border-top: 1px solid var(--line); }
.langs li:last-child { border-bottom: 1px solid var(--line); }
.langs__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.langs h3 { font-size: clamp(20px, 1.6vw, 26px); letter-spacing: -.02em; }
.bar { height: 6px; background: var(--line); overflow: hidden; margin-bottom: 8px; }
.bar span { display: block; height: 100%; width: var(--w); background: var(--yellow); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.2s var(--ease-out) .2s; }
.in .bar span { transform: scaleX(1); }
.langs p { font-size: .95em; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 56px; } .facts li { grid-template-columns: 120px 1fr; } }

/* ---------- Contact ---------- */
.contact { padding: clamp(56px, 6vw, 96px) var(--pad); background: var(--paper); border-top: 1px solid var(--line); }
.contact__inner { max-width: var(--max); margin: 0 auto; }
.contact__title { font-size: clamp(56px, 11vw, 200px); line-height: .9; letter-spacing: -.05em; font-weight: 800; margin-bottom: clamp(28px, 4vw, 56px); }
.contact__mail, .contact__tel { display: block; width: max-content; max-width: 100%; font-weight: 700; letter-spacing: -.02em; }
.contact__mail { font-size: clamp(22px, 3.4vw, 54px); }
.contact__tel { font-size: clamp(18px, 2.2vw, 32px); margin-top: 10px; }
.contact mark {
  background: linear-gradient(var(--yellow), var(--yellow)) no-repeat 0 100% / 100% 42%;
  color: inherit; padding: 0 .12em; transition: background-size .4s var(--ease-out);
  overflow-wrap: anywhere;
}
.contact a:hover mark { background-size: 100% 100%; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); margin-top: clamp(48px, 6vw, 96px); align-items: end; }
.contact__addr { line-height: 1.6; }
.contact__links li { padding: 10px 0; border-top: 1px solid var(--line); }
.contact__links li:last-child { border-bottom: 1px solid var(--line); }
.link { position: relative; font-weight: 500; }
.link span { display: inline-block; transition: transform .3s var(--ease-out); }
.link:hover span { transform: translate(3px, -3px); }
@media (max-width: 760px) {
  .contact__grid { grid-template-columns: 1fr; }
  }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; flex-wrap: wrap;
  padding: 26px var(--pad); border-top: 1px solid var(--line); font-size: .95em; background: var(--paper);
}

.footer__quote { font-weight: 700; letter-spacing: -.01em; }
.footer__legal { color: var(--mute); }
.footer__legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.footer__quote .muted { font-weight: 400; margin-left: .4em; }
.footer__machine { color: var(--mute); font-size: .7em; }
.footer__machine a { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* ---------- Booking overlay ---------- */
.contact__book { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.contact__book .btn { margin-top: 0; }
.book { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; overflow: hidden; background: rgba(18,18,18,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.book[hidden] { display: none; }
.book__panel {
  position: relative; width: min(760px, 100%); max-width: 100%; max-height: calc(100svh - 32px); overflow: hidden auto; overscroll-behavior: contain;
  background: var(--paper); color: var(--ink); padding: clamp(24px, 4vw, 44px); box-shadow: 0 30px 80px rgba(0,0,0,.35);
  animation: up .45s var(--ease-out);
}
.book__close { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; font-size: 30px; line-height: 1; color: var(--mute); }
.book__close:hover { color: var(--ink); }
.book .h3 { margin-bottom: 8px; }
.book__rules { color: var(--mute); margin-bottom: 22px; }
.book__days { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 8px; margin-bottom: 18px; scrollbar-width: thin; }
.book__day {
  flex: 0 0 auto; min-width: 64px; padding: 8px 10px; border: 1px solid var(--line); text-align: center; line-height: 1.15;
  transition: background .2s, border-color .2s;
}
.book__day b { display: block; font-size: 1.05em; }
.book__day small { font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.book__day:hover { border-color: var(--ink); }
.book__day[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--yellow); }
.book__day[aria-selected="true"] small { color: var(--yellow); }
.book__day:disabled { opacity: .35; cursor: not-allowed; }
.book__slots { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.book__slot { padding: 8px 14px 8px 22px; font-weight: 700; background: var(--yellow); clip-path: polygon(0 50%, 12px 0, 100% 0, 100% 100%, 12px 100%); transition: transform .3s var(--ease-out), background .2s, color .2s; }
.book__slot:hover { transform: translateX(4px); }
.book__slot[aria-selected="true"] { background: var(--ink); color: var(--yellow); }
.book__slot small { font-weight: 400; font-family: var(--mono); font-size: .7rem; margin-left: .5em; opacity: .75; }
.book__empty { color: var(--mute); }
.book__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.book__foot .btn { margin-top: 0; }
.book__form { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.book__pick { margin-bottom: 16px; }
.book__pick, .book__status, .book__note, .book__empty { overflow-wrap: anywhere; }
.book__type { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.book__type .label { margin: 0 6px 0 0; }
.book__radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.book__radio input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.book__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.book__field { display: flex; flex-direction: column; gap: 6px; font-size: .92em; }
.book__field em { font-style: normal; color: var(--mute); }
.book__field--wide { grid-column: 1 / -1; }
.book__field[hidden] { display: none; }
.book__field input { width: 100%; min-width: 0; font: inherit; font-size: max(16px, 1em); padding: 10px 12px; /* ≥ 16px: iOS Safari zooms into smaller fields */ border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 0; }
.book__field input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.book__field input:user-invalid { border-color: #c0392b; }
.book__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.book__status { color: var(--mute); min-height: 1.4em; }
.book__status.is-error { color: #b03020; }
.book__status.is-ok { color: var(--ink); font-weight: 500; }
.book__form.is-sent .book__fields, .book__form.is-sent .book__type, .book__form.is-sent #book-send { display: none; }
/* while the dialog is open the page underneath must not move in any direction (iOS) */
html.is-booking, html.is-booking body { overflow: hidden; }
.book__note { margin-top: 16px; color: var(--mute); }
@media (max-width: 600px) { .book__fields { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .book { padding: 0; align-items: end; }
  .book__panel { max-height: 100svh; width: 100%; padding: 22px 20px 28px; }
}

/* ---------- Legal pages ---------- */
.legal { padding: clamp(110px, 12vw, 160px) var(--pad) clamp(64px, 8vw, 120px); min-height: 70svh; }
.legal__inner { max-width: 720px; margin: 0 auto; }
.legal h1 { margin-bottom: 18px; }
.legal__lead { font-size: clamp(18px, 1.5vw, 22px); color: var(--ink-2); margin-bottom: 40px; text-wrap: pretty; }
.legal h2 { font-size: clamp(19px, 1.5vw, 24px); letter-spacing: -.02em; margin: 34px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.legal p { color: var(--ink-2); text-wrap: pretty; }
.legal a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.legal__todo { background: var(--yellow); padding: 0 .3em; font-weight: 700; color: var(--ink); }
.legal__meta { margin-top: 48px; color: var(--mute); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; transition-delay: 0s !important; }
  .rv { opacity: 1; transform: none; }
  .hero__body > * { opacity: 1; transform: none; }
  .hero__img { animation: none; transform: none; }
  .hero__sig { clip-path: none; }
  .grain, .cursor { display: none; }
}
