/* =========================================================
   IVENTALIA — Experience Design House
   Editorial · Cinematic · Luxury · Mobile-first
   ========================================================= */

:root {
  /* Palette */
  --ivory:      #F7F5F0;   /* fondo principal */
  --ivory-deep: #EFEBE3;   /* secciones alternas */
  --ink:        #111010;   /* negro tipográfico */
  --ink-soft:   #4A4744;   /* texto secundario */
  --champagne:  #B79C6E;   /* acento dorado sutil */
  --champagne-l:#CBB68C;
  --line:       #DAD4C8;   /* hairlines */

  /* Type */
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;
  --body:  "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Rhythm */
  --pad: clamp(1.25rem, 5vw, 6rem);
  --sec: clamp(5rem, 12vw, 11rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--champagne); color: var(--ivory); }

/* ---------- Shared type devices ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.62rem, 1.4vw, 0.72rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--champagne);
}

.section-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: 0.005em;
}

.rule {
  display: block;
  width: 0;
  height: 1px;
  background: var(--champagne);
  margin-bottom: 1.6rem;
  transition: width 1.1s var(--ease) 0.1s;
}
.reveal.in .rule { width: 3.5rem; }
.rule--center { margin-left: auto; margin-right: auto; }

.section-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 1.1rem 2.2rem;
  border: 1px solid var(--ink);
  transition: background .5s var(--ease), color .5s var(--ease),
              border-color .5s var(--ease), transform .5s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--ivory); }
.btn--solid:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--lg { padding: 1.25rem 3rem; }
.btn:focus-visible { outline: 2px solid var(--champagne); outline-offset: 4px; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--pad);
  color: var(--ink);
  transition: background .5s var(--ease), padding .5s var(--ease),
              box-shadow .5s var(--ease), color .5s var(--ease);
}
.nav::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(247,245,240,0.9) 0%, rgba(247,245,240,0) 100%);
  opacity: 1;
  transition: opacity .5s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.nav.scrolled::before { opacity: 0; }
.nav.scrolled {
  background: rgba(247, 245, 240, 0.85);
  backdrop-filter: blur(12px);
  padding: 1rem var(--pad);
  box-shadow: 0 1px 0 var(--line);
}
.nav__brand {
  display: block;
  height: clamp(20px, 2.8vw, 28px);
}
.nav__brand img {
  height: 100%;
  width: auto;
}
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }
.nav__links a {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 3px;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--champagne);
  transition: width .4s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  border: 1px solid var(--line);
  padding: 0.6rem 1.2rem;
  transition: border-color .4s var(--ease), color .4s var(--ease);
}
.nav__cta:hover { border-color: var(--ink); }

@media (max-width: 680px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .nav { padding: 1.1rem var(--pad); }
  .nav__cta { padding: 0.55rem 1rem; font-size: 0.66rem; }
}

/* =========================================================
   1. HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 8rem var(--pad) 4rem;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  top: 0; right: 0;
  width: 46%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--ivory) 0%, rgba(247,245,240,0) 32%);
}
.hero__media img { filter: grayscale(1) contrast(1.05); transform: scale(1.05); }

.hero__content { position: relative; z-index: 2; max-width: 46rem; }
.hero__content .eyebrow { margin-bottom: 1.8rem; }

.hero__headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin-bottom: 2rem;
}
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease);
}
.hero.in .reveal-line:nth-child(1) > span { transition-delay: .15s; }
.hero.in .reveal-line:nth-child(2) > span { transition-delay: .30s; }
.hero.in .reveal-line > span { transform: translateY(0); }

.hero__text {
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--ink-soft);
  margin-bottom: 2.6rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__scroll {
  position: absolute;
  bottom: 2.2rem; left: var(--pad);
  display: flex; align-items: center; gap: 0.9rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.hero__scroll-line {
  display: block; width: 3.5rem; height: 1px;
  background: var(--line); position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0;
  background: var(--champagne);
  animation: scrollSlide 2.4s var(--ease) infinite;
}
@keyframes scrollSlide {
  0% { transform: translateX(-100%); }
  55%,100% { transform: translateX(100%); }
}

@media (max-width: 860px) {
  .hero { align-items: end; min-height: 100svh; padding-top: 7rem; padding-bottom: 3.5rem; }
  .hero__media { position: absolute; width: 100%; height: 52%; top: 0; right: 0; }
  .hero__media::after {
    background: linear-gradient(180deg, rgba(247,245,240,0) 24%, var(--ivory) 78%);
  }
  .hero__content { padding-top: 40vh; }
  .hero__scroll { display: none; }
}

/* =========================================================
   2. COLLECTIONS
   ========================================================= */
.collections { padding: var(--sec) var(--pad); }

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}
.card { position: relative; }
.card--feature { grid-column: 1 / -1; }

.card__media {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin-bottom: 1.4rem;
}
.card--feature .card__media { aspect-ratio: 16 / 9; }
.card__media img {
  filter: grayscale(1) contrast(1.04);
  transform: scale(1.02);
  transition: transform 1.4s var(--ease), filter 1.4s var(--ease);
}
.card:hover .card__media img { transform: scale(1.07); filter: grayscale(1) contrast(1.12); }

.card__body { display: flex; flex-direction: column; gap: 0.5rem; }
.card__index {
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  color: var(--champagne);
}
.card__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.1;
}
.card__text {
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 34rem;
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .card--feature .card__media { aspect-ratio: 3 / 4; }
}

/* =========================================================
   3. ABOUT
   ========================================================= */
.about {
  background: var(--ivory-deep);
  padding: var(--sec) var(--pad);
}
.about__inner { max-width: 60rem; margin: 0 auto; text-align: center; }
.about__inner .rule { margin-left: auto; margin-right: auto; }
.about__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
  margin: 0.5rem 0 2rem;
}
.about__title em { font-style: italic; color: var(--champagne); }
.about__text {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 44rem;
  margin: 0 auto;
}

/* =========================================================
   4. METHOD
   ========================================================= */
.method { padding: var(--sec) var(--pad); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.step {
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.2rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3.5rem) 0;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.step:nth-child(3n) { border-right: none; }
.step__num {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--champagne);
}
.step__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0.8rem 0 0.6rem;
}
.step__text { font-size: 0.95rem; color: var(--ink-soft); max-width: 22rem; }

@media (max-width: 780px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { padding-right: clamp(1rem, 4vw, 2rem); }
  .step:nth-child(3n) { border-right: 1px solid var(--line); }
  .step:nth-child(2n) { border-right: none; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none !important; padding-right: 0; }
}

/* =========================================================
   5. CINEMATIC
   ========================================================= */
.cinematic {
  background: var(--ink);
  color: var(--ivory);
  padding: var(--sec) var(--pad);
}
.cinematic ::selection { background: var(--champagne); color: var(--ink); }
.cinematic .eyebrow { color: var(--champagne-l); }
.cinematic .rule { background: var(--champagne-l); }
.cinematic__intro { max-width: 44rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.cinematic__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.08;
  margin-bottom: 1.4rem;
}
.cinematic__text {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(247,245,240,0.7);
  max-width: 34rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: clamp(0.6rem, 1.5vw, 1.2rem);
}
.gallery__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.gallery__item--tall { grid-row: span 2; aspect-ratio: 1 / 2; }
.gallery__item--wide { grid-column: span 2; aspect-ratio: 2 / 1; }
.gallery__item img {
  filter: grayscale(1) contrast(1.08) brightness(0.95);
  transform: scale(1.02);
  transition: transform 1.6s var(--ease), filter 1.6s var(--ease);
}
.gallery__item:hover img { transform: scale(1.08); filter: grayscale(1) contrast(1.15) brightness(1.02); }
.gallery__item figcaption {
  position: absolute;
  left: 1rem; bottom: 0.9rem;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.gallery__item:hover figcaption { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery__item--wide { grid-column: span 2; }
  .gallery__item--tall { grid-row: span 2; }
}
@media (max-width: 460px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery__item, .gallery__item--tall, .gallery__item--wide {
    aspect-ratio: 4 / 3; grid-row: auto; grid-column: auto;
  }
}

/* =========================================================
   6. CTA FINAL
   ========================================================= */
.cta { padding: var(--sec) var(--pad); text-align: center; }
.cta__inner { max-width: 46rem; margin: 0 auto; }
.cta__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 6.5vw, 4.2rem);
  line-height: 1.06;
  margin: 0.5rem 0 1.4rem;
}
.cta__text { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--ink-soft); margin-bottom: 2.6rem; }
.cta__email {
  display: block;
  margin-top: 1.6rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  transition: color .4s var(--ease);
}
.cta__email:hover { color: var(--champagne); }

/* =========================================================
   7. FOOTER
   ========================================================= */
.footer {
  background: var(--ivory-deep);
  padding: clamp(3.5rem, 8vw, 6rem) var(--pad);
  text-align: center;
  border-top: 1px solid var(--line);
}
.footer__brand {
  margin-bottom: 1.5rem;
}
.footer__brand img {
  height: clamp(26px, 5vw, 40px);
  width: auto;
  margin: 0 auto;
}
.footer__descriptor {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 0.6rem;
}
.footer__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.footer__email {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  transition: color .4s var(--ease);
}
.footer__email:hover { color: var(--champagne); }
.footer__legal {
  margin-top: 2.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-media { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease); }
.reveal-media.in { clip-path: inset(0 0 0 0); }

/* stagger cards & steps & gallery */
.cards .reveal.in,
.steps .reveal.in { transition-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-media, .reveal-line > span { opacity: 1; transform: none; clip-path: none; }
}
