/* SIGILLVM: a poster to open (the seal enormous and turning, the name from one side to the
   other), then the studio in one grotesk on a warm near-black with a moving grain; Roman capitals
   only for the name and the Latin words, the gold only where the seal has it. */
:root {
  --bg: #100e0b;
  --fg: #f1eee6;
  --fg-82: rgba(241, 238, 230, 0.82);
  --mute: rgba(241, 238, 230, 0.6);
  --mute-2: rgba(241, 238, 230, 0.42);
  --line: rgba(241, 238, 230, 0.14);
  --gold: #c9a45c;
  --gold-55: rgba(201, 164, 92, 0.55);
  --caps: "Cormorant SC", "Trajan Pro", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(18px, 3vw, 44px);
  --ease: cubic-bezier(0.16, 0.84, 0.24, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
/* the seal may run past the edges; the page never scrolls sideways */
main { overflow-x: hidden; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; border-radius: 2px; }
.v { color: var(--gold); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 80;
  padding: 10px 16px; background: var(--fg); color: var(--bg); font-weight: 500;
}
.skip:focus { top: 12px; }

/* the grain, behind the content, shifting a few times a second like film */
.grain {
  position: fixed; z-index: -1; top: -120px; left: -120px; right: -120px; bottom: -120px;
  background: url("/assets/img/grain.png") 0 0 / 256px 256px repeat;
  pointer-events: none;
  animation: grain 0.9s steps(1, end) infinite;
}
/* and a finer grain over everything, letters included, as on film */
.grain--over {
  z-index: 45; background: url("/assets/img/grain-overlay.png") 0 0 / 256px 256px repeat;
  mix-blend-mode: overlay; opacity: 0.32; animation-delay: -0.45s;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  12.5% { transform: translate(-61px, 37px); }
  25% { transform: translate(43px, -88px); }
  37.5% { transform: translate(-97px, -19px); }
  50% { transform: translate(18px, 71px); }
  62.5% { transform: translate(79px, 14px); }
  75% { transform: translate(-28px, -63px); }
  87.5% { transform: translate(57px, 96px); }
  100% { transform: translate(0, 0); }
}

/* ---- Header: the studio's line over the poster, its name once the poster is gone ----------- */

.hdr {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; gap: clamp(28px, 4vw, 72px);
  padding: 22px var(--pad) 18px;
  border-bottom: 1px solid transparent;
  transition: background 0.5s, border-color 0.5s, padding 0.5s;
}
.hdr.is-solid {
  padding-top: 14px; padding-bottom: 14px;
  background: rgba(16, 14, 11, 0.84);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.brand { position: relative; display: block; width: 180px; height: 44px; flex: none; }
.brand__tag, .brand__name { position: absolute; left: 0; top: 50%; transition: opacity 0.45s, transform 0.45s var(--ease); }
.brand__tag { transform: translateY(-50%); font-size: 15px; line-height: 1.35; }
.brand__name { display: inline-flex; align-items: center; gap: 12px; opacity: 0; transform: translateY(-20%); }
.brand__mark { width: 24px; height: 24px; }
.brand__word { font: 500 15px/1 var(--caps); letter-spacing: 0.3em; }
.hdr.is-solid .brand__tag { opacity: 0; transform: translateY(-80%); }
.hdr.is-solid .brand__name { opacity: 1; transform: translateY(-50%); }
.nav { display: flex; align-items: center; gap: clamp(18px, 2vw, 30px); font-size: 15px; }
.nav a { color: var(--mute); transition: color 0.3s; }
.nav a:hover { color: var(--fg); }
/* the other language: a small capsule at the end of the menu */
.nav .nav__lang { padding: 4px 10px 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 12px; letter-spacing: 0.1em; color: var(--fg-82); transition: border-color 0.3s, color 0.3s; }
.nav .nav__lang:hover { border-color: var(--gold-55); color: var(--fg); }
@media (max-width: 760px) {
  .hdr { justify-content: space-between; }
  .nav .nav__sec { display: none; }
}

/* ---- Shared ------------------------------------------------------------- */

.sec { position: relative; padding: clamp(100px, 16vh, 190px) var(--pad) 0; }
.sec__title { font: 500 clamp(36px, 4.4vw, 68px)/1.02 var(--sans); letter-spacing: -0.035em; }
.sec__intro { margin-top: 24px; max-width: 46em; color: var(--mute); }

/* reveal on entering the screen */
.js [data-reveal] { opacity: 0; transform: translateY(22px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease) var(--d, 0s), transform 1.1s var(--ease) var(--d, 0s);
}

/* columns of short texts, each under a fine rule */
.cols { display: grid; gap: 0 clamp(24px, 3vw, 56px); margin-top: clamp(56px, 8vh, 110px); }
.cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col { padding-top: 22px; border-top: 1px solid var(--line); transition: border-color 0.5s; }
.col:hover { border-top-color: var(--gold-55); }
.col h3 { font: 500 17px/1.3 var(--sans); }
.col p { margin-top: 10px; color: var(--mute); }
.col .col__lat { margin: 0 0 18px; font: 400 clamp(20px, 2vw, 30px)/1 var(--caps); letter-spacing: 0.16em; color: var(--gold); }
@media (max-width: 1100px) {
  .cols--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols--4 .col:nth-child(n + 3) { margin-top: 40px; }
}
@media (max-width: 860px) {
  .cols--3 { grid-template-columns: minmax(0, 1fr); }
  .cols--3 .col + .col { margin-top: 36px; }
}
@media (max-width: 600px) {
  .cols--4 { grid-template-columns: minmax(0, 1fr); }
  .cols--4 .col + .col { margin-top: 36px; }
}

/* ---- The poster --------------------------------------------------------- */

.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; }
/* the seal as large and where it was in option B; the poster does not clip it at its foot, so it
   carries on whole past the name and behind the next section */
.hero__seal {
  position: absolute; left: 80vw; top: 46%; width: 140vh; height: 140vh;
  transform: translate(-50%, calc(-50% + var(--hp, 0) * 90px)); opacity: calc(1 - var(--hp, 0) * 0.6);
}
.seal { width: 100%; height: 100%; overflow: visible; animation: turn 240s linear infinite; }
.hero.is-off .seal { animation-play-state: paused; }
@keyframes turn { to { transform: rotate(360deg); } }
/* the left column: the line, the availability just below it, and the name large at the foot */
.hero__copy { position: absolute; left: var(--pad); top: 34vh; bottom: 40px; display: flex; flex-direction: column; align-items: flex-start; }
.hero__lead { max-width: 13ch; font: 400 clamp(30px, 3.2vw, 52px)/1.06 var(--sans); letter-spacing: -0.02em; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 36px; margin-top: 22px; font-size: 13px; color: var(--mute); }
.hero__meta a { transition: color 0.3s; }
.hero__meta a:hover { color: var(--fg); }
.status { display: inline-flex; align-items: center; gap: 10px; }
.status__dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.status__dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--gold); opacity: 0; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }
.hero__word { margin: auto 0 0; white-space: nowrap; font: 300 clamp(64px, 11.5vw, 220px)/0.86 var(--caps); letter-spacing: 0.02em; color: rgba(241, 238, 230, 0.8); }
/* the letters blur away one after another, stay gone a moment, and come back in the same order
   (longhands: a delay computed from a variable does not survive inside the animation shorthand) */
.hero__word span {
  display: inline-block;
  animation-name: dissolve; animation-duration: 11s; animation-timing-function: ease-in-out;
  animation-iteration-count: infinite; animation-delay: calc(1.6s + var(--i) * 0.22s);
}
@keyframes dissolve {
  0%, 38% { opacity: 1; filter: blur(0); }
  48%, 60% { opacity: 0; filter: blur(18px); }
  70%, 100% { opacity: 1; filter: blur(0); }
}
.hero__word .v { background: linear-gradient(170deg, #e2c88e 8%, #c9a45c 46%, #9c7a3c 92%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* the hero arrives: the name, the line, the details; the seal draws itself */
.js .hero__in { opacity: 0; transform: translateY(16px); }
.is-ready .hero__in { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) var(--d, 0s), transform 1.3s var(--ease) var(--d, 0s); }
.js .seal .sg-reveal { r: 0px; }
.is-ready .seal .sg-reveal { r: 728px; transition: r 2.6s var(--ease) 0.35s; }
.seal .sg-ring { transform: rotate(-90deg); transform-box: fill-box; transform-origin: center; }
.js .seal .sg-ring { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.js .seal .sg-dot { transform: scale(0); transform-box: fill-box; transform-origin: center; }
.is-ready .seal .sg-ring { stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s cubic-bezier(0.65, 0, 0.35, 1) 0.1s; }
.is-ready .seal .sg-dot { transform: scale(1); transition: transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1.9s; }

/* on a phone the seal keeps to the upper right, clear of the menu and of the text below it */
@media (max-width: 760px) {
  .hero__seal { left: 92vw; top: 40%; width: 125vw; height: 125vw; }
  .hero__copy { top: auto; bottom: 28px; right: var(--pad); }
  .hero__lead { max-width: 11ch; }
  .hero__meta { margin-top: 16px; }
  .hero__word { margin-top: 30px; font-size: 18vw; }
}

/* ---- What the studio does ----------------------------------------------- */

.statement { padding-top: clamp(90px, 15vh, 170px); }
.statement__text { max-width: 20ch; font: 400 clamp(36px, 5.4vw, 92px)/1.02 var(--sans); letter-spacing: -0.03em; }

/* ---- The name ----------------------------------------------------------- */

.name__entry { font-size: 15px; color: var(--mute); }
.name__entry span { margin: 0 0.5em; color: var(--gold); }
.name__body {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 120px);
  margin-top: 26px; padding-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--line);
}
.name__def { max-width: 21ch; font: 400 clamp(28px, 3vw, 46px)/1.14 var(--sans); letter-spacing: -0.02em; }
.name__text { display: grid; gap: 1.1em; color: var(--mute); max-width: 40em; }
@media (max-width: 860px) { .name__body { grid-template-columns: minmax(0, 1fr); } }

/* ---- Process ------------------------------------------------------------ */

.steps { position: relative; margin-top: clamp(56px, 7vw, 96px); container-type: inline-size; }
.steps__wave { width: 100%; height: auto; overflow: visible; }
.steps__wave path { fill: none; stroke-width: 1.2; }
.steps__track { stroke: var(--line); }
.steps__line { stroke: var(--gold); stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--sp, 0)); }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step { position: relative; padding: 34px clamp(18px, 2.6vw, 48px) 0 0; }
.step__dot {
  position: absolute; left: -4.5px; top: calc(-2cqw - 4.5px); width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--mute-2); transition: background 0.5s, border-color 0.5s, box-shadow 0.5s;
}
.step.is-lit .step__dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 6px rgba(201, 164, 92, 0.14); }
.step h3 { font: 500 clamp(20px, 1.7vw, 26px)/1.2 var(--sans); letter-spacing: -0.01em; }
.step p { margin-top: 12px; color: var(--mute); }
@media (max-width: 860px) {
  .steps__wave { display: none; }
  .steps__list { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-left: 30px; border-left: 1px solid var(--line); }
  .step { padding: 0; }
  .step__dot { left: -35px; top: 7px; }
}

/* ---- Principles --------------------------------------------------------- */

.lat { width: min(100%, 220px); height: auto; margin-bottom: 24px; overflow: visible; }
.lat path { fill: none; stroke: rgba(241, 238, 230, 0.5); stroke-width: 1; }
.lat__dot { fill: var(--gold); }
.lat__drift { animation: lat-drift 12s linear infinite; }
@keyframes lat-drift { to { transform: translateX(120px); } }

/* ---- Contact and the brief ---------------------------------------------- */

.contact { isolation: isolate; padding-bottom: clamp(110px, 16vh, 180px); }
.contact__seal {
  position: absolute; z-index: -1; right: calc(var(--pad) - 6vw); top: clamp(60px, 10vh, 120px);
  width: min(52vw, 620px); height: auto; opacity: 0.06; pointer-events: none;
}
.brief {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(28px, 4vw, 72px);
  margin-top: clamp(44px, 5vw, 72px); align-items: start;
}
.brief__form { display: grid; gap: 32px; }
.brief__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.brief__group legend, .field > span { display: block; margin-bottom: 14px; padding: 0; font-size: 14px; color: var(--mute); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none; cursor: pointer; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg-82);
  font: 400 15px/1.2 var(--sans); transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.chip:hover { border-color: var(--gold-55); color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.brief__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 28px; }
.field--wide { grid-column: 1 / -1; }
.field input, .field textarea {
  display: block; width: 100%; padding: 8px 0 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--fg); font: 400 17px/1.5 var(--sans); resize: vertical; transition: border-color 0.3s;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.brief__summary { position: sticky; top: 96px; padding: clamp(24px, 2.6vw, 34px); border: 1px solid var(--line); background: rgba(241, 238, 230, 0.025); }
.brief__title { font: 500 20px/1.25 var(--sans); }
.brief__list { margin: 22px 0 28px; display: grid; gap: 16px; }
.brief__list div { padding-top: 14px; border-top: 1px solid var(--line); }
.brief__list dt { font-size: 13px; color: var(--mute-2); }
.brief__list dd { margin: 6px 0 0; color: var(--fg-82); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 15px 22px;
  border: 1px solid var(--fg); font: 500 15px/1 var(--sans); transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.btn--solid { width: 100%; background: var(--gold); border-color: var(--gold); color: var(--bg); }
.btn--solid:hover { background: var(--fg); border-color: var(--fg); }
.brief__note { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--mute-2); }
.contact__or { margin-top: clamp(56px, 7vw, 96px); color: var(--mute); }
.contact__mail { display: inline-block; margin-top: 8px; font: 400 clamp(32px, 4.6vw, 68px)/1.1 var(--sans); letter-spacing: -0.025em; overflow-wrap: anywhere; transition: color 0.35s; }
.contact__mail:hover { color: var(--gold); }
.contact__who { margin-top: 26px; font-size: 14px; color: var(--mute-2); }
@media (max-width: 960px) {
  .brief { grid-template-columns: minmax(0, 1fr); }
  .brief__summary { position: static; }
}
@media (max-width: 560px) { .brief__fields { grid-template-columns: minmax(0, 1fr); } }

/* ---- Footer ------------------------------------------------------------- */

.ftr {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  padding: 34px calc(var(--pad) + 64px) 40px var(--pad); border-top: 1px solid var(--line);
  font-size: 13px; color: var(--mute-2);
}
.ftr .brand { display: inline-flex; align-items: center; gap: 12px; width: auto; height: auto; }
.ftr .brand__word { font-size: 14px; color: var(--fg); }

/* ---- The seal in the corner: how far down the page, and back to the top --- */

.toplink {
  position: fixed; right: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px); z-index: 30;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(16, 14, 11, 0.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.5s, transform 0.5s var(--ease);
}
.toplink.is-on { opacity: 1; transform: none; pointer-events: auto; }
.toplink svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.toplink__track { fill: none; stroke: var(--line); stroke-width: 1.5; }
.toplink__bar { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.toplink__dot { fill: var(--gold); transition: transform 0.4s var(--ease); transform-box: fill-box; transform-origin: center; }
.toplink:hover .toplink__dot { transform: scale(1.5); }

/* ---- The pointer: the gold dot of the seal, its ring and a warm, living light */

.has-cursor, .has-cursor a, .has-cursor button, .has-cursor .chip { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.cursor { position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.cursor.is-on { opacity: 1; }
.cursor__dot, .cursor__ring, .cursor__light { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--gold); box-shadow: 0 0 10px 2px rgba(255, 196, 110, 0.75); transition: width 0.3s, height 0.3s, margin 0.3s, opacity 0.3s; }
.cursor__ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid rgba(232, 200, 120, 0.7);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), border-color 0.35s, background 0.35s, opacity 0.3s;
}
.cursor__light {
  width: 440px; height: 440px; margin: -220px 0 0 -220px; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 205, 120, 0.2) 0%, rgba(240, 165, 80, 0.09) 28%, rgba(220, 140, 60, 0.035) 50%, rgba(220, 140, 60, 0) 70%);
}
.cursor__light::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 150, 0.16) 0%, rgba(255, 180, 90, 0.05) 22%, rgba(255, 180, 90, 0) 40%);
  animation: flicker 2.7s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  13% { opacity: 1; transform: scale(1.05); }
  27% { opacity: 0.72; transform: scale(0.97); }
  41% { opacity: 0.95; transform: scale(1.03); }
  56% { opacity: 0.78; transform: scale(0.98); }
  72% { opacity: 1; transform: scale(1.06); }
  86% { opacity: 0.8; transform: scale(0.99); }
}
.cursor.is-link .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--gold); background: rgba(201, 164, 92, 0.1); }
.cursor.is-link .cursor__dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
.cursor.is-down .cursor__ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.cursor.is-text .cursor__ring, .cursor.is-text .cursor__dot { opacity: 0; }
/* gold under the pointer: the text it passes over takes the gold, fading out at the edges
   (the class is set by the script, only where text can carry a background) */
.glint {
  background-image:
    radial-gradient(circle var(--gr, 150px) at var(--gx, -9999px) var(--gy, -9999px), #e2c584 0%, rgba(201, 164, 92, 0.92) 26%, rgba(201, 164, 92, 0) 70%),
    linear-gradient(currentColor, currentColor);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__word .glint { --gr: 240px; }
.statement__text.glint, .contact__mail.glint { --gr: 220px; }
.glint .v, .name__entry.glint span { -webkit-text-fill-color: var(--gold); }
.glint::selection, .glint *::selection { -webkit-text-fill-color: var(--bg); }

[data-magnetic] { display: inline-block; transition: transform 0.45s var(--ease), background 0.3s, color 0.3s, border-color 0.3s; }
.btn[data-magnetic] { display: inline-flex; }
.is-pulling { transition: transform 0.12s linear, background 0.3s, color 0.3s, border-color 0.3s; }

/* ---- Less motion -------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .seal, .lat__drift, .status__dot::after, .hero__word span { animation: none; }
  .js [data-reveal], .js .hero__in { opacity: 1; transform: none; }
  .js .seal .sg-ring { stroke-dashoffset: 0; }
  .js .seal .sg-reveal { r: 728px; }
  .js .seal .sg-dot { transform: none; }
  .hero__seal { transform: translate(-50%, -50%); opacity: 1; }
}
