/* rafirasooli.com
   Warm white, orange and red. Instrument Serif for display, Schibsted Grotesk for text. */

/* ---------- Fonts (self-hosted, latin) ---------- */
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  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: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic-latin.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
  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";
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  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;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #FBF7F1;
  --cream: #F2E9DE;
  --white: #FFFFFF;
  --ink: #1C1512;
  --ink-2: #4A3F39;
  --muted: #6B5E56;
  --orange: #E2622C;
  --orange-hover: #EB7442;
  --orange-ink: #B84A1A;
  --orange-soft: #F6D9C8;
  --red: #B3261E;
  --red-soft: #F3D9CF;
  --ember: #D9473A;
  --line: rgb(28 21 18 / .14);
  --line-strong: rgb(28 21 18 / .26);
  --on-dark: #FBF7F1;
  --on-dark-2: #CDBFB3;
  --on-dark-line: rgb(251 247 241 / .14);

  --font-display: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --font-text: "Schibsted Grotesk", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --gut: clamp(20px, 5.5vw, 80px);
  --wrap: 1280px;
  --sec: clamp(88px, 10vw, 152px);
  --nav-h: 72px;
  --r-md: 20px;
  --r-lg: 28px;

  /* one size per heading level below h2 */
  --t-h3: clamp(1.625rem, 1.25rem + .8vw, 2rem);
  --t-h4: clamp(1.375rem, 1.2rem + .45vw, 1.625rem);

  --spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0c.6 6.2 5.8 11.4 12 12-6.2.6-11.4 5.8-12 12-.6-6.2-5.8-11.4-12-12C6.2 11.4 11.4 6.2 12 0z'/%3E%3C/svg%3E");
}
@media (max-width: 639px) {
  :root { --nav-h: 64px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  scrollbar-color: #CDBBA8 var(--paper);
}
/* smooth only for in-page link jumps, so keyboard focus scrolling stays instant */
html.motion.is-smooth { scroll-behavior: smooth; }
html.menu-open, html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, dl, dd, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }
p { text-wrap: pretty; }
::selection { background: var(--orange); color: var(--ink); }
input, textarea { caret-color: var(--orange); }

:focus-visible {
  outline: 2px solid var(--orange-ink);
  outline-offset: 3px;
  border-radius: 6px;
}
.section--orange :focus-visible,
.section--red :focus-visible,
.nav :focus-visible,
.closing :focus-visible { outline-color: var(--ink); }
.section--red :focus-visible,
.nav :focus-visible,
.closing :focus-visible { outline-color: var(--on-dark); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: var(--gut); top: 12px; z-index: 100;
  padding: 12px 18px; border-radius: 999px;
  background: var(--orange); color: var(--ink);
  font-weight: 500; text-decoration: none;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Icons ---------- */
.i {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 260ms var(--ease-out);
}
.i-play path { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: var(--h);
  padding: 0 1.5em;
  border: 1px solid transparent; border-radius: 999px;
  font: 500 1rem/1 var(--font-text);
  letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 240ms ease;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  background: var(--orange); color: var(--ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), 0 10px 24px -12px rgb(226 98 44 / .75);
}
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.closing .btn--ghost { color: var(--on-dark); border-color: rgb(251 247 241 / .32); }
.btn--nav { --h: 44px; padding: 0 1.25em; font-size: .9375rem; }
.i-logo { width: 18px; height: 18px; }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--orange-hover); box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 14px 28px -12px rgb(226 98 44 / .85); }
  .btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .closing .btn--ghost:hover { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
  .btn:hover .i-arrow { transform: translate(2px, -2px); }
  .btn:hover .i-down { transform: translateY(2px); }
}

/* Text links: underline that wipes away and returns. Standalone links keep a 44px tap height. */
.link {
  display: inline-flex; align-items: center; gap: .35em;
  min-height: 44px;
  font-weight: 500; color: inherit; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(50% + .78em) / 100% 1px no-repeat;
  transition: background-size 320ms var(--ease-out), color 200ms ease;
}
.qa__body .link { display: inline; min-height: 0; background-position: 0 100%; padding-bottom: 1px; }
.link--quiet { background-size: 0 1px; }
@media (hover: hover) and (pointer: fine) {
  .link:hover { background-size: 0 1px; background-position: 100% calc(50% + .78em); }
  .qa__body .link:hover { background-position: 100% 100%; }
  .link--quiet:hover { background-size: 100% 1px; background-position: 0 calc(50% + .78em); }
  .link:hover .i-arrow { transform: translate(2px, -2px); }
  .link:hover .i-up { transform: translateY(-2px); }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: var(--ink); color: var(--on-dark);
}
.nav__bar {
  position: relative;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  color: inherit; text-decoration: none;
}
.brand__mark { width: 30px; height: 30px; color: var(--on-dark); }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.5rem; line-height: 1; letter-spacing: -.01em;
  white-space: nowrap;
}
.nav__links { margin-inline: auto; }
.nav__links ul {
  position: relative;
  display: flex; gap: 2px;
  padding: 5px;
  border: 1px solid var(--on-dark-line); border-radius: 999px;
  background: rgb(251 247 241 / .035);
}
.nav__links a {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center;
  min-height: 36px; padding: 0 16px;
  border-radius: 999px;
  font-size: .9375rem; font-weight: 500;
  color: var(--on-dark-2); text-decoration: none;
  transition: color 200ms ease;
}
.nav__links a[aria-current] { color: var(--on-dark); }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--on-dark); }
}
.nav__pill {
  position: absolute; z-index: 0; top: 5px; left: 0;
  height: 36px; width: var(--pw, 0px);
  border-radius: 999px;
  background: rgb(251 247 241 / .12);
  transform: translateX(var(--px, 0px));
  opacity: 0;
  transition: transform 460ms var(--ease-out), width 460ms var(--ease-out), opacity 240ms ease;
  pointer-events: none;
}
.nav__pill.is-on { opacity: 1; }

.nav__toggle {
  display: none; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid rgb(251 247 241 / .22); border-radius: 999px;
  background: transparent; color: var(--on-dark);
  font-size: .9375rem; font-weight: 500;
  cursor: pointer;
  transition: background-color 200ms ease;
}
.nav__toggle-icon { position: relative; width: 16px; height: 10px; }
.nav__toggle-icon span {
  position: absolute; left: 0; right: 0; height: 1.6px; border-radius: 2px;
  background: currentColor;
  transition: transform 320ms var(--ease-out);
}
.nav__toggle-icon span:first-child { top: 1px; }
.nav__toggle-icon span:last-child { bottom: 1px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-icon span:first-child { transform: translateY(3.4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-icon span:last-child { transform: translateY(-3.4px) rotate(-45deg); }

/* tri-colour rule under the nav: muted at rest, saturating left to right as the page scrolls */
.nav__progress { position: relative; height: 3px; }
.nav__progress::before,
.nav__progress span {
  content: ""; position: absolute; inset: 0; display: block;
  background: linear-gradient(90deg, #7A5E52 0 22%, var(--orange) 22% 76%, var(--ember) 76% 100%);
}
.nav__progress::before { opacity: .5; }
.nav__progress span { clip-path: inset(0 calc(100% - var(--p, 0) * 100%) 0 0); }

.menu {
  position: fixed; inset: calc(var(--nav-h) + 2px) 0 0;
  background: var(--ink); color: var(--on-dark);
  overflow-y: auto; overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 560ms var(--ease-drawer);
}
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu[hidden] { display: none; }
.menu__inner { padding-block: 16px 40px; min-height: 100%; display: flex; flex-direction: column; }
.menu__inner ul { border-top: 1px solid var(--on-dark-line); }
.menu__inner li { border-bottom: 1px solid var(--on-dark-line); }
.menu__inner li a {
  display: flex; align-items: center; min-height: 64px;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 8.5vw, 3.25rem); line-height: 1.05;
  color: var(--on-dark); text-decoration: none;
}
.menu__foot { margin-top: auto; padding-top: 32px; display: grid; gap: 16px; }
.menu__foot .btn { width: 100%; }
.menu__foot p { color: var(--on-dark-2); font-size: .9375rem; }
html.motion .menu.is-open li { animation: menu-in 520ms var(--ease-out) both; }
html.motion .menu.is-open li:nth-child(1) { animation-delay: 90ms; }
html.motion .menu.is-open li:nth-child(2) { animation-delay: 125ms; }
html.motion .menu.is-open li:nth-child(3) { animation-delay: 160ms; }
html.motion .menu.is-open li:nth-child(4) { animation-delay: 195ms; }
html.motion .menu.is-open li:nth-child(5) { animation-delay: 230ms; }
html.motion .menu.is-open li:nth-child(6) { animation-delay: 265ms; }
@keyframes menu-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 1079px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .btn--nav { margin-left: auto; }
}
@media (max-width: 639px) {
  .btn--nav { display: none; }
  .nav__toggle { margin-left: auto; }
  .brand__name { font-size: 1.375rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding-top: calc(var(--nav-h) + 2px);
  background:
    radial-gradient(70% 55% at 50% 36%, #FFFDF9 0%, rgb(255 253 249 / 0) 72%),
    radial-gradient(40% 40% at 12% 90%, rgb(226 98 44 / .07) 0%, rgb(226 98 44 / 0) 70%),
    radial-gradient(40% 40% at 90% 18%, rgb(179 38 30 / .05) 0%, rgb(179 38 30 / 0) 70%),
    var(--paper);
  overflow: clip;
}
.hero__inner {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding-block: clamp(28px, 5vh, 72px) clamp(56px, 7vh, 76px);
}
.hero__titlewrap { position: relative; display: inline-block; max-width: 100%; }
.hero__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: min(clamp(3rem, 1.2rem + 7.4vw, 7.75rem), 14.5vh);
  line-height: .98;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
.hero__title em { font-style: italic; color: var(--orange); letter-spacing: -.01em; }
.line {
  display: block; overflow: hidden;
  padding: .14em .08em .12em;
  margin: -.14em -.08em -.12em;
}
.line__in { display: inline-block; }
.hero__face {
  display: inline-block;
  width: .8em; height: .8em;
  margin: 0 .04em 0 .02em;
  vertical-align: -.07em;
  border-radius: 50%;
  overflow: hidden;
  background: #6E6E6E;
  box-shadow: 0 0 0 .045em var(--paper), 0 0 0 .08em var(--orange);
}
.hero__face img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 500ms var(--ease-spring);
}
@media (hover: hover) and (pointer: fine) {
  .hero__face:hover img { transform: scale(1.1) rotate(-4deg); }
}

.seal {
  position: absolute;
  top: clamp(-60px, -3vw, -28px);
  right: clamp(-190px, -12.4vw, -100px);
  width: clamp(124px, 10.8vw, 164px); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--line), 0 18px 36px -20px rgb(28 21 18 / .45);
}
.seal__ring { width: 100%; height: 100%; }
.seal__ring text {
  font-family: var(--font-text);
  font-size: 17px; font-weight: 500;
  letter-spacing: .12em;
  fill: currentColor;
}
.seal__core {
  position: absolute; inset: 29%;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--orange); color: var(--ink);
  font-size: clamp(18px, 1.6vw, 24px);
  transition: transform 360ms var(--ease-spring), background-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .seal:hover .seal__core { transform: scale(1.1) rotate(-45deg); background: var(--orange-hover); }
}
@media (max-width: 999px) { .seal { display: none; } }

.hero__lead {
  max-width: 54ch;
  margin-top: clamp(18px, 3vh, 30px);
  font-size: clamp(1.0625rem, .95rem + .45vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: balance;
}
.hero__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: clamp(22px, 3.6vh, 38px);
}
.hero__status {
  margin-top: clamp(18px, 3vh, 28px);
  font-size: .9375rem; line-height: 1.5; color: var(--muted);
}
.hero__sep { color: var(--muted); white-space: pre; }
.hero__loc { white-space: nowrap; }
.pulse {
  position: relative;
  display: inline-block; vertical-align: .08em;
  width: 8px; height: 8px; margin-right: 10px; border-radius: 50%;
  background: var(--orange);
}
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--orange); opacity: 0;
}
html.motion .pulse::after { animation: ping 2.6s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 75%, 100% { transform: scale(3.2); opacity: 0; } }

@media (max-width: 639px) {
  .hero__actions { width: 100%; flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .hero__sep { display: none; }
  .hero__loc { display: block; }
}

/* Hero entrance (runs once, only with script and motion allowed) */
html.js.motion .line__in { transform: translateY(108%); transition: transform 1050ms var(--ease-out) 160ms; }
html.js.motion .line + .line .line__in { transition-delay: 260ms; }
html.js.motion .hero__face { transform: scale(.35) rotate(-18deg); opacity: 0; transition: transform 950ms var(--ease-spring) 520ms, opacity 300ms ease 520ms; }
html.js.motion .seal { opacity: 0; transform: scale(.7) rotate(-60deg); transition: opacity 500ms ease 620ms, transform 1100ms var(--ease-out) 620ms; }
html.js.motion [data-enter] { opacity: 0; transform: translateY(18px); transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: calc(var(--d, 0) * 95ms + 220ms); }
html.js.motion.is-loaded .line__in,
html.js.motion.is-loaded .hero__face,
html.js.motion.is-loaded .seal,
html.js.motion.is-loaded [data-enter] { opacity: 1; transform: none; }
html.motion .seal__ring { animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bands (crossing marquees) ---------- */
.bands {
  position: relative;
  height: clamp(112px, 12.5vw, 184px);
  margin-top: auto;
  overflow-x: clip;
}
.band {
  position: absolute; top: 50%; left: -10vw; right: -10vw;
  padding: clamp(10px, 1vw, 15px) 0;
  overflow: hidden;
  box-shadow: 0 14px 30px -20px rgb(28 21 18 / .5);
}
.band--orange { z-index: 2; background: var(--orange); color: var(--ink); transform: translateY(-50%) rotate(-2.4deg); }
.band--red { z-index: 1; background: var(--red); color: var(--paper); transform: translateY(-50%) rotate(2deg); }
.band__track { display: flex; width: max-content; will-change: transform; }
.band__list { display: flex; align-items: center; flex: none; }
.band__list li {
  display: flex; align-items: center;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, .95rem + 1.9vw, 2.75rem);
  line-height: 1.15; letter-spacing: -.005em;
}
.band__list li::after {
  content: "";
  width: .5em; height: .5em; margin-inline: .7em;
  background: currentColor;
  -webkit-mask: var(--spark) center / contain no-repeat;
  mask: var(--spark) center / contain no-repeat;
}
.motion-toggle {
  position: absolute; z-index: 3;
  right: max(var(--gut), 16px); bottom: calc(100% + 8px);
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--paper); color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px rgb(28 21 18 / .5);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.motion-toggle:active { transform: scale(.94); }
.motion-toggle .i-play { display: none; }
html[data-paused] .motion-toggle .i-play { display: block; }
html[data-paused] .motion-toggle .i-pause { display: none; }
html:not(.motion) .motion-toggle { display: none; }
@media (hover: hover) and (pointer: fine) { .motion-toggle:hover { background: var(--white); } }

/* the cross needs a steeper angle as the screen narrows, or the two bands sit on top of each other */
@media (max-width: 1023px) {
  .bands { height: clamp(128px, 17vw, 168px); }
  .band--orange { transform: translateY(-50%) rotate(-3.6deg); }
  .band--red { transform: translateY(-50%) rotate(3.4deg); }
}
@media (max-width: 639px) {
  .bands { height: 150px; }
  .band--orange { transform: translateY(-50%) rotate(-6deg); }
  .band--red { transform: translateY(-50%) rotate(5.6deg); }
}

.bands--single { height: clamp(84px, 8vw, 120px); background: var(--paper); }
.bands--single .band { transform: translateY(-50%) rotate(-1.6deg); }
@media (max-width: 639px) { .bands--single .band { transform: translateY(-50%) rotate(-3deg); } }

html[data-paused] .seal__ring,
html[data-paused] .pulse::after { animation-play-state: paused; }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: var(--sec); overflow: clip; }
.section > .wrap { position: relative; z-index: 1; }
.ghost {
  position: absolute; z-index: 0;
  top: calc(var(--sec) - .3em); right: -.05em;
  font-family: var(--font-display);
  font-size: clamp(6.5rem, 3.5rem + 13vw, 17rem);
  line-height: .8; letter-spacing: -.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ghost, rgb(28 21 18 / .13));
  pointer-events: none; user-select: none;
}
.section--orange .ghost { --ghost: rgb(28 21 18 / .2); }
/* the ghost word sinks into its section's lower edge, under the cards, clear of all copy; the section grows to hold it */
.section:has(> .ghost--foot) { padding-bottom: calc(var(--sec) + 4vw); }
.ghost--foot {
  top: auto; right: auto;
  left: 50%; bottom: -.42em;
  transform: translateX(-50%);
  font-size: clamp(6rem, 2.5rem + 12vw, 13rem);
}
.section--paper { background: var(--paper); }
.section--cream { background: var(--cream); }
.section--orange { background: var(--orange); color: var(--ink); }
.section--red { background: var(--red); color: var(--on-dark); }

.section__head { display: grid; gap: 18px; margin-bottom: clamp(40px, 5.5vw, 72px); }
@media (min-width: 960px) {
  .section__head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; column-gap: 48px; }
  .section__head:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
  .section__head .lead { justify-self: end; }
}
.h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.5rem, 1.35rem + 3.9vw, 4.75rem);
  line-height: 1; letter-spacing: -.018em;
  text-wrap: balance;
}
.lead {
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
}
.section--orange .lead { color: var(--ink); }
.section--red .lead { color: var(--on-dark); }

/* ---------- What I handle: arches ---------- */
.arches { display: grid; gap: clamp(14px, 1.6vw, 24px); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.arch {
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(48px, 4.4vw, 64px) clamp(20px, 1.8vw, 28px) clamp(26px, 2.4vw, 34px);
  border-radius: 50% 50% var(--r-lg) var(--r-lg) / 150px 150px var(--r-lg) var(--r-lg);
  background: var(--paper);
  text-align: center;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 26px 50px -30px rgb(90 30 6 / .6);
}
.arch__art { width: 100%; max-width: 230px; margin-bottom: clamp(18px, 2vw, 26px); }
.dg { width: 100%; height: auto; overflow: visible; }
.arch__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--t-h3);
  line-height: 1.05; letter-spacing: -.01em;
  margin-bottom: 10px;
  text-wrap: balance;
}
.arch p { font-size: 1rem; line-height: 1.55; color: var(--ink-2); max-width: 30ch; }
@media (max-width: 1099px) { .arches { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .arches { grid-template-columns: 1fr; }
  .arch { border-radius: 50% 50% var(--r-lg) var(--r-lg) / 130px 130px var(--r-lg) var(--r-lg); }
}

/* Diagram pieces. The resting state is the finished state; script sets the start state and plays it. */
.dg-col { fill: var(--cream); }
.dg-head { fill: rgb(28 21 18 / .26); }
.dg-card { fill: var(--white); stroke: rgb(28 21 18 / .12); stroke-width: 1; }
.dg-mover rect:first-child { fill: var(--orange); }
.dg-mover-bar { fill: rgb(28 21 18 / .45); }
.dg-mover { transform: translate(158px, 56px); }

.dg-spokes path { stroke: rgb(28 21 18 / .2); stroke-width: 1.5; fill: none; }
.dg-pulses circle { fill: var(--orange); opacity: 0; }
.dg-nodes circle { fill: var(--orange-soft); stroke: var(--orange); stroke-width: 1.5; }
.dg-core { fill: var(--orange); }
.dg-core-mark { stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; fill: none; }

.dg-cells .c0 { fill: var(--cream); }
.dg-cells .c1 { fill: var(--orange-soft); }
.dg-cells .c2 { fill: #F1B596; }
.dg-cells .c3 { fill: #E8875E; }
.dg-cells .c4 { fill: var(--ember); }
.dg-axis { stroke: rgb(28 21 18 / .3); stroke-width: 1.5; fill: none; stroke-linecap: round; }
.dg-trail { stroke: var(--ink); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-dasharray: 140; stroke-dashoffset: 0; opacity: .5; }
.dg-dot { fill: var(--ink); stroke: var(--paper); stroke-width: 2.5; transform: translate(-80px, 88px); }

.dg-track { stroke: rgb(28 21 18 / .14); stroke-width: 5; stroke-linecap: round; fill: none; }
.dg-fill { stroke: var(--orange); stroke-width: 5; stroke-linecap: round; fill: none; stroke-dasharray: 180; stroke-dashoffset: 0; }
.dg-stones rect { fill: var(--orange); stroke: var(--paper); stroke-width: 2.5; }
.dg-pole { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.dg-cloth { fill: var(--red); transform-box: fill-box; transform-origin: 0 50%; }
.dg-start { fill: var(--ink); }

/* start states (script + motion only, until the card plays) */
html.js.motion .arch:not(.is-playing) .dg-mover { transform: translate(0, 0); }
html.js.motion .arch:not(.is-playing) .dg-nodes circle { fill: var(--paper); stroke: rgb(28 21 18 / .3); }
html.js.motion .arch:not(.is-playing) .dg-trail { stroke-dashoffset: 140; }
html.js.motion .arch:not(.is-playing) .dg-dot { transform: translate(0, 0); }
html.js.motion .arch:not(.is-playing) .dg-fill { stroke-dashoffset: 180; }
html.js.motion .arch:not(.is-playing) .dg-stones rect { fill: var(--paper); stroke: rgb(28 21 18 / .3); }
html.js.motion .arch:not(.is-playing) .dg-cloth { transform: translateY(40px) scaleX(.2); opacity: 0; }

.arch.is-playing .dg-mover { animation: dg-move 2.8s var(--ease-in-out) both; }
@keyframes dg-move {
  0%, 10% { transform: translate(0, 0); }
  40%, 54% { transform: translate(79px, 28px); }
  84%, 100% { transform: translate(158px, 56px); }
}
.arch.is-playing .dg-pulses circle { animation: dg-pulse 1.25s var(--ease-out) both; animation-delay: calc(var(--k) * 110ms + 150ms); }
@keyframes dg-pulse {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 1; }
  80% { transform: translate(var(--x), var(--y)); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)); opacity: 0; }
}
.arch.is-playing .dg-nodes circle { animation: dg-node 500ms var(--ease-out) both; animation-delay: calc(var(--k) * 110ms + 1100ms); }
@keyframes dg-node {
  from { fill: var(--paper); stroke: rgb(28 21 18 / .3); }
  to { fill: var(--orange-soft); stroke: var(--orange); }
}
.arch.is-playing .dg-trail { animation: dg-trail 2s var(--ease-in-out) 200ms both; }
@keyframes dg-trail { from { stroke-dashoffset: 140; } to { stroke-dashoffset: 0; } }
.arch.is-playing .dg-dot { animation: dg-dot 2s var(--ease-in-out) 200ms both; }
@keyframes dg-dot {
  0% { transform: translate(0, 0); }
  30% { transform: translate(-8px, 30px); }
  62% { transform: translate(-40px, 62px); }
  100% { transform: translate(-80px, 88px); }
}
.arch.is-playing .dg-fill { animation: dg-fill 1.8s var(--ease-in-out) 150ms both; }
@keyframes dg-fill { from { stroke-dashoffset: 180; } to { stroke-dashoffset: 0; } }
.arch.is-playing .dg-stones rect { animation: dg-stone 360ms var(--ease-out) both; animation-delay: calc(var(--k) * 470ms + 520ms); }
@keyframes dg-stone {
  from { fill: var(--paper); stroke: rgb(28 21 18 / .3); }
  to { fill: var(--orange); stroke: var(--paper); }
}
.arch.is-playing .dg-cloth { animation: dg-flag 900ms var(--ease-spring) 1.85s both; }
@keyframes dg-flag {
  from { transform: translateY(40px) scaleX(.2); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------- About ---------- */
.about { display: grid; gap: clamp(48px, 6vw, 96px); align-items: center; }
@media (min-width: 960px) { .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.about__media {
  position: relative;
  width: 100%; max-width: 480px; margin-inline: auto;
  padding-bottom: clamp(44px, 5vw, 72px);
}
.about__slab {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 4 / 5;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 7% 8% 9% 17%;
  border-radius: var(--r-lg);
  background: var(--orange); color: var(--ink);
  overflow: hidden;
  box-shadow: 0 34px 64px -38px rgb(90 30 6 / .7);
}
.about__num {
  font-family: var(--font-display);
  font-size: clamp(9rem, 19vw, 17rem);
  font-size: 74cqw;
  line-height: .8; letter-spacing: -.05em;
  font-variant-numeric: lining-nums;
}
.about__cap { max-width: 11ch; font-size: clamp(1.0625rem, .95rem + .45vw, 1.375rem); font-weight: 500; line-height: 1.2; }
.about__name {
  position: absolute; left: 5.5%; bottom: 9%;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: .8125rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  white-space: nowrap;
}
.about__photo {
  position: absolute; right: -5%; bottom: 0;
  width: 42%; aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 6px solid var(--paper);
  border-radius: 50% 50% 22px 22px / 38% 38% 22px 22px;
  background: var(--cream);
  box-shadow: 0 24px 40px -24px rgb(28 21 18 / .5);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 48% 50%; }

.about__body .h2 { margin-bottom: 24px; }
.about__body .lead { max-width: 58ch; margin-bottom: 14px; color: var(--ink); }
.about__body > p:not(.lead) { color: var(--ink-2); max-width: 60ch; }
.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px;
  margin: 32px 0 28px;
  border-top: 1px solid var(--line);
}
.facts div { padding: 14px 0 15px; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .8125rem; font-weight: 500; color: var(--muted); margin-bottom: 3px; }
.facts dd { font-size: 1rem; color: var(--ink); }
.tools { margin-bottom: 32px; }
.tools__label { font-size: .8125rem; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
/* one chip for every list of names on the page: tools and top skills */
.tools__list, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tools__list li, .chips li {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white);
  font-size: .9375rem; font-weight: 500;
}
.tools__list li::before, .chips li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--orange); transform: rotate(45deg); }
@media (max-width: 519px) {
  .facts { grid-template-columns: 1fr; }
  .about__media { padding-bottom: 48px; }
}

/* ---------- Results ---------- */
.results { display: grid; gap: clamp(40px, 5vw, 72px); }
@media (min-width: 1024px) { .results { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; } }
.results__head .h2 { margin-bottom: 20px; }
.figures {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgb(251 247 241 / .3);
}
.figure { padding: clamp(22px, 2.8vw, 40px) 0 clamp(26px, 3vw, 44px); border-bottom: 1px solid rgb(251 247 241 / .3); }
.figure:nth-child(odd) { padding-right: clamp(14px, 3vw, 48px); border-right: 1px solid rgb(251 247 241 / .3); }
.figure:nth-child(even) { padding-left: clamp(14px, 3vw, 48px); }
.figure__num {
  display: grid;
  font-family: var(--font-display);
  font-size: clamp(4rem, 2.2rem + 7vw, 10.5rem);
  line-height: .9; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums lining-nums;
}
.figure__ghost, .figure__val { grid-area: 1 / 1; }
.figure__ghost { visibility: hidden; }
.figure__label {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px; max-width: 26ch;
  font-size: clamp(1rem, .95rem + .25vw, 1.1875rem); line-height: 1.4;
  color: var(--red-soft);
}
.figure__label .i { margin-top: .22em; color: var(--on-dark); }

/* ---------- Experience ---------- */
.exp { display: grid; gap: clamp(40px, 5vw, 64px); }
@media (min-width: 960px) { .exp { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.exp__label {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--t-h3); line-height: 1.1;
}
.exp__label--skills { margin-top: 40px; }
.exp__icon {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--orange); color: var(--ink);
}
.exp__icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.role, .school {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.role { padding: clamp(24px, 3vw, 40px); }
.role__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.role__title { font-family: var(--font-display); font-weight: 400; font-size: var(--t-h4); line-height: 1.05; letter-spacing: -.005em; }
.role__org { margin-top: 8px; font-weight: 500; }
.role__when {
  padding: 8px 14px; border-radius: 999px;
  background: var(--orange); color: var(--ink);
  font-size: .9375rem; font-weight: 500; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.role__where { margin-top: 4px; font-size: .9375rem; color: var(--muted); }
.role__list { position: relative; display: grid; gap: 16px; margin-top: 28px; padding-left: 30px; }
.role__list::before, .role__list::after {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
}
.role__list::before { background: var(--line); }
.role__list::after { background: var(--orange); transform-origin: 50% 0; transform: scaleY(var(--p, 1)); }
.role__list li { position: relative; color: var(--ink-2); }
.role__list li::before {
  content: ""; position: absolute; left: -30px; top: .5em; z-index: 1;
  width: 12px; height: 12px; border-radius: 3px;
  background: var(--orange); box-shadow: 0 0 0 3px var(--paper);
  transform: rotate(45deg);
  transition: background-color 300ms ease, transform 400ms var(--ease-spring);
}
html.js.motion .role__list li:not(.is-past)::before { background: var(--paper); box-shadow: 0 0 0 3px var(--paper), inset 0 0 0 1.5px var(--line-strong); transform: rotate(45deg) scale(.85); }
.school { padding: clamp(22px, 2.6vw, 32px); }
.school__name { font-family: var(--font-display); font-weight: 400; font-size: var(--t-h4); line-height: 1.05; }
.school__degree { margin-top: 8px; color: var(--ink-2); }

/* ---------- Projects ---------- */
.projects { display: grid; gap: clamp(20px, 2.6vw, 36px); }
.project {
  display: grid;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--cream);
}
@media (min-width: 800px) { .project { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.project__photo { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--ink); }
@media (min-width: 800px) { .project__photo { aspect-ratio: auto; min-height: 460px; } }
.project__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project__photo .obj-right { object-position: 68% 50%; }
.project__body { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: clamp(26px, 4vw, 56px); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 6px 13px; border-radius: 999px;
  background: var(--orange); color: var(--ink);
  font-size: .875rem; font-weight: 500;
}
.project__title { font-family: var(--font-display); font-weight: 400; font-size: var(--t-h3); line-height: 1.05; letter-spacing: -.01em; }
.project__body > p { color: var(--ink-2); max-width: 54ch; }
.project__meta { display: grid; gap: 10px; width: 100%; padding-top: 18px; border-top: 1px solid var(--line); }
.project__meta div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; }
.project__meta dt { font-size: .875rem; font-weight: 500; color: var(--muted); padding-top: .1em; }
.project__meta .link { margin-top: 4px; }

/* ---------- Certifications ---------- */
.creds { display: grid; gap: clamp(32px, 4vw, 56px); }
@media (min-width: 960px) {
  .creds { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "head head" "cert list"; align-items: start; column-gap: clamp(32px, 4vw, 64px); }
  .creds__head { grid-area: head; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px; align-items: end; }
  .creds__head .lead { justify-self: end; }
  .cert { grid-area: cert; }
  .cred-list { grid-area: list; }
}
.creds__head { gap: 18px; display: grid; }
.cert {
  position: relative; display: block; width: 100%;
  padding: clamp(10px, 1.1vw, 16px);
  border: 0; border-radius: var(--r-lg);
  background: var(--white);
  cursor: zoom-in;
  box-shadow: 0 0 0 1px var(--line), 0 34px 60px -38px rgb(28 21 18 / .55);
  transition: transform 420ms var(--ease-out), box-shadow 420ms var(--ease-out);
}
.cert img { width: 100%; border-radius: 14px; }
.cert__hint {
  position: absolute; right: clamp(22px, 2.4vw, 32px); bottom: clamp(22px, 2.4vw, 32px);
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--ink); color: var(--on-dark);
  font-size: .875rem; font-weight: 500;
  transition: opacity 200ms ease, transform 300ms var(--ease-out);
}
.cert:active { transform: scale(.99); }
@media (hover: hover) and (pointer: fine) {
  .cert__hint { opacity: 0; transform: translateY(6px); }
  .cert:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line), 0 44px 70px -40px rgb(28 21 18 / .6); }
  .cert:hover .cert__hint, .cert:focus-visible .cert__hint { opacity: 1; transform: none; }
}
.cred-list { border-top: 1px solid var(--line); }
.cred { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cred__abbr {
  display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line);
  font-family: var(--font-display); font-size: 1.375rem; line-height: 1; letter-spacing: .01em;
}
.cred:first-child .cred__abbr { background: var(--orange); border-color: transparent; }
.cred__name { font-family: var(--font-display); font-weight: 400; font-size: var(--t-h3); line-height: 1.05; }
.cred__by { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.cred .link { margin-top: 12px; }

/* ---------- Questions ---------- */
.faq { display: grid; gap: clamp(32px, 4vw, 64px); }
@media (min-width: 960px) { .faq { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.faq__head .h2 { margin-bottom: 20px; }
.faq__head .lead { margin-bottom: 28px; }
.faq__list { display: grid; gap: 10px; }
.qa { border-radius: 20px; background: var(--cream); transition: background-color 280ms ease; }
.qa[open]:not(.is-closing) { background: var(--orange); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 68px; padding: 14px 16px 14px 24px;
  font-size: 1.0625rem; font-weight: 500; line-height: 1.35;
  cursor: pointer; list-style: none;
  border-radius: 20px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa__icon { position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); transition: transform 300ms var(--ease-out); }
.qa__icon::before, .qa__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 12px; height: 1.7px; border-radius: 2px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 320ms var(--ease-out);
}
.qa__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.qa[open]:not(.is-closing) .qa__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
@media (hover: hover) and (pointer: fine) { .qa summary:hover .qa__icon { transform: scale(1.08); } }
.qa__body { padding: 0 24px 24px; }
.qa__body p { max-width: 60ch; color: var(--ink); }

/* ---------- Closing / footer ---------- */
.closing { position: relative; background: var(--ink); color: var(--on-dark); overflow: clip; }
.closing__photo { position: relative; height: clamp(260px, 40vw, 580px); overflow: hidden; }
.closing__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.closing__photo::after {
  content: ""; position: absolute; inset: auto 0 0; height: 45%;
  background: linear-gradient(to bottom, rgb(28 21 18 / 0), var(--ink));
}
.closing__main { position: relative; z-index: 1; margin-top: clamp(-150px, -9vw, -56px); padding-bottom: clamp(56px, 7vw, 104px); }
.closing__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3rem, 1.3rem + 6.4vw, 8rem);
  line-height: .95; letter-spacing: -.02em;
  max-width: 13ch;
  text-wrap: balance;
}
.closing__title em { font-style: italic; color: var(--orange); }
.closing__lead { margin-top: 20px; max-width: 46ch; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--on-dark-2); }
.contact { margin-top: clamp(28px, 4vw, 44px); display: grid; justify-items: start; gap: 22px; }
.contact__line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.contact__email {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3.25rem); line-height: 1.15;
  color: var(--on-dark); text-decoration: none;
  overflow-wrap: anywhere;
  background:
    linear-gradient(var(--orange), var(--orange)) 0 100% / 0% 2px no-repeat,
    linear-gradient(rgb(251 247 241 / .3), rgb(251 247 241 / .3)) 0 100% / 100% 1px no-repeat;
  padding-block: 6px;
  transition: background-size 500ms var(--ease-out), color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .contact__email:hover { color: var(--orange); background-size: 100% 2px, 100% 1px; }
}
.copy-btn {
  position: relative; flex: none;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgb(251 247 241 / .32);
  background: transparent; color: var(--on-dark);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}
.copy-btn:active { transform: scale(.94); }
.copy-btn__icon {
  grid-area: 1 / 1; width: 18px; height: 18px;
  transition: opacity 200ms ease, filter 200ms ease, transform 280ms var(--ease-out);
}
.copy-btn__icon--done { opacity: 0; filter: blur(3px); transform: scale(.6); }
@media (hover: hover) and (pointer: fine) {
  .copy-btn:hover { background: var(--on-dark); border-color: var(--on-dark); color: var(--ink); }
}
.copy-btn.is-copied, .copy-btn.is-copied:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.copy-btn.is-copied .copy-btn__icon--idle { opacity: 0; filter: blur(3px); transform: scale(.6); }
.copy-btn.is-copied .copy-btn__icon--done { opacity: 1; filter: none; transform: none; }

.closing__dir {
  display: grid; gap: 36px;
  padding-block: 48px;
  border-top: 1px solid var(--on-dark-line);
}
@media (min-width: 800px) { .closing__dir { grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); } }
.closing__brand p { margin-top: 14px; max-width: 34ch; color: var(--on-dark-2); }
.closing__col h3 { margin-bottom: 14px; font-size: .8125rem; font-weight: 500; color: var(--on-dark-2); }
.closing__legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 32px;
  padding-block: 22px;
  border-top: 1px solid var(--on-dark-line);
  font-size: .875rem; color: var(--on-dark-2);
}
.closing__legal p { padding-block: 12px; }
.closing__legal .link--quiet { background-size: 100% 1px; }
.closing__word {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 18.6vw, 19.5rem);
  line-height: .8; letter-spacing: -.035em;
  text-align: center; white-space: nowrap;
  color: var(--orange);
  margin-top: clamp(8px, 2vw, 28px);
  margin-bottom: -.12em;
  user-select: none;
}
.closing__word span { display: inline-block; }
html.js.motion .closing__word span { transform: translateY(70%); opacity: 0; transition: transform 1000ms var(--ease-out), opacity 600ms ease; transition-delay: calc(var(--i) * 40ms); }
html.js.motion .closing__word.is-in span { transform: none; opacity: 1; }

/* ---------- Certificate dialog ---------- */
.lightbox {
  padding: 0; border: 0; background: transparent;
  width: min(1180px, 94vw); max-width: none; max-height: 92vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgb(28 21 18 / .74); backdrop-filter: blur(3px); }
.lightbox__inner { position: relative; }
.lightbox img { width: 100%; max-height: 88vh; object-fit: contain; border-radius: 14px; box-shadow: 0 40px 90px -30px rgb(0 0 0 / .65); }
.lightbox__close {
  position: absolute; top: -18px; right: -14px;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--paper); color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 10px 20px -10px rgb(0 0 0 / .5);
  transition: transform 160ms var(--ease-out);
}
.lightbox__close:active { transform: scale(.94); }
@media (max-width: 639px) { .lightbox__close { top: -54px; right: 0; } }
html.motion .lightbox[open] { animation: dlg-in 280ms var(--ease-out); }
html.motion .lightbox[open]::backdrop { animation: fade-in 280ms ease; }
html.motion .lightbox.is-closing { animation: dlg-out 170ms var(--ease-out) forwards; }
html.motion .lightbox.is-closing::backdrop { animation: fade-out 170ms ease forwards; }
@keyframes dlg-in { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dlg-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.97); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Scroll reveals (script + motion only; content shows without them) ---------- */
html.js.motion [data-reveal="arch"] { opacity: 0; transform: translateY(56px); transition: opacity 700ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
html.js.motion [data-reveal="rise"] { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 120ms); }
/* the photo frame stays put (and observable); the picture inside wipes up into it */
html.js.motion [data-reveal="photo"] img { clip-path: inset(100% 0 0 0); transform: scale(1.14); transition: clip-path 1150ms var(--ease-in-out), transform 1500ms var(--ease-out); }
html.js.motion [data-reveal].is-in { opacity: 1; transform: none; }
html.js.motion [data-reveal="photo"].is-in img { clip-path: inset(0 0 0 0); transform: none; }

/* ---------- Reduced motion: everything rests in its finished state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .band__track { transform: none !important; }
}

/* ---------- Small pages (credits, 404) ---------- */
.page-plain { min-height: 100svh; display: flex; flex-direction: column; background: var(--paper); }
.page-plain__head { background: var(--ink); color: var(--on-dark); }
.page-plain__head .wrap { min-height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-plain main { flex: 1; padding-block: clamp(64px, 9vw, 128px); }
.page-plain h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.75rem, 1.6rem + 4vw, 5rem); line-height: 1; letter-spacing: -.02em; margin-bottom: 20px; }
.page-plain .lead { margin-bottom: 40px; }
.credit-list { border-top: 1px solid var(--line); max-width: 760px; }
.credit-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.credit-list p { color: var(--ink-2); }
.credit-list .link { justify-self: end; }
@media (max-width: 559px) { .credit-list li { grid-template-columns: 1fr; } .credit-list .link { justify-self: start; } }
