/* Primitives ported from ThreeDevBros/landing-page styles.css (spec §3). Page-specific styles live in pages.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; min-height: 100dvh; background: var(--ink); color: var(--bone);
  font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 300; letter-spacing: -.01em; color: var(--accent); }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.skip { position: fixed; left: 16px; top: -60px; z-index: 400; padding: 10px 16px; border-radius: 99px; background: var(--bone); color: var(--ink); font-weight: 600; transition: top .2s; }
.skip:focus { top: 16px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }
.grain {
  position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.label { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Pill buttons [O]. Text on an accent fill is always --ink (spec §3). */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 99px;
  background: var(--bone); color: var(--ink); font: 500 15px/1 var(--sans); white-space: nowrap;
  transition: color .4s var(--out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--accent);
  transform: translateY(101%); transition: transform .5s var(--out);
}
.btn svg { width: 19px; height: 19px; fill: currentColor; flex: none; }
.btn-ghost { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px rgba(235, 229, 218, .22); }
@media (hover: hover) {
  .btn:hover { color: var(--ink); }
  .btn:hover::before { transform: none; }
}

/* Nav + language toggle [O], toggle raised to 44 px (spec §8). */
.nav { position: absolute; inset: 0 0 auto; z-index: 50; height: var(--nav-h); display: flex; align-items: center; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mono-mark { display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 99px; }
/* The photo as given, not zoomed in on the face (owner, 29 Oct), shown in a circle. */
.mono-mark img { display: block; width: 40px; height: 40px; border-radius: 99px; object-fit: cover; background: var(--ink-3);
  box-shadow: 0 0 0 1px rgba(235, 229, 218, .14); transition: box-shadow .3s; }
@media (hover: hover) { .mono-mark:hover img { box-shadow: 0 0 0 2px var(--accent); } }
.nav-links { display: none; }
.lang {
  display: inline-flex; align-items: center; min-height: 44px; padding: 4px; border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(235, 229, 218, .16); font: 500 12px/1 var(--mono); letter-spacing: .06em;
}
.lang span { display: grid; place-items: center; min-width: 36px; min-height: 36px; padding: 0 8px; border-radius: 99px; color: var(--muted); }
.lang span[aria-current="true"] { background: var(--bone); color: var(--ink); }
@media (hover: hover) { .lang:hover span:not([aria-current="true"]) { color: var(--bone); } }

/* Reduced motion: no movement anywhere (spec §7). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

.btn-sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn-xl { min-height: 64px; padding: 0 34px; font-size: 17px; }
.contact-actions { display: grid; gap: 12px; }
.noscript-contact a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }

/* Leaving overlay [O, leave.js]: answers the tap within one frame, then hands off. */
/* The hand-off: the tapped row or button grows to fill the screen, then the site opens.
   --t/--r/--b/--l/--rad are the tapped element's edges and corner radius, set by contact.ts. */
.leaving {
  position: fixed; inset: 0; z-index: 350; display: grid; place-content: center; justify-items: center; gap: 20px;
  background: var(--ink-2);
  clip-path: inset(var(--t, 50%) var(--r, 50%) var(--b, 50%) var(--l, 50%) round var(--rad, 22px));
  transition: clip-path .45s cubic-bezier(.32, .72, 0, 1);
}
.leaving[hidden] { display: none; }
.leaving.is-on { clip-path: inset(0 0 0 0 round 0); }
.leaving-icon { display: grid; place-items: center; color: var(--accent); scale: .8; opacity: 0;
  transition: scale .5s cubic-bezier(.34, 1.3, .64, 1) .12s, opacity .25s .12s; }
.leaving-icon:empty { display: none; }
.leaving-icon svg { width: 56px; height: 56px; fill: currentColor; }
.leaving-text, .leaving-cancel { opacity: 0; translate: 0 8px; transition: opacity .3s .18s, translate .4s var(--out) .18s; }
.leaving.is-on .leaving-icon { scale: 1; opacity: 1; }
.leaving.is-on .leaving-text, .leaving.is-on .leaving-cancel { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .leaving { clip-path: none; opacity: 0; transition: opacity .2s; }
  .leaving.is-on { clip-path: none; opacity: 1; }
  .leaving-icon, .leaving-text, .leaving-cancel { scale: 1; translate: none; transition: opacity .2s; }
}
.leaving-text { font: 400 clamp(24px, 4vw, 40px)/1.1 var(--sans); letter-spacing: -.03em; }
