/* ============================================================
   Dahiana Terapias Holísticas — base.css
   Design tokens, reset, typography foundations
   ============================================================ */

:root {
  /* Type scale (fluid) */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.6vw,  1.375rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.2vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.4rem  + 2.4vw,  3.25rem);
  --text-3xl:  clamp(2.5rem,   1.4rem  + 4vw,    4.75rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem;    --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;    --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;   --space-20: 5rem;   --space-24: 6rem;

  /* Color — Salvia/Cream warm holistic palette (light) */
  --color-bg:           #f6f2ea;
  --color-bg-soft:      #f9f5ed;
  --color-surface:      #fbf8f2;
  --color-surface-2:    #f1ece3;
  --color-surface-3:    #ebe5da;
  --color-border:       #d8d0c2;
  --color-border-soft:  rgba(35, 51, 45, 0.08);
  --color-text:         #23332d;
  --color-text-muted:   #5a6f67;
  --color-text-faint:   #8da199;
  --color-primary:      #6e9382;   /* salvia */
  --color-primary-hover:#587a6b;
  --color-primary-soft: #dfe9e3;
  --color-accent:       #c7b895;   /* warm gold */
  --color-accent-hover: #b3a37c;
  --color-mystic:       #6b4f8a;   /* subtle purple, echoes hero photo */
  --color-success:      #437a22;
  --color-error:        #a12c7b;
  --color-whatsapp:     #25D366;

  /* Radii */
  --radius-sm: 0.5rem;  --radius-md: 0.85rem; --radius-lg: 1.25rem;
  --radius-xl: 1.75rem; --radius-2xl: 2.25rem; --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 4px 14px rgba(35, 51, 45, 0.06);
  --shadow-md: 0 14px 36px rgba(35, 51, 45, 0.10);
  --shadow-lg: 0 28px 60px rgba(35, 51, 45, 0.14);

  /* Layout */
  --content: 1180px;
  --content-narrow: 880px;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Motion */
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark mode (opt-in via [data-theme="dark"]) */
[data-theme="dark"] {
  --color-bg:           #1a1f1c;
  --color-bg-soft:      #1f2522;
  --color-surface:      #232a26;
  --color-surface-2:    #2a322e;
  --color-surface-3:    #303834;
  --color-border:       #3a4641;
  --color-border-soft:  rgba(255, 255, 255, 0.08);
  --color-text:         #ece8de;
  --color-text-muted:   #a9b8b2;
  --color-text-faint:   #6e7d77;
  --color-primary:      #9ab9aa;
  --color-primary-hover:#b9d2c4;
  --color-primary-soft: rgba(154, 185, 170, 0.16);
  --color-accent:       #d8c89c;
  --color-mystic:       #b09bd1;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 60px rgba(0, 0, 0, 0.55);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

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

::selection { background: var(--color-primary-soft); color: var(--color-text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip link */
.skip-link {
  position: absolute; top: 0; left: 1rem;
  background: var(--color-primary); color: #fff;
  padding: 0.5rem 1rem; border-radius: var(--radius-md);
  z-index: 100;
  transform: translateY(-120%);
  transition: transform var(--transition);
}
.skip-link:focus { transform: translateY(0.75rem); }

/* Container */
.container {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}
.container-narrow {
  width: min(calc(100% - 2rem), var(--content-narrow));
  margin-inline: auto;
}

/* Visually hidden */
.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;
}
