/* agrippina coming-soon page. Tokens follow the colour table of Tom's development brief (22.10.2026). */

@font-face {
  font-family: "Geom";
  src: url("/fonts/Geom-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Geom";
  src: url("/fonts/Geom-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --stone: #b6b3aa;
  --white: #ffffff;
  --black: #111111;
  --museum-blue: #7899c2;
  --electric-blue: #1739e8;

  --vh: 100vh;

  /* The hero frame behaves like object-fit: cover, so layers inside it can be placed in image coordinates.
     Landscape motif 2568 x 1070 by default (Nic's motif with wall and plinth continued, see
     scripts/extend-landscape.mjs), right-aligned, so up to 2.4 : 1 it always shows its full height.
     Portrait motif 1024 x 1536 below. */
  --ar: 2.4;
  --px: 1;
  --py: 0.35;
  --fw: max(100vw, calc(var(--vh) * var(--ar)));
  --fh: calc(var(--fw) / var(--ar));
  --fx: calc((100vw - var(--fw)) * var(--px));
  --fy: calc((var(--vh) - var(--fh)) * var(--py));

  /* Trail of the motion blur right of the blue square, in % of the frame */
  --tx: 88.12;
  --ty: 8.4;
  --tw: 11.88;
  --th: 42.6;
  --trail-img: url("/assets/hero-landscape-1800.jpg");
  --trail-set: image-set(url("/assets/hero-landscape-1800.avif") type("image/avif"), url("/assets/hero-landscape-1800.webp") type("image/webp"), url("/assets/hero-landscape-1800.jpg") type("image/jpeg"));

  --logo-w: clamp(112px, calc(var(--fh) * 0.19), 240px);
  --pad-x: clamp(24px, 4.4vw, 76px);
  --pad-top: clamp(28px, 4.6vh, 56px);

  --fs-main: clamp(12px, calc(var(--fh) * 0.0172), 20px);
  --fs-sub: clamp(10.5px, calc(var(--fh) * 0.0121), 14px);
  --note-gap: max(16px, calc(var(--fh) * 0.027));
  /* on the dark plinth face below the bust, as in the reference; kept inside narrow windows */
  --note-x: clamp(30vw, calc(var(--fx) + var(--fw) * 0.7352), 70vw);
  --note-y: min(calc(var(--fy) + var(--fh) * 0.852), calc(var(--vh) - var(--note-gap) - var(--fs-sub) - 28px));
}

@supports (height: 100dvh) {
  :root { --vh: 100dvh; }
}

/* Beyond 2.4 : 1 the motif is cut at the bottom: keep the head, lift the text into view. */
@media (min-aspect-ratio: 2.4/1) {
  :root { --py: 0; }
  .note { text-shadow: 0 0 14px rgba(17, 17, 17, 0.45); }
}

@media (max-aspect-ratio: 4/5) {
  :root {
    --ar: 0.6667;
    --px: 0.62;
    --py: 0.6;
    --tx: 77.9;
    --ty: 22.8;
    --tw: 22.1;
    --th: 30.5;
    --trail-img: url("/assets/hero-portrait-1024.jpg");
    --trail-set: image-set(url("/assets/hero-portrait-1024.avif") type("image/avif"), url("/assets/hero-portrait-1024.webp") type("image/webp"), url("/assets/hero-portrait-1024.jpg") type("image/jpeg"));

    /* proportions of the reference: logo 23.7 % of the width, inset 6.3 % */
    --logo-w: clamp(92px, 23.7vw, 200px);
    --pad-x: clamp(22px, 6.3vw, 56px);
    --pad-top: clamp(26px, calc(var(--fh) * 0.036), 56px);

    --fs-main: clamp(12px, 1.8vw, 18px);
    --fs-sub: clamp(10px, 1.26vw, 13px);
    --note-x: 50vw;
    --note-gap: max(18px, calc(var(--fh) * 0.0247));
    /* the rule sits at 85.8 % of the motif, as in the reference */
    --note-y: calc(var(--fy) + var(--fh) * 0.858);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--stone);
}

body {
  font-family: "Geom", ui-sans-serif, system-ui, sans-serif;
  font-weight: 300;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.home { overflow: hidden; }

/* Layer 1 to 3: background, sculpture, blue square and blur, all in the motif */
.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--stone);
}

.frame {
  position: absolute;
  left: var(--fx);
  top: var(--fy);
  width: var(--fw);
  height: var(--fh);
}

.frame picture,
.hero {
  display: block;
  width: 100%;
  height: 100%;
}

.hero { object-fit: cover; }

/* A copy of the blur trail breathes a few pixels wider and back. Only transform, so it stays on the compositor. */
.trail {
  position: absolute;
  left: calc(var(--tx) * 1%);
  top: calc(var(--ty) * 1%);
  width: calc(var(--tw) * 1%);
  height: calc(var(--th) * 1%);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18%);
  pointer-events: none;
}

.trail::before {
  content: "";
  position: absolute;
  left: calc(var(--tx) / var(--tw) * -100%);
  top: calc(var(--ty) / var(--th) * -100%);
  width: calc(100 / var(--tw) * 100%);
  height: calc(100 / var(--th) * 100%);
  background-image: var(--trail-img);
  background-image: var(--trail-set);
  background-size: 100% 100%;
  transform-origin: calc(var(--tx) * 1%) 50%;
  /* the pointer stretches the trail on top of the breathing (site.js sets --pull, 0 to about 0.14) */
  scale: calc(1 + var(--pull, 0)) 1;
  animation: trail 7s ease-in-out infinite alternate;
}

/* Layer 4: logo and menu */
.bar {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: max(var(--pad-top), env(safe-area-inset-top)) max(var(--pad-x), env(safe-area-inset-right)) 0 max(var(--pad-x), env(safe-area-inset-left));
  pointer-events: none;
}

.bar > * { pointer-events: auto; }

.logo {
  display: block;
  width: var(--logo-w);
  line-height: 0;
}

.logo img {
  width: 100%;
  height: auto;
}

/* Two hairlines as in the reference: the upper one longer, both flush right. */
.menu-toggle {
  --line-long: max(18px, calc(var(--logo-w) * 0.177));
  --line-short: max(12px, calc(var(--logo-w) * 0.12));
  --line-gap: max(5px, calc(var(--logo-w) * 0.05));
  position: relative;
  width: 48px;
  height: 48px;
  /* centre of the lines at 38 % of the logo height, as in the reference */
  margin: calc(var(--logo-w) * 0.216 * 0.38 - 24px) -12px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
}

.menu-line {
  position: absolute;
  right: 12px;
  height: 1.25px;
  background: currentColor;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.menu-line--long {
  top: calc(50% - var(--line-gap) / 2 - 0.75px);
  width: var(--line-long);
}

.menu-line--short {
  top: calc(50% + var(--line-gap) / 2 - 0.75px);
  width: var(--line-short);
}

.menu-open .menu-line--long {
  width: var(--line-long);
  transform: translateY(calc(var(--line-gap) / 2)) rotate(-45deg);
  transform-origin: 50% 50%;
}

.menu-open .menu-line--short {
  width: var(--line-long);
  transform: translateY(calc(var(--line-gap) / -2)) rotate(45deg);
  transform-origin: 50% 50%;
}

/* Layer 5: the two lines */
.note {
  position: fixed;
  z-index: 2;
  left: var(--note-x);
  top: var(--note-y);
  width: 0;
  height: 0;
  font-size: var(--fs-main);
  text-align: center;
  text-transform: uppercase;
}

.note-main,
.note-sub {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding-left: 0.32em;
  font-weight: 300;
  line-height: 1;
  white-space: nowrap;
}

.note-main {
  bottom: var(--note-gap);
  font-size: 1em;
  letter-spacing: 0.38em;
  padding-left: 0.38em;
}

.note-sub {
  top: var(--note-gap);
  font-size: var(--fs-sub);
  letter-spacing: 0.34em;
  padding-left: 0.34em;
}

.note-rule {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2.6em;
  height: 1px;
  margin-left: -1.3em;
  background: var(--white);
  opacity: 0.85;
}

/* Menu */
.menu {
  position: fixed;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 17, 17, 0.58);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.menu[hidden] { display: none; }
.menu.is-visible { opacity: 1; }

.menu ul {
  display: grid;
  gap: clamp(22px, 4vh, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.menu a {
  display: inline-block;
  padding: 10px 4px 10px calc(4px + 0.32em);
  color: var(--white);
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: 0.32em;
  text-decoration: none;
  text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 50% calc(100% - 4px) / 0 1px no-repeat;
  transition: background-size 0.35s ease;
}

.menu a:hover { background-size: calc(100% - 0.64em) 1px; }

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--white);
  outline-offset: 4px;
}

/* Entry: the motif fades in first, logo and text follow. Without JavaScript everything is visible at once. */
.js .frame { opacity: 0; transition: opacity 1.6s ease; }
.js .bar { opacity: 0; transition: opacity 1.2s ease 0.5s; }
.js .note-main,
.js .note-sub { opacity: 0; transition: opacity 1.4s ease 0.9s; }
.js .note-rule { opacity: 0; transition: opacity 1.4s ease 0.9s; }

.is-ready .frame,
.is-ready .bar,
.is-ready .note-main,
.is-ready .note-sub { opacity: 1; }
.is-ready .note-rule { opacity: 0.85; }

@keyframes trail {
  from { transform: scaleX(1); }
  to { transform: scaleX(1.035); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; }
}

/* Imprint and privacy */
.legal {
  min-height: 100%;
  background: var(--stone);
  color: var(--black);
  font-weight: 400;
}

.legal .bar {
  position: static;
  padding-bottom: 0;
}

.legal-main {
  max-width: 680px;
  padding: clamp(56px, 12vh, 120px) var(--pad-x) clamp(56px, 10vh, 96px);
  margin: 0 auto;
}

.legal h1 {
  margin: 0 0 clamp(32px, 6vh, 56px);
  font-size: clamp(13px, 1.12vw, 17px);
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.legal h2 {
  margin: 2.6em 0 0.7em;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.7;
}

.legal p {
  margin: 0 0 1em;
  font-size: 15px;
  line-height: 1.6;
}

.legal a {
  color: inherit;
  text-underline-offset: 3px;
}

.legal a:focus-visible { outline-color: var(--black); }

.legal-foot {
  display: flex;
  gap: 28px;
  margin-top: clamp(48px, 8vh, 80px);
  padding-top: 20px;
  border-top: 1px solid rgba(17, 17, 17, 0.25);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.legal-foot a { text-decoration: none; }
.legal-foot a:hover { text-decoration: underline; }
.legal-foot [aria-current="page"] { opacity: 0.55; }
