/* ===========================================================
   NANABI — tokens
   Concepto: metamorfosis. Jardín al atardecer + alas de mariposa.
   =========================================================== */
:root{
  --bg:        #FBF7F1;
  --paper:     #FFFFFF;
  --ink:       #201A2E;
  --muted:     #8A8195;
  --line:      #E9E1D6;

  /* colores de ala — cada mariposa usa una combinación */
  --violet:    #7C5CBF;
  --violet-d:  #4E3480;
  --teal:      #2E9E8F;
  --amber:     #E8A93D;
  --rose:      #D65C82;

  --night-1:   #201A38;
  --night-2:   #4B2C5E;
  --night-3:   #8B4066;
  --night-4:   #D97A4E;

  --display: "Fraunces", serif;
  --body: "Inter", sans-serif;

  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3{
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
}

p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.03;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.section-index{
  display:block;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--violet-d);
  margin-bottom: 10px;
}

.section-title{
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 40px;
}

/* ===========================================================
   MARIPOSA — forma base reutilizada en todo el sitio
   .wing hace el aleteo; el color se define en cada contexto
   =========================================================== */
.wing{
  transform-origin: 60px 50px;
  animation: flap 2.6s ease-in-out infinite;
}
.wing--left{ animation-delay: 0s; }
.wing--right{ animation-delay: 0s; transform-origin: 60px 50px; }

@keyframes flap{
  0%, 100%{ transform: scaleX(1) rotateY(0deg); }
  50%{ transform: scaleX(0.72); }
}

.wing path:first-child{ fill: currentColor; }
.wing-spot{ fill: rgba(255,255,255,0.55); }
.body{ fill: var(--ink); }

@media (prefers-reduced-motion: reduce){
  .wing{ animation: none; }
}

/* ===========================================================
   NAV
   =========================================================== */
.nav{
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad);
  background: rgba(251,247,241,0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav__mark{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.01em;
}

.nav__butterfly{
  width: 26px;
  height: 22px;
  color: var(--rose);
}
.nav__butterfly .body{ fill: var(--ink); }

.nav__links{
  display: flex;
  gap: 36px;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.nav__links a{
  position: relative;
  padding-bottom: 4px;
}

.nav__links a::after{
  content:"";
  position: absolute;
  left:0; right:0; bottom:0;
  height: 1px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav__links a:hover::after{ transform: scaleX(1); }

.nav__toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span{
  width: 22px;
  height: 1.5px;
  background: var(--ink);
}

/* ===========================================================
   HERO — jardín al atardecer
   =========================================================== */
.hero{
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__sky{
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(155deg,
    var(--night-1) 0%,
    var(--night-2) 42%,
    var(--night-3) 72%,
    var(--night-4) 100%);
}

.hero__glow{
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}
.hero__glow--1{
  width: 40vw; height: 40vw;
  background: var(--rose);
  top: -10%; right: -5%;
}
.hero__glow--2{
  width: 30vw; height: 30vw;
  background: var(--amber);
  bottom: -10%; right: 15%;
  opacity: 0.35;
}
.hero__glow--3{
  width: 24vw; height: 24vw;
  background: var(--violet);
  top: 30%; left: -6%;
  opacity: 0.4;
}

.hero__field{
  position: absolute;
  inset: 0;
}

/* mariposas generadas por JS dentro de #heroField */
.flight-butterfly{
  position: absolute;
  width: 46px;
  height: 38px;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce){
  .flight-butterfly{ animation: none !important; }
}

.hero__content{
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
  color: #FBF7F1;
}

.hero__eyebrow{
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #E8C7D2;
  margin-bottom: 24px;
}

.hero__title{
  font-size: clamp(44px, 8vw, 96px);
  line-height: 1.03;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 16ch;
}

.hero__title-accent{
  font-style: italic;
  background: linear-gradient(100deg, #F3C77E, #E88AA6 60%, #C79BE8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede{
  margin-top: 28px;
  max-width: 42ch;
  font-size: 17px;
  color: #D9CFE0;
}

.hero__cta{
  display: inline-block;
  margin-top: 36px;
  padding: 15px 30px;
  border: 1px solid rgba(251,247,241,0.7);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #FBF7F1;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.hero__cta:hover{
  background: #FBF7F1;
  color: var(--night-1);
  border-color: #FBF7F1;
}

.hero__scroll{
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid rgba(251,247,241,0.5);
  border-radius: 20px;
  z-index: 1;
}
.hero__scroll span{
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #FBF7F1;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot{
  0%{ transform: translateY(0); opacity: 1; }
  70%{ transform: translateY(14px); opacity: 0; }
  100%{ opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .hero__scroll span{ animation: none; top: 14px; }
}

/* ===========================================================
   SOBRE NOSOTROS
   =========================================================== */
.about{
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px var(--pad);
  border-top: 1px solid var(--line);
}

.about__deco{
  position: absolute;
  top: 70px;
  right: var(--pad);
  width: 72px;
  height: 60px;
  color: var(--amber);
  opacity: 0.9;
  transform: rotate(8deg);
}
.about__deco .body{ fill: var(--ink); }

@media (max-width: 760px){ .about__deco{ display: none; } }

.about__grid{
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
}

.about__lead{
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.3;
  color: var(--violet-d);
}

.about__body{
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 52ch;
}

@media (max-width: 760px){
  .about__grid{ grid-template-columns: 1fr; gap: 24px; }
}

/* ===========================================================
   COLECCIÓN
   =========================================================== */
.collection{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px var(--pad);
  border-top: 1px solid var(--line);
}

.product-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.product{
  background: var(--bg);
  padding: 28px 24px 32px;
}

.product__image{
  position: relative;
  aspect-ratio: 3/4;
  margin-bottom: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product__image--a{ background: linear-gradient(155deg,#F3E3D4,#D9A6C0); }
.product__image--b{ background: linear-gradient(155deg,#CFE3DD,#6FA89C); }
.product__image--c{ background: linear-gradient(155deg,#E8C48E,#8B4066); }
.product__image--d{ background: linear-gradient(155deg,#3A3157,#201A38); }

.product__butterfly{
  width: 46%;
  height: 46%;
  color: rgba(255,255,255,0.85);
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.12));
  transition: transform .4s ease;
}
.product__image--d .product__butterfly{ color: rgba(232,169,61,0.9); }
.product__butterfly .body{ fill: rgba(32,26,46,0.55); }

.product:hover .product__butterfly{ transform: scale(1.08) translateY(-4px); }

.product__num{
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--display);
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

.product h3{
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 6px;
}
.product__meta{
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.product__price{
  font-size: 14px;
  letter-spacing: 0.02em;
}

.collection__note{
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}
.collection__note code{
  background: #F1E6EC;
  padding: 2px 6px;
  border-radius: 2px;
}

@media (max-width: 980px){
  .product-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .product-grid{ grid-template-columns: 1fr; }
}

/* ===========================================================
   CONTACTO
   =========================================================== */
.contact{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px var(--pad) 140px;
  border-top: 1px solid var(--line);
}

.contact__grid{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}

.contact__info p{
  color: var(--muted);
  max-width: 40ch;
  margin-bottom: 28px;
  font-size: 15.5px;
}

.contact__details{
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
}
.contact__details span{
  display: inline-block;
  width: 90px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact__form{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label{
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.field input,
.field textarea{
  font-family: var(--body);
  font-size: 15px;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  outline: none;
  resize: vertical;
  transition: border-color .2s ease;
}
.field input:focus,
.field textarea:focus{
  border-bottom-color: var(--rose);
}

.contact__submit{
  align-self: flex-start;
  margin-top: 8px;
  padding: 15px 32px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background .2s ease;
}
.contact__submit:hover{ background: var(--rose); }

.contact__status{
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}

@media (max-width: 760px){
  .contact__grid{ grid-template-columns: 1fr; gap: 32px; }
}

/* ===========================================================
   FOOTER
   =========================================================== */
.footer{
  display: flex;
  justify-content: space-between;
  padding: 28px var(--pad) 40px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ===========================================================
   SCROLL REVEAL (clase agregada por JS via IntersectionObserver)
   =========================================================== */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}

/* ===========================================================
   RESPONSIVE NAV (mobile)
   =========================================================== */
@media (max-width: 700px){
  .nav__toggle{ display: flex; }
  .nav__links{
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav__links.open{ max-height: 260px; }
  .nav__links a{
    padding: 16px var(--pad);
    border-top: 1px solid var(--line);
  }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; }
}
