/* ============================================
   KLAMAHAMA® — Design System Tokens v1.0
   Art & Design Studio · Córdoba, Argentina
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Cormorant+Garamond:ital,wght@1,300;1,400&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  /* ─── COLOR PALETTE ─── */
  --k-rosa:       #E195A9;   /* Acento principal · CTAs · labels */
  --k-marron:     #4D4039;   /* Fondo oscuro principal */
  --k-crema:      #F0E9D3;   /* Fondo claro editorial */
  --k-blanco:     #FFFFFF;   /* Páginas de producto · fichas */
  --k-off-white:  #FAFAF8;   /* Fondo base de la web */
  --k-texto:      #292929;   /* Texto principal (reemplaza negro) */
  --k-texto-soft: #4D4039;   /* Texto secundario */

  /* ─── TYPOGRAPHY ─── */
  --font-display: 'Space Grotesk', sans-serif;   /* Títulos · hero · drops */
  --font-accent:  'Cormorant Garamond', serif;   /* Citas · manifiesto · acentos */
  --font-body:    'DM Sans', sans-serif;         /* Body · UI · navegación */

  /* ─── TYPE SCALE ─── */
  --text-xs:   10px;
  --text-sm:   12px;
  --text-base: 14px;
  --text-md:   16px;
  --text-lg:   18px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  36px;
  --text-4xl:  48px;
  --text-hero: 68px;

  /* ─── LETTER SPACING ─── */
  --tracking-tight:   0.02em;
  --tracking-normal:  0.04em;
  --tracking-wide:    0.08em;
  --tracking-wider:   0.12em;
  --tracking-widest:  0.18em;
  --tracking-label:   0.22em;

  /* ─── SPACING ─── */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  40px;
  --space-xl:  64px;
  --space-2xl: 80px;

  /* ─── BORDERS ─── */
  --border-light:  1px solid rgba(77, 64, 57, 0.08);
  --border-medium: 1px solid rgba(77, 64, 57, 0.15);
  --border-dark:   1px solid rgba(77, 64, 57, 0.25);
  --border-crema:  1px solid rgba(240, 233, 211, 0.1);
  --border-rosa:   1px solid rgba(225, 149, 169, 0.3);

  /* ─── RADIUS ─── */
  --radius-none: 0px;
  --radius-sm:   2px;   /* Botones · cards · badges */
  --radius-md:   8px;
  --radius-pill: 20px;  /* Tags de comunidad */
  --radius-full: 9999px;

  /* ─── SHADOWS ─── */
  --shadow-sm: 0 1px 3px rgba(77, 64, 57, 0.08);
  --shadow-md: 0 4px 16px rgba(77, 64, 57, 0.1);

  /* ─── MOTION ─── */
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.45, 0, 0.55, 1);
  --duration-fast: 200ms;
  --duration-base: 300ms;
  --duration-slow: 600ms;
  --duration-hero: 800ms;
  --stagger:       120ms;

  /* ─── NAV ─── */
  --nav-height: 58px;
  --nav-bg:     var(--k-off-white);

  /* ─── Z-INDEX ─── */
  --z-nav:    10;
  --z-modal:  100;
  --z-cursor: 9999;
}

/* ─── RESET BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--k-texto); background: var(--k-off-white); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { text-decoration: none; }

/* ─── TYPOGRAPHY UTILITIES ─── */
.k-display  { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-normal); line-height: 0.95; }
.k-accent   { font-family: var(--font-accent); font-style: italic; font-weight: 300; }
.k-label    { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--tracking-widest); text-transform: uppercase; opacity: 0.7; color: var(--k-texto-soft); }
.k-body     { font-family: var(--font-body); font-size: var(--text-base); font-weight: 400; line-height: 1.85; color: var(--k-texto); }

/* ─── BUTTON SYSTEM ─── */
.k-btn {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
  display: inline-block;
}
.k-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.k-btn-rosa   { background: var(--k-rosa);   color: var(--k-marron); }
.k-btn-dark   { background: var(--k-marron); color: var(--k-crema);  }
.k-btn-ghost-light { background: transparent; color: var(--k-crema);  border: 1px solid rgba(240,233,211,0.25); }
.k-btn-ghost-dark  { background: transparent; color: var(--k-marron); border: 1px solid rgba(77,64,57,0.25); }

/* ─── BADGE / TAG ─── */
.k-badge { font-family: var(--font-body); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; background: var(--k-rosa); color: var(--k-marron); padding: 3px 8px; border-radius: var(--radius-sm); display: inline-block; }
.k-tag   { font-family: var(--font-body); font-size: 11px; padding: 8px 16px; border: 1px solid rgba(77,64,57,0.2); border-radius: var(--radius-pill); color: var(--k-texto-soft); cursor: pointer; }

/* ─── DIVIDER ─── */
.k-divider       { border: none; border-top: var(--border-light); }
.k-divider-crema { border: none; border-top: 1px solid rgba(77,64,57,0.08); }

/* ─── SECTION SPACING ─── */
.k-section { padding: var(--space-xl) var(--space-lg); }

/* ─── NAV ─── */
.k-nav {
  background: var(--k-off-white);
  border-bottom: var(--border-light);
  padding: 0 var(--space-lg);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
}
.k-nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: var(--tracking-wider);
  color: var(--k-texto);
}
.k-nav-link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--k-texto-soft);
  opacity: 0.78;
  transition: opacity var(--duration-fast);
}
.k-nav-link:hover, .k-nav-link.active { opacity: 1; }
.k-nav-link.active { border-bottom: 1px solid var(--k-rosa); padding-bottom: 2px; }
.k-nav-icon { width: 18px; height: 18px; stroke: var(--k-texto-soft); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.6; cursor: pointer; }

/* ─── CUSTOM CURSOR ─── */
*, *::before, *::after { cursor: none !important; }
.k-cursor {
  width: 12px; height: 12px;
  background: var(--k-marron);
  border: 2px solid var(--k-off-white);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(77,64,57,0.18);
  mix-blend-mode: normal;
  transition: transform var(--duration-fast) var(--ease-out),
              width var(--duration-fast), height var(--duration-fast),
              background var(--duration-fast);
}
.k-cursor.hover { width: 8px; height: 8px; opacity: 0.85; }
/* Invert on dark backgrounds so it stays visible on marrón / texto */
.k-cursor.on-dark { background: var(--k-crema); border-color: var(--k-marron); }

/* ─── ANNOUNCEMENT BANNER ─── */
.k-banner {
  background: var(--k-crema);
  padding: 9px var(--space-lg);
  text-align: center;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--k-texto-soft);
}
.k-banner-sep { margin: 0 10px; opacity: 0.4; }

/* ─── SCROLL REVEAL ─── */
.k-reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out); }
.k-reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── FOOTER ─── */
.k-footer { background: var(--k-texto); }
.k-footer-inner { padding: 48px var(--space-lg) 36px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.k-footer-logo   { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: var(--tracking-wider); color: var(--k-crema); margin-bottom: 7px; }
.k-footer-tagline { font-family: var(--font-accent); font-style: italic; font-size: 14px; color: var(--k-crema); opacity: 0.7; margin-bottom: 12px; }
.k-footer-desc   { font-family: var(--font-body); font-size: 13px; color: var(--k-crema); opacity: 0.65; line-height: 1.7; }
.k-footer-col-t  { font-family: var(--font-body); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--k-crema); opacity: 0.55; margin-bottom: 14px; }
.k-footer-link   { font-family: var(--font-body); font-size: 13px; color: var(--k-crema); opacity: 0.78; display: block; margin-bottom: 9px; }
.k-footer-link:hover { opacity: 1; }
.k-footer-bottom { border-top: 1px solid rgba(240,233,211,0.1); padding: 18px var(--space-lg) 22px; display: flex; justify-content: space-between; align-items: center; }
.k-footer-copy   { font-family: var(--font-body); font-size: 12px; color: var(--k-crema); opacity: 0.55; }

/* ─── MOTION SCRIPTS ─── */
/* Apply via JS: IntersectionObserver → .visible on .k-reveal */
/* Stagger: delay = index * var(--stagger) */
/* Page transition: body opacity 0→1 on load, 500ms */
/* Sello rotation: animation: spin 20s linear infinite */
/* Drop name: animation: blurIn 800ms ease-out */

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes blurIn { from { opacity: 0; filter: blur(8px); transform: translateY(8px); } to { opacity: 1; filter: blur(0); transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


/* ============================================
   KLAMAHAMA® — Tweaks panel + extras
   ============================================ */

/* Etiqueta — emphasis (no strike, must remain readable) */
.kh-etiqueta {
  position: relative;
  display: inline-block;
  color: var(--k-rosa);
  font-style: italic;
}

/* Body density hooks */
body[data-density="compact"]   { --k-section-y: 44px; }
body[data-density="editorial"] { --k-section-y: 64px; }
body[data-density="spacious"]  { --k-section-y: 96px; }

/* Cursor toggle */
body.kh-no-cursor *, body.kh-no-cursor *::before, body.kh-no-cursor *::after { cursor: auto !important; }
body.kh-no-cursor .k-cursor { display: none; }

/* Sello toggle */
body.kh-no-sello .khero-sello, body.kh-no-sello .kh-sello { animation: none !important; }

/* Touch: hide custom cursor */
@media (pointer: coarse) {
  *, *::before, *::after { cursor: auto !important; }
  .k-cursor { display: none !important; }
}

/* ─── Tweaks Panel ─── */
.kh-tweaks-panel { position: fixed; right: 20px; bottom: 20px; z-index: 9000; font-family: var(--font-body); }
.kh-tweaks-fab {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(77,64,57,0.18);
  background: var(--k-marron); color: var(--k-rosa);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 6px 20px rgba(77,64,57,0.18);
  transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out);
  font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.04em;
}
.kh-tweaks-fab:hover { transform: translateY(-1px) rotate(-6deg); }
.kh-tweaks-fab.hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }
.kh-tweaks-fab span { display: block; }

.kh-tweaks-card {
  position: absolute; right: 0; bottom: 0;
  width: 320px;
  background: var(--k-off-white);
  border: 1px solid rgba(77,64,57,0.18);
  border-radius: 4px;
  padding: 22px 22px 18px;
  box-shadow: 0 16px 48px rgba(77,64,57,0.18);
  opacity: 0; pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.kh-tweaks-card.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.kh-tw-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.kh-tw-eyebrow { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--k-texto-soft); opacity: 0.45; margin-bottom: 4px; }
.kh-tw-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--k-texto); text-transform: uppercase; letter-spacing: 0.04em; }
.kh-tw-close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--k-texto-soft);
  width: 26px; height: 26px; opacity: 0.6;
}
.kh-tw-close:hover { opacity: 1; }

.kh-tw-section { padding: 12px 0; border-top: 1px solid rgba(77,64,57,0.08); }
.kh-tw-section:first-of-type { border-top: none; padding-top: 0; }
.kh-tw-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--k-texto-soft); opacity: 0.65; margin-bottom: 10px; display: flex; justify-content: space-between; }
.kh-tw-val { font-family: var(--font-display); font-weight: 500; font-size: 11px; opacity: 0.9; letter-spacing: 0.04em; }
.kh-tw-hint { font-family: var(--font-accent); font-style: italic; font-size: 11px; color: var(--k-texto-soft); opacity: 0.45; margin-top: 6px; }

.kh-tw-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: rgba(77,64,57,0.05); padding: 3px; border-radius: 2px; }
.kh-tw-seg button {
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  background: transparent; border: none; cursor: pointer;
  padding: 8px 6px; border-radius: 2px;
  color: var(--k-texto-soft); opacity: 0.55;
  transition: all 200ms var(--ease-out);
}
.kh-tw-seg button.on { background: var(--k-marron); color: var(--k-crema); opacity: 1; }
.kh-tw-seg button:hover:not(.on) { opacity: 0.9; }

.kh-tw-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 2px; background: rgba(77,64,57,0.15);
  outline: none; border-radius: 0; cursor: pointer;
}
.kh-tw-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; background: var(--k-rosa);
  border-radius: 50%; cursor: pointer;
  border: 2px solid var(--k-off-white);
  box-shadow: 0 0 0 1px rgba(77,64,57,0.25);
}
.kh-tw-range::-moz-range-thumb {
  width: 14px; height: 14px; background: var(--k-rosa);
  border-radius: 50%; cursor: pointer;
  border: 2px solid var(--k-off-white);
  box-shadow: 0 0 0 1px rgba(77,64,57,0.25);
}

.kh-tw-row { display: flex; gap: 14px; }
.kh-tw-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 11px; color: var(--k-texto-soft); }
.kh-tw-toggle input { accent-color: var(--k-rosa); }

.kh-tw-reset {
  width: 100%; padding: 10px;
  background: transparent; border: 1px solid rgba(77,64,57,0.18);
  border-radius: 2px; cursor: pointer;
  font-family: var(--font-body); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--k-texto-soft); transition: all 200ms;
}
.kh-tw-reset:hover { background: var(--k-marron); color: var(--k-crema); border-color: var(--k-marron); }

.kh-tw-foot { font-family: var(--font-accent); font-style: italic; font-size: 11px; color: var(--k-texto-soft); opacity: 0.4; margin-top: 12px; text-align: center; }

@media (max-width: 720px) {
  .kh-tweaks-card { width: calc(100vw - 40px); }
}
