/*
 * Atelier — modern editorial theme for De Cadenze.
 * Dark cinematic home, bone pages, oversized Instrument Serif type, GSAP motion.
 * Layered on top of the Cadezone stylesheet (shared page layouts) and the
 * [data-theme="atelier"] tokens in imperial-tokens.css.
 */
:root {
  --at-ink: #11100e;
  --at-ink-2: #1d1b19;
  --at-bone: #ece8e1;
  --at-bone-2: #e1dcd2;
  --at-ox: #7e2419;
  --at-champ: #c9ad7f;
  --at-muted: #7b746b;
  --at-ease: cubic-bezier(.22, .8, .2, 1);
  --at-gutter: clamp(18px, 4vw, 56px);
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

body.at { background: var(--at-bone); color: var(--at-ink); font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
body.at ::selection { background: var(--at-ink); color: var(--at-bone); }
.at-display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: .92; }
.at-display em { font-style: italic; }
.at-eyebrow { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--at-muted); }
.at-wrap { max-width: 1680px; margin: 0 auto; padding-left: var(--at-gutter); padding-right: var(--at-gutter); }

/* ---------------------------------------------------------- progress --- */
.at-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.at-progress span { display: block; height: 100%; width: 100%; background: var(--at-champ); transform-origin: 0 50%; transform: scaleX(0); }

/* ------------------------------------------------------------ header --- */
.at-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 76px; padding: 0 var(--at-gutter);
  color: var(--at-ink); transition: transform .5s var(--at-ease), background .4s, color .4s, height .4s;
}
.at-header.is-over-dark { color: var(--at-bone); }
.at-header.is-solid { background: color-mix(in oklab, var(--at-bone) 86%, transparent); backdrop-filter: blur(14px) saturate(1.2); color: var(--at-ink); height: 64px; }
.at-header.is-hidden { transform: translateY(-110%); }
.at-header a, .at-header button { color: inherit; }
.at-hleft { display: flex; align-items: center; gap: 28px; }
.at-hright { display: flex; align-items: center; justify-content: flex-end; gap: 6px; position: relative; }
.at-menu-btn { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.at-menu-btn i { display: inline-block; width: 26px; height: 9px; position: relative; }
.at-menu-btn i::before, .at-menu-btn i::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .45s var(--at-ease); }
.at-menu-btn i::before { top: 0; } .at-menu-btn i::after { bottom: 0; right: 8px; }
.at-menu-btn:hover i::after { right: 0; }
.at-hlink { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; position: relative; }
.at-hlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--at-ease); }
.at-hlink:hover::after { transform: scaleX(1); transform-origin: left; }
.at-logo { font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 30px); letter-spacing: .06em; white-space: nowrap; }
.at-logo em { font-style: italic; }
.at-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; position: relative; transition: background .3s; }
.at-icon:hover { background: color-mix(in oklab, currentColor 10%, transparent); }
.at-icon .material-symbols-outlined { font-size: 21px; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; }
@media (max-width: 900px) { .at-hide-m { display: none !important; } .at-header { height: 64px; } }

/* -------------------------------------------------------- menu overlay --- */
.at-menu { position: fixed; inset: 0; z-index: 95; background: var(--at-ink); color: var(--at-bone); visibility: hidden;
  clip-path: inset(0 0 100% 0); display: grid; grid-template-columns: 1.2fr .8fr; }
.at-menu.is-open { visibility: visible; }
.at-menu-links { display: flex; flex-direction: column; justify-content: center; padding: 110px var(--at-gutter) 60px; gap: 2px; }
.at-menu-links a { font-family: var(--font-display); font-size: clamp(46px, 7.4vw, 118px); line-height: 1; display: flex; align-items: baseline; gap: 22px; overflow: hidden; color: var(--at-bone); }
.at-menu-links a span { display: inline-block; transition: transform .6s var(--at-ease), color .3s; }
.at-menu-links a small { font-family: var(--font-ui); font-size: 12px; letter-spacing: .2em; color: var(--at-muted); }
.at-menu-links a:hover span { transform: translateX(18px); font-style: italic; color: var(--at-champ); }
.at-menu-side { border-left: 1px solid rgba(236,232,225,.12); padding: 120px var(--at-gutter) 60px; display: flex; flex-direction: column; justify-content: space-between; }
.at-menu-side a { color: var(--at-bone); }
.at-menu-img { aspect-ratio: 4/5; overflow: hidden; border-radius: 4px; max-width: 360px; }
.at-menu-img img { width: 100%; height: 100%; object-fit: cover; }
.at-menu-close { position: absolute; top: 22px; right: var(--at-gutter); color: var(--at-bone); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
@media (max-width: 900px) { .at-menu { grid-template-columns: 1fr; } .at-menu-side { display: none; } }

/* ------------------------------------------------------------- intro --- */
.at-intro { position: fixed; inset: 0; z-index: 200; background: var(--at-ink); color: var(--at-bone); display: grid; place-items: center; }
.at-intro-word { font-family: var(--font-display); font-size: clamp(54px, 11vw, 190px); line-height: 1; overflow: hidden; }
.at-intro-word span { display: inline-block; }
.at-intro-count { position: absolute; right: var(--at-gutter); bottom: 34px; font-size: 12px; letter-spacing: .3em; font-variant-numeric: tabular-nums; color: var(--at-muted); }
.at-intro-line { position: absolute; left: var(--at-gutter); right: var(--at-gutter); bottom: 28px; height: 1px; background: rgba(236,232,225,.14); }
.at-intro-line i { display: block; height: 100%; background: var(--at-champ); transform-origin: 0 50%; transform: scaleX(0); }

/* ------------------------------------------------------------ cursor --- */
.at-cursor { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; mix-blend-mode: difference; }
.at-cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 999px; background: #fff; }
.at-cursor-ring { position: fixed; top: 0; left: 0; z-index: 299; pointer-events: none; width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 999px; display: grid; place-items: center; background: var(--at-bone); color: var(--at-ink);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; transform: scale(0); }
@media (pointer: coarse) { .at-cursor, .at-cursor-ring { display: none; } }

/* -------------------------------------------------------- buttons --- */
.at-btn { display: inline-flex; align-items: center; gap: 14px; padding: 18px 30px; border-radius: 999px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  background: var(--at-ink); color: var(--at-bone); position: relative; overflow: hidden; isolation: isolate; }
.at-btn::before { content: ""; position: absolute; inset: 0; background: var(--at-ox); transform: translateY(101%); transition: transform .55s var(--at-ease); z-index: -1; border-radius: inherit; }
.at-btn:hover::before { transform: translateY(0); }
.at-btn-light { background: var(--at-bone); color: var(--at-ink); }
.at-btn-light::before { background: var(--at-champ); }
.at-btn .material-symbols-outlined { font-size: 18px; }
.at-link { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; display: inline-flex; gap: 10px; align-items: center; border-bottom: 1px solid currentColor; padding-bottom: 4px; }

/* ================================================================ HOME === */
.at-dark { background: var(--at-ink); color: var(--at-bone); }

/* hero — title, tagline and cue always fit the first screen (laptop 894x521 included) */
.at-hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 88px var(--at-gutter) clamp(22px, 4svh, 44px); overflow: hidden; }
.at-hero-title { font-size: clamp(64px, min(15vw, 26svh), 300px); position: relative; z-index: 2; margin-bottom: -.06em; }
.at-hero-title .line { display: block; overflow: hidden; }
.at-hero-meta { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: clamp(14px, 3svh, 30px); flex-wrap: wrap; }
.at-hero-meta p { max-width: 34ch; color: #bdb6ab; line-height: 1.6; font-size: 15px; }
.at-scroll-cue { display: flex; align-items: center; gap: 14px; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: #bdb6ab; }
.at-scroll-cue i { width: 1px; height: clamp(28px, 6svh, 54px); background: rgba(236,232,225,.25); position: relative; overflow: hidden; }
.at-scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--at-bone); animation: at-cue 2.2s var(--at-ease) infinite; }
@keyframes at-cue { to { top: 100%; } }
/* Image: right column, height-capped so it never exceeds the screen. */
.at-hero-media { position: absolute; z-index: 1; top: 76px; right: var(--at-gutter);
  height: min(85svh, calc(100svh - 96px), 900px); aspect-ratio: 4 / 5; max-width: 44vw; overflow: hidden; border-radius: 3px; }
.at-hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transform: scale(1.08); }
@media (max-width: 599px) {
  .at-hero { justify-content: flex-start; padding-top: 76px; }
  .at-hero-media { position: relative; top: auto; right: auto; width: 100%; max-width: none; height: min(48svh, 460px); aspect-ratio: auto; margin-bottom: 18px; }
  .at-hero-title { font-size: clamp(56px, 18vw, 96px); }
  .at-hero-meta p { font-size: 14px; }
}

/* campaign — a framed image (never taller than the screen) that opens up while pinned; caption inside */
.at-film { position: relative; height: 100svh; overflow: hidden; background: var(--at-ink); display: grid; place-items: center; }
.at-film-frame { position: relative; width: calc(100% - 2 * var(--at-gutter)); max-width: 1600px; height: min(90svh, 820px);
  overflow: hidden; border-radius: 6px; clip-path: inset(10% 18% 10% 18% round 6px); will-change: clip-path; }
.at-film-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transform: scale(1.15); }
.at-film-cap { position: absolute; left: 0; right: 0; bottom: clamp(20px, 6%, 56px); text-align: center; color: var(--at-bone); z-index: 2; padding: 0 20px; }
.at-film-cap .at-display { font-size: clamp(36px, 6vw, 110px); }
@media (max-width: 599px) { .at-film-frame { height: min(78svh, 640px); clip-path: inset(6% 10% 6% 10% round 6px); } }

/* manifesto: words light up on scroll */
.at-manifesto { padding: clamp(110px, 16vw, 230px) 0; }
.at-manifesto p { font-family: var(--font-display); font-size: clamp(34px, 5.2vw, 88px); line-height: 1.08; letter-spacing: -0.015em; max-width: 18ch; }
.at-manifesto .w { opacity: .14; }
.at-manifesto em { font-style: italic; color: var(--at-ox); }

/* marquee */
.at-marquee { border-top: 1px solid rgba(17,16,14,.12); border-bottom: 1px solid rgba(17,16,14,.12); overflow: hidden; padding: 22px 0; }
.at-marquee-track { display: flex; width: max-content; will-change: transform; }
.at-marquee-track span { font-family: var(--font-display); font-size: clamp(54px, 8vw, 140px); line-height: 1; padding-right: .5em; white-space: nowrap; }
.at-marquee-track span em { font-style: italic; color: var(--at-ox); }
.at-marquee-track span i { font-style: normal; color: var(--at-champ); padding: 0 .35em; }

/* collections — 5 equal panels. Desktop: pinned horizontal row. <=900px: grid. */
.at-hz { position: relative; overflow: hidden; }
.at-hz-track { display: flex; gap: 3vw; padding: 0 var(--at-gutter); height: 100svh; align-items: center; width: max-content; }
.at-hz-intro { width: min(36vw, 520px); flex: none; }
.at-hz-intro h2 { font-size: clamp(56px, 7vw, 120px); margin: 16px 0 20px; }
.at-hz-intro p { color: #bdb6ab; line-height: 1.7; max-width: 34ch; }
.at-panel { position: relative; flex: none; width: min(36vw, 560px); height: min(74svh, 720px); overflow: hidden; border-radius: 4px; display: block; color: var(--at-bone); background: var(--at-ink-2); }
/* Image always covers the whole panel; the parallax only moves it inside a scale(1.15) buffer, so no gaps. */
.at-panel img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 25%;
  transform: scale(1.15); transition: filter .6s; filter: saturate(.92); }
.at-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,7,6,0) 45%, rgba(8,7,6,.72)); }
.at-panel-cap { position: absolute; z-index: 2; left: 26px; right: 26px; bottom: 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.at-panel-cap h3 { font-family: var(--font-display); font-size: clamp(36px, 4vw, 70px); line-height: .95; }
.at-panel-cap small { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #d9d2c6; white-space: nowrap; }
.at-panel-num { position: absolute; z-index: 2; top: 22px; left: 26px; font-size: 11px; letter-spacing: .26em; color: #d9d2c6; }
.at-panel:hover img { filter: saturate(1.1); }
/* Uomo: typographic art panel with the same frame, caption and gradient as the photo panels. */
.at-panel-type { background: radial-gradient(120% 80% at 30% 20%, #6b1a12 0%, #3b0e0a 55%, #1d0705 100%); }
.at-panel-art { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: rgba(236,232,225,.55); }
.at-panel-art em { font-family: var(--font-display); font-size: clamp(90px, 10vw, 180px); letter-spacing: -0.02em; text-transform: none; line-height: .9; color: rgba(236,232,225,.9); }
.at-panel-type::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(236,232,225,.16); border-radius: 2px; z-index: 1; }
@media (max-width: 900px) {
  .at-hz-track { height: auto; width: 100%; padding: 80px var(--at-gutter); display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .at-hz-intro { width: 100%; grid-column: 1 / -1; margin-bottom: 8px; }
  .at-panel { width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 85svh; }
}
@media (max-width: 599px) { .at-hz-track { grid-template-columns: 1fr; } .at-panel { aspect-ratio: 4 / 5; } }

/* products */
.at-products { padding: clamp(90px, 12vw, 180px) 0 clamp(80px, 10vw, 140px); }
.at-sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.at-sec-head h2 { font-size: clamp(54px, 8vw, 140px); }
.at-tabs { display: flex; gap: 8px; }
.at-tab { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; padding: 11px 18px; border-radius: 999px; border: 1px solid rgba(17,16,14,.2); transition: all .3s; }
.at-tab[aria-pressed="true"] { background: var(--at-ink); color: var(--at-bone); border-color: var(--at-ink); }
/* Even grid: no stagger, 40px row gap, every card the same height. */
.at-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 22px; align-items: start; }
@media (max-width: 1100px) { .at-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .at-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 14px; } }
.at-card { display: flex; flex-direction: column; color: inherit; }
/* Packshots on white: contain on a light ground, ratio reserved so nothing jumps; never taller than the screen. */
.at-card-frame { position: relative; aspect-ratio: 3 / 4; max-height: 80svh; overflow: hidden; border-radius: 3px; background: #f7f5f1; }
.at-card-frame img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; padding: 6%; transition: transform 1.2s var(--at-ease); }
.at-card:hover .at-card-frame img { transform: scale(1.04); }
.at-card-cap { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 14px; font-size: 13px; min-height: 3.6em; }
.at-card-cap b { font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.at-card-cap small { display: block; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--at-muted); margin-bottom: 3px; }
.at-card-price { font-family: var(--font-display); font-size: 20px; white-space: nowrap; }
.at-skel { aspect-ratio: 3 / 4; background: linear-gradient(100deg, var(--at-bone-2) 40%, #ebe6de 50%, var(--at-bone-2) 60%); background-size: 200% 100%; animation: at-sk 1.4s linear infinite; border-radius: 3px; }
@keyframes at-sk { to { background-position: -200% 0; } }

/* studio split — sticky column with a portrait frame capped at 80svh (face kept in view) */
.at-split { display: grid; grid-template-columns: 1fr 1fr; }
.at-split-media { position: relative; height: 100svh; display: grid; place-items: center; padding: 0 var(--at-gutter); }
.at-split-frame { position: relative; width: 100%; max-width: 620px; aspect-ratio: 4 / 5; max-height: 80svh; overflow: hidden; border-radius: 4px; }
.at-split-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transform: scale(1.06); }
.at-split-media .at-badge { position: absolute; left: 18px; bottom: 18px; background: var(--at-bone); color: var(--at-ink); padding: 10px 16px; border-radius: 999px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; z-index: 2; }
.at-split-copy { padding: 18vh var(--at-gutter); display: flex; flex-direction: column; gap: 32vh; }
.at-step .at-step-n { font-family: var(--font-display); font-size: 22px; color: var(--at-champ); }
.at-step h3 { font-family: var(--font-display); font-size: clamp(40px, 4.6vw, 80px); line-height: .98; margin: 10px 0 16px; }
.at-step p { color: #bdb6ab; line-height: 1.75; max-width: 38ch; }
@media (max-width: 900px) {
  .at-split { grid-template-columns: 1fr; }
  .at-split-media { height: auto; padding: 60px var(--at-gutter) 0; }
  .at-split-frame { max-width: 520px; }
  .at-split-copy { gap: 70px; padding: 60px var(--at-gutter) 80px; }
}

/* closing statement */
.at-closing { padding: clamp(120px, 16vw, 240px) 0 clamp(80px, 10vw, 140px); text-align: center; }
.at-closing h2 { font-size: clamp(64px, 13vw, 250px); color: transparent; -webkit-text-stroke: 1px rgba(17,16,14,.35);
  background: linear-gradient(90deg, var(--at-ink) 0 50%, transparent 50% 100%); background-size: 200% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; }
.at-closing p { margin: 36px auto 44px; max-width: 46ch; color: var(--at-muted); line-height: 1.7; }

/* ------------------------------------------------------------ footer --- */
.at-footer { background: var(--at-ink); color: var(--at-bone); padding: 90px 0 34px; overflow: hidden; }
.at-footer-big { font-family: var(--font-display); font-size: clamp(70px, 15vw, 290px); line-height: .85; letter-spacing: -0.03em; white-space: nowrap; margin: 70px 0 30px; }
.at-footer-big em { font-style: italic; color: var(--at-champ); }
.at-footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 36px; }
@media (max-width: 900px) { .at-footer-cols { grid-template-columns: 1fr 1fr; } }
.at-footer h4 { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--at-muted); margin-bottom: 16px; font-weight: 500; }
.at-footer a { color: var(--at-bone); opacity: .82; transition: opacity .2s; }
.at-footer a:hover { opacity: 1; }
.at-footer-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.at-footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid rgba(236,232,225,.12); padding-top: 22px; font-size: 12px; color: var(--at-muted); }
.at-footer-bottom a, .at-footer-bottom button { color: var(--at-muted); }
.at-news { display: flex; border-bottom: 1px solid rgba(236,232,225,.3); }
.at-news input { flex: 1; background: transparent; border: 0; color: var(--at-bone); padding: 12px 0; font-size: 15px; outline: none; }
.at-news input::placeholder { color: var(--at-muted); }
.at-news button { color: var(--at-bone); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }

/* ---------------------------------------------- inner pages (shared) --- */
body.at main { padding-top: 76px; }
body.at.at-home main { padding-top: 0; }
@media (max-width: 900px) { body.at main { padding-top: 64px; } }

/* JS-driven reveal starting state is applied by atelier.js only (no-JS = visible). */
.at-noscroll { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .at-scroll-cue i::after, .at-skel { animation: none; }
  .at-film-frame { clip-path: none; }
  .at-manifesto .w { opacity: 1; }
  .at-closing h2 { color: var(--at-ink); -webkit-text-stroke: 0; background: none; }
}
.at-arrow { flex: none; transition: transform .5s var(--at-ease); }
.at-btn:hover .at-arrow { transform: translateX(4px); }
/* keep the film caption legible over light imagery */
.at-film-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,7,6,0) 45%, rgba(8,7,6,.55) 100%); pointer-events: none; }
.at-film-cap { text-shadow: 0 2px 30px rgba(8,7,6,.45); }

/* ---------------------------------------------------- global images --- */
body.at img { display: block; max-width: 100%; }
/* Each frame carries its own height cap (hero 85svh, film 90svh, panels 85svh, studio 80svh, cards 80svh). */
