/* =================================================================
   Visual Nails — base.css
   Tokens (paleta, tipografía), reset, layout y utilidades.
   ================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Paleta de marca (rosa empolvado + lavanda + crema) */
  --blush:        #EBB4BC;
  --blush-deep:   #D98B98;
  --blush-soft:   #F8E3E7;
  --lavender:     #BDB4E6;
  --lavender-deep:#8B7FD0;
  --lavender-soft:#ECE8F8;
  --cream:        #FBF6EF;
  --cream-2:      #F3EADD;
  --mint:         #C7E7DC;
  --sky:          #B7DCEA;
  --gold:         #C39A4E;

  /* Texto */
  --ink:        #2E2730;
  --ink-soft:   #6B6270;
  --ink-faint:  #9A91A0;
  --on-dark:    #FBF6EF;

  /* CTA de alto contraste */
  --cta:        #C0436F;
  --cta-hover:  #A23459;
  --cta-ink:    #FFFFFF;

  /* Superficies */
  --bg:         #FBF6EF;
  --surface:    #FFFFFF;
  --surface-2:  #F6EFE6;
  --plum-deep:  #2B1E2C;   /* secciones oscuras (galería 3D, footer) */
  --plum-deep-2:#3E2B41;

  /* Bordes / sombras / radios */
  --line:       rgba(46, 39, 48, 0.10);
  --shadow-sm:  0 2px 8px rgba(46, 39, 48, 0.06);
  --shadow-md:  0 10px 30px rgba(46, 39, 48, 0.10);
  --shadow-lg:  0 24px 60px rgba(46, 39, 48, 0.16);
  --radius-sm:  10px;
  --radius:     18px;
  --radius-lg:  28px;
  --radius-pill:999px;

  /* Tipografía */
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:  "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --container:  1200px;
  --gutter:     clamp(1.1rem, 4vw, 2.5rem);
  --header-h:   76px;

  /* Transiciones */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
img { background: var(--surface-2); }

a { color: inherit; text-decoration: none; transition: color .25s var(--ease); }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; padding: 0; }
input, select, textarea, button { font-family: inherit; }

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

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }
h4 { font-size: 1.1rem; font-weight: 600; }

p { color: var(--ink-soft); }
strong { color: var(--ink); font-weight: 600; }

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cta);
}
.eyebrow--light { color: var(--blush); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--cream { background: var(--cream); }
.section--soft  { background: linear-gradient(180deg, var(--cream) 0%, var(--lavender-soft) 100%); }
.section--blush { background: linear-gradient(160deg, var(--blush-soft), var(--lavender-soft)); }
.section--plum  { background: radial-gradient(120% 120% at 50% 0%, var(--plum-deep-2), var(--plum-deep)); color: var(--on-dark); }
.section--plum h2, .section--plum h3 { color: var(--on-dark); }
.section--plum p { color: rgba(251, 246, 239, 0.78); }

.section-head { max-width: 680px; margin-inline: auto; text-align: center; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head p { margin-top: .9rem; font-size: 1.05rem; }
.section-head .eyebrow { display: block; margin-bottom: .9rem; }

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.8rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.text-center { text-align: center; }
.mt-1 { margin-top: .6rem; } .mt-2 { margin-top: 1.2rem; } .mt-3 { margin-top: 2rem; }
.flow > * + * { margin-top: 1rem; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* ---------- Accesibilidad ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100%; left: 12px; z-index: 1000;
  background: var(--ink); color: var(--on-dark);
  padding: .7rem 1.1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* ---------- Responsive base ---------- */
@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  :root { --header-h: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
