/* ==========================================================================
   Dubnov 8 — base.css
   Design tokens, reset, RTL foundation, accessibility utilities.
   Authored 2026. Replaces the Colorlib "The Venue" stylesheets.
   ========================================================================== */

:root {
  /* ---- Colour: cream / stone / ink ------------------------------------ */
  --surface:      #F6F1E9;
  --surface-alt:  #EDE6DA;
  --surface-deep: #E3D9C9;
  --ink:          #26221E;
  --ink-muted:    #5A5249;
  --line:         #D8CEBE;
  --accent:       #8A6A4F;
  --accent-deep:  #6E5038;
  --on-accent:    #F6F1E9;
  --overlay:      rgba(28, 24, 20, .46);

  /* ---- Type ------------------------------------------------------------ */
  --font-serif: "Frank Ruhl Libre", "Noto Serif Hebrew", Georgia, "Times New Roman", serif;
  --font-sans:  "Heebo", "Assistant", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --fs-900: clamp(2.5rem, 1.5rem + 4.6vw, 4.5rem);
  --fs-800: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);
  --fs-700: clamp(1.4rem, 1.15rem + 1.2vw, 1.9rem);
  --fs-600: clamp(1.15rem, 1.05rem + .5vw, 1.35rem);
  --fs-400: 1.125rem;
  --fs-300: 1rem;
  --fs-200: .8125rem;

  --lh-tight: 1.18;
  --lh-body:  1.75;

  /* ---- Spacing --------------------------------------------------------- */
  --sp-1: .25rem;  --sp-2: .5rem;  --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;   --sp-7: 3rem;    --sp-8: 4rem;
  --sp-9: 6rem;    --sp-10: 8rem;
  --section-y: clamp(3.5rem, 2rem + 6vw, 7rem);

  /* ---- Radii / shadow -------------------------------------------------- */
  --r-sm: 4px;  --r-md: 8px;  --r-lg: 14px;  --r-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(38,34,30,.08);
  --shadow-md: 0 8px 24px rgba(38,34,30,.10);
  --shadow-lg: 0 20px 50px rgba(38,34,30,.16);

  /* ---- Layout ---------------------------------------------------------- */
  --container:      1200px;
  --container-text: 68ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --header-h: 5rem;

  /* ---- Motion / layers ------------------------------------------------- */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur:  360ms;
  --z-float: 90;  --z-header: 100;  --z-overlay: 200;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 var(--fs-400)/var(--lh-body) var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--lh-tight);
  text-wrap: balance;
  /* Hebrew has no case and no tracking conventions — never letterspace it. */
  letter-spacing: 0;
}

p { margin: 0; text-wrap: pretty; }

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

img, iframe, svg, video {
  display: block;
  max-inline-size: 100%;
}
img { block-size: auto; }

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

button { font: inherit; color: inherit; }

/* Latin-only wordmarks/eyebrows may be tracked and uppercased.
   Scope this class tightly — never apply it to Hebrew text. */
.latin {
  font-family: var(--font-sans);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.skip-link {
  position: absolute;
  inset-inline-start: var(--sp-4);
  inset-block-start: -4rem;
  z-index: calc(var(--z-overlay) + 1);
  padding: var(--sp-2) var(--sp-4);
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: inset-block-start var(--dur) var(--ease);
}
.skip-link:focus { inset-block-start: var(--sp-4); }

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

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

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  max-inline-size: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose { max-inline-size: min(var(--container-text), 100%); }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-alt); }

/* ==========================================================================
   Reveal on scroll — opt-in, added by JS only when safe.
   Content is visible by default so JS-off and reduced-motion users see it all.
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

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