/* =========================================================
   SCINTILLA — Studio Creativo
   Palette & type from the brand: Playfair Display + Poppins
   ========================================================= */
:root {
  --cream: #f3efe6;
  --ink: #181818;
  --yellow: #f3d94a;
  --blue: #c9d9f4;
  --skyblue: #a9c3e8;
  --sky-deep: #86b4e4;
  --black: #0c0c0c;
  --grey: #cfcfcf;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Poppins', system-ui, sans-serif;
  --pad: clamp(20px, 4.2vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 500; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }
svg use { fill: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
[data-theme="dark"] :focus-visible { outline-color: var(--yellow); }

/* yellow highlight, as in the brand */
mark.hl {
  background: none;
  color: inherit;
  padding: 0 .12em;
  margin: 0 -.06em;
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-repeat: no-repeat;
  background-size: 100% 88%;
  background-position: 0 70%;
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
mark.hl-anim { background-size: 0% 88%; transition: background-size 1s var(--ease) .35s; }
.in mark.hl-anim, mark.hl-anim.in { background-size: 100% 88%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  margin: 0 0 22px;
}
.eyebrow svg { width: 14px; height: 14px; color: var(--yellow); stroke: var(--ink); stroke-width: 4px; overflow: visible; }
[data-theme="dark"] .eyebrow svg { stroke: none; }
.big-serif {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(44px, 7.4vw, 120px);
  line-height: .98; letter-spacing: -.02em;
  margin: 0;
}
.big-serif em { font-weight: 400; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ================= LOADER ================= */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #eaf2fb 60%, #d8e7f6 100%);
  transition: opacity 1.1s ease .2s, visibility 0s 1.4s;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-logo { width: min(64vw, 420px); margin: 0 auto; clip-path: inset(0 100% 0 0); animation: wipe 1.2s var(--ease) .15s forwards; }
.loader-sub { font-size: 11px; letter-spacing: .5em; margin-top: 14px; opacity: 0; animation: fadein .8s ease .9s forwards; padding-left: .5em; }
.loader-star { width: 34px; height: 34px; margin: 0 auto 22px; color: var(--yellow); stroke: var(--ink); stroke-width: 3px; overflow: visible; animation: spin 2.4s linear infinite, pulse 1.2s ease-in-out infinite alternate; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes fadein { to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { from { scale: .8; } to { scale: 1.15; } }

/* ================= HEADER ================= */
.site-header {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  transition: color .4s ease, background .4s ease, padding .4s ease, transform .5s var(--ease);
}
.site-header.scrolled { padding-top: 14px; padding-bottom: 14px; background: rgba(243, 239, 230, .72); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.site-header.on-hero { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header[data-theme="dark"] { color: #fff; }
.site-header[data-theme="dark"].scrolled { background: rgba(12, 12, 12, .6); }
.site-header[data-theme="dark"] .brand-logo { filter: invert(1); }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand-logo { height: 24px; width: auto; transition: filter .4s ease; }
.brand-sub { font-size: 8.5px; letter-spacing: .42em; font-weight: 500; margin-top: 6px; }
.nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 44px); }
.nav a { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; position: relative; padding: 4px 0; }
.nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav a:not(.nav-cta):hover::after, .nav a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid currentColor; border-radius: 999px; padding: 9px 18px !important; transition: background .3s, color .3s; }
.nav-cta svg { width: 12px; height: 12px; color: var(--yellow); stroke: var(--ink); stroke-width: 6px; overflow: visible; transition: transform .6s var(--ease); }
.nav-cta:hover { background: var(--ink); color: #fff; }
.nav-cta:hover svg { transform: rotate(180deg) scale(1.3); }
[data-theme="dark"] .nav-cta:hover { background: #fff; color: var(--ink); }
.menu-btn { display: none; width: 44px; height: 44px; position: relative; }
.menu-btn span:not(.sr) { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
.menu-btn span:nth-child(1) { top: 17px; }
.menu-btn span:nth-child(2) { top: 26px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: linear-gradient(180deg, #8db9e6 0%, #bcd6ef 70%, #e4eef8 100%);
  display: flex; flex-direction: column; justify-content: center; padding: 90px var(--pad) 40px;
  opacity: 0; transition: opacity .45s ease;
}
.mobile-menu.open { opacity: 1; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu nav a { font-family: var(--serif); font-size: clamp(42px, 12vw, 64px); line-height: 1.1; }
.mobile-menu nav a:nth-child(even) { font-style: italic; }
.mobile-mail { margin-top: 40px; font-size: 14px; letter-spacing: .08em; }

/* ================= HERO / STANZA ================= */
.hero { position: relative; height: 290vh; background: #c8def3; }
.hero-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.stage {
  position: absolute; inset: 0;
  perspective-origin: 50% 50%;
  overflow: hidden;
  background: linear-gradient(180deg, #8db9e6, #c8def3);
}
.world { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.face { position: absolute; left: 0; top: 0; transform-origin: 0 0; backface-visibility: visible; }
/* smooth, softly lit walls (light comes from the camera side) */
.face-wallB {
  background:
    linear-gradient(270deg, rgba(70,110,170,.16) 0, rgba(70,110,170,0) 7%),
    linear-gradient(180deg, rgba(70,110,170,.2) 0, rgba(70,110,170,0) 14%, rgba(70,110,170,0) 86%, rgba(70,110,170,.14) 100%),
    radial-gradient(ellipse 60% 70% at 62% 48%, #d3e4f6 0%, #bad3ef 45%, #a3c4e9 100%);
}
.face-wallA {
  background:
    linear-gradient(90deg, rgba(70,110,170,.2) 0, rgba(70,110,170,0) 9%),
    linear-gradient(180deg, rgba(70,110,170,.16) 0, rgba(70,110,170,0) 14%, rgba(70,110,170,0) 86%, rgba(70,110,170,.12) 100%),
    linear-gradient(90deg, #a9c8ea 0%, #bcd5f0 40%, #c9ddf3 100%);
}
.face-ceiling { background: radial-gradient(circle at 0 0, #93b9e4 0%, #9fc1e8 40%, #b3cfee 100%); }
.face-floor { background: radial-gradient(circle at 0 0, #bdd5ef 0%, #cde0f4 35%, #e0ecf8 100%); }

.wall-logo { position: absolute; display: flex; flex-direction: column; align-items: center; }
.wall-logo img { width: 100%; height: auto; }
.wall-logo span { font-size: 21px; font-weight: 500; letter-spacing: .5em; padding-left: .5em; white-space: nowrap; margin-top: 18px; color: var(--ink); }
.wall-video { position: absolute; margin: 0; background: #dfe9f4; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 12px #fff, 30px 40px 60px rgba(40, 75, 130, .3); }
.wall-video video { width: 100%; height: 100%; object-fit: cover; }
.wall-caption { position: absolute; margin: 0; font-size: 17px; line-height: 1.4; letter-spacing: .04em; color: var(--ink); text-align: center; }
.wall-caption b { text-transform: uppercase; letter-spacing: .2em; font-weight: 600; }

.sprite { position: absolute; left: 0; top: 0; transform-origin: 50% 100%; pointer-events: none; user-select: none; }
.sprite img { width: 100%; height: 100%; object-fit: contain; }
.sprite-cloud img { object-fit: fill; }
.sprite-rebecca img { object-fit: contain; object-position: bottom; -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 96%); mask-image: linear-gradient(180deg, #000 72%, transparent 96%); }

.fog {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #f6f9fd 55%, #eef4fa 100%);
}
.hero-ui {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: row-reverse; align-items: flex-end; justify-content: space-between; gap: 30px;
  padding: 0 var(--pad) clamp(26px, 5vh, 56px);
  pointer-events: none;
}
.hero-ui a { pointer-events: auto; }
.hero-title { text-align: right; margin: 0; font-weight: 500; font-size: clamp(26px, 3.2vw, 50px); line-height: 1.12; letter-spacing: -.015em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.2s var(--ease); }
body.entered .hero-title .line > span { transform: none; }
body.entered .hero-title .line:nth-child(2) > span { transition-delay: .12s; }
body.entered .hero-title .line:nth-child(3) > span { transition-delay: .24s; }
.hero-title mark.hl { background-size: 0% 88%; transition: background-size 1s var(--ease) 1.4s; }
body.entered .hero-title mark.hl { background-size: 100% 88%; }
.hero-side { text-align: left; opacity: 0; transition: opacity 1s ease 1.2s; }
body.entered .hero-side { opacity: 1; }
.hero-side p { display: none; margin: 0 0 18px; font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.3; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; }
.scroll-cue svg { width: 18px; height: 18px; color: var(--yellow); stroke: var(--ink); stroke-width: 4px; overflow: visible; animation: spin 6s linear infinite; }
/* ================= MANIFESTO ================= */
.manifesto {
  position: relative;
  padding: clamp(90px, 14vh, 160px) 0 clamp(90px, 14vh, 160px);
  background: linear-gradient(180deg, #eef4fa 0%, #f4f6f5 40%, var(--cream) 100%);
}
.manifesto-grid { display: grid; grid-template-columns: 1fr; }
.manifesto-text { max-width: 980px; }
.stack { margin: 0 0 36px; font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.6vw, 74px); line-height: 1.08; letter-spacing: -.02em; }
.stack span { display: block; }
.stack span:nth-child(2) { transition-delay: .1s; }
.stack span:nth-child(3) { transition-delay: .2s; }
.stack mark.hl { font-weight: 600; font-style: italic; }
.lead { font-size: clamp(16px, 1.25vw, 19px); max-width: 540px; margin: 0 0 30px; color: #333; }
.link-arrow { display: inline-flex; gap: 12px; align-items: center; font-weight: 600; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1.5px solid; padding-bottom: 6px; }
.link-arrow span { transition: transform .4s var(--ease); }
.link-arrow:hover span { transform: translateX(6px); }
.phone { position: relative; justify-self: center; width: min(100%, 340px); }
.phone-frame { position: relative; border-radius: 34px; overflow: hidden; aspect-ratio: 9 / 16; background: #dfe9f4; box-shadow: 0 50px 90px -30px rgba(30, 60, 110, .45), 0 0 0 10px #fff, 0 0 0 11px rgba(0,0,0,.06); transform: rotate(3deg); }
.phone-frame video { width: 100%; height: 100%; object-fit: cover; }
.phone-note { position: absolute; left: -58%; bottom: 12%; margin: 0; font-size: 15px; line-height: 1.3; transform: rotate(-4deg); background: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.25); }
.sticker { position: absolute; color: var(--yellow); stroke: var(--ink); stroke-width: 2.5px; overflow: visible; pointer-events: none; }
.phone .s1 { width: 54px; height: 54px; top: -22px; right: -18px; animation: spin 14s linear infinite; }
.phone .s2 { width: 26px; height: 26px; bottom: 26%; right: -34px; animation: pulse 1.6s ease-in-out infinite alternate; }

/* ================= ABOUT ================= */
.about { position: relative; background: var(--cream); padding: clamp(80px, 12vh, 150px) 0 0; overflow: hidden; }
.about-head { margin-bottom: clamp(40px, 6vw, 80px); }
.about-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(36px, 6vw, 110px); align-items: start; }
.polaroid { position: relative; margin: 0; background: #fff; padding: 14px 14px 56px; box-shadow: 0 40px 80px -36px rgba(0,0,0,.35); transform: rotate(-3deg); transition: transform .8s var(--ease); max-width: 440px; }
.polaroid.in { transform: rotate(-3deg); }
.polaroid:hover { transform: rotate(0deg) translateY(-6px); }
.polaroid img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 62%; background: var(--blue); }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 17px; }
.polaroid .sticker { width: 64px; height: 64px; top: -26px; right: -26px; animation: spin 18s linear infinite; }
.about-lead { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 38px); line-height: 1.22; margin: 0 0 36px; letter-spacing: -.01em; }
.about-lead b { font-family: var(--sans); font-weight: 700; font-size: .78em; letter-spacing: .04em; background: var(--yellow); padding: 0 .2em; }
.about-cols { columns: 2; column-gap: 44px; font-size: 15.5px; color: #2a2a2a; }
.about-cols p { margin: 0 0 18px; break-inside: avoid; }
.path { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.path li { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 14px; }
.path li:not(:last-child)::after { content: "→"; margin-left: 4px; margin-right: -26px; padding-left: 14px; font-weight: 400; }
.path li:not(:last-child) { margin-right: 22px; }
.path li.now { background: var(--ink); color: #fff; }
.path li.now svg { width: 13px; height: 13px; color: var(--yellow); }

.marquee { margin-top: clamp(70px, 10vw, 130px); border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); overflow: hidden; background: var(--yellow); }
.marquee-track { display: flex; width: max-content; align-items: center; gap: 34px; padding: 20px 0; animation: marquee 34s linear infinite; }
.marquee-track span { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 52px); white-space: nowrap; line-height: 1; }
.marquee-track span:nth-of-type(even) { font-style: italic; }
.marquee-track i { font-style: normal; font-size: 22px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================= NIGHT SECTIONS ================= */
.night { position: relative; background: var(--black); color: #fff; overflow: hidden; }
.stars-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.night .wrap { position: relative; z-index: 1; }
.sec-head { margin-bottom: clamp(40px, 6vw, 90px); }

.services-sec { padding: clamp(90px, 14vh, 170px) 0 clamp(70px, 10vh, 120px); }
.services { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.service { border-top: 1px solid rgba(255,255,255,.22); }
.service:last-child { border-bottom: 1px solid rgba(255,255,255,.22); }
.service-head { width: 100%; display: grid; grid-template-columns: 90px 1fr 50px; align-items: center; gap: 20px; text-align: left; padding: clamp(22px, 3vw, 38px) 0; }
.service .num { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--yellow); }
.service .name { font-weight: 600; font-size: clamp(22px, 3.6vw, 56px); text-transform: uppercase; letter-spacing: -.01em; line-height: 1.04; transition: transform .6s var(--ease), color .4s; }
.service-head:hover .name { transform: translateX(18px); }
.service .plus { position: relative; width: 38px; height: 38px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 50%; justify-self: end; transition: transform .5s var(--ease), background .3s, border-color .3s; }
.service .plus::before, .service .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.service .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.service-head:hover .plus { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.service.open .plus { transform: rotate(135deg); background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.service-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.service-body > div { overflow: hidden; padding-left: 110px; }
.service.open .service-body { grid-template-rows: 1fr; }
.service-body p { max-width: 620px; margin: 0 0 18px; color: #cfcfcf; font-size: 16.5px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 34px; }
.chips li { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 13px; }
.service-preview { position: fixed; left: 0; top: 0; width: 300px; aspect-ratio: 4 / 5; z-index: 30; pointer-events: none; border-radius: 6px; overflow: hidden; opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .35s ease, scale .4s var(--ease); box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.service-preview.show { opacity: 1; }
.service-preview img { width: 100%; height: 100%; object-fit: cover; }

/* covers band */
.covers-band { height: clamp(560px, 92vh, 900px); display: grid; place-items: center; }
.covers-tilt { position: absolute; inset: -20% -10%; display: flex; flex-direction: column; justify-content: center; gap: 22px; transform: perspective(1200px) rotateX(24deg) rotateZ(-9deg) scale(1.05); }
.covers-row { display: flex; gap: 22px; width: max-content; animation: marquee 70s linear infinite; }
.covers-row:nth-child(2) { animation-direction: reverse; animation-duration: 80s; }
.covers-row:nth-child(3) { animation-duration: 90s; }
.covers-row img { width: clamp(150px, 15vw, 240px); aspect-ratio: 1; object-fit: cover; border-radius: 6px; box-shadow: 0 20px 40px rgba(0,0,0,.5); transition: transform .5s var(--ease); }
.covers-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 45% at 50% 50%, rgba(12,12,12,.94) 0%, rgba(12,12,12,.82) 45%, rgba(12,12,12,.25) 100%), linear-gradient(180deg, var(--black) 0, rgba(12,12,12,0) 18%, rgba(12,12,12,0) 82%, var(--black) 100%); pointer-events: none; }
.covers-caption { position: relative; z-index: 2; text-align: center; padding: 0 var(--pad); }
.covers-title { font-family: var(--serif); font-size: clamp(40px, 6vw, 96px); line-height: 1; margin: 0 0 20px; letter-spacing: -.02em; }
.covers-sub { margin: 0 auto; max-width: 440px; color: #d6d6d6; }

/* works */
.works-sec { padding: clamp(70px, 10vh, 130px) 0 clamp(90px, 14vh, 160px); }
.works-head { display: flex; flex-direction: column; align-items: flex-start; gap: 34px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); transition: background .3s, color .3s, border-color .3s; }
.filter:hover { border-color: #fff; }
.filter[aria-selected="true"] { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.works-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 30px); }
.work { grid-column: span 6; position: relative; cursor: none; perspective: 900px; opacity: 1; transition: opacity .5s ease; }
.work.w-4 { grid-column: span 4; }
.work.w-8 { grid-column: span 8; }
.work.w-12 { grid-column: span 12; }
.work.hidden { display: none; }
.work-card { display: block; width: 100%; text-align: left; cursor: none; }
.work-media { position: relative; overflow: hidden; border-radius: 8px; background: #1b1b1b; transform-style: preserve-3d; transition: transform .6s var(--ease), box-shadow .6s; aspect-ratio: var(--ar, 4 / 3); }
.work-media img, .work-media video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; }
.work-card:hover .work-media img, .work-card:hover .work-media video { transform: scale(1.05); }
.work-media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.22), rgba(255,255,255,0) 45%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.work-card:hover .work-media::after { opacity: 1; }
.work-info { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; padding: 16px 2px 0; }
.work-title { font-family: var(--serif); font-size: clamp(22px, 2vw, 30px); margin: 0; line-height: 1.1; }
.work-client { font-size: 13px; color: #aaa; margin: 4px 0 0; }
.work-cat { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--yellow); white-space: nowrap; }
.work-play { position: absolute; left: 18px; top: 18px; z-index: 2; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; background: rgba(255,255,255,.92); color: var(--ink); border-radius: 999px; padding: 6px 12px; }

.cursor-label { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; display: inline-flex; gap: 8px; align-items: center; background: var(--yellow); color: var(--ink); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 12px 18px; border-radius: 999px; transform: translate(-50%, -50%) scale(0); transition: scale .3s var(--ease); }
.cursor-label svg { width: 12px; height: 12px; }
.cursor-label.show { scale: 1; transform: translate(-50%, -50%) scale(1); }

/* ================= CASE MODAL ================= */
.case { position: fixed; inset: 0; z-index: 80; }
.case-backdrop { position: absolute; inset: 0; background: rgba(12, 12, 12, .55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .5s ease; }
.case.open .case-backdrop { opacity: 1; }
.case-panel { position: absolute; left: 0; right: 0; bottom: 0; top: 4vh; background: var(--cream); border-radius: 22px 22px 0 0; overflow-y: auto; overscroll-behavior: contain; transform: translateY(105%); transition: transform .75s var(--ease); padding: clamp(28px, 5vw, 70px) var(--pad) 40px; }
.case.open .case-panel { transform: none; }
.case-close { position: sticky; top: 0; float: right; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 16px; z-index: 2; transition: transform .4s var(--ease); }
.case-close:hover { transform: rotate(90deg); }
.case-header { max-width: 900px; margin-bottom: clamp(30px, 5vw, 60px); }
.case-cat { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 14px; }
.case-cat::before { content: "✦ "; color: #c9a800; }
.case-title { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 6vw, 92px); line-height: 1; margin: 0 0 10px; letter-spacing: -.02em; }
.case-client { font-family: var(--serif); font-style: italic; font-size: 20px; margin: 0 0 24px; color: #555; }
.case-text { font-size: 17px; max-width: 700px; margin: 0 0 24px; }
.case-link { display: inline-block; background: var(--ink); color: #fff; border-radius: 999px; padding: 13px 24px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.case-link:hover { background: var(--yellow); color: var(--ink); }
.case-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.case-gallery > * { border-radius: 8px; overflow: hidden; background: #e8e3d8; }
.case-gallery .full { grid-column: 1 / -1; }
.case-gallery img, .case-gallery video { width: 100%; height: 100%; object-fit: cover; }
.case-gallery.covers { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.case-gallery.tall { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.case-nav { display: flex; justify-content: space-between; margin-top: 50px; padding-top: 24px; border-top: 1px solid rgba(0,0,0,.15); }
.case-nav button { font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.case-nav button:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* ================= CONTACT ================= */
.contact { position: relative; overflow: hidden; background: linear-gradient(180deg, #7eaee2 0%, #a3c6ea 45%, #d4e5f5 85%, #eaf2fa 100%); min-height: 100vh; display: flex; flex-direction: column; }
.contact-sky { position: absolute; inset: 0; pointer-events: none; }
.contact-sky img { position: absolute; will-change: transform; }
.contact-inner { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 140px; padding-bottom: 80px; }
.contact-title { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7.6vw, 128px); line-height: 1; letter-spacing: -.025em; margin: 0 0 28px; }
.contact-title mark.hl { font-weight: 600; font-style: italic; }
.contact-lead { font-size: clamp(16px, 1.3vw, 19px); margin: 0 0 44px; }
.big-btn { position: relative; display: inline-flex; align-items: center; gap: 16px; background: var(--ink); color: #fff; border-radius: 999px; padding: clamp(18px, 2vw, 26px) clamp(34px, 3.6vw, 56px); font-weight: 600; font-size: clamp(14px, 1.2vw, 17px); letter-spacing: .2em; text-transform: uppercase; transition: background .35s, color .35s, transform .5s var(--ease); }
.big-btn svg { width: 22px; height: 22px; color: var(--yellow); transition: transform .8s var(--ease); }
.big-btn:hover { background: var(--yellow); color: var(--ink); }
.big-btn:hover svg { color: var(--ink); transform: rotate(270deg) scale(1.2); }
.contact-mail { margin-top: 26px; font-family: var(--serif); font-style: italic; font-size: 20px; border-bottom: 1px solid; }
.footer { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 26px var(--pad); font-size: 12.5px; border-top: 1px solid rgba(24,24,24,.15); }
.footer p { margin: 0; }
.footer-logo { height: 16px; width: auto; }
.to-top { font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 11.5px; }

/* sparks canvas */
.sparks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1000px) {
  .manifesto-grid { grid-template-columns: 1fr; }
  .phone { width: min(70vw, 300px); }
  .phone-note { left: -40%; }
  .about-grid { grid-template-columns: 1fr; }
  .polaroid { max-width: 340px; margin: 0 auto 10px; }
  .work, .work.w-4, .work.w-8 { grid-column: span 12; }
  .filters { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .hero-ui { padding-top: 120px; background: linear-gradient(180deg, rgba(214,229,245,0) 0%, rgba(214,229,245,.82) 45%, rgba(226,237,249,.96) 100%); }
  .hero-title { font-size: clamp(25px, 7.4vw, 34px); text-align: left; }
  .menu-btn { display: block; margin-right: -10px; }
  .hero-ui { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero-side { text-align: left; }
  .hero-side p { display: none; }
  .about-cols { columns: 1; }
  .service-head { grid-template-columns: 44px 1fr 40px; gap: 12px; }
  .service .plus { width: 32px; height: 32px; }
  .service-body > div { padding-left: 56px; }
  .service-preview { display: none; }
  .phone-note { display: none; }
  .path li:not(:last-child)::after { display: none; }
  .path li:not(:last-child) { margin-right: 0; }
  .case-gallery { grid-template-columns: 1fr; }
  .case-gallery.covers { grid-template-columns: repeat(2, 1fr); }
  .footer { justify-content: center; text-align: center; }
  .work, .work-card { cursor: pointer; }
}

@media (hover: none) {
  .work, .work-card { cursor: pointer; }
  .cursor-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
}
.covers-caption { text-shadow: 0 2px 30px rgba(0,0,0,.85); }

/* =========================================================
   INTRO — la scintilla compone il logo
   ========================================================= */
.site-header.intro-hidden { transform: translateY(-110%); pointer-events: none; }
.intro {
  position: relative; height: 100vh; height: 100svh; min-height: 480px; overflow: hidden;
  background: linear-gradient(180deg, #8fb9e5 0%, #a9c8ea 45%, #c9ddf2 80%, #dbe8f6 100%);
  display: grid; place-items: center;
}
.sky-clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sky-clouds img { position: absolute; left: 0; height: auto; animation: cloudDrift 150s linear infinite; will-change: transform; }
.sky-clouds img.flip { scale: -1 1; }
@keyframes cloudDrift { from { transform: translateX(-50vw); } to { transform: translateX(110vw); } }

.intro-center { position: relative; z-index: 2; width: min(84vw, 980px); }
.intro-logo { margin: 0; display: flex; flex-direction: column; align-items: center; }
.lt-row { position: relative; display: block; width: 100%; aspect-ratio: 2540 / 470; }
.lt { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: translateY(10%) scale(.97); transition: opacity .45s ease, transform .7s var(--ease); }
.lt.on { opacity: 1; transform: none; }
.intro-sub { display: flex; justify-content: center; margin-top: clamp(14px, 2.4vw, 30px); font-family: var(--sans); font-weight: 400; font-size: clamp(13px, 2.3vw, 30px); letter-spacing: .32em; padding-left: .32em; }
.intro-sub span { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .8s var(--ease); }
.intro-sub span.on { opacity: 1; transform: none; }

.spark { position: absolute; left: 0; top: 0; width: clamp(54px, 7vw, 96px); aspect-ratio: 1; pointer-events: none; transform: translate(-200px, -200px) scale(0); opacity: 0; transition: transform .9s cubic-bezier(.3, 1.6, .5, 1), opacity .4s ease; }
.spark.born { opacity: 1; }
.spark.fly { transition: transform .4s var(--ease), opacity .4s ease; }
.spark.fly, .spark.fly + * { }
.spark.rest { transition: transform 1s var(--ease); }
.spark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spark-core { color: var(--yellow); stroke: var(--ink); stroke-width: 2px; animation: twinkle 1.4s ease-in-out infinite; }
.spark-glow { color: #fff6c2; filter: blur(10px); opacity: .9; transform: scale(1.5); animation: glow 1.4s ease-in-out infinite; }
.spark-mini { width: 32% !important; height: 32% !important; inset: auto !important; color: var(--yellow); stroke: var(--ink); stroke-width: 4px; animation: twinkle 1.1s ease-in-out infinite; }
.spark-mini.m1 { left: -30%; top: -10%; animation-delay: .4s; }
.spark-mini.m2 { right: -35%; bottom: -15%; animation-delay: .8s; }
.spark.fly .spark-core, .spark.fly .spark-glow { animation-duration: .35s; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(.78) rotate(45deg); } }
@keyframes glow { 0%, 100% { opacity: .9; transform: scale(1.6); } 50% { opacity: .4; transform: scale(1.1); } }

.intro-cue { position: absolute; z-index: 3; left: 50%; bottom: clamp(22px, 5vh, 46px); transform: translate(-50%, 10px); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; padding-left: .28em; opacity: 0; transition: opacity 1s ease .3s, transform 1s var(--ease) .3s; }
.intro-cue i { width: 1.5px; height: 40px; background: linear-gradient(var(--ink), rgba(24,24,24,0)); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
body.intro-done .intro-cue { opacity: 1; transform: translate(-50%, 0); }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* =========================================================
   HOME — testi ai lati, video al centro
   ========================================================= */
.home-hero {
  position: relative; overflow: hidden; min-height: 100vh;
  padding: clamp(110px, 14vh, 150px) 0 clamp(60px, 9vh, 100px);
  background: linear-gradient(180deg, #dbe8f6 0%, #b6cfee 16%, #c3d6ef 50%, #dfe8f4 82%, #eef2f6 100%);
  display: flex; align-items: center;
}
.home-grid { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: 1fr minmax(200px, 300px) 1fr; align-items: center; gap: clamp(30px, 5vw, 90px); }
.home-left, .home-right { margin: 0; font-family: var(--sans); font-weight: 500; font-size: clamp(22px, 2.15vw, 34px); line-height: 1.32; letter-spacing: -.005em; }
.home-left { justify-self: end; }
.home-right { justify-self: start; }
.band { position: relative; display: inline-block; padding: 0 .3em; z-index: 0; }
.band b { font-weight: 700; }
.band::before { content: ""; position: absolute; top: 0; bottom: 0; background: var(--yellow); z-index: -1; transform: scaleX(0); transition: transform 1.1s var(--ease) .5s; }
.band-left { margin-left: -.3em; }
.band-left::before { right: 0; left: -100vw; transform-origin: right; }
.band-right { margin-left: -.3em; }
.band-right::before { left: 0; right: -100vw; transform-origin: left; }
.reveal.in .band::before { transform: scaleX(1); }
.home-video { position: relative; perspective: 1200px; width: min(100%, 31vh, 280px); justify-self: center; }
.home-video video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #c9daf0; box-shadow: 0 40px 70px -24px rgba(25, 50, 90, .45), 0 10px 24px -12px rgba(25, 50, 90, .3); transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); transition: transform .2s linear; }
.home-star { position: absolute; z-index: 1; color: var(--yellow); filter: drop-shadow(0 0 8px rgba(255, 240, 170, .9)); animation: twinkle 2.4s ease-in-out infinite; pointer-events: none; }
.hs1 { width: 26px; height: 26px; top: 16%; right: 16%; }
.hs2 { width: 18px; height: 18px; top: 55%; left: 38%; animation-delay: .8s; }
.hs3 { width: 28px; height: 28px; bottom: 9%; right: 6%; animation-delay: 1.5s; }

@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; text-align: center; gap: 34px; }
  .home-video { order: -1; width: min(64vw, 300px); justify-self: center; }
  .home-left, .home-right { justify-self: center; font-size: clamp(20px, 5.4vw, 26px); }
  .band-left::before, .band-right::before { left: 0; right: 0; }
  .hs2 { display: none; }
}

/* stacked pages: every page after the first slides over the previous one */
main > section { position: relative; }
main > section + section { border-radius: 28px 28px 0 0; box-shadow: 0 -24px 50px -20px rgba(20, 40, 80, .28); }
main > section.night + section.night { box-shadow: 0 -1px 0 rgba(255,255,255,.12), 0 -24px 50px -20px rgba(0,0,0,.6); }
@media (max-width: 760px) { main > section + section { border-radius: 20px 20px 0 0; } }

/* tap-to-play fallback */
.home-video, .case-gallery > div, .work-media { position: relative; }
.needs-tap { cursor: pointer; }
.needs-tap::after { content: "\25B6"; position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; display: grid; place-items: center; padding-left: 5px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 24px; box-shadow: 0 10px 30px rgba(0,0,0,.25); pointer-events: none; z-index: 3; }

/* =========================================================
   HOME — stanza celeste, perspective from the reference:
   wide back wall from the left edge to a corner right of centre,
   gently sloping edges, side wall opening to the right.
   Corner at --cx; edges in % of the section.
   ========================================================= */
.home-hero { background: #b9d1ee; }
.room2 {
  --dx: 0; --dy: 0;
  --cx: calc(62% + var(--dx) * 1%);
  --ct: calc(24% + var(--dy) * .6%);   /* corner top */
  --cb: calc(67% + var(--dy) * .6%);   /* corner bottom */
  --lt: 16%;  --lb: 77%;               /* left edge of back wall */
  --rt: 15%;  --rb: 81%;               /* right edge of side wall */
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, #a9c6e8 0%, #b5cfee 100%);   /* ceiling tone behind everything */
}
.room2 > div { position: absolute; inset: 0; }
.r-ceil {
  clip-path: polygon(0 0, 100% 0, 100% var(--rt), var(--cx) var(--ct), 0 var(--lt));
  background: linear-gradient(180deg, #9dbde4 0%, #aac7ea 70%, #b2cdec 100%);
}
.r-back {
  clip-path: polygon(0 var(--lt), var(--cx) var(--ct), var(--cx) var(--cb), 0 var(--lb));
  background:
    radial-gradient(ellipse 42% 46% at 22% 52%, rgba(244,249,255,.9) 0%, rgba(244,249,255,0) 100%),
    linear-gradient(90deg, rgba(70,110,170,0) 80%, rgba(70,110,170,.1) 100%),
    linear-gradient(180deg, #c4daf2 0%, #d5e6f7 45%, #cfe1f5 75%, #bed5f0 100%);
}
.r-side {
  clip-path: polygon(var(--cx) var(--ct), 100% var(--rt), 100% var(--rb), var(--cx) var(--cb));
  background:
    linear-gradient(90deg, rgba(70,110,170,.18) 0%, rgba(70,110,170,0) 16%),
    radial-gradient(ellipse 40% 50% at 82% 34%, rgba(240,247,255,.8) 0%, rgba(240,247,255,0) 100%),
    linear-gradient(180deg, #b8d0ef 0%, #c6dbf3 50%, #b4cdee 100%);
}
.r-floor {
  clip-path: polygon(0 var(--lb), var(--cx) var(--cb), 100% var(--rb), 100% 100%, 0 100%);
  background:
    radial-gradient(ellipse 50% 40% at 40% 78%, rgba(240,246,253,.85) 0%, rgba(240,246,253,0) 100%),
    linear-gradient(180deg, #c3d7ef 0%, #d1e2f4 40%, #dde9f6 100%);
}
/* soft shading where wall meets floor and ceiling */
.r-shade {
  background:
    linear-gradient(180deg, rgba(70,110,170,.12) 0%, rgba(70,110,170,0) 6%) 0 var(--lt) / 100% 30% no-repeat;
  clip-path: polygon(0 var(--lt), var(--cx) var(--ct), 100% var(--rt), 100% var(--rb), var(--cx) var(--cb), 0 var(--lb));
  filter: blur(0);
  opacity: .9;
}
.r-floorclouds { inset: auto 0 -2% 0 !important; height: 34%; }
.r-floorclouds img { position: absolute; bottom: 0; height: auto; opacity: .95; animation: floatY 7s ease-in-out infinite alternate; }
@keyframes floatY { from { transform: translateY(0); } to { transform: translateY(-10px); } }
.home-hero .sky-clouds { z-index: 1; transition: transform .1s linear; }
.home-hero .home-star { z-index: 2; }
.home-video video { box-shadow: 0 50px 80px -28px rgba(25, 50, 90, .5), 0 14px 30px -14px rgba(25, 50, 90, .35); }
@media (max-width: 900px) {
  .room2 { --cx: calc(72% + var(--dx) * 1%); --ct: 13%; --cb: 70%; --lt: 8%; --lb: 78%; --rt: 6%; --rb: 82%; }
}

/* star cursor over the services list */
.services, .services .service-head, .services a {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 100 100'%3E%3Cpath d='M50 2 C54 38 62 46 98 50 C62 54 54 62 50 98 C46 62 38 54 2 50 C38 46 46 38 50 2Z' fill='%23f3d94a' stroke='%230c0c0c' stroke-width='3'/%3E%3C/svg%3E") 16 16, pointer;
}
/* no image preview on hover: the star cursor is enough */
.service-preview { display: none !important; }

/* agency credit under a case study */
.case-credit { margin: -8px 0 24px; padding-top: 14px; border-top: 1px solid rgba(24,24,24,.15); font-size: 13px; line-height: 1.6; opacity: .7; max-width: 60ch; }

/* ---------- MOBILE tweaks ---------- */
@media (max-width: 900px) {
  /* home: flat sky, clouds drifting behind the video */
  .room2 > .r-ceil, .room2 > .r-back, .room2 > .r-side, .room2 > .r-floor { display: none; }
  .room2 { background: linear-gradient(180deg, #a9c6e8 0%, #c4daf2 45%, #dce9f7 100%); }
  #homeClouds img { min-width: 62vw; }
  /* text above the video, question below; smaller video */
  .home-video { order: 0; width: min(52vw, 240px); }
  .home-grid { gap: 28px; }
  /* manifesto: one sentence per line, paragraph as one block */
  .stack { font-size: clamp(20px, 6.4vw, 40px); }
  .stack span { white-space: nowrap; }
  .lead br { display: none; }
}
