/* =========================================================
   Camilla Stelluti — sito vetrina
   Palette calda, editoriale, minimale. Niente icone.
   ========================================================= */

:root {
  --cream:     #f6f1ea;
  --cream-2:   #ede3d6;
  --ink:       #241b16;
  --ink-soft:  #6b5d52;
  --rose:      #c77f6a;
  --rose-deep: #9c4a37;
  --gold:      #d8a878;
  --line:      rgba(36, 27, 22, 0.14);
  --line-soft: rgba(36, 27, 22, 0.08);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad-x: clamp(1.5rem, 6vw, 7rem);
  --maxw:  1240px;
  --ease:  cubic-bezier(0.22, 0.68, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ---------- Lenis (smooth scroll) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Grana ---------- */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: url("../assets/grain.png") repeat;
  background-size: 200px 200px;
  opacity: 0.38;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 9000;
  animation: grain 7s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* Senza JavaScript i contenuti restano comunque visibili */
html:not(.js) .reveal { opacity: 1; transform: none; }
html:not(.js) .hero__title .reveal-mask > span { transform: none; }

/* piccolo stagger su gruppi */
.stats__grid .stat:nth-child(2) { transition-delay: 0.1s; }
.stats__grid .stat:nth-child(3) { transition-delay: 0.2s; }
.links__list li:nth-child(1) { transition-delay: 0.04s; }
.links__list li:nth-child(2) { transition-delay: 0.1s; }
.links__list li:nth-child(3) { transition-delay: 0.16s; }
.links__list li:nth-child(4) { transition-delay: 0.22s; }
.links__list li:nth-child(5) { transition-delay: 0.28s; }

/* =========================================================
   Navigazione
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.1rem, 2.4vw, 1.9rem) var(--pad-x);
  transition: padding 0.4s var(--ease), background 0.4s var(--ease),
              box-shadow 0.4s var(--ease);
}
.nav.scrolled {
  padding-block: clamp(0.7rem, 1.4vw, 1rem);
  background: rgba(246, 241, 234, 0.78);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav__brand {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.nav__menu { display: flex; gap: clamp(1.2rem, 3vw, 2.6rem); }
.nav__menu a {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s var(--ease);
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav__menu a:hover { color: var(--ink); }
.nav__menu a:hover::after { transform: scaleX(1); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 7rem var(--pad-x) 5rem;
}
.hero__bg {
  position: absolute;
  inset: -12% -6%;
  background: url("../assets/hero.jpg") center / cover no-repeat;
  z-index: -2;
  will-change: transform;
}
/* sfondo ammorbidito: la foto risalta, il rosa resta solo come tono caldo */
.hero__wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(246, 241, 234, 0.5), rgba(246, 241, 234, 0.32)),
    radial-gradient(120% 80% at 50% 35%, transparent 30%, rgba(246, 241, 234, 0.55) 100%),
    linear-gradient(to bottom, transparent 50%, var(--cream) 99%);
}

/* apertura divisa: testo a sinistra, ritratto a destra */
.hero__inner {
  width: 100%;
  max-width: var(--maxw);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}
.hero__text { text-align: left; }
.hero__text .hero__tagline { margin-inline: 0; }
.hero__text .hero__actions { justify-content: flex-start; }

.hero__media { position: relative; }
.hero__media .frame { aspect-ratio: 4 / 5; }
.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--rose);
  border-radius: 16px;
  transform: translate(clamp(14px, 2vw, 26px), clamp(14px, 2vw, 26px));
  transition: transform 0.7s var(--ease);
}
.hero__media:hover::before {
  transform: translate(clamp(20px, 2.8vw, 36px), clamp(20px, 2.8vw, 36px));
}
/* ingresso foto hero: tendina che scopre l'immagine + leggero zoom che si assesta */
.hero__media.reveal { opacity: 1; transform: none; }
.hero__media .frame { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease); }
.hero__media .frame img { transform: scale(1.12); transition: transform 1.6s var(--ease); }
.hero__media.in .frame { clip-path: inset(0 0 0 0); }
.hero__media.in .frame img { transform: scale(1); }
html:not(.js) .hero__media .frame { clip-path: none; }
html:not(.js) .hero__media .frame img { transform: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}
.eyebrow .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--rose);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 8.5vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .reveal-mask { display: block; overflow: hidden; }
.hero__title .reveal-mask > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease);
}
body.loaded .hero__title .reveal-mask > span { transform: translateY(0); }
.hero__title .line:nth-child(2) .reveal-mask > span { transition-delay: 0.12s; }

.hero__tagline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 2.3vw, 1.55rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: clamp(1.6rem, 3.5vw, 2.4rem) auto clamp(2rem, 4vw, 2.8rem);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.hero__scroll {
  position: absolute;
  bottom: clamp(1.4rem, 4vh, 2.6rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero__scroll-line {
  width: 1px; height: 46px;
  background: linear-gradient(var(--ink-soft), transparent);
  transform-origin: top;
  animation: scrollLine 2.2s var(--ease) infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); opacity: 0; }
  35%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(46px); opacity: 0; }
}

/* =========================================================
   Bottoni
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  padding: 0.95em 1.9em;
  border-radius: 100px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.4s var(--ease);
}
.btn > span { position: relative; z-index: 1; transition: color 0.45s var(--ease); }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateY(102%);
  transition: transform 0.5s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn--solid { background: var(--ink); color: var(--cream); }
.btn--solid::before { background: var(--rose-deep); }

.btn--ghost { color: var(--ink); border-color: rgba(36, 27, 22, 0.32); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover > span { color: var(--cream); }

/* =========================================================
   Marquee
   ========================================================= */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line-soft);
  padding-block: clamp(1.1rem, 2.4vw, 1.7rem);
  background: linear-gradient(var(--cream), var(--cream-2));
}
.marquee__inner {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 28s linear infinite;
}
.marquee__inner span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 4vw, 2.7rem);
  color: var(--ink);
}
.marquee__inner .sep { color: var(--rose); font-style: normal; }
/* parole interattive: il nastro si ferma all'hover (sotto) e la parola si accende */
.marquee__inner span:not(.sep) {
  cursor: default;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.marquee__inner span:not(.sep):hover {
  color: var(--rose-deep);
  transform: translateY(-2px) scale(1.05);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee__inner { animation-play-state: paused; }

/* =========================================================
   Sezioni generiche
   ========================================================= */
.section {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(5rem, 13vh, 9.5rem) var(--pad-x);
}
/* offset per gli ancoraggi: la barra fissa non copre il titolo */
#studio, #services, #work, #contact { scroll-margin-top: 5rem; }
.kicker {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose-deep);
  margin-bottom: 1.4rem;
}
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5.2vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 18ch;
}

/* ---------- Storia ---------- */
/* Studio: sezione testuale a due colonne (titolo a sx, testo a dx) */
.storia {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.storia__intro h2 { margin-top: 0.5rem; }
.frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  box-shadow: 0 30px 60px -30px rgba(36, 27, 22, 0.4);
}
.frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.frame:hover img { transform: scale(1.06); }
.storia__text h2 { margin-bottom: 1.6rem; }
.storia__text .lead {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.storia__text p:not(.lead):not(.kicker) { color: var(--ink-soft); }

.studio__sign {
  margin-top: clamp(2rem, 4vw, 2.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.studio__sign-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
}
.studio__sign-role {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

/* ---------- Community / numeri ---------- */
.stats { text-align: center; }
.stats .kicker { display: inline-block; }
.stats__head { margin: 0 auto 3.5rem; max-width: 20ch; }
.stats__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(2rem, 7vw, 6rem);
}
.stat { display: flex; flex-direction: column; gap: 0.4rem; }
.stat__num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 8.5vw, 6.2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat__label {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.stats__note {
  margin: 3.5rem auto 0;
  max-width: 36ch;
  color: var(--ink-soft);
}

/* =========================================================
   Approach — processo (lista tipografica, niente immagini)
   ========================================================= */
.approach__head { margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.approach__head h2 { margin-top: 0.5rem; }
.approach__lead {
  margin-top: 1.4rem;
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}
.approach__list { list-style: none; }
.approach__list li {
  position: relative;
  display: grid;
  grid-template-columns: clamp(7rem, 22vw, 14rem) 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: baseline;
  padding-block: clamp(1.4rem, 3.2vw, 2.2rem);
  border-top: 1px solid var(--line);
}
.approach__list li:last-child { border-bottom: 1px solid var(--line); }
/* linea rosa che si disegna passando sopra la riga */
.approach__list li::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--rose-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.approach__list li:hover::after { transform: scaleX(1); }
.approach__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: transform 0.45s var(--ease), color 0.35s var(--ease);
}
.approach__list li:hover .approach__name {
  color: var(--rose-deep);
  transform: translateX(clamp(4px, 1vw, 12px));
}
.approach__desc {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 48ch;
}

/* =========================================================
   Link / dove trovarmi
   ========================================================= */
.links__head { margin-bottom: 1rem; }
.links__intro { color: var(--ink-soft); margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.links__list { list-style: none; }
.links__list li { border-top: 1px solid var(--line); }
.links__list li:last-child { border-bottom: 1px solid var(--line); }
.links__list a {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(1.1rem, 3.2vw, 2.1rem);
  text-decoration: none;
  overflow: hidden;
}
.links__list a::before {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--rose-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.links__list a:hover::before { transform: scaleX(1); }
.links__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 5.4vw, 3.1rem);
  line-height: 1;
  letter-spacing: -0.01em;
  transition: transform 0.45s var(--ease), color 0.35s var(--ease);
}
.links__list a:hover .links__name {
  transform: translateX(clamp(8px, 1.6vw, 22px));
  color: var(--rose-deep);
}
.links__meta {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-align: right;
  white-space: nowrap;
  transition: opacity 0.35s var(--ease);
}

/* =========================================================
   Contatti — blocco "Studio" (indirizzo) sotto la lista
   ========================================================= */
.contact__studio { margin-top: clamp(2.6rem, 6vw, 4rem); }
.contact__studio .kicker { margin-bottom: 0.9rem; }
.contact__studio-addr {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.5;
  color: var(--ink);
}

/* =========================================================
   Chiusura / contatti
   ========================================================= */
.closing { text-align: center; }
.closing .kicker { display: inline-block; }
.closing__head { margin: 0 auto 1.4rem; max-width: 16ch; }
.closing__text {
  margin: 0 auto clamp(2rem, 4vw, 2.8rem);
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding: 2.4rem var(--pad-x);
  border-top: 1px solid var(--line-soft);
  background: var(--cream-2);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer__name { font-family: var(--serif); color: var(--ink); }
.footer__top {
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  position: relative;
}
.footer__top::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.footer__top:hover::after { transform: scaleX(1); }

/* =========================================================
   Tocco su mobile: feedback al tap + CTA fissa
   ========================================================= */
@media (hover: none) {
  .links__list a:active .links__name {
    color: var(--rose-deep);
    transform: translateX(clamp(8px, 1.6vw, 22px));
  }
  .links__list a:active::before { transform: scaleX(1); }
  .approach__list li:active::after { transform: scaleX(1); }
  .approach__list li:active .approach__name {
    color: var(--rose-deep);
    transform: translateX(clamp(4px, 1vw, 12px));
  }
}

.cta-sticky {
  display: none;
  position: fixed;
  left: 50%;
  bottom: clamp(0.9rem, 3vw, 1.4rem);
  z-index: 950;
  align-items: center;
  padding: 0.85em 1.8em;
  border-radius: 100px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 12px 30px -10px rgba(36, 27, 22, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(170%);
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}
.cta-sticky.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.cta-sticky:active { transform: translateX(-50%) translateY(0) scale(0.97); }
@media (max-width: 820px) { .cta-sticky { display: inline-flex; } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 820px) {
  .nav__menu { gap: 1rem; }
  /* su mobile: il testo riempie la prima schermata, la foto arriva intera
     scrollando (niente "testa mozzata" che spuntava in fondo) */
  .hero { min-height: auto; padding-top: 0; padding-bottom: clamp(2.5rem, 8vw, 4rem); }
  .hero__inner { grid-template-columns: 1fr; gap: 0; }
  .hero__text {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: clamp(5rem, 16vw, 7rem);
    padding-bottom: clamp(1.5rem, 6vw, 2.5rem);
  }
  .hero__media { width: 100%; max-width: 22rem; margin: clamp(1.2rem, 5vw, 2rem) auto 0; }
  .hero__scroll { display: none; }
  .storia { grid-template-columns: 1fr; gap: clamp(1rem, 4vw, 2rem); }
  h2 { max-width: 100%; }
}

@media (max-width: 600px) {
  .approach__list li { grid-template-columns: 1fr; gap: 0.45rem; }
}

@media (max-width: 540px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .nav__menu { gap: 0.85rem; }
  .nav__menu a { font-size: 0.74rem; letter-spacing: 0.05em; }
  .footer { justify-content: flex-start; }
}

/* =========================================================
   Riduzione del movimento
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__title .reveal-mask > span { transform: none; }
  .grain { animation: none; }
  .marquee__inner { animation: none; }
}
