/* ============================================================
   NÈVE · Gelato d'Autore
   Editorial · chic · paleta neutra com pastéis sofisticados
   Nested CSS
   ============================================================ */

:root {
  --bone:   #f3ede3;   /* fundo osso/creme */
  --paper:  #faf6ef;   /* superfície clara */
  --char:   #26241f;   /* carvão (texto) */
  --muted:  #8c8578;   /* texto secundário */
  --pist:   #a9c47f;   /* pistácio */
  --terra:  #cf8a5c;   /* terracota */
  --rose:   #d9a7b4;   /* rosa empoeirado */
  --line:   rgba(38,36,31,0.14);

  --font-serif: "Playfair Display", Georgia, serif;
  --font-ui:    "Manrope", system-ui, sans-serif;

  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 300;
  color: var(--char);
  background: var(--bone);
  line-height: 1.7;
  overflow-x: hidden;

  &.is-loading { overflow: hidden; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

h1, h2, h3 { margin: 0; font-weight: 400; line-height: 1.1; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 4px; }
::selection { background: var(--pist); color: var(--char); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  &.is-visible { opacity: 1; transform: none; }
}

/* shared editorial section header */
.editorial {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);

  & .editorial__num {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--terra);
    padding-top: 0.4rem;
  }
  & .editorial__kicker {
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 0.72rem;
    color: var(--muted);
    margin: 0 0 0.3rem;
  }
  & .editorial__title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 6vw, 3.4rem);
    color: var(--char);
  }
}

/* ============================================================
   Intro — a colour swatch blooms, name fades
   ============================================================ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--bone);
  transition: opacity 0.8s ease, visibility 0.8s;

  &.is-done { opacity: 0; visibility: hidden; }

  & .intro__inner { text-align: center; position: relative; }

  & .intro__bloom {
    display: block;
    width: 0; height: 0;
    margin: 0 auto 1.4rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--pist), var(--terra));
    animation: bloom 1.1s var(--ease) 0.1s forwards;
  }

  & .intro__name {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 9vw, 4rem);
    letter-spacing: 0.12em;
    color: var(--char);
    opacity: 0;
    animation: fade 1s ease 0.6s forwards;
  }
  & .intro__sub {
    display: block;
    margin-top: 0.4rem;
    font-style: italic;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--terra);
    opacity: 0;
    animation: fade 1s ease 0.9s forwards;
  }
}
@keyframes bloom { to { width: 84px; height: 84px; } }
@keyframes fade { to { opacity: 1; } }

/* ============================================================
   Header
   ============================================================ */
.head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem clamp(1rem, 5vw, 3rem);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), border-color 0.5s;
  border-bottom: 1px solid transparent;

  &.is-scrolled {
    background: color-mix(in srgb, var(--bone) 88%, transparent);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--line);
    padding-block: 0.85rem;
  }

  & .mark {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    letter-spacing: 0.18em;
    color: var(--char);
  }
  & .nav {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    & a {
      font-size: 0.82rem;
      letter-spacing: 0.08em;
      color: var(--muted);
      transition: color 0.4s;
      &:hover { color: var(--terra); }
    }
  }
  & .ig {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--char);
    border-bottom: 1px solid var(--terra);
    padding-bottom: 2px;
  }
}

/* ============================================================
   Hero — asymmetric editorial
   ============================================================ */
.hero {
  min-height: 100svh;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(7rem, 15vh, 10rem) clamp(1.4rem, 6vw, 3rem) 4rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 3rem;

  & .hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 0.74rem;
    color: var(--terra);
    margin: 0 0 1.2rem;
  }
  & .hero__title {
    font-family: var(--font-serif);
    font-size: clamp(2.6rem, 7vw, 4.8rem);
    color: var(--char);
    line-height: 1.06;
    & em { font-style: italic; color: var(--terra); }
  }
  & .hero__lede {
    max-width: 30rem;
    margin: 1.8rem 0 2.4rem;
    color: var(--muted);
    font-size: 1.05rem;
  }
}

/* three stacked quenelle scoops */
.hero__scoops {
  position: relative;
  height: clamp(240px, 40vw, 360px);
  display: grid;
  place-items: center;
}
.quenelle {
  position: absolute;
  width: clamp(150px, 30vw, 230px);
  height: clamp(90px, 18vw, 130px);
  border-radius: 60% 60% 55% 55% / 90% 90% 45% 45%;
  box-shadow: inset -12px -14px 24px rgba(0,0,0,0.12), 0 20px 40px -20px rgba(38,36,31,0.5);
  animation: floaty 6s ease-in-out infinite;
}
.quenelle--a { background: radial-gradient(circle at 35% 25%, #c3d99a, var(--pist)); transform: translateY(-64px) rotate(-4deg); }
.quenelle--b { background: radial-gradient(circle at 35% 25%, #e6b07f, var(--terra)); transform: translateY(0) rotate(3deg); animation-delay: 0.8s; }
.quenelle--c { background: radial-gradient(circle at 35% 25%, #e8c2cd, var(--rose)); transform: translateY(64px) rotate(-2deg); animation-delay: 1.6s; }

@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--char);
  border: 1px solid var(--char);
  border-radius: 999px;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  &:hover { background: var(--char); color: var(--paper); }

  &--dark { background: var(--char); color: var(--paper); border-color: var(--char);
    &:hover { background: var(--terra); border-color: var(--terra); }
  }
}

/* ============================================================
   La Collezione
   ============================================================ */
.collezione, .formati, .casa {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 7rem) clamp(1.4rem, 6vw, 3rem);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.6rem);
}

.fla {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);

  & .fla__swatch {
    flex-shrink: 0;
    width: 74px; height: 74px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--tone) 70%, white), var(--tone));
    box-shadow: inset -6px -8px 14px rgba(0,0,0,0.12);
    transition: transform 0.5s var(--ease), border-radius 0.5s var(--ease);
  }
  &:hover .fla__swatch {
    transform: scale(1.08) rotate(6deg);
    border-radius: 60% 60% 55% 55% / 85% 85% 45% 45%;  /* melts into a quenelle */
  }

  & .fla__name { font-family: var(--font-serif); font-size: 1.4rem; color: var(--char); }
  & .fla__note { margin: 0.2rem 0 0.5rem; font-size: 0.9rem; color: var(--muted); }
  & .fla__tag {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--terra);
    border: 1px solid var(--line);
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
  }
}

/* ============================================================
   Instagram / photo divider
   ============================================================ */
.shot {
  position: relative;
  display: grid;
  place-items: center;
  gap: 0.6rem;
  min-height: 46vh;
  padding: clamp(4rem, 10vw, 7rem) 1.5rem;
  text-align: center;
  color: var(--paper);
  background-image:
    linear-gradient(rgba(38,36,31,0.42), rgba(38,36,31,0.52)),
    url("https://images.unsplash.com/photo-1497034825429-c343d7c6a68f?auto=format&fit=crop&w=1600&q=70");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;

  & .shot__hash {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(2rem, 7vw, 3.4rem);
    margin: 0;
  }
  & .shot__line {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin: 0;
    & em { color: var(--rose); font-style: normal; }
  }
}

/* ============================================================
   I Formati
   ============================================================ */
.formats { display: grid; gap: 0; }

.format {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 1.4rem 0.5rem;
  border-top: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease), background 0.4s var(--ease);

  &:last-child { border-bottom: 1px solid var(--line); }
  &:hover { padding-left: 1rem; background: var(--paper); }

  & .format__ico {
    font-size: 1.8rem;
    width: 2.4rem;
    text-align: center;
    flex-shrink: 0;
  }
  & div { flex: 1; }
  & .format__name { font-family: var(--font-serif); font-size: 1.5rem; color: var(--char); }
  & .format__desc { margin: 0.15rem 0 0; font-size: 0.9rem; color: var(--muted); }
  & .format__price {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--terra);
    flex-shrink: 0;
    &::before { content: "€"; font-size: 0.7em; margin-right: 0.1em; color: var(--muted); }
  }
}

/* ============================================================
   A casa
   ============================================================ */
.casa {
  & .casa__card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: clamp(2.5rem, 7vw, 5rem);
    text-align: center;
    max-width: 720px;
    margin-inline: auto;

    & .casa__title { font-family: var(--font-serif); font-size: clamp(1.8rem, 5vw, 3rem); color: var(--char); margin: 0.4rem 0 1rem; }
    & .casa__text { max-width: 40rem; margin: 0 auto 1.4rem; color: var(--muted); }
    & .casa__line { color: var(--char); font-size: 0.92rem; }
    & .btn { margin-top: 1.6rem; }
  }
}

/* ============================================================
   Footer
   ============================================================ */
.foot {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) 1.5rem 3.5rem;

  & .foot__mark { font-family: var(--font-serif); font-size: 1.6rem; letter-spacing: 0.16em; color: var(--char); margin: 0 0 0.4rem; }
  & .foot__tag { font-style: italic; font-family: var(--font-serif); color: var(--terra); margin: 0; }
  & .foot__note { margin-top: 1.2rem; font-size: 0.8rem; color: var(--muted); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .hero__lede { margin-inline: auto; }
  .hero__scoops { order: -1; height: 260px; }
}
@media (max-width: 640px) {
  .head .nav { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .intro__bloom { width: 84px; height: 84px; }
  .intro__name, .intro__sub { opacity: 1; }
  .shot { background-attachment: scroll; }
}
