/* ==========================================================================
   Austerio — artistic direction
   Palette, type and shapes come from the Figma file "Artistic direction":
   near-black ground, cream text, vermilion / cobalt / sun-yellow taken from
   the paintings; Instrument Serif italic + Syne ExtraBold + Inter;
   tilted paintings, coloured discs, thin "halo" ellipses (echo of the A with
   a halo), a scrolling yellow band, a museum label that looks like a sticker.
   ========================================================================== */

:root {
  --night: #12100F;
  --cream: #F3E9D8;
  --vermilion: #F2582B;   /* Figma uses #E4491B; slightly lighter here so small dark text passes 4.5:1 */
  --cobalt: #1D3FBF;
  --sun: #F5B61B;
  --paper: #FAF9F6;
  --ink-soft: #4A4741;

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --display: 'Syne', 'Arial Black', Impact, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Design unit: 1u = 1 Figma pixel on a 1440 px wide frame. */
  --u: calc(min(100vw, 1440px) / 1440);
  --gutter: 40px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font: 400 15px/1.6 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; }
::selection { background: var(--sun); color: var(--night); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--sun); color: var(--night); padding: 10px 16px; font-weight: 500; }
.skip:focus { top: 12px; }

.eyebrow { font: 500 12px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.u-link { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s var(--ease); }
.u-link:hover, .u-link[aria-current="page"] { background-size: 100% 1px; }

/* -------------------------------------------------------------------------
   Header (fixed; blend mode keeps it readable on every coloured section)
   ------------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px var(--gutter);
  color: var(--cream);
  mix-blend-mode: difference;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 26px; height: 40px; overflow: visible; }
.brand__mark ellipse { fill: none; stroke: currentColor; stroke-width: 1.1; }
.brand__mark text { font-family: var(--serif); font-size: 30px; fill: currentColor; }
.brand__name { font: 500 12px/1 var(--sans); letter-spacing: .24em; transition: letter-spacing .5s var(--ease); }
.brand__mark ellipse { transform-box: fill-box; transform-origin: center; transform: rotate(-8deg); }
/* hover: only the name opens up */
.brand:hover .brand__name, .brand:focus-visible .brand__name { letter-spacing: .36em; }
.nav { display: flex; align-items: center; gap: 40px; font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.lang { display: flex; align-items: center; gap: 6px; opacity: .75; }
.lang button { font: inherit; letter-spacing: inherit; text-transform: inherit; padding: 6px 2px; opacity: .6; }
.lang button[aria-pressed="true"] { opacity: 1; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; }
.lang:hover { opacity: 1; }
.burger { display: none; width: 44px; height: 44px; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 26px; }

/* -------------------------------------------------------------------------
   Sections and themes
   ------------------------------------------------------------------------- */
.sec { position: relative; overflow: hidden; }
.sec--night { background: var(--night); color: var(--cream); }
.sec--cobalt { background: var(--cobalt); color: var(--cream); }
.sec--sun { background: var(--sun); color: var(--night); }
.sec--vermilion { background: var(--vermilion); color: var(--night); }

/* The "stage": a 1440 u wide canvas on which pieces are placed by --x --y --w
   (desktop) and --mx --my --mw (mobile). It scales with the window. */
.stage { position: relative; width: calc(1440 * var(--u)); height: calc(var(--h) * var(--u)); margin: 0 auto; }
.item, .deco {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  transform: rotate(var(--r, 0deg));
  translate: var(--tx, 0px) var(--ty, 0px);
  transition: transform .5s var(--ease), translate .6s var(--ease);
}
.item--text { font-size: max(calc(var(--fs, 15) * var(--u)), 13px); }
.item--text.eyebrow { font-size: 12px; }
.deco { pointer-events: none; }
.disc { aspect-ratio: 1; border-radius: 50%; background: var(--c); }
.halo { height: calc(var(--hh) * var(--u)); border-radius: 50%; border: 1.5px solid var(--c, var(--cream)); }
.d-sun { --c: var(--sun); } .d-cobalt { --c: var(--cobalt); } .d-vermilion { --c: var(--vermilion); } .d-night { --c: var(--night); } .d-cream { --c: var(--cream); }

/* paintings */
.art { display: block; }
.art img { width: 100%; box-shadow: 0 calc(14 * var(--u)) calc(34 * var(--u)) rgba(0, 0, 0, .42); background: #2a2623; }
a.art:hover, a.art:focus-visible { transform: rotate(0deg) scale(1.035); z-index: 5; }
.art__label { display: block; margin-top: 16px; }
.lbl { display: block; font: 500 11px/1.5 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.lbl-sub { display: block; font: 400 11px/1.5 var(--sans); opacity: .75; }

/* museum label, as a sticker */
.caption { background: var(--paper); color: var(--night); padding: 20px 22px 22px; box-shadow: 0 16px 36px rgba(0, 0, 0, .4); }
.caption__title { font: italic 400 28px/1.05 var(--serif); }
.caption__meta { margin-top: 14px; font: 400 13px/1.7 var(--sans); color: var(--ink-soft); }
a.caption:hover { transform: rotate(0deg) scale(1.04); }

/* orbiting works: positioned by JS through `translate` (GPU), never animated by CSS */
.is-orbiting { transition: transform .5s var(--ease); will-change: translate; backface-visibility: hidden; }

/* end of the works wall */
.end-cta { text-align: center; }
.end-cta .pill { min-height: 56px; padding: 0 36px; font-size: 13px; }
.end-cta .pill--sun:hover { background: var(--cream); border-color: var(--cream); }

/* hero button: a rotating stamp */
.cta { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--cream); color: var(--night); box-shadow: 0 14px 34px rgba(0, 0, 0, .4); z-index: 6; transition: transform .5s var(--ease), background .3s, box-shadow .3s; }
.cta::before { content: ""; position: absolute; inset: 27%; border-radius: 50%; border: 1.5px solid var(--night); opacity: .9; }
.cta__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: ctaSpin 22s linear infinite; }
.cta__ring text { font: 700 15px var(--display); letter-spacing: .08em; text-transform: uppercase; fill: var(--night); }
.cta__arrow { font: italic 400 calc(64 * var(--u)) / 1 var(--serif); transition: transform .5s var(--ease); }
.cta:hover, .cta:focus-visible { transform: rotate(0deg) scale(1.08); background: var(--sun); }
.cta:hover .cta__arrow, .cta:focus-visible .cta__arrow { transform: translateX(8px); }
@keyframes ctaSpin { to { transform: rotate(360deg); } }

/* pills */
.pill {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px;
  border: 1.5px solid currentColor; border-radius: 40px;
  font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  transition: transform .25s var(--ease), background-color .25s, color .25s;
}
.pill:hover { transform: translateY(-2px) rotate(-1deg); }
.pill--night { background: var(--night); border-color: var(--night); color: var(--cream); min-height: 56px; padding: 0 36px; font-size: 13px; }
.pill--night:hover { background: var(--cream); border-color: var(--cream); color: var(--night); }
.pill--sun { background: var(--sun); border-color: var(--sun); color: var(--night); }
.pill[aria-pressed="true"] { background: var(--cream); border-color: var(--cream); color: var(--night); }

/* scrolling band */
.band { overflow: hidden; padding: 18px 0; background: var(--sun); color: var(--night); }
.band__track { display: inline-block; white-space: nowrap; font: 800 48px/1.1 var(--display); animation: slide 32s linear infinite; }
@keyframes slide { to { transform: translateX(-50%); } }

/* reveal on scroll (opacity + scale only, so rotation / translate keep working) */
.js .reveal { opacity: 0; scale: .96; transition: opacity .8s var(--ease), scale .8s var(--ease), transform .5s var(--ease), translate .6s var(--ease); }
.js .reveal.in { opacity: 1; scale: 1; }

/* -------------------------------------------------------------------------
   Home — hero
   ------------------------------------------------------------------------- */
.hero__tag { position: absolute; z-index: 7; left: calc(40 * var(--u)); top: calc(130 * var(--u)); font: 500 12px/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.hero__name {
  position: absolute; left: calc(40 * var(--u)); bottom: calc(70 * var(--u)); z-index: 4;
  font: 800 calc(160 * var(--u))/.82 var(--display); letter-spacing: -.03em; text-transform: uppercase; white-space: nowrap;
}
.hero__count, .hero__scroll { position: absolute; bottom: calc(40 * var(--u)); font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.hero__count { left: calc(40 * var(--u)); }
.hero__scroll { right: calc(40 * var(--u)); }

/* -------------------------------------------------------------------------
   Page heads (works / work detail)
   ------------------------------------------------------------------------- */
.page-title { font: italic 400 clamp(88px, 11.8vw, 170px)/1 var(--serif); }
.wrap { position: relative; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

/* works page */
.works-head { padding-top: 130px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; }
.works-count { font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding-bottom: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; padding: 36px 0 56px; }
.grid { columns: 2; column-gap: 64px; padding-bottom: 150px; }
.card { display: block; break-inside: avoid; margin: 0 0 64px; transform: perspective(900px) rotate(var(--r, 0deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .45s var(--ease), filter .5s var(--ease); }
.card .card__meta { transition: transform .5s var(--ease), letter-spacing .5s var(--ease); }
@media (hover: hover) {
  .grid:has(.card:hover) .card:not(:hover) { filter: grayscale(.7) brightness(.55) blur(1.5px); }
  .card:hover, .card:focus-visible { transform: perspective(900px) rotate(0deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-14px) scale(1.06); position: relative; z-index: 3; transition: transform .2s ease-out, filter .5s var(--ease); }
  .card:hover .card__img { box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 0 1.5px var(--sun); }
  .card:hover .card__meta { transform: translateX(10px); }
}
.card__img { display: block; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, .5); background: #2a2623; transition: box-shadow .5s var(--ease); }
.card__img img { width: 100%; transition: transform .8s var(--ease); }
.card:hover .card__img img { transform: scale(1.05); }
.card__meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; }
.card__year { font: 400 11px/1.5 var(--sans); opacity: .75; }
.grid-empty { padding: 60px 0 160px; font: italic 400 32px/1.2 var(--serif); }

/* -------------------------------------------------------------------------
   Work detail
   ------------------------------------------------------------------------- */
.viewer { padding-top: 120px; }
.viewer .deco { position: absolute; }
.viewer__back { display: inline-block; margin: 0 0 24px; opacity: .85; }
.viewer__stage { display: flex; flex-wrap: wrap; gap: 56px; padding-bottom: 110px; position: relative; }
.viewer__pic { flex: 0 1 600px; min-width: 280px; }
.viewer__pic img { width: 100%; transform: rotate(-2deg); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.viewer__info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; padding-top: 16px; }
.work-title { font: italic 400 clamp(64px, 9.5vw, 140px)/.92 var(--serif); }
.viewer__desc { max-width: 380px; opacity: .92; }
.viewer__caption { align-self: flex-end; width: min(340px, 100%); margin: 28px 24px 0 0; transform: rotate(2deg); }
.viewer__nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }

.about-work { padding-block: 76px 100px; display: flex; flex-wrap: wrap; gap: 56px; position: relative; }
.about-work__text { flex: 1 1 560px; min-width: 0; }
.about-work__lead { margin-top: 32px; max-width: 820px; font: italic 400 clamp(36px, 5vw, 72px)/1.08 var(--serif); }
.facts { margin-top: 64px; max-width: 560px; font-size: 14px; }
.facts div { display: flex; gap: 24px; padding: 16px 0; border-top: 1px solid rgba(243, 233, 216, .5); }
.facts dt { width: 170px; flex: none; }
.about-work__detail { flex: 0 1 300px; margin: 0 auto; transform: rotate(4deg); }
.detail-img { aspect-ratio: 4 / 5; background-size: 260%; background-position: 30% 35%; background-repeat: no-repeat; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.about-work__detail figcaption { margin-top: 14px; }

.more-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 68px; }
.more-title { font: italic 400 clamp(56px, 9vw, 130px)/1 var(--serif); }
.more { display: flex; flex-wrap: wrap; gap: 48px; padding: 40px 0 130px; align-items: flex-start; position: relative; }
.more .art { flex: 1 1 220px; min-width: 200px; }
.more .art:nth-child(1) { --r: -2deg; margin-top: 40px; }
.more .art:nth-child(2) { --r: 2deg; margin-top: 120px; }
.more .art:nth-child(3) { --r: -1.5deg; margin-top: 20px; }
.more .art:nth-child(4) { --r: 3deg; margin-top: 140px; }
/* home works wall: same hover as below */
#works .art { transform: perspective(900px) rotate(var(--r, 0deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .45s var(--ease), filter .5s var(--ease), opacity .8s var(--ease), scale .8s var(--ease); }
#works .art img { transition: box-shadow .5s var(--ease); }
#works .art .art__label { transition: transform .5s var(--ease), letter-spacing .5s var(--ease); }
@media (hover: hover) {
  #works .stage:has(.art:hover) .art:not(:hover) { filter: grayscale(.7) brightness(.55) blur(1.5px); }
  #works a.art:hover, #works a.art:focus-visible { transform: perspective(900px) rotate(0deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-14px) scale(1.07); transition: transform .2s ease-out, filter .5s var(--ease), opacity .8s var(--ease), scale .8s var(--ease); }
  #works .art:hover img { box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 0 1.5px var(--sun); }
  #works .art:hover .art__label { transform: translateX(10px); letter-spacing: .04em; }
}
/* hover: the work lifts and tilts toward the mouse, the others step back */
.more .art { transform: perspective(900px) rotate(var(--r, 0deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .45s var(--ease), filter .5s var(--ease), opacity .8s var(--ease), scale .8s var(--ease); }
.more .art img { transition: box-shadow .5s var(--ease); }
.more .art .art__label { transition: transform .5s var(--ease), letter-spacing .5s var(--ease); }
@media (hover: hover) {
  .more:has(.art:hover) .art:not(:hover) { filter: grayscale(.7) brightness(.55) blur(1.5px); }
  .more a.art:hover, .more a.art:focus-visible { transform: perspective(900px) rotate(0deg) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-14px) scale(1.07); transition: transform .2s ease-out, filter .5s var(--ease), opacity .8s var(--ease), scale .8s var(--ease); }
  .more .art:hover img { box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 0 1.5px var(--sun); }
  .more .art:hover .art__label { transform: translateX(10px); letter-spacing: .04em; }
}

.next-block { position: relative; }
.next-block .wrap { padding-top: 64px; padding-bottom: 40px; }
.next-link { display: block; margin-top: 16px; font: italic 400 clamp(56px, 11.5vw, 170px)/1 var(--serif); }
.foot { margin-top: 72px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font: 400 13px/1.5 var(--sans); }

/* -------------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------------- */
.say { font-family: var(--serif); font-style: italic; font-weight: 400; line-height: 1; }
.wall-title { font: italic 400 calc(170 * var(--u))/1 var(--serif); }
.about__statement { font-family: var(--serif); font-style: italic; font-weight: 400; line-height: 1.07; }
.mail { background-color: var(--sun); white-space: nowrap; font: 800 1em/1.15 var(--display); letter-spacing: -.02em; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; display: inline-block; }
.mail:hover { text-decoration-color: transparent; }
.rows { font-size: 13px; }
.rows div { display: flex; gap: 24px; padding: 13px 0; border-top: 1px solid rgba(18, 16, 15, .55); }
.rows dt { width: 110px; flex: none; }
.rows a:hover { text-decoration: underline; }
.stage-foot { position: absolute; left: calc(40 * var(--u)); right: calc(40 * var(--u)); bottom: calc(40 * var(--u)); display: flex; justify-content: space-between; font: 400 12px/1.5 var(--sans); }

/* -------------------------------------------------------------------------
   Mobile (design redrawn on a 430 u wide canvas)
   ------------------------------------------------------------------------- */
@media (max-width: 820px) {
  :root { --u: calc(100vw / 430); --gutter: 20px; }
  .stage { width: 100%; height: calc(var(--mh, var(--h)) * var(--u)); }
  .item, .deco {
    left: calc(var(--mx, var(--x)) * var(--u));
    top: calc(var(--my, var(--y)) * var(--u));
    width: calc(var(--mw, var(--w)) * var(--u));
    transform: rotate(var(--mr, var(--r, 0deg)));
  }
  .item--text { font-size: max(calc(var(--mfs, var(--fs, 15)) * var(--u)), 13px); }
  .halo { height: calc(var(--mhh, var(--hh)) * var(--u)); }
  .m-hide { display: none !important; }

  .site-header { padding: 14px var(--gutter); }
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: flex-start; gap: 22px;
    padding: 0 var(--gutter); background: var(--night); color: var(--cream);
    font: italic 400 56px/1.1 var(--serif); letter-spacing: 0; text-transform: none;
    opacity: 0; visibility: hidden; transition: opacity .3s;
  }
  .lang { font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: 1; margin-top: 16px; }
  .site-header.is-open { mix-blend-mode: normal; }
  .site-header.is-open .nav { opacity: 1; visibility: visible; }
  .site-header.is-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
  .site-header.is-open .burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

  .hero__tag { top: calc(76 * var(--u)); left: calc(20 * var(--u)); }
  .hero__name { font-size: calc(45 * var(--u)); left: calc(20 * var(--u)); bottom: calc(70 * var(--u)); }
  .hero__count { display: none; }
  .hero__scroll { right: calc(20 * var(--u)); bottom: calc(30 * var(--u)); }

  .band__track { font-size: 32px; }
  .caption { padding: 14px 16px 16px; }
  .caption__title { font-size: 22px; }
  .caption__meta { font-size: 12px; margin-top: 10px; }

  /* collage walls become two flowing columns */
  .stage--flow { width: 100%; height: auto; padding: 0 var(--gutter) 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px 20px; align-items: start; }
  .stage--flow .item { position: static; width: auto; translate: none; }
  .stage--flow .item--head { grid-column: 1 / -1; }
  .stage--flow .deco { display: none; }

  .page-title { font-size: clamp(76px, 24vw, 120px); }
  .works-head { padding-top: 104px; }
  .grid { columns: 2; column-gap: 20px; }
  .card { margin-bottom: 36px; }
  .card__meta { flex-direction: column; gap: 0; }
  .viewer { padding-top: 90px; }
  .viewer__stage { gap: 32px; padding-bottom: 72px; }
  .viewer__caption { margin-right: 0; align-self: flex-start; }
  .about-work { padding-block: 56px 72px; gap: 40px; }
  .facts dt { width: 120px; }
  .more { gap: 28px; padding-bottom: 80px; }
  .more .art { flex: 1 1 140px; min-width: 130px; margin-top: 0 !important; }
  .rows dt { width: 90px; }
  .stage-foot { flex-direction: column; gap: 6px; left: calc(20 * var(--u)); right: auto; bottom: calc(24 * var(--u)); }
  .wall-title { font-size: calc(104 * var(--u)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .band__track, .cta__ring { animation: none; }
  .brand__name { transition: none; }
  .js .reveal { opacity: 1; scale: 1; transition: none; }
  .item, .deco, .card, .pill { transition: none; }
}
