/* ==========================================================================
   Sigal base: tokens, reset, typography.
   Colour and font variables come from Site Settings (partials/brand_vars.html).
   ========================================================================== */

:root {
  /* Fallbacks if brand_vars is missing */
  --color-primary: #3D1E77;
  --color-primary-dark: #2A1354;
  --color-accent: #EA3989;
  --color-accent-dark: #C21F6B;
  --color-bg: #FBF9FC;
  --color-surface: #F3EEF8;
  --color-blush: #FCEEF4;
  --color-text: #241A33;
  --color-muted: #6E6680;
  --font-heading: "Bodoni Moda", Didot, Georgia, serif;
  --font-body: "Jost", system-ui, sans-serif;
  --font-accent: "Allura", cursive;

  /* Derived colours */
  --color-line: color-mix(in srgb, var(--color-primary) 14%, transparent);
  --color-line-strong: color-mix(in srgb, var(--color-primary) 30%, transparent);
  --color-white: #fff;
  --color-whatsapp: #1FA855;
  --color-success: #2E7D4F;
  --color-error: #B3261E;

  /* Type scale: minor third, fluid between 360px and 1280px */
  --step--1: clamp(0.83rem, 0.8rem + 0.12vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.3vw, 1.33rem);
  --step-2: clamp(1.44rem, 1.32rem + 0.5vw, 1.75rem);
  --step-3: clamp(1.73rem, 1.52rem + 0.9vw, 2.35rem);
  --step-4: clamp(2.07rem, 1.72rem + 1.55vw, 3.2rem);
  --step-5: clamp(2.49rem, 1.9rem + 2.6vw, 4.4rem);

  /* Spacing */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: clamp(3rem, 2.2rem + 3.5vw, 5.5rem);

  /* Shape and depth: images stay near-square, controls are soft pills */
  --radius-s: 4px;
  --radius-m: 10px;
  --radius-l: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 10px 30px -12px color-mix(in srgb, var(--color-primary) 30%, transparent);

  --container: 1280px;
  --container-narrow: 760px;
  --gutter: clamp(1rem, 0.6rem + 1.8vw, 2rem);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Reset ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
a { color: inherit; }
[x-cloak] { display: none !important; }

/* Typography ------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.12;
  color: var(--color-primary);
  text-wrap: balance;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--step-5); font-weight: 400; }
h2 { font-size: var(--step-4); font-weight: 400; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { text-wrap: pretty; max-width: 68ch; }
.lead { font-size: var(--step-1); color: var(--color-muted); font-weight: 300; }
.text-muted { color: var(--color-muted); }
small, .small { font-size: var(--step--1); }

/* Text links inside running copy only; components style their own links. */
:where(p, li, dd, .prose) a:not([class]) {
  color: var(--color-accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
:where(p, li, dd, .prose) a:not([class]):hover { color: var(--color-primary); }

.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--step-3); margin-top: 1.6em; }
.prose h3 { font-size: var(--step-2); margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .35em; }

code { font-size: .9em; background: var(--color-surface); padding: .1em .35em; border-radius: var(--radius-s); }

/* Focus and accessibility ----------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}
.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: absolute; left: var(--space-s); top: -100px; z-index: 100;
  background: var(--color-primary); color: var(--color-white);
  padding: var(--space-2xs) var(--space-s); border-radius: var(--radius-pill);
}
.skip-link:focus { top: var(--space-s); }
main:focus { outline: none; }

@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;
  }
}
