@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@400;500;600;700;800&display=swap');
/* ════════════════════════════════════════════════════════════════
   ד"ר אדולפו רויטמן — אתר רשמי
   Master stylesheet · RTL · עברית
   פלטה: קלף + דיו + טרהקוטה · טיפוגרפיה: Assistant + Heebo
   ════════════════════════════════════════════════════════════════ */

/* ─── Custom Properties ─────────────────────────────────────────── */
:root {
  /* Palette — parchment / ink / terracotta */
  --paper:        #f6f0e4;
  --paper-2:      #efe6d4;
  --paper-3:      #e8dcc4;
  --ink:          #221a12;
  --ink-soft:     #463b2d;
  --muted:        #6f6151;
  --line:         #ddcfb4;
  --line-strong:  #c8b690;
  --accent:       #9a3b28;
  --accent-deep:  #79291a;
  --accent-tint:  #f0d9cf;
  --dark:         #1b1510;
  --dark-2:       #241c14;
  --dark-paper:   #f1e8d7;
  --dark-muted:   #b9a98d;
  --dark-line:    #4a3c2c;

  /* Spacing scale */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.5rem;   --space-6: 2rem;
  --space-7: 3rem;     --space-8: 4rem;     --space-9: 6rem;
  --space-10: 8.5rem;

  /* Type scale — dramatic contrast (typeContrast 4) */
  --type-display: clamp(2.75rem, 7.5vw, 5.75rem);
  --type-h1:      clamp(2.1rem, 5vw, 3.6rem);
  --type-h2:      clamp(1.6rem, 3.4vw, 2.5rem);
  --type-h3:      clamp(1.2rem, 2vw, 1.5rem);
  --type-body:    clamp(1rem, 1.1vw, 1.125rem);
  --type-lead:    clamp(1.15rem, 1.6vw, 1.4rem);
  --type-small:   clamp(0.85rem, 0.95vw, 0.9375rem);
  --type-mono:    clamp(0.72rem, 0.85vw, 0.8125rem);

  /* Radius — sharp / editorial */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-pill: 9999px;

  /* Motion */
  --dur-fast: 160ms;
  --dur-base: 280ms;
  --dur-slow: 600ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);

  /* Fonts */
  --font-serif: "Assistant", "Heebo", system-ui, sans-serif;
  --font-sans:  "Heebo", system-ui, -apple-system, sans-serif;

  /* Layout */
  --measure: 38rem;          /* readable text column */
  --container: 74rem;
  --container-wide: 84rem;

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

ul, ol { padding: 0; list-style: none; }

button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }

:where(h2, h3) { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--accent); color: var(--paper); }

/* ─── Accessibility: focus + skip-link ──────────────────────────── */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: fixed;
  inset-block-start: -100%;
  inset-inline-start: var(--space-4);
  z-index: 2000;
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--type-small);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.skip-link:focus { inset-block-start: var(--space-4); color: var(--paper); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* ─── Layout utilities ──────────────────────────────────────────── */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container-wide { width: min(100% - 2.5rem, var(--container-wide)); margin-inline: auto; }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--alt { background: var(--paper-2); }
.section--paper3 { background: var(--paper-3); }

.section--dark {
  background: var(--dark);
  color: var(--dark-paper);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--dark-paper); }
.section--dark a { color: #e9b9a8; }
.section--dark a:hover { color: #fff; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--type-mono);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: none;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-block-end: var(--space-4);
}
/* hairline AFTER the text — the eyebrow starts flush with the headings */
.eyebrow::after {
  content: "";
  inline-size: 1.75rem;
  block-size: 1px;
  background: var(--accent);
}
.section--dark .eyebrow { color: #d98e76; }
.section--dark .eyebrow::after { background: #d98e76; }

.lead { font-size: var(--type-lead); color: var(--ink-soft); line-height: 1.6; max-inline-size: var(--measure); }
.section--dark .lead { color: var(--dark-muted); }

.section-head { max-inline-size: 42rem; margin-block-end: clamp(2rem, 4vw, 3.5rem); }
.section-head h2 { font-size: var(--type-h2); }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--type-small);
  line-height: 1;
  padding: 0.95em 1.6em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  min-block-size: 44px;
}
.btn--primary { background: var(--accent); color: var(--paper); }
.btn--primary:hover { background: var(--accent-deep); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.section--dark .btn--primary { background: var(--accent); color: #fff; }
.section--dark .btn--ghost, .hero .btn--ghost { color: var(--dark-paper); border-color: var(--dark-line); }
.section--dark .btn--ghost:hover, .hero .btn--ghost:hover { border-color: var(--dark-paper); color: #fff; }

.text-link {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--type-small);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.text-link::after { content: "←"; transition: transform var(--dur-fast) var(--ease); }

@media (hover: hover) {
  .btn--primary:hover { transform: translateY(-2px); }
  .text-link:hover::after { transform: translateX(-4px); }
}

/* ─── Header ────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-4);
}
.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.1;
}
.brand small {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-block-start: 2px;
}

.desktop-nav { display: none; }
.desktop-nav ul { display: flex; align-items: center; gap: var(--space-6); }
.desktop-nav a {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: var(--space-2);
  border-block-end: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.desktop-nav a:hover { color: var(--ink); }
.desktop-nav a.is-current { color: var(--accent); border-block-end-color: var(--accent); }

.header-cta { display: none; }

/* Mobile menu — native <details> */
.mobile-menu { position: relative; }
.mobile-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px; block-size: 44px;
  font-size: 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu[open] summary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mobile-menu nav {
  position: absolute;
  inset-block-start: calc(100% + var(--space-3));
  inset-inline-end: 0;
  inline-size: max-content;
  min-inline-size: 15rem;
  max-inline-size: calc(100vw - 1.75rem);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px -16px rgba(33, 26, 18, 0.4);
  padding: var(--space-3);
}
.mobile-menu nav ul {
  display: grid;
  gap: 2px;
  padding-block-end: var(--space-3);
  margin-block-end: var(--space-3);
  border-block-end: 1px solid var(--line);
}
.mobile-menu nav ul a {
  display: block;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
}
.mobile-menu nav ul a:hover, .mobile-menu nav ul a.is-current { background: var(--paper-2); color: var(--accent); }
.mobile-menu nav .btn { width: 100%; }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--dark);
  color: var(--dark-paper);
  overflow: hidden;
  padding-block: clamp(4rem, 11vw, 9rem);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(0deg, rgba(20,15,11,0.78), rgba(20,15,11,0.52)), var(--hero-img, none);
  background-size: cover;
  background-position: center;
  filter: saturate(0.8);
}
.hero::after {
  content: "";
  position: absolute;
  inset-block-end: 0; inset-inline: 0;
  block-size: 40%;
  z-index: -1;
  background: linear-gradient(0deg, var(--dark), transparent);
}
.hero .eyebrow { color: #d98e76; }
.hero .eyebrow::after { background: #d98e76; }
.hero h1 {
  font-size: var(--type-display);
  font-weight: 700;
  max-inline-size: 16ch;
  margin-block-end: var(--space-5);
}
.hero .hero-sub {
  font-size: var(--type-lead);
  color: var(--dark-muted);
  max-inline-size: 44ch;
  margin-block-end: var(--space-7);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* compact hero for inner pages — optional photo backdrop via --page-img
   (set inline per page; legal pages leave it unset and stay flat dark) */
.page-hero {
  position: relative;
  background: var(--dark);
  color: var(--dark-paper);
  padding-block: clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(0deg, rgba(20, 15, 11, 0.84), rgba(20, 15, 11, 0.58)), var(--page-img, none);
  background-size: cover;
  background-position: var(--page-pos, center);
  filter: saturate(0.8);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  block-size: 45%;
  z-index: -1;
  background: linear-gradient(0deg, var(--dark), transparent);
}
.page-hero h1 { font-size: var(--type-h1); max-inline-size: 18ch; }
.page-hero p { color: var(--dark-muted); max-inline-size: var(--measure); margin-block-start: var(--space-4); font-size: var(--type-lead); }

/* ─── Value / prose blocks ──────────────────────────────────────── */
.prose { max-inline-size: var(--measure); }
.prose > * + * { margin-block-start: var(--space-5); }
.prose p { color: var(--ink-soft); }
.prose h2 { font-size: var(--type-h2); margin-block-start: var(--space-7); }
.prose h3 { font-size: var(--type-h3); margin-block-start: var(--space-6); color: var(--accent-deep); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose a { font-weight: 500; }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1fr; } .split--bio { grid-template-columns: 1.3fr 1fr; } }

.pull-quote {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 500;
  line-height: 1.32;
  color: var(--ink);
  text-align: center;
  margin-inline: auto;
}
.pull-quote + .lead { text-align: center; max-inline-size: none; }
.section--dark .pull-quote { color: var(--dark-paper); }

/* ─── Stats ─────────────────────────────────────────────────────── */
.stats {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.stat { border-block-start: 2px solid var(--accent); padding-block-start: var(--space-4); }
.stat .stat-value {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: lining-nums;
  letter-spacing: -0.02em;
}
.stat .stat-label {
  font-family: var(--font-sans);
  font-size: var(--type-small);
  color: var(--muted);
  margin-block-start: var(--space-3);
  display: block;
}
.section--dark .stat .stat-label { color: var(--dark-muted); }

/* ─── Cards (services) — container queries ──────────────────────── */
.cards {
  display: grid;
  gap: var(--space-5);
  container-type: inline-size;
  container-name: cards;
}
@container cards (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@container cards (min-width: 980px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3cqi, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.section--alt .card { background: var(--paper); }
.card .card-index {
  font-family: var(--font-sans);
  font-size: var(--type-mono);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.card h3 { font-size: clamp(1.15rem, 3cqi, 1.45rem); }
.card p { color: var(--ink-soft); font-size: var(--type-body); }
.card .card-foot { margin-block-start: auto; padding-block-start: var(--space-3); }

@media (hover: hover) {
  .card:hover { border-color: var(--line-strong); transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(33,26,18,0.45); }
}

/* ─── Credentials list ──────────────────────────────────────────── */
.creds { display: grid; gap: 0; max-inline-size: 52rem; }
.creds li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding-block: var(--space-4);
  border-block-end: 1px solid var(--line);
  font-size: var(--type-body);
}
.creds li::before { content: "✦"; color: var(--accent); font-size: 0.8em; }
.creds li:last-child { border-block-end: 0; }

/* logo / affiliations strip */
.affil { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); }
.affil li {
  font-family: var(--font-sans);
  font-size: var(--type-small);
  color: var(--muted);
  padding-inline-end: var(--space-5);
  border-inline-end: 1px solid var(--line-strong);
}
.affil li:last-child { border-inline-end: 0; padding-inline-end: 0; }

/* ─── FAQ accordion ─────────────────────────────────────────────── */
.faq { max-inline-size: 48rem; }
.faq details { border-block-end: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-size: var(--type-h3);
  font-weight: 500;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
/* drawn +/× (two bars) — a font glyph never sits optically centered */
.faq summary::after {
  content: "";
  inline-size: 14px;
  block-size: 14px;
  flex-shrink: 0;
  color: var(--accent);
  background:
    linear-gradient(currentColor, currentColor) center / 14px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 14px no-repeat;
  transition: transform var(--dur-base) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }

/* ─── Scroll progress hairline ─── */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
  z-index: 300;
  background: linear-gradient(to inline-start, var(--accent), #d98e76);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  pointer-events: none;
}

/* ─── Cross-page fade (View Transitions, progressive) ─── */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }

/* ═══ WOW layer — scholarly edition (hero choreography, ghosts, ornaments) ═══ */

/* header condenses on scroll */
.site-header { transition: box-shadow var(--dur-base) var(--ease), background var(--dur-base); }
.site-header .header-inner { transition: padding var(--dur-base) var(--ease); }
.site-header.is-scrolled { background: color-mix(in srgb, var(--paper) 94%, transparent); box-shadow: 0 10px 30px -22px rgba(33, 26, 18, 0.55); }
.site-header.is-scrolled .header-inner { padding-block: var(--space-3); }

/* button sweep (variant-aware via --sweep / --sweep-ink) */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--sweep, transparent);
  translate: 101% 0;
  transition: translate 0.45s var(--ease-out);
}
.btn--primary { --sweep: var(--accent-deep); }
.btn--primary:hover { background: var(--accent); }
.btn--ghost { --sweep: var(--ink); }
.btn--ghost:hover { color: var(--paper); border-color: var(--ink); }
.section--dark .btn--ghost, .hero .btn--ghost { --sweep: var(--dark-paper); }
.section--dark .btn--ghost:hover, .hero .btn--ghost:hover { color: var(--dark); border-color: var(--dark-paper); }
@media (hover: hover) { .btn:hover::after { translate: 0 0; } }

/* ghost outline word behind light section heads.
   z-index:0 pins a stacking context so the z:-1 ghost stays ABOVE the section
   background permanently — without it the ghost is only visible while the
   reveal transition's opacity<1 context exists, then vanishes ("comes and goes"). */
.section-head { position: relative; z-index: 0; }
.ghost-word {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 0;
  translate: 0 -62%;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 10rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.3px rgba(154, 59, 40, 0.10);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

/* pull-quote — giant gershayim ornament */
.section--dark .pull-quote { position: relative; }
.section--dark .pull-quote::before {
  content: "״";
  position: absolute;
  inset-block-start: -0.55em;
  inset-inline-start: 50%;
  translate: 50% 0;
  font-size: 3.2em;
  line-height: 1;
  color: #d98e76;
  opacity: 0.25;
  pointer-events: none;
}

/* stats — richer numerals (count-up friendly) */
.stat .stat-value { color: var(--accent-deep); font-variant-numeric: lining-nums tabular-nums; }
.section--dark .stat .stat-value { color: #e9b9a8; }

/* footer watermark */
.site-footer { position: relative; overflow: clip; }
.site-footer::before {
  content: "אדולפו רויטמן";
  position: absolute;
  inset-block-end: -0.3em;
  inset-inline-start: 50%;
  translate: 50% 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(4.5rem, 16vw, 13rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.3px rgba(233, 185, 168, 0.10);
  white-space: nowrap;
  pointer-events: none;
}
.site-footer > .container { position: relative; }

@media (prefers-reduced-motion: no-preference) {
  /* hero choreography */
  .hero::before { animation: heroKen 22s var(--ease) infinite alternate; }
  @keyframes heroKen { from { transform: scale(1); } to { transform: scale(1.07); } }
  .hero .eyebrow, .page-hero .eyebrow { animation: heroRise 0.8s 0.05s var(--ease-out) both; }
  .hero .hero-sub, .page-hero p { animation: heroRise 0.9s 0.5s var(--ease-out) both; }
  .hero .hero-actions { animation: heroRise 0.9s 0.7s var(--ease-out) both; }
  @keyframes heroRise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
  /* JS wraps headline words in .w for the stagger; no JS → text shows normally */
  .hero h1 .w, .page-hero h1 .w {
    display: inline-block;
    animation: wordRise 0.85s var(--ease-out) both;
    animation-delay: calc(120ms + var(--i, 0) * 85ms);
  }
  @keyframes wordRise {
    from { opacity: 0; transform: translateY(0.6em) rotate(1deg); filter: blur(3px); }
    to   { opacity: 1; transform: none; filter: none; }
  }
  /* card stagger once the grid reveals */
  .reveal.is-visible .card { animation: cardRise 0.7s var(--ease-out) both; }
  .reveal.is-visible .card:nth-child(1) { animation-delay: 0ms; }
  .reveal.is-visible .card:nth-child(2) { animation-delay: 100ms; }
  .reveal.is-visible .card:nth-child(3) { animation-delay: 200ms; }
  @keyframes cardRise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
  /* stat stagger */
  .reveal.is-visible .stat { animation: cardRise 0.7s var(--ease-out) both; }
  .reveal.is-visible .stat:nth-child(2) { animation-delay: 110ms; }
  .reveal.is-visible .stat:nth-child(3) { animation-delay: 220ms; }
}
.faq details p { color: var(--ink-soft); padding-block-end: var(--space-5); max-inline-size: var(--measure); }

/* ─── Contact form ──────────────────────────────────────────────── */
.contact-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 1fr 1.1fr; } }

.contact-methods dt { font-family: var(--font-sans); font-size: var(--type-mono); letter-spacing: 0.1em; color: var(--muted); margin-block-start: var(--space-5); }
.contact-methods dd { font-size: var(--type-h3); margin-block-start: var(--space-1); }
.contact-methods dd a { text-decoration: none; }

.social-row { display: flex; gap: var(--space-3); margin-block-start: var(--space-6); }
.social-row a {
  inline-size: 44px; block-size: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.social-row a:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.social-row svg { inline-size: 20px; block-size: 20px; }

.form { display: grid; gap: var(--space-5); }
.field { display: grid; gap: var(--space-2); }
.field label { font-family: var(--font-sans); font-size: var(--type-small); font-weight: 600; color: var(--ink); }
.field label .req { color: var(--accent); }
.field input, .field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  width: 100%;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field textarea { min-block-size: 8rem; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--accent-deep); }

.form-consent { font-family: var(--font-sans); font-size: var(--type-small); color: var(--muted); }
.form-message {
  font-family: var(--font-sans); font-size: var(--type-small);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
}
.form-message:empty { display: none; }
.form-message.is-ok { background: var(--accent-tint); color: var(--accent-deep); }
.form-message.is-err { background: #f7ddd6; color: var(--accent-deep); }

.honeypot { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ─── Footer ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: var(--dark-muted);
  padding-block: clamp(3rem, 6vw, 4.5rem) var(--space-6);
  font-size: var(--type-small);
}
.footer-grid {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-brand .brand { color: var(--dark-paper); }
.footer-brand .brand small { color: var(--dark-muted); }
.footer-brand p { color: var(--dark-muted); margin-block-start: var(--space-4); max-inline-size: 32ch; }
.footer-col h4 { font-family: var(--font-sans); font-size: var(--type-mono); letter-spacing: 0.12em; color: var(--dark-paper); margin-block-end: var(--space-4); }
.footer-col ul { display: grid; gap: var(--space-3); }
.footer-col a { color: var(--dark-muted); text-decoration: none; }
.footer-col a:hover { color: var(--dark-paper); }

.footer-legal {
  margin-block-start: clamp(2.5rem, 5vw, 3.5rem);
  padding-block-start: var(--space-5);
  border-block-start: 1px solid var(--dark-line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  justify-content: space-between;
}
.footer-legal nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.footer-legal a { color: var(--dark-muted); text-decoration: none; font-family: var(--font-sans); }
.footer-legal a:hover { color: var(--dark-paper); text-decoration: underline; }
.footer-legal .copy { color: var(--dark-muted); font-family: var(--font-sans); }

/* ─── Consent banner ────────────────────────────────────────────── */
.cookie-consent {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 1500;
  background: var(--ink);
  color: var(--paper);
  border-block-start: 2px solid var(--accent);
  padding: var(--space-4) var(--space-5);
}
.cookie-consent[hidden] { display: none; }
.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3) var(--space-5);
}
.cookie-consent p { font-family: var(--font-sans); font-size: var(--type-small); max-inline-size: 60ch; }
.cookie-consent a { color: #e9b9a8; }
.cookie-consent .btn--primary { background: var(--accent); color: #fff; flex-shrink: 0; }

/* ─── Scroll reveal (motion 2 — subtle) ─────────────────────────── */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ─── Responsive: header breakpoints ────────────────────────────── */
@media (min-width: 860px) {
  .desktop-nav { display: block; }
  .header-cta { display: inline-flex; }
  .mobile-menu { display: none; }
}

/* iOS zoom guard — inputs ≥16px on small screens */
@media (max-width: 767px) {
  .field input, .field textarea { font-size: 16px; }
}

/* ─── Preset sections (client-added structure, styled by THIS site) ─ */
.ff-section-title { font-size: var(--type-h2); margin-block-end: clamp(1.5rem, 3vw, 2.5rem); }

.ff-gallery-grid { display: grid; gap: var(--space-4); }
.ff-gallery--grid .ff-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.ff-gallery--masonry .ff-gallery-grid { display: block; column-gap: var(--space-4); }
@media (min-width: 640px) { .ff-gallery--masonry .ff-gallery-grid { columns: 2; } }
@media (min-width: 1024px) { .ff-gallery--masonry .ff-gallery-grid { columns: 3; } }
.ff-gallery--masonry .ff-gallery-item { break-inside: avoid; margin-block-end: var(--space-4); }
.ff-gallery--carousel .ff-gallery-grid {
  grid-auto-flow: column;
  grid-auto-columns: min(80%, 22rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-block-end: var(--space-3);
}
.ff-gallery--carousel .ff-gallery-item { scroll-snap-align: start; }
.ff-gallery-item { margin: 0; border: 1px solid var(--line); background: var(--paper-2); }
.ff-gallery-item img { inline-size: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.ff-gallery--masonry .ff-gallery-item img { aspect-ratio: auto; }
.ff-gallery-item figcaption { font-family: var(--font-sans); font-size: var(--type-small); color: var(--muted); padding: var(--space-3); }

.ff-quote .ff-quote-text { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 500; line-height: 1.4; max-inline-size: 34ch; }
.ff-quote .ff-quote-by { font-family: var(--font-sans); font-size: var(--type-small); color: var(--muted); margin-block-start: var(--space-4); }
.ff-quote--bordered .ff-quote-text { border-inline-start: 3px solid var(--accent); padding-inline-start: var(--space-6); }
.ff-quote--dark { background: var(--dark); color: var(--dark-paper); }
.ff-quote--dark .ff-quote-by { color: var(--dark-muted); }

/* ─── Print ─────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .cookie-consent, .hero-actions, .mobile-menu, .skip-link, .social-row { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero, .page-hero, .section--dark { background: #fff !important; color: #000 !important; }
  .hero h1, .page-hero h1, .section--dark h2 { color: #000 !important; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
  .section { padding-block: 1.2rem; }
}

/* ─── Reduced data ──────────────────────────────────────────────── */
@media (prefers-reduced-data: reduce) {
  .hero::before { background-image: none; background: var(--dark); }
}

/* ─── Client refinements (WhatsApp requests) ──────────────────────────
   A) Header brand — larger name, drop the tagline. Scoped to .site-header
      so the shared .brand (footer) is untouched, and done in CSS so every
      page (incl. the locked legal pages) stays consistent without editing
      their markup.
   B) Desktop — trim oversized vertical rhythm to cut scrolling while
      keeping comfortable spacing (section padding was up to 7rem/side). */
.site-header .brand { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.6rem); }
.site-header .brand small { display: none; }

@media (min-width: 1024px) {
  .section { padding-block: 5rem; }
  .section--tight { padding-block: 3.25rem; }
  .section-head { margin-block-end: 2.75rem; }
}

/* lecture topics (services): numbered, two columns on wide screens */
.topics { list-style: none; counter-reset: topic; padding: 0; margin: 0; display: grid; gap: 0 var(--space-6); max-inline-size: 60rem; }
@media (min-width: 720px) { .topics { grid-template-columns: 1fr 1fr; } }
.topics li { counter-increment: topic; display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: baseline; padding-block: var(--space-4); border-block-end: 1px solid var(--line); font-size: var(--type-body); }
.topics li::before { content: counter(topic, decimal-leading-zero); font-family: var(--font-sans); font-size: var(--type-mono); font-weight: 600; letter-spacing: 0.1em; color: var(--accent); }

/* a short numbered list inside an offering card (the English series episodes) */
.card .card-list { margin: 0; padding-inline-start: 1.4em; color: var(--ink-soft); font-size: var(--type-small); display: grid; gap: 0.3rem; }

/* language switcher (English and Spanish mirrors under /en/ and /es/) */
.lang-switch { display: flex; gap: var(--space-3); align-items: center; font-family: var(--font-sans); font-size: var(--type-mono); letter-spacing: 0.06em; }
.lang-switch a { color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--accent); }
.lang-switch a.is-current { color: var(--ink); font-weight: 600; pointer-events: none; }
.mobile-menu .lang-switch { margin-block-start: var(--space-4); }
@media (max-width: 859px) { .lang-switch--desktop { display: none; } }

/* left-to-right mirrors: arrows point the other way */
[dir="ltr"] .text-link::after { content: "\2192"; }
[dir="ltr"] .text-link:hover::after { transform: translateX(4px); }
