/* OLADIA v10, home page only. One idea: the O.
   It sits in the name, leaves it, becomes Spin's dial, and lands as the o in
   the address. home.js drives that from scroll when it can (html.anim);
   otherwise the three blocks stack as a plain page.
   The legal and Spin pages have their own stylesheets. */

@font-face { font-family: 'General Sans'; src: url('/assets/fonts/general-sans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'General Sans'; src: url('/assets/fonts/general-sans-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --bg: #0B0C0E; --fg: #ECEBE6; --fg-2: #9C9D9A;
  --paper: #E6E7E3; --ink: #111215; --ink-2: #4B4D52;
  --water: #3D8BFF; --navy: #1B2A4E;
  --focus: #8FB4FF;
  --sans: 'General Sans', ui-sans-serif, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --round: ui-rounded, 'SF Pro Rounded', 'General Sans', system-ui, sans-serif;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --mark: clamp(64px, 26.6vw, 520px);
  --mail: clamp(30px, 7.4vw, 124px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 9; background: var(--fg); color: var(--bg); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 12px; }

.nav { position: absolute; top: 0; right: 0; z-index: 5; height: 64px; padding-inline: var(--gutter); display: flex; align-items: center; }
.nav nav { display: flex; gap: clamp(20px, 3vw, 36px); }
.nav a, .foot a, .link {
  font-size: 15px; padding: 12px 0;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  transition: text-decoration-color .2s ease;
}
.nav a:hover, .foot a:hover, .link:hover { text-decoration-color: currentColor; }

/* ── the three blocks (plain, stacked: the no-JS and reduced-motion page) ── */
.b { padding: 96px var(--gutter) clamp(32px, 6vh, 64px); }
.bl { display: inline-block; width: 0; height: 0; }            /* marks the text baseline for home.js */
#ring { display: none; }

.b-name { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; position: relative; }
.mark {
  margin: 0 0 0 -.045em; white-space: nowrap;
  font: 500 var(--mark)/.8 var(--sans); letter-spacing: -.045em; color: #8B8B8A;
}
.mark span { display: inline-block; }
.line { position: absolute; left: var(--gutter); bottom: clamp(32px, 6vh, 64px); margin: 0; font-size: clamp(17px, 1.4vw, 21px); color: var(--fg-2); }

.b-spin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 5vw, 80px); min-height: 100svh; }
.slot { position: relative; justify-self: center; width: min(46vh, 40vw, 440px); aspect-ratio: 1; }
.slot__still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; border-radius: 50%; }
.read { display: none; }
.copy { max-width: 30ch; }
.copy h2 { margin: 0 0 14px; font: 500 clamp(40px, 5.6vw, 88px)/1 var(--sans); letter-spacing: -.035em; }
.copy__lede { margin: 0 0 12px; font: 500 clamp(22px, 2.3vw, 34px)/1.15 var(--sans); letter-spacing: -.02em; }
.copy__sub { margin: 0 0 26px; color: var(--fg-2); font-size: clamp(16px, 1.2vw, 19px); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 30px; border-radius: 16px; text-decoration: none;
  background: var(--water); color: #fff; font: 700 18px/1 var(--round);
  box-shadow: 0 4px 0 #2B66CF; transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
}
.btn:hover { background: #4A94FF; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2B66CF; }
.ph { display: none; }

.b-contact { min-height: 100svh; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; }
.contact__in { margin-block: auto; }
.mail {
  display: inline-block; white-space: nowrap;
  font: 500 var(--mail)/1 var(--sans); letter-spacing: -.04em; text-decoration: none; padding-bottom: .08em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 .04em no-repeat;
  transition: background-size .5s var(--ease);
}
.mail:hover, .mail:focus-visible { background-size: 100% .04em; }
.b-contact p { margin: 18px 0 0; color: var(--ink-2); font-size: clamp(17px, 1.3vw, 20px); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; color: var(--ink-2); }
.foot nav { display: flex; gap: 24px; }
.foot a { font-size: 14px; }

/* ── the moving page ─────────────────────────────────── */
.anim .stage { height: 640vh; }
.anim .pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.anim #ring { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.anim .b { position: absolute; inset: 0; min-height: 0; }
.anim .o { color: transparent; }                               /* the canvas draws every O */
@media (min-width: 861px) { .anim .b-spin { grid-template-columns: minmax(0, 1fr) minmax(0, 30ch) min(30vw, 400px); } }
.anim .mark { color: transparent; }                            /* the canvas draws the whole name, lit by the pointer */
.anim .b-spin, .anim .b-contact { visibility: hidden; }
.anim .b-spin.on, .anim .b-contact.on { visibility: visible; }
.anim .b-spin { z-index: 3; pointer-events: none; }
.anim .b-spin.live { pointer-events: auto; }
.anim .b-contact { z-index: 3; background: transparent; }
.anim .slot__still { display: none; }
.anim .slot { cursor: pointer; }
.anim .read {
  --rb: clamp(34px, 7.4vh, 76px);
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: #fff; line-height: 1; font-family: var(--round); pointer-events: none; will-change: transform, opacity;
}
.anim .read b { font-size: var(--rb); font-weight: 800; font-variant-numeric: tabular-nums; }
/* the small word hangs under the big one, so the big one stays dead centre */
.anim .read span { position: absolute; left: 0; right: 0; top: 50%; margin-top: calc(var(--rb) * .62); font-size: clamp(13px, 1.9vh, 18px); opacity: .8; }
.anim .ph {
  display: block; position: absolute; width: min(21vh, 15vw); aspect-ratio: 660 / 1434;
  border-radius: 13.5% / 6.2%; overflow: hidden; background: #F5F0E7;
  box-shadow: 0 0 0 5px #16171A, 0 0 0 6px rgba(255, 255, 255, .12), 0 40px 80px -30px rgba(61, 139, 255, .45);
  will-change: transform, opacity;
}
.anim .ph img { width: 100%; height: 100%; object-fit: cover; }
.anim .ph1 { right: calc(var(--gutter) + min(13vh, 9vw)); top: 10vh; }
.anim .ph2 { right: var(--gutter); bottom: 9vh; }
.anim .copy, .anim .read, .anim .contact__in, .anim .foot { will-change: transform, opacity; }

@media (max-width: 860px) {
  .b-spin { grid-template-columns: 1fr; align-content: center; }
  .anim .b-spin { align-content: start; padding-top: 12svh; gap: 3.5svh; }
  .anim .slot { width: min(34svh, 66vw); }
  .anim .ph { display: none; }
  .anim .copy { justify-self: center; text-align: left; }
  .anim .b-name { justify-content: center; padding-bottom: 18svh; }
}
@media (prefers-reduced-motion: reduce) { .mail { transition: none; } }
