/* ==========================================================================
   NIVARO CGI — design system
   Dark editorial identity: charcoal + ivory + champagne gold.
   Gold is the single accent (it echoes the gold/brass in the renders).
   ========================================================================== */

/* ---------- Fonts (self-hosted, Latin + Spanish accents) ---------- */
@font-face { font-family: "Lora"; src: url("../assets/fonts/lora-var.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../assets/fonts/lora-italic-var.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --ink-950: #08080a;
  --ink-900: #0d0d0f;
  --ink-850: #131316;
  --ink-800: #19191d;
  --ivory: #f2ede3;
  --ivory-dim: rgba(242, 237, 227, .78);
  --muted: rgba(242, 237, 227, .62);
  --line: rgba(242, 237, 227, .12);
  --line-strong: rgba(242, 237, 227, .2);
  --gold: #cfa968;
  --gold-bright: #e4c58c;
  --gold-ink: #7a5a22;            /* gold for text on light surfaces */
  --paper: #ece6da;
  --glass: rgba(255, 255, 255, .06);

  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 36px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1440px;
  --header-h: 76px;
  --section-y: clamp(88px, 12vw, 180px);

  --text: var(--ivory);
  --text-muted: var(--muted);
  --rule: var(--line);
  --accent: var(--gold);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) - 8px); background: var(--ink-900); }
html.has-viewer, html.menu-open { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; background: var(--ink-900); color: var(--text);
  font-family: var(--sans); font-size: 1rem; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* fine film grain over everything: static, so it costs nothing at runtime */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 300; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, picture, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--ink-950); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip { position: fixed; left: 16px; top: -64px; z-index: 500; padding: .8rem 1.2rem; border-radius: 999px; background: var(--ivory); color: var(--ink-950); font-weight: 500; transition: top .3s var(--ease); }
.skip:focus { top: 16px; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }

/* ---------- Type ---------- */
.eyebrow { display: flex; align-items: center; gap: .9rem; font-size: .75rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .8; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.5rem, 1.1rem + 5.6vw, 6rem); line-height: 1; letter-spacing: -.032em; margin-top: 1.4rem; text-wrap: balance; }
.h2--md { font-size: clamp(2.2rem, 1rem + 4vw, 4.5rem); }
.h2 em, .hero__title em { font-style: italic; color: var(--accent); letter-spacing: -.02em; }
.lead { font-size: clamp(1.0625rem, .96rem + .45vw, 1.3125rem); line-height: 1.55; color: var(--ivory-dim); }
p { color: var(--text-muted); text-wrap: pretty; }
.note { font-size: .8125rem; line-height: 1.5; color: var(--text-muted); opacity: .85; }
.link { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); transition: border-color .4s, color .4s; }
.link:hover { border-color: var(--accent); color: var(--gold-bright); }

.chip {
  display: inline-flex; align-items: center; padding: .5rem .95rem; border-radius: 999px;
  font-size: .6875rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ivory);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

.section-head { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 2rem clamp(32px, 6vw, 120px); align-items: end; margin-bottom: clamp(48px, 7vw, 104px); }
.section-head--solo { grid-template-columns: 1fr; }
@media (max-width: 719px) { .section-head { grid-template-columns: minmax(0, 1fr); align-items: start; } }
.section-head__aside { display: grid; gap: 1.1rem; max-width: 46ch; padding-bottom: .6rem; }

/* ---------- Buttons ---------- */
.btn {
  --h: 54px; position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem; height: var(--h); padding: 0 1.6rem 0 1.75rem;
  border-radius: 999px; font-size: .9375rem; font-weight: 500; letter-spacing: .01em; white-space: nowrap;
  transition: color .5s var(--ease), border-color .5s var(--ease), background-color .5s var(--ease);
}
.btn--sm { --h: 44px; padding: 0 1.2rem 0 1.35rem; font-size: .875rem; }
.btn--primary { background: var(--ivory); color: var(--ink-950); }
.btn--primary::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold); transform: translateY(101%); transition: transform .6s var(--ease); border-radius: inherit; }
.btn--primary:hover::before, .btn--primary:focus-visible::before { transform: none; }
.btn--ghost { color: var(--ivory); border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(207, 169, 104, .08); }
.btn .arrow { transition: transform .5s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.icon-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .05); color: var(--ivory); transition: background-color .4s, border-color .4s, color .4s; }
.icon-btn:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(207, 169, 104, .1); }

/* ---------- Language switch ---------- */
.lang { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.lang button { min-width: 44px; height: 36px; padding: 0 .5rem; border-radius: 999px; font-size: .75rem; font-weight: 500; letter-spacing: .14em; color: var(--ivory-dim); transition: background-color .4s var(--ease), color .4s var(--ease); }
.lang button:hover { color: var(--ivory); }
.lang button[aria-pressed="true"] { background: var(--ivory); color: var(--ink-950); }
.lang--lg button { min-width: 64px; height: 46px; font-size: .8125rem; }

/* ---------- Header / nav ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; }
.site-header__bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; height: var(--header-h); padding-inline: var(--gutter);
  border-bottom: 1px solid transparent; transition: background-color .6s var(--ease), border-color .6s var(--ease), -webkit-backdrop-filter .6s, backdrop-filter .6s;
}
.site-header.is-scrolled .site-header__bar, html.menu-open .site-header__bar { background: rgba(13, 13, 15, .66); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(20px) saturate(1.2); backdrop-filter: blur(20px) saturate(1.2); }
html.menu-open .site-header__bar { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

.wordmark { display: inline-flex; align-items: flex-start; gap: .4em; font-size: .9375rem; font-weight: 500; letter-spacing: .34em; color: var(--ivory); justify-self: start; }
.wordmark__tag { margin-top: -.2em; font-size: .56em; letter-spacing: .22em; color: var(--gold); }

.nav { display: none; gap: clamp(1.6rem, 3.2vw, 3.2rem); }
.nav a { position: relative; padding-block: .5rem; font-size: .875rem; color: var(--ivory-dim); transition: color .4s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .15rem; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.nav a:hover, .nav a.is-active { color: var(--ivory); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.site-header__actions { justify-self: end; display: flex; align-items: center; gap: .8rem; }
.site-header__cta { display: none; }

.menu-toggle { position: relative; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.menu-toggle__bars i { position: absolute; left: 15px; right: 15px; height: 1.5px; background: var(--ivory); border-radius: 2px; transition: transform .6s var(--ease), top .6s var(--ease); }
.menu-toggle__bars i:first-child { top: 20px; }
.menu-toggle__bars i:last-child { top: 27px; }
.menu-toggle[aria-expanded="true"] i:first-child { top: 23.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:last-child { top: 23.5px; transform: rotate(-45deg); }

@media (min-width: 960px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
}
@media (min-width: 1100px) { .site-header__cta { display: inline-flex; } }
@media (max-width: 959px) { .site-header__bar { grid-template-columns: 1fr auto; --header-h: 68px; } }

/* mobile menu */
.menu { position: fixed; inset: 0; z-index: 90; background: rgba(8, 8, 10, .94); -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px); opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s linear .5s; }
.menu.is-open { opacity: 1; visibility: visible; transition: opacity .5s var(--ease); }
.menu__inner { height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: calc(var(--header-h) + 2.5rem) var(--gutter) calc(2rem + env(safe-area-inset-bottom)); overflow-y: auto; }
.menu__nav { display: grid; }
.menu__nav a { display: flex; align-items: baseline; gap: 1.2rem; padding: .85rem 0; border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: clamp(2.4rem, 11vw, 4rem); letter-spacing: -.03em; line-height: 1.05; opacity: 0; translate: 0 24px; transition: opacity .8s var(--ease), translate 1s var(--ease), color .4s; }
.menu__nav a:hover { color: var(--gold-bright); }
.menu__idx { font-family: var(--sans); font-size: .75rem; letter-spacing: .16em; color: var(--gold); }
.menu.is-open .menu__nav a { opacity: 1; translate: 0 0; }
.menu.is-open .menu__nav a:nth-child(1) { transition-delay: .08s; }
.menu.is-open .menu__nav a:nth-child(2) { transition-delay: .14s; }
.menu.is-open .menu__nav a:nth-child(3) { transition-delay: .2s; }
.menu.is-open .menu__nav a:nth-child(4) { transition-delay: .26s; }
.menu__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }

/* ---------- Media (responsive images + blur-up) ---------- */
.media { position: relative; overflow: hidden; background-color: var(--dominant, #151517); aspect-ratio: var(--ratio); }
.media::before { content: ""; position: absolute; inset: -6%; background: var(--lqip) center / cover; filter: blur(18px); transition: opacity .9s var(--ease); }
.media.is-loaded::before { opacity: 0; }
.media picture { display: block; width: 100%; height: 100%; }
.media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease), scale 1.6s var(--ease); }
.media.is-loaded img { opacity: 1; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; translate: 0 30px; transition: opacity 1s var(--ease) var(--d, 0s), translate 1.2s var(--ease) var(--d, 0s); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ==========================================================================
   HERO — headline flanks the can; geometry is derived from the render's
   own proportions (can occupies ~19% of the image width, centred).
   ========================================================================== */
.hero {
  --hh: max(100vh, 680px);
  --img-w: max(100vw, calc(var(--hh) * 1.8333));
  --can-w: calc(var(--img-w) * .215);
  position: relative; height: var(--hh); overflow: hidden; background: var(--ink-950); isolation: isolate;
}
@supports (height: 100svh) { .hero { --hh: max(100svh, 680px); } }
.hero__parallax { position: absolute; inset: 0; will-change: transform; }
.hero__media { position: absolute; inset: 0; }
.hero__media.media { aspect-ratio: auto; }
.hero__media img { object-position: 50% 50%; }
.js .hero__media img { scale: 1.1; }
.js .hero.is-ready .hero__media img { scale: 1; transition: opacity 1.4s var(--ease), scale 2.8s var(--ease); }

.hero__shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 8, 10, .34), transparent 34%, transparent 66%, rgba(8, 8, 10, .34)),
    linear-gradient(180deg, rgba(8, 8, 10, .62) 0, rgba(8, 8, 10, 0) 20%, rgba(8, 8, 10, 0) 72%, var(--ink-900) 100%),
    radial-gradient(120% 95% at 50% 45%, transparent 52%, rgba(8, 8, 10, .6) 100%); }
.hero__glow { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(38% 52% at 50% 50%, rgba(207, 169, 104, .1), transparent 72%), radial-gradient(60% 40% at 50% 100%, rgba(207, 169, 104, .1), transparent 70%);
  animation: glow 9s var(--ease-io) infinite alternate; }
@keyframes glow { from { opacity: .55; } to { opacity: 1; } }

.hero__inner {
  position: relative; z-index: 2; height: 100%; width: min(100% - 2 * var(--gutter), 1800px); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--can-w) minmax(0, 1fr); grid-template-rows: auto 1fr auto;
  padding: calc(var(--header-h) + clamp(12px, 2.5vh, 28px)) 0 clamp(24px, 4.5vh, 48px);
}
.hero__eyebrow { grid-column: 1 / 3; grid-row: 1; }
.hero__caption { grid-column: 3; grid-row: 1; justify-self: end; font-size: .6875rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.hero__title { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) var(--can-w) minmax(0, 1fr);
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.75rem, min(6vw, 10.5svh), 8rem); line-height: .96; letter-spacing: -.035em; text-shadow: 0 2px 40px rgba(0, 0, 0, .45); }
html:lang(es) .hero__title { font-size: clamp(2.5rem, min(5.3vw, 9.5svh), 7rem); }
.hero__left { grid-column: 1; align-self: start; padding-top: clamp(8px, 4vh, 48px); }
.hero__right { grid-column: 3; align-self: end; padding-bottom: clamp(12px, 3vh, 36px); }
.hero__line { display: block; overflow: hidden; padding: .06em .08em .12em 0; margin: -.06em 0 -.12em; white-space: nowrap; }
.hero__line > span { display: block; }
.js .hero__line > span { transform: translateY(112%); transition: transform 1.3s var(--ease) var(--d, 0s); }
.js .hero.is-ready .hero__line > span { transform: none; }

.hero__tag { position: absolute; z-index: 3; display: flex; align-items: center; gap: .55rem; font-size: .6875rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; }
.hero__tag .label { padding: .55rem .95rem; border-radius: 999px; white-space: nowrap; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hero__tag .line { width: clamp(24px, 4vw, 64px); height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero__tag--b .line { transform: scaleX(-1); }
.hero__tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(207, 169, 104, .22); }
.hero__tag--a { right: calc(50% + var(--can-w) / 2 - 8px); top: 64%; }
.hero__tag--b { left: calc(50% + var(--can-w) / 2 - 8px); top: 27%; }
.js .hero__tag { opacity: 0; translate: 0 12px; transition: opacity 1.1s var(--ease) var(--d, 1s), translate 1.3s var(--ease) var(--d, 1s); }
.js .hero.is-ready .hero__tag { opacity: 1; translate: 0 0; }
.hero__tag { transform: translate3d(calc(var(--mx, 0) * 12px), calc(var(--my, 0) * 8px), 0); transition-property: opacity, translate; }

.hero__foot { grid-column: 1; grid-row: 3; align-self: end; display: grid; gap: 1.5rem; max-width: 34rem; }
.hero__sub { font-size: clamp(1rem, .9rem + .4vw, 1.25rem); line-height: 1.5; color: var(--ivory-dim); max-width: 28ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero__scroll { position: absolute; right: 0; bottom: clamp(24px, 4.5vh, 48px); display: flex; align-items: center; gap: .9rem; font-size: .6875rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); transition: color .4s; }
.hero__scroll:hover { color: var(--ivory); }
.hero__scroll-line { position: relative; width: 56px; height: 1px; background: rgba(242, 237, 227, .22); overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: translateX(-101%); animation: cue 2.8s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: translateX(-101%); } 55% { transform: translateX(0); } 100% { transform: translateX(101%); } }

.js .hero__eyebrow, .js .hero__caption, .js .hero__foot, .js .hero__scroll { opacity: 0; translate: 0 14px; transition: opacity 1s var(--ease) .15s, translate 1.2s var(--ease) .15s; }
.js .hero__foot { transition-delay: .7s; }
.js .hero__scroll { transition-delay: 1.3s; }
.js .hero.is-ready .hero__eyebrow, .js .hero.is-ready .hero__caption, .js .hero.is-ready .hero__foot, .js .hero.is-ready .hero__scroll { opacity: 1; translate: 0 0; }

/* hero: stacked layout for phones, tablets and any narrow window */
@media (max-width: 899px), (max-aspect-ratio: 11/10) {
  .hero { --m-img-h: min(60svh, 720px); height: auto; min-height: 100svh; background: var(--ink-900); }
  @supports not (height: 100svh) { .hero { --m-img-h: min(60vh, 720px); min-height: 100vh; } }
  .hero__parallax { inset: 0 0 auto 0; height: var(--m-img-h); }
  .hero__shade { background: linear-gradient(180deg, rgba(8, 8, 10, .55) 0, transparent 150px, transparent calc(var(--m-img-h) - 190px), var(--ink-900) calc(var(--m-img-h) + 4px)); }
  .hero__glow { height: var(--m-img-h); bottom: auto; }
  .hero__inner { display: flex; flex-direction: column; justify-content: flex-end; gap: 1.4rem; height: auto; min-height: 100svh; padding-top: calc(var(--m-img-h) - 52px); padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
  .hero__caption, .hero__tag, .hero__scroll { display: none; }
  .hero__title { display: block; font-size: clamp(2.7rem, 12.5vw, 6rem); }
  html:lang(es) .hero__title { font-size: clamp(2.45rem, 11vw, 5.4rem); }
  .hero__left, .hero__right { padding: 0; }
  .hero__line { white-space: normal; }
  .hero__foot { max-width: none; gap: 1.3rem; }
  .hero__sub { max-width: 34ch; }
}

/* ==========================================================================
   WORK
   ========================================================================== */
.work { background: var(--ink-900); overflow: clip; }
.work::before { content: ""; position: absolute; top: 0; right: -10%; width: 60%; height: 520px; pointer-events: none; background: radial-gradient(closest-side, rgba(207, 169, 104, .09), transparent); }

.work__grid { display: grid; gap: clamp(56px, 8vw, 112px) 0; }
.work__item { position: relative; min-width: 0; }
.work__card { position: relative; display: block; width: 100%; text-align: left; border-radius: var(--r-lg); }
.work__frame { border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9); transition: border-color .6s var(--ease), box-shadow .6s var(--ease); }
.work__frame picture { scale: 1.08; will-change: transform; }
.js .work__item:not(.in) .work__frame img { scale: 1.1; }
.work__card:hover .work__frame, .work__card:focus-visible .work__frame { border-color: rgba(207, 169, 104, .55); box-shadow: 0 50px 110px -40px rgba(0, 0, 0, .95), 0 0 80px -30px rgba(207, 169, 104, .35); }
.work__card:hover .work__frame img, .work__card:focus-visible .work__frame img { scale: 1.045; }
.work__card:focus-visible { outline-offset: 6px; border-radius: calc(var(--r-lg) + 4px); }
.work__chip { position: absolute; left: 16px; top: 16px; z-index: 2; background: rgba(13, 13, 15, .55); border-color: rgba(255, 255, 255, .22); }
.work__view { position: absolute; right: 16px; bottom: 16px; z-index: 2; display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; border-radius: 999px; font-size: .8125rem; font-weight: 500; color: var(--ink-950); background: var(--ivory); opacity: 0; translate: 0 10px; transition: opacity .5s var(--ease), translate .6s var(--ease), background-color .4s; }
.work__card:hover .work__view, .work__card:focus-visible .work__view { opacity: 1; translate: 0 0; }
@media (hover: none) { .work__view { opacity: 1; translate: 0 0; padding: .55rem .9rem; } }

.work__meta { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.1rem; margin-top: 1.4rem; align-items: baseline; }
.work__num { font-size: .75rem; font-weight: 500; letter-spacing: .16em; color: var(--gold); }
.work__title { font-family: var(--serif); font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.05; letter-spacing: -.025em; }
.work__cat { grid-column: 2; font-size: .6875rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ivory-dim); }
.work__desc { grid-column: 2; max-width: 46ch; font-size: .9375rem; line-height: 1.55; }

/* small screens: single column, portraits staggered left/right and capped (they are low-res files) */
.work__item.is-portrait { width: min(100%, 440px); }
.work__item.is-portrait:nth-child(even) { margin-left: auto; }

@media (min-width: 1024px) {
  .work__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); }
  .work__item.is-portrait { width: auto; }
  .work__item:nth-child(6n+1) { grid-column: 1 / span 8; align-self: end; }
  .work__item:nth-child(6n+2) { grid-column: 9 / span 4; }
  .work__item:nth-child(6n+3) { grid-column: 3 / span 10; }
  .work__item:nth-child(6n+4) { grid-column: 1 / span 3; align-self: start; }
  .work__item:nth-child(6n+5) { grid-column: 4 / span 6; align-self: center; }
  .work__item:nth-child(6n+6) { grid-column: 10 / span 3; align-self: end; }
}
@media (max-width: 1023px) and (min-width: 600px) { .work__item.is-portrait { width: min(62%, 440px); } }
/* phones: landscape renders get a 4:5 crop around their focal point so the product stays large */
@media (max-width: 599px) {
  .work__item:not(.is-portrait) .work__frame.media { aspect-ratio: 4 / 5; }
  .work__item:not(.is-portrait) .work__frame img { object-position: var(--pos-m, 50% 50%); }
}

/* ==========================================================================
   SERVICES (light panel for editorial rhythm)
   ========================================================================== */
.services {
  --text: var(--ink-900); --text-muted: rgba(18, 18, 20, .66); --rule: rgba(18, 18, 20, .16); --accent: var(--gold-ink);
  position: relative; margin-inline: clamp(8px, 1.4vw, 24px); padding-block: var(--section-y); border-radius: clamp(28px, 4vw, 56px);
  background: var(--paper); color: var(--text);
}
.services .eyebrow { color: var(--gold-ink); }
.services .h2 em { color: var(--gold-ink); }
.services p { color: var(--text-muted); }

.services__layout { display: grid; gap: 2rem; }
.services__panel { display: none; }
.service { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0 1rem; padding-block: clamp(28px, 5vh, 56px); border-top: 1px solid var(--rule); }
.service:last-child { border-bottom: 1px solid var(--rule); }
.service__num { padding-top: .5rem; font-size: .75rem; font-weight: 500; letter-spacing: .16em; color: var(--gold-ink); }
.service__title { font-family: var(--serif); font-size: clamp(1.75rem, 1rem + 2.6vw, 3.1rem); line-height: 1.04; letter-spacing: -.028em; text-wrap: balance; }
.service__thumb { margin-top: 1.4rem; border-radius: var(--r-md); aspect-ratio: 4 / 3; }
.service__thumb.media { aspect-ratio: 4 / 3; }
.service__desc { margin-top: 1.2rem; max-width: 46ch; font-size: 1.0625rem; line-height: 1.55; color: var(--ink-900); opacity: .8; }
.service__tags { margin-top: 1.1rem; font-size: .6875rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; }

@media (min-width: 1000px) {
  .services__layout { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 110px); align-items: start; }
  .services__panel { display: block; position: sticky; top: calc(var(--header-h) + 3vh); aspect-ratio: 4 / 5; max-height: calc(100vh - var(--header-h) - 6vh); width: 100%; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-850); box-shadow: 0 50px 100px -50px rgba(0, 0, 0, .6); }
  .services__stage { position: absolute; inset: 0; }
  .svc-layer { position: absolute; inset: 0; opacity: 0; scale: 1.07; transition: opacity 1s var(--ease), scale 1.6s var(--ease); }
  .svc-layer.is-active { opacity: 1; scale: 1; }
  .svc-layer.media { aspect-ratio: auto; }
  .services__label { position: absolute; left: 16px; bottom: 16px; right: 16px; z-index: 2; display: flex; align-items: center; gap: .9rem; width: fit-content; max-width: calc(100% - 32px); padding: .65rem 1.1rem; border-radius: 999px; font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ivory); background: rgba(13, 13, 15, .55); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .services__label span:first-child { color: var(--gold); }
  .services__label span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .service { min-height: 38vh; opacity: .38; transition: opacity .7s var(--ease); align-content: start; }
  .service.is-active { opacity: 1; }
  .service__thumb { display: none; }
}

/* ==========================================================================
   PROCESS
   ========================================================================== */
.process { background: var(--ink-950); }
.process::after { content: ""; position: absolute; left: -10%; bottom: -10%; width: 55%; height: 60%; pointer-events: none; background: radial-gradient(closest-side, rgba(207, 169, 104, .08), transparent); }
.process__steps { display: grid; gap: clamp(32px, 4vw, 56px) clamp(20px, 3vw, 48px); position: relative; z-index: 1; }
.step { position: relative; padding-top: 1.7rem; border-top: 1px solid var(--line); }
.step::before { content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--gold); }
.js .step::before { transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease) calc(var(--d, 0s) + .25s); }
.js .step.in::before { transform: scaleX(1); }
.step__num { display: block; font-family: var(--serif); font-style: italic; font-size: clamp(2.75rem, 2rem + 2.4vw, 4.25rem); line-height: 1; color: var(--gold); letter-spacing: -.03em; }
.step__title { margin: 1.3rem 0 .8rem; font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); letter-spacing: -.02em; line-height: 1.1; }
.step p { max-width: 34ch; font-size: .9688rem; line-height: 1.6; }
@media (min-width: 640px) { .process__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .process__steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { background: var(--ink-900); overflow: clip; }
.about::before { content: ""; position: absolute; left: -5%; top: 10%; width: 55%; aspect-ratio: 1; pointer-events: none; background: radial-gradient(closest-side, rgba(36, 168, 112, .07), transparent 70%); }
.about__grid { display: grid; gap: clamp(48px, 7vw, 120px); align-items: center; position: relative; }
.about__visual { position: relative; aspect-ratio: 4 / 5; width: min(100%, 620px); }
.about__img { position: absolute; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: 0 40px 90px -35px rgba(0, 0, 0, .95); will-change: transform; }
.about__img--back { left: 0; bottom: 0; width: 54%; }
.about__img--front { right: 0; top: 0; width: 56%; z-index: 1; }
.about__caption { position: absolute; right: 0; bottom: 4%; z-index: 2; }
.about__text { display: grid; gap: 1.4rem; align-content: center; }
.about__text .h2 { margin-bottom: .4rem; }
.about__text > p:not(.lead):not(.eyebrow) { max-width: 52ch; }
.about__text .lead { max-width: 52ch; }
.principles { display: grid; gap: 1.6rem 2rem; margin-top: 1.6rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.principles h3 { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -.02em; color: var(--ivory); margin-bottom: .45rem; }
.principles p { font-size: .9375rem; line-height: 1.55; }
@media (min-width: 720px) { .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .about__grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); } }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { isolation: isolate; overflow: clip; background: var(--ink-900); }
.contact__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.contact__bg-inner { position: absolute; inset: -5% 0; opacity: .42; will-change: transform; }
.contact__bg-inner.media { aspect-ratio: auto; }
.contact__bg::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, var(--ink-900) 0, rgba(13, 13, 15, .5) 28%, rgba(13, 13, 15, .68) 72%, var(--ink-900) 100%),
  linear-gradient(90deg, rgba(13, 13, 15, .85) 0, rgba(13, 13, 15, .2) 60%, rgba(13, 13, 15, .5) 100%); }
.contact__grid { display: grid; gap: clamp(36px, 5vw, 80px); align-items: center; }
.contact__intro { display: grid; gap: 1.5rem; align-content: start; }
.contact__intro .lead { max-width: 40ch; }
.contact__direct { font-size: .9375rem; }
.contact__direct .link { word-break: break-all; }

.form { display: grid; gap: 1.2rem; padding: clamp(22px, 3vw, 40px); border-radius: var(--r-xl); border: 1px solid var(--line-strong); background: rgba(19, 19, 22, .58); -webkit-backdrop-filter: blur(24px) saturate(1.15); backdrop-filter: blur(24px) saturate(1.15); box-shadow: 0 50px 120px -50px rgba(0, 0, 0, .9); }
.form__row { display: grid; gap: 1.2rem; }
.field { display: grid; gap: .5rem; align-content: start; min-width: 0; }
.field label { font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ivory-dim); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: .9rem 1.05rem; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .04); color: var(--ivory); font-size: 1rem; transition: border-color .4s var(--ease), background-color .4s var(--ease); }
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: rgba(242, 237, 227, .38); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(242, 237, 227, .34); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-color: var(--gold); background: rgba(255, 255, 255, .06); }
.field [aria-invalid="true"] { border-color: #e3866c; }
.field__error { font-size: .8125rem; color: #ffb4a0; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 2.6rem; cursor: pointer; }
.select select:invalid { color: rgba(242, 237, 227, .5); }
.select option { background: #19191d; color: var(--ivory); }
.select svg { position: absolute; right: 1.05rem; top: 50%; translate: 0 -50%; pointer-events: none; color: var(--ivory-dim); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: .4rem; }
.form__status { flex: 1 1 240px; min-height: 1.5em; font-size: .875rem; line-height: 1.5; }
.form__status.is-ok { color: var(--gold-bright); }
.form__status.is-error { color: #ffb4a0; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .contact__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { position: relative; overflow: hidden; background: var(--ink-950); border-top: 1px solid var(--line); padding-top: clamp(56px, 8vw, 110px); }
.footer__word { font-family: var(--serif); font-size: clamp(4.5rem, 21vw, 21rem); line-height: .78; letter-spacing: -.045em; color: transparent; -webkit-text-stroke: 1px rgba(242, 237, 227, .16); user-select: none; margin: 0 0 clamp(36px, 5vw, 72px) -.04em; white-space: nowrap; }
.footer__grid { display: grid; gap: 2.4rem 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer__brand { grid-column: 1 / -1; display: grid; gap: 1rem; align-content: start; }
.footer__col { display: grid; gap: .65rem; align-content: start; justify-items: start; font-size: .9375rem; }
.footer__col a { color: var(--ivory-dim); transition: color .4s; }
.footer__col a:hover { color: var(--gold-bright); }
.footer__col p { font-size: .9375rem; }
.footer__h { margin-bottom: .6rem; font-family: var(--sans); font-size: .6875rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.footer__bottom { display: grid; gap: 1.2rem; margin-top: clamp(40px, 6vw, 80px); padding-block: 1.6rem calc(2rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: .8125rem; }
.footer__bottom p { font-size: .8125rem; }
.footer__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.footer__top { display: inline-flex; align-items: center; gap: .6rem; color: var(--ivory-dim); font-size: .8125rem; transition: color .4s; }
.footer__top:hover { color: var(--gold-bright); }
@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .footer__brand { grid-column: auto; }
  .footer__bottom { grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; }
  .footer__note { text-align: center; }
}

/* ==========================================================================
   PROJECT VIEWER (native <dialog>)
   ========================================================================== */
.viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: clamp(10px, 2.4vw, 32px); border: 0; background: rgba(6, 6, 8, .84); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); color: var(--ivory); opacity: 0; transition: opacity .35s var(--ease); overflow: hidden; z-index: 400; }
.viewer[open] { display: grid; place-items: center; }
.viewer.is-open { opacity: 1; }
.viewer::backdrop { background: transparent; }
.viewer__panel { position: relative; display: grid; gap: 1.4rem; width: min(1320px, 100%); max-height: 100%; overflow: auto; padding: clamp(14px, 2vw, 24px); border-radius: var(--r-xl); border: 1px solid var(--line-strong); background: rgba(20, 20, 23, .82); box-shadow: 0 60px 140px -40px rgba(0, 0, 0, .95); translate: 0 18px; scale: .985; transition: translate .7s var(--ease), scale .7s var(--ease); overscroll-behavior: contain; }
.viewer.is-open .viewer__panel { translate: 0 0; scale: 1; }
.viewer__close { position: absolute; right: 14px; top: 14px; z-index: 3; background: rgba(13, 13, 15, .6); }
.viewer__stage { display: grid; place-items: center; min-height: 0; transition: opacity .25s var(--ease), translate .25s var(--ease); }
.viewer__stage.is-swapping { opacity: 0; translate: 0 8px; }
.viewer__stage picture { display: block; max-width: min(100%, var(--nat-w, 1280px)); }
.viewer__stage img { width: auto; height: auto; max-width: 100%; max-height: 62vh; border-radius: var(--r-md); border: 1px solid var(--line); }
.viewer__meta { display: grid; gap: .8rem; align-content: end; padding: .4rem .4rem .6rem; }
.viewer__count { font-size: .75rem; font-weight: 500; letter-spacing: .16em; color: var(--muted); }
.viewer__cat.eyebrow { font-size: .6875rem; }
.viewer__title { font-family: var(--serif); font-size: clamp(2rem, 1.4rem + 2.2vw, 3.4rem); letter-spacing: -.03em; line-height: 1.02; }
.viewer__desc { font-size: .9688rem; line-height: 1.6; }
.viewer__concept { width: fit-content; margin-top: .4rem; }
.viewer__nav { display: flex; gap: .7rem; margin-top: 1rem; }
@media (min-width: 900px) {
  .viewer__panel { grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: stretch; }
  .viewer__stage img { max-height: 80vh; }
  .viewer__meta { padding: 1rem 1rem 1rem 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .hero__eyebrow, .js .hero__caption, .js .hero__foot, .js .hero__scroll, .js .hero__tag { opacity: 1; translate: none; }
  .js .hero__line > span { transform: none; }
  .js .hero__media img, .js .work__item:not(.in) .work__frame img { scale: 1; }
  .js .step::before { transform: none; }
  .hero__glow { animation: none; }
}
