/* =============================================================
   HILO DE LUNA — styles.css
   1. Tokens
   2. Reset & base
   3. Utilities
   4. Typography
   5. Components (btn, nav, cursor, forms)
   6. Sections (hero, marquee, catalog, about, testimonials, faq, footer)
   7. Effects (reveal, tilt, hover)
   8. Responsive
   9. Reduced motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  /* palette — Editorial Light Cream, adaptada a joyería boho */
  --bg:        #f6efe4;   /* crema cálido */
  --bg-2:      #ecdfc9;   /* arena */
  --paper:     #fffdf9;
  --ink:       #241f1a;
  --ink-soft:  #3a332b;
  --ink-mute:  #7a6f60;
  --accent:    #b3622f;   /* terracota */
  --accent-2:  #5c6b45;   /* musgo */
  --gold:      #ac8144;   /* latón envejecido */
  --line:      rgba(36,31,26,0.12);

  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Fraunces", "Georgia", serif;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius: 18px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--paper);
  z-index: 9999; border-radius: 8px; font-weight: 500;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: .9rem;
}
.kicker::before {
  content: ""; width: 22px; height: 1px; background: var(--accent);
}

/* =============================================================
   4. Typography
   ============================================================= */
h1, .h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2, .h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3, .h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
em { font-style: italic; color: var(--accent); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-mute); max-width: 46ch; }

/* =============================================================
   5. Components
   ============================================================= */

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  box-shadow: 0 4px 14px rgba(36,31,26,0.08), 0 1px 3px rgba(36,31,26,0.06);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s, color .3s;
}
.btn:hover { transform: translateY(-4px); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }

.btn-primary {
  background: var(--accent); color: var(--paper);
}
.btn-primary:hover {
  box-shadow: 0 22px 50px rgba(179,98,47,0.28), 0 10px 22px rgba(179,98,47,0.22);
}

.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--accent); color: var(--accent);
  box-shadow: 0 14px 30px rgba(36,31,26,0.1);
}

.btn-wa {
  background: #25D366; color: #08350f;
}
.btn-wa:hover {
  box-shadow: 0 22px 50px rgba(37,211,102,0.3);
}
.btn-wa svg { width: 18px; height: 18px; }

/* --- custom cursor --- */
.cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  display: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity .25s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; margin: -3px; background: var(--paper); border-radius: 50%; }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px; border: 1px solid var(--paper); border-radius: 50%;
  transition: width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out);
}
.cursor.is-interactive .cursor-ring { width: 52px; height: 52px; margin: -26px; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

/* --- nav --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  padding-block: 1.1rem;
  transition: background-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out), box-shadow .4s var(--ease-out), padding .4s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(246,239,228,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-block: .7rem;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: .5rem; }
.brand-icon { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.brand em { color: var(--accent); }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-link { position: relative; padding: .25rem 0; font-size: .93rem; font-weight: 500; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-soft);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
.nav-burger {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid var(--line);
}
.nav-burger span { display: block; width: 16px; height: 1px; background: var(--ink); position: relative; }
.nav-burger span::before, .nav-burger span::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1px; background: var(--ink);
  transition: transform .3s var(--ease-out);
}
.nav-burger span::before { top: -5px; }
.nav-burger span::after { top: 5px; }

.nav-mobile {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .65s var(--ease-soft);
}
.nav-mobile[data-open="true"] { clip-path: inset(0); }
.nav-mobile-inner { display: flex; flex-direction: column; gap: 1.6rem; text-align: center; }
.nav-mobile a { font-family: var(--serif); font-size: 2rem; }
.nav-mobile-close {
  position: absolute; top: 1.4rem; right: var(--gutter);
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(246,239,228,.3);
  display: grid; place-items: center; font-size: 1.4rem;
}

/* --- floating WhatsApp button --- */
.wa-float {
  position: fixed; right: 1.3rem; bottom: 1.3rem; z-index: 95;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(37,211,102,0.45);
  transition: transform .4s var(--ease-bounce);
}
.wa-float:hover { transform: scale(1.08) rotate(-6deg); }
.wa-float svg { width: 28px; height: 28px; }

/* --- cards / products --- */
.card {
  --rx: 0deg; --ry: 0deg;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft), box-shadow .45s var(--ease-soft);
  box-shadow: 0 1px 0 var(--line);
  display: flex; flex-direction: column;
}
.card:hover { transition-duration: .15s; }
.card:hover {
  box-shadow:
    0 50px 100px -20px rgba(179,98,47,0.25),
    0 30px 60px -15px rgba(36,31,26,0.18),
    0 0 0 1px rgba(179,98,47,0.18);
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(155deg, var(--bg-2), var(--bg));
}
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-soft), filter .55s;
}
.card:hover .card-media img {
  transform: scale(1.1);
  filter: saturate(1.15) brightness(1.03);
}
/* Placeholder motif shown while there's no real photo yet */
.card-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.card-placeholder svg { width: 46%; opacity: .8; }
.card-body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body h3 { font-size: 1.15rem; }
.card-material { font-size: .82rem; color: var(--ink-mute); }
.card-blurb { font-size: .9rem; color: var(--ink-mute); flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .6rem; gap: .8rem; }
.card-price { font-family: var(--serif); font-size: 1.2rem; color: var(--accent); }
.card-price-wrap { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.card-price-old {
  font-family: var(--sans); font-size: .82rem; color: var(--ink-mute);
  text-decoration: line-through; text-decoration-color: var(--accent);
}
.card-badge {
  position: absolute; top: .8rem; left: .8rem; z-index: 2;
  background: var(--accent); color: var(--paper);
  font-family: var(--sans); font-weight: 700; font-size: .74rem;
  padding: .35rem .7rem; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(179,98,47,0.35);
}
.card-badge-set { background: var(--accent-2); box-shadow: 0 6px 16px rgba(92,107,69,0.35); }
.card-order {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; font-weight: 600;
  padding: .55rem 1rem; border-radius: 999px;
  background: var(--bg-2);
  transition: background .3s, transform .3s var(--ease-soft);
}
.card-order:hover { background: #25D366; color: #08350f; transform: translateY(-2px); }
.card-order svg { width: 14px; height: 14px; }

/* --- form --- */
.field {
  position: relative;
  margin-bottom: 1.3rem;
}
.field input, .field textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.15rem 1rem .5rem;
  transition: border-color .3s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field label {
  position: absolute; left: 1rem; top: 1.05rem;
  font-size: 1rem; color: var(--ink-mute);
  pointer-events: none;
  transition: transform .2s var(--ease-out), font-size .2s var(--ease-out), color .2s;
  transform-origin: left top;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-.65rem);
  font-size: .74rem;
  color: var(--accent);
}

/* =============================================================
   6. Sections
   ============================================================= */

/* --- hero --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 7rem; padding-bottom: 4rem;
  overflow: hidden;
  background: radial-gradient(120% 90% at 85% 8%, #fbf4e7 0%, var(--bg) 55%);
}
.hero-motif {
  position: absolute; inset: 0; z-index: 0;
  opacity: .9;
  pointer-events: none;
}
.hero-motif svg { position: absolute; }
.hero-inner {
  position: relative; z-index: 1;
  display: grid; gap: 3rem;
  align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-title { margin-bottom: 1.1rem; }
.hero-sub { margin-bottom: 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.4rem; }
.hero-values { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.hero-values li {
  font-size: .82rem; color: var(--ink-mute);
  display: flex; align-items: center; gap: .45rem;
}
.hero-values li::before { content: "✦"; color: var(--accent); font-size: .7rem; }

.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(160deg, #efe1c8 0%, #e3cba3 55%, #cf9f6c 100%);
  display: grid; place-items: center;
  box-shadow: 0 60px 100px -30px rgba(36,31,26,0.28);
}
.hero-visual svg { width: 62%; }

/* --- marquee --- */
.marquee-wrap {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  padding-block: 1.1rem;
}
.marquee { overflow: hidden; position: relative; }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0;  background: linear-gradient(90deg, var(--bg-2), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--bg-2), transparent); }
.marquee-track {
  display: inline-flex; gap: 3rem; white-space: nowrap; width: max-content;
  animation: marqueeScroll 34s linear infinite;
}
.marquee-track span {
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink-soft);
}
.marquee-track span.dot { color: var(--accent); font-style: normal; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- about / manifesto --- */
.about-grid {
  display: grid; gap: 2.5rem;
}
.about-num {
  font-family: var(--serif); font-style: italic; color: var(--accent);
  font-size: 3.2rem; line-height: 1;
}

/* --- catalog grid (uniforme, escala a cualquier número de piezas) --- */
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* --- process strip --- */
.process-list { display: grid; gap: 2rem; counter-reset: step; }
.process-item { display: flex; gap: 1.2rem; align-items: flex-start; }
.process-item::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--serif); font-style: italic; color: var(--accent);
  font-size: 1.4rem; flex-shrink: 0; width: 2.4rem;
}

/* --- testimonials --- */
.testi-grid { display: grid; gap: 1.5rem; }
.testi-card {
  background: var(--paper); border-radius: var(--radius);
  padding: 2rem; box-shadow: 0 1px 0 var(--line);
}
.testi-quote { font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin-bottom: 1.2rem; }
.testi-name { font-size: .85rem; color: var(--ink-mute); }

/* --- faq --- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding-block: 1.3rem; text-align: left; font-family: var(--serif); font-size: 1.1rem;
}
.faq-q-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; transition: transform .35s var(--ease-soft);
  position: relative;
}
.faq-q-icon::before, .faq-q-icon::after {
  content: ""; position: absolute; background: var(--ink);
}
.faq-q-icon::before { width: 10px; height: 1px; }
.faq-q-icon::after { width: 1px; height: 10px; transition: transform .3s var(--ease-soft); }
.faq-item[data-open="true"] .faq-q-icon::after { transform: rotate(90deg) scaleY(0); }
.faq-item[data-open="true"] .faq-q-icon { transform: rotate(180deg); background: var(--accent); border-color: var(--accent); }
.faq-item[data-open="true"] .faq-q-icon::before,
.faq-item[data-open="true"] .faq-q-icon::after { background: var(--paper); }
.faq-a {
  overflow: hidden; max-height: 0;
  transition: max-height .4s var(--ease-soft);
  color: var(--ink-mute); font-size: .95rem;
}
.faq-a-inner { padding-bottom: 1.4rem; max-width: 60ch; }

/* --- final CTA --- */
.cta-final {
  background: var(--ink); color: var(--bg);
  border-radius: 32px;
  padding: clamp(2.5rem, 6vw, 5rem);
  position: relative; overflow: hidden;
  text-align: center;
}
.cta-final::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 0%, rgba(179,98,47,0.35), transparent 70%);
}
.cta-final-inner { position: relative; z-index: 1; }
.cta-final h2 { color: var(--bg); margin-bottom: 1rem; }
.cta-final p { color: rgba(246,239,228,0.7); max-width: 46ch; margin-inline: auto; margin-bottom: 2rem; }
.cta-final .btn-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- footer --- */
.footer { padding-block: 3.5rem 2.5rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-brand { font-family: var(--serif); font-size: 1.4rem; margin-bottom: .6rem; }
.footer-cols { display: grid; gap: 2rem; }
.footer-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); margin-bottom: .9rem; }
.footer-col a, .footer-col p { display: block; font-size: .92rem; margin-bottom: .55rem; color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .82rem; color: var(--ink-mute);
}

/* =============================================================
   7. Effects
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal-stagger] > * {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft);
}
[data-reveal-stagger].is-revealed > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-revealed > *:nth-child(1) { transition-delay: 0s; }
[data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: .08s; }
[data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: .16s; }
[data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: .24s; }
[data-reveal-stagger].is-revealed > *:nth-child(5) { transition-delay: .32s; }
[data-reveal-stagger].is-revealed > *:nth-child(6) { transition-delay: .4s; }
[data-reveal-stagger].is-revealed > *:nth-child(7) { transition-delay: .48s; }
[data-reveal-stagger].is-revealed > *:nth-child(8) { transition-delay: .56s; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .testi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .about-grid { grid-template-columns: 90px 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }

  .hero-inner { grid-template-columns: 1.05fr .95fr; }

  .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testi-grid { grid-template-columns: repeat(3, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; }
}

@media (min-width: 1280px) {
  .container { padding-inline: var(--gutter); }
  .catalog-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =============================================================
   9. Reduced motion — only truly intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation-duration: 90s; }
  html { scroll-behavior: auto; }
}
