/* Antonella Morrone · Fotografia · 2026 */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f4f0e9;
  --paper-2: #e9e3d8;
  --ink: #161412;
  --ink-2: #5f5850;
  --line: color-mix(in oklab, var(--ink) 15%, transparent);
  --accent: #a33d1f;
  --on-accent: #fbf6ef;

  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1520px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11100e;
    --paper-2: #1c1a17;
    --ink: #efe9e0;
    --ink-2: #a8a095;
    --accent: #e3876a;
    --on-accent: #1d0e07;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 350;
  font-size: clamp(1rem, .96rem + .18vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.01em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.section { padding-block: clamp(80px, 12vw, 190px); }
.eyebrow {
  font: 500 .75rem/1.3 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.lead {
  font-size: clamp(1.1rem, 1rem + .45vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 48ch;
}
.lead em, .serif-em {
  font-family: var(--serif);
  font-size: 1.18em;
  line-height: 1;
  color: var(--ink);
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -100px; z-index: 100;
  padding: .7em 1.1em; border-radius: 999px;
  background: var(--ink); color: var(--paper);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .65em;
  padding: 1em 1.6em;
  border: 0; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 500 .9rem/1 var(--sans); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.btn:hover { background: var(--accent); color: var(--on-accent); }
.btn--line { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.btn--line:hover { background: var(--ink); color: var(--paper); box-shadow: none; }
.btn--invert { background: var(--on-accent); color: var(--accent); }
.btn--invert:hover { background: var(--paper); color: var(--ink); }
.btn--small { padding: .7em 1.15em; font-size: .82rem; }
.btn svg, .arrow-link svg { width: 1em; height: 1em; flex: none; transition: transform .35s var(--ease); }
.btn:hover svg, .arrow-link:hover svg { transform: translateX(.25em); }
.arrow-link {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 500; font-size: .9rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: .15em;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: var(--gutter);
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: transform .5s var(--ease), background-color .4s, color .4s, border-color .4s;
}
.site-header.is-scrolled {
  background: color-mix(in oklab, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.brand {
  font-family: var(--serif);
  font-size: 1.55rem; line-height: 1;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: 2.25rem; }
.nav ul { display: flex; gap: 1.85rem; margin: 0; padding: 0; list-style: none; }
.nav ul a {
  position: relative;
  font-size: .9rem; font-weight: 450;
  text-decoration: none;
}
.nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav ul a:hover::after, .nav ul a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle {
  display: none;
  align-items: center; gap: .6em;
  padding: .55em 0; border: 0; background: none;
  font-size: .9rem; font-weight: 500; cursor: pointer;
}
.menu-toggle i { display: grid; gap: 5px; width: 22px; }
.menu-toggle i::before, .menu-toggle i::after { content: ""; height: 1.5px; background: currentColor; }
@media (max-width: 860px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- Mobile menu (popover) ---------- */
.menu {
  position: fixed; inset: 0;
  width: 100%; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0 var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom));
  border: 0;
  background: var(--ink); color: var(--paper);
  overflow-y: auto;
}
.menu:popover-open { display: flex; flex-direction: column; }
@media (prefers-reduced-motion: no-preference) {
  .menu { transition: opacity .35s var(--ease), translate .45s var(--ease), display .45s allow-discrete, overlay .45s allow-discrete; }
  .menu:popover-open { opacity: 1; translate: 0 0; }
  @starting-style { .menu:popover-open { opacity: 0; translate: 0 -12px; } }
}
.menu__top { display: flex; justify-content: space-between; align-items: center; height: var(--header-h); flex: none; }
.menu__close { border: 0; background: none; font-weight: 500; font-size: .9rem; cursor: pointer; padding: .55em 0; }
.menu ol { margin: auto 0; padding: 2rem 0; list-style: none; counter-reset: m; }
.menu ol a {
  display: flex; align-items: baseline; gap: .5em;
  padding-block: .12em;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 11.5vw, 5rem); line-height: 1.04;
  text-decoration: none;
}
.menu ol a small { font: 500 .72rem/1 var(--sans); letter-spacing: .12em; opacity: .55; translate: 0 -1.4em; }
.menu__foot { display: flex; flex-wrap: wrap; gap: .75rem 2rem; font-size: .9rem; opacity: .8; }
.menu__foot a { text-decoration: none; }

/* ---------- Section heads ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: end; gap: 1rem 2rem; flex-wrap: wrap;
  padding-bottom: 1.25rem; margin-bottom: clamp(36px, 5vw, 80px);
  border-bottom: 1px solid var(--line);
}
.section-head h2 { font-size: clamp(3rem, 8.4vw, 8.5rem); line-height: .84; letter-spacing: -.03em; }
.section-head .eyebrow { padding-bottom: .5em; }

/* ---------- Footer ---------- */
.site-footer { padding-block: clamp(56px, 7vw, 96px) calc(28px + env(safe-area-inset-bottom)); font-size: .9rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem var(--gutter); }
.footer__brand { font-family: var(--serif); font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1; }
.footer__grid p { color: var(--ink-2); margin-top: .9rem; max-width: 34ch; }
.footer__grid h2 { margin-bottom: .9rem; font: 500 .72rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.footer__grid ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.footer__grid a { text-decoration: none; }
.footer__grid a:hover { text-decoration: underline; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  margin-top: clamp(48px, 6vw, 80px); padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2); font-size: .8rem;
}
.footer__bottom a { color: inherit; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Page head (galleries, contacts, text pages) ---------- */
.page-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.75rem var(--gutter);
  padding-top: calc(var(--header-h) + clamp(44px, 8vw, 130px));
  padding-bottom: clamp(36px, 5vw, 72px);
}
.crumbs { grid-column: 1 / -1; display: flex; gap: .7em; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.page-title {
  grid-column: 1 / -1;
  margin-left: -.05em;
  font-size: clamp(4.2rem, 16.5vw, 17rem);
  line-height: .8;
  letter-spacing: -.04em;
}
.page-title--sm { font-size: clamp(3.4rem, 11vw, 11rem); }
.page-head .lead { grid-column: 7 / -1; }
.facts { grid-column: 1 / 6; grid-row: 3; align-self: end; display: grid; gap: .9rem; margin: 0; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.facts dt { font: 500 .72rem/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.facts dd { margin: 0; }
@media (max-width: 860px) {
  .page-head .lead, .facts { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- Justified gallery ---------- */
.justified {
  --h: clamp(150px, 25vw, 400px);
  display: flex; flex-wrap: wrap; gap: clamp(6px, .75vw, 12px);
  margin: 0; padding: 0; list-style: none;
}
.justified::after { content: ""; flex-grow: 999999; }
.justified li { position: relative; flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--h)); }
.tile { display: block; aspect-ratio: var(--r); overflow: hidden; background: var(--c); cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), opacity .7s var(--ease); }
.tile:hover img { transform: scale(1.035); }
.tile__cap {
  position: absolute; left: .7rem; bottom: .7rem;
  padding: .4em .75em; border-radius: 999px;
  background: rgb(10 10 10 / .5); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 500 .68rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  pointer-events: none;
  opacity: 0; transition: opacity .4s var(--ease);
}
.justified li:hover .tile__cap, .tile:focus-visible + .tile__cap { opacity: 1; }
@media (hover: none) { .tile__cap { opacity: 1; } }
.js img[data-fade]:not(.is-loaded) { opacity: 0; }

/* Quote band + next category */
.ask {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem 2rem;
  margin-top: clamp(72px, 9vw, 140px); padding: clamp(28px, 4vw, 48px);
  background: var(--paper-2);
}
.ask p { font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 3.2rem); line-height: 1; }
.next-cat { margin-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); }
.next-cat a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--gutter);
  padding-block: clamp(28px, 4vw, 56px) 0;
  text-decoration: none;
}
.next-cat strong {
  display: block; margin-top: .6rem;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.6rem, 12vw, 12rem); line-height: .82; letter-spacing: -.035em;
  transition: color .3s var(--ease);
}
.next-cat a:hover strong { color: var(--accent); font-style: italic; }
.next-cat img { width: clamp(110px, 20vw, 300px); aspect-ratio: 4 / 5; object-fit: cover; background: var(--c); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #0d0c0b; color: #ece6dd;
  overflow: hidden; overscroll-behavior: contain;
}
.lightbox::backdrop { background: #0d0c0b; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lb-in .35s var(--ease); }
  @keyframes lb-in { from { opacity: 0; } }
}
.lb__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  font: 500 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
.lb__bar--bottom { padding: 14px var(--gutter) max(16px, env(safe-area-inset-bottom)); text-transform: none; letter-spacing: .01em; font-size: .9rem; font-weight: 400; color: #b7aea2; min-height: 3.4rem; }
.lb__btn { display: inline-flex; align-items: center; gap: .5em; padding: .6em .2em; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.lb__btn svg { width: 1.2rem; height: 1.2rem; }
.lb__stage { position: relative; min-height: 0; overflow: hidden; touch-action: pan-y; }
.lb__img {
  position: absolute; inset: 0; margin: auto;
  width: auto; height: auto;
  max-width: calc(100% - 2 * var(--gutter)); max-height: 100%;
  transition: opacity .3s var(--ease);
  user-select: none; -webkit-user-drag: none;
}
.lb__img.is-loading { opacity: 0; }
.lb__nav {
  position: absolute; top: 0; bottom: 0; width: 34%;
  display: flex; align-items: center;
  padding: 0 var(--gutter); border: 0; background: none; color: #fff;
  cursor: pointer; opacity: 0; transition: opacity .3s;
}
.lb__nav:hover, .lb__nav:focus-visible { opacity: 1; }
.lb__nav--prev { left: 0; justify-content: flex-start; cursor: w-resize; }
.lb__nav--next { right: 0; justify-content: flex-end; cursor: e-resize; }
.lb__nav span { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: rgb(0 0 0 / .45); }
.lb__nav svg { width: 1.2rem; height: 1.2rem; }
@media (hover: none) { .lb__nav { display: none; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 120px); }
.info-list { margin: 0; padding: 0; list-style: none; }
.info-list li { display: grid; gap: .3rem; padding-block: 1.1rem; border-top: 1px solid var(--line); }
.info-list li:last-child { border-bottom: 1px solid var(--line); }
.info-list span { font: 500 .72rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.info-list a, .info-list strong { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1.1; text-decoration: none; }
.info-list a:hover { color: var(--accent); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.9rem 1.5rem; }
.form h2 { grid-column: 1 / -1; font-size: clamp(2.2rem, 3.6vw, 3.4rem); }
.field { display: grid; gap: .45rem; }
.field--full { grid-column: 1 / -1; }
.field label { font: 500 .72rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: .65em 0;
  border: 0; border-bottom: 1px solid color-mix(in oklab, var(--ink) 35%, transparent); border-radius: 0;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 1.05rem;
  transition: border-color .3s;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.field select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0 center; background-size: 1.1rem;
}
.field select option { background: var(--paper); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field ::placeholder { color: color-mix(in oklab, var(--ink) 38%, transparent); }
.check { grid-column: 1 / -1; display: flex; gap: .8rem; align-items: flex-start; font-size: .92rem; color: var(--ink-2); }
.check input { flex: none; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.form__status { font-size: .95rem; }
.form__status.is-ok { color: var(--ink); }
.form__status.is-error { color: var(--accent); }
.form.is-sending .btn { opacity: .6; pointer-events: none; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form { grid-template-columns: 1fr; }
}

/* ---------- Text pages ---------- */
.prose { max-width: 70ch; padding-bottom: clamp(80px, 10vw, 160px); }
.prose h2 { margin: 2.6rem 0 .8rem; font-size: clamp(1.8rem, 2.6vw, 2.4rem); }
.prose p, .prose ul { margin: 0 0 1rem; color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 500; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    @keyframes reveal { from { opacity: 0; transform: translateY(48px); } }
  }
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }
}
