/* ============================================================
   Wonders of Computational Manuscriptology — Tel Aviv University
   Design system
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Parchment & ink */
  --parchment:    #FBF8F2;
  --parchment-2:  #F5EFE4;
  --parchment-3:  #EFE7D8;
  --surface:      #FFFDF9;
  --ink:          #2C2722;
  --ink-2:        #5A5249;
  --ink-3:        #8B8076;
  --rule:         #E6DCCB;
  --rule-soft:    #F0E9DC;

  /* Pastel accents */
  --indigo:       #5D6E8E;
  --indigo-deep:  #46546E;
  --indigo-tint:  #E4E9F1;
  --rose:         #BE8A79;
  --rose-tint:    #F5E5DD;
  --sage:         #7F9A8B;
  --sage-tint:    #E1EBE4;
  --gold:         #B99A55;
  --gold-tint:    #F3EAD3;
  --plum:         #90869F;
  --plum-tint:    #ECE7F1;

  /* Type */
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hebrew: "Frank Ruhl Libre", "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Space & shape */
  --wrap: 1140px;
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(44,39,34,.05), 0 4px 14px rgba(44,39,34,.05);
  --shadow: 0 2px 4px rgba(44,39,34,.04), 0 14px 40px rgba(44,39,34,.08);
  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --parchment:   #1B1815;
    --parchment-2: #221E1A;
    --parchment-3: #2A251F;
    --surface:     #232019;
    --ink:         #EDE5D8;
    --ink-2:       #BCB1A2;
    --ink-3:       #8E8478;
    --rule:        #3A342C;
    --rule-soft:   #2E2922;
    --indigo:      #9CB0D0;
    --indigo-deep: #B6C6DE;
    --indigo-tint: #262C38;
    --rose:        #D6A493;
    --rose-tint:   #362B26;
    --sage:        #9CB9A8;
    --sage-tint:   #26302A;
    --gold:        #D6B978;
    --gold-tint:   #352E1E;
    --plum:        #B3A8C2;
    --plum-tint:   #2C2733;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
    --shadow: 0 2px 4px rgba(0,0,0,.3), 0 14px 40px rgba(0,0,0,.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Faint parchment grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(185,154,85,.06), transparent 45%),
    radial-gradient(circle at 82% 78%, rgba(93,110,142,.055), transparent 48%);
}
body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--indigo-deep); text-decoration-color: color-mix(in srgb, var(--indigo) 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

::selection { background: var(--gold-tint); color: var(--ink); }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--parchment);
  padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); font-weight: 500; }
h3 { font-size: 1.3rem; letter-spacing: 0; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1rem;
}
.eyebrow--indigo { color: var(--indigo); }

.lede { font-size: 1.12rem; color: var(--ink-2); line-height: 1.75; max-width: 68ch; }
.muted { color: var(--ink-3); }
.he { font-family: var(--hebrew); direction: rtl; unicode-bidi: isolate; }
.small { font-size: .875rem; }
.caption { font-size: .8rem; color: var(--ink-3); line-height: 1.6; }

/* ---------- Ornamental rule ---------- */
.ornament {
  display: flex; align-items: center; gap: 14px;
  color: var(--gold); margin: 0 0 1.6rem;
}
.ornament::before, .ornament::after { content: ""; height: 1px; background: var(--rule); flex: 1; }
.ornament span { font-size: .9rem; letter-spacing: .3em; opacity: .8; }
.ornament--left::before { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans); font-size: .9rem; font-weight: 500; letter-spacing: .01em;
  padding: .78em 1.5em; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--indigo); color: #FFFDF9; box-shadow: 0 6px 18px color-mix(in srgb, var(--indigo) 26%, transparent); }
.btn-primary:hover { background: var(--indigo-deep); box-shadow: 0 10px 26px color-mix(in srgb, var(--indigo) 32%, transparent); }
.btn-ghost { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo-deep); background: color-mix(in srgb, var(--indigo-tint) 60%, transparent); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--parchment);
  background: color-mix(in srgb, var(--parchment) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--rule); }

.header-inner { display: flex; align-items: center; gap: 20px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin-right: auto; }
.brand-mark {
  flex: none;
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--gold-tint), var(--indigo-tint));
  border: 1px solid var(--rule);
  font-family: var(--hebrew); font-size: 1.25rem; color: var(--indigo-deep);
  line-height: 1; padding-bottom: 2px;
  transition: transform .4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-6deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-title { font-family: var(--display); font-size: 1.02rem; font-weight: 600; letter-spacing: -0.005em; }
.brand-sub { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  position: relative; font-size: .875rem; color: var(--ink-2); text-decoration: none;
  padding: .5em .8em; border-radius: var(--r-sm); transition: color .2s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: .8em; right: .8em; bottom: .18em; height: 1px;
  background: var(--indigo); transform: scaleX(0); transform-origin: right;
  transition: transform .3s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.site-nav a.is-current { color: var(--ink); font-weight: 500; }
.site-nav a.is-current::after { transform: scaleX(1); background: var(--gold); }
.site-nav .nav-cta {
  margin-left: 8px; background: var(--ink); color: var(--parchment);
  border-radius: 999px; padding: .5em 1.15em; font-weight: 500;
}
.site-nav .nav-cta::after { display: none; }
.site-nav .nav-cta:hover { background: var(--indigo-deep); color: #FFFDF9; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--rule);
  border-radius: 10px; background: transparent; cursor: pointer;
  padding: 0; place-items: center; gap: 4px;
}
.nav-toggle span { display: block; width: 17px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 920px) {
  .brand-title { font-size: .95rem; max-width: 15ch; }
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--parchment); border-bottom: 1px solid var(--rule);
    padding: 8px 24px 20px;
    box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .85em .2em; border-bottom: 1px solid var(--rule-soft); font-size: 1rem; }
  .site-nav a::after { display: none; }
  .site-nav .nav-cta { margin: 14px 0 0; text-align: center; justify-content: center; border-bottom: 0; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tight { padding-block: clamp(48px, 6vw, 76px); }
.section--tint { background: var(--parchment-2); border-block: 1px solid var(--rule-soft); }
.section-head { max-width: 70ch; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .ornament { justify-content: center; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 8vw, 104px) clamp(40px, 5vw, 64px); overflow: hidden; }
.hero-inner { max-width: 900px; }
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  font-size: .78rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 1.6rem;
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.hero h1 { margin-bottom: .35em; }
.hero h1 .accent { color: var(--indigo); font-style: italic; }
.hero-sub { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--ink-2); max-width: 60ch; margin-bottom: 2rem; line-height: 1.65; }
.hero .btn-row { margin-bottom: 2.2rem; }

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .74rem; letter-spacing: .04em; padding: .38em .85em; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink-2);
}

/* Manuscript band under the hero */
.hero-band {
  position: relative; margin-top: clamp(36px, 5vw, 56px); margin-inline: auto;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  aspect-ratio: 1002 / 466;
  max-width: 900px;
  background: var(--parchment-3);
}
.hero-band img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-band img { filter: brightness(.85); }
}
.hero-band-credit {
  position: absolute; right: 12px; bottom: 10px; z-index: 2;
  font-size: .66rem; letter-spacing: .04em; color: var(--ink-3);
  background: var(--parchment);
  background: color-mix(in srgb, var(--parchment) 78%, transparent);
  backdrop-filter: blur(6px);
  padding: .3em .7em; border-radius: 999px; border: 1px solid var(--rule-soft);
  text-decoration: none;
}
.hero-band-credit:hover { color: var(--ink); }

/* ---------- Page header (interior pages) ---------- */
.page-head { padding-block: clamp(48px, 6.5vw, 86px) clamp(28px, 3.5vw, 44px); }
.page-head h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
.page-head .lede { margin-top: .4em; }
.breadcrumb { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1rem; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
/* Always two columns on wider screens, so four cards sit as an even 2x2. */
.grid-2x2 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2x2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 26px 26px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-2); font-size: .945rem; }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--indigo) 26%, var(--rule)); }

.card-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  margin-bottom: 16px; border: 1px solid var(--rule-soft);
}
.card-icon svg { width: 20px; height: 20px; }
.i-indigo { background: var(--indigo-tint); color: var(--indigo-deep); }
.i-rose   { background: var(--rose-tint);   color: var(--rose); }
.i-sage   { background: var(--sage-tint);   color: var(--sage); }
.i-gold   { background: var(--gold-tint);   color: var(--gold); }
.i-plum   { background: var(--plum-tint);   color: var(--plum); }

/* ---------- Key dates ---------- */
.dates { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.date-cell { background: var(--surface); padding: 26px 24px; transition: background-color .3s var(--ease); }
.date-cell:hover { background: var(--parchment-2); }
.date-cell .date-label { font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.date-cell .date-value { font-family: var(--display); font-size: 1.55rem; font-weight: 500; line-height: 1.2; color: var(--ink); }
.date-cell .date-note { font-size: .82rem; color: var(--ink-3); margin-top: 8px; }
.date-cell.is-highlight { background: var(--gold-tint); background: color-mix(in srgb, var(--gold-tint) 55%, var(--surface)); }
.date-cell.is-highlight .date-value { color: var(--indigo-deep); }

.tba {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--sans); font-size: .78rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--rose); background: var(--rose-tint); border-radius: 999px; padding: .3em .8em;
  vertical-align: middle;
}
.tba::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .7; }

/* ---------- Split (image + text) ---------- */
.split { display: grid; gap: clamp(28px, 5vw, 60px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split--wide-text { grid-template-columns: 1.15fr .85fr; } }
.split-figure { margin: 0; }
.split-figure img {
  width: 100%; border-radius: var(--r); border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  filter: sepia(.14) saturate(.82) contrast(1.01);
}
.split-figure figcaption { font-size: .78rem; color: var(--ink-3); margin-top: 12px; line-height: 1.55; }

/* ---------- Pull quote ---------- */
.pullquote {
  border-left: 2px solid var(--gold); padding: 4px 0 4px 24px; margin: 2rem 0;
  font-family: var(--display); font-size: 1.35rem; font-style: italic; line-height: 1.5; color: var(--ink-2);
}

/* ---------- Feature list ---------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: .96rem; line-height: 1.6; }
.checklist li::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: .55em; border-radius: 2px;
  background: var(--sage); transform: rotate(45deg);
}
.checklist.numbered { counter-reset: step; }
.checklist.numbered li::before {
  counter-increment: step; content: counter(step); transform: none; background: var(--indigo-tint);
  color: var(--indigo-deep); width: 24px; height: 24px; border-radius: 50%; margin-top: .05em;
  display: grid; place-items: center; font-size: .74rem; font-weight: 600; font-family: var(--sans);
}

/* ---------- OCR demo ---------- */
.ocr { position: relative; }
.ocr-stage {
  display: grid; gap: 20px; grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 900px) { .ocr-stage { grid-template-columns: 1.5fr 1fr; } }

.ocr-page {
  position: relative; overflow: visible;
  filter: drop-shadow(0 10px 22px rgba(20,12,4,.35));
  /* The SVG draws its own torn, darkened parchment, so the box stays bare
     and the drop-shadow follows the irregular edge. */
  background: none;
  display: flex; align-items: center;
}
.ocr-page svg { display: block; width: 100%; height: auto; }

.ocr-panel {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 22px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow-sm);
}
.ocr-panel-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 12px; border-bottom: 1px solid var(--rule-soft);
}
.ocr-panel-head .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.ocr-out {
  font-family: var(--hebrew); direction: rtl; text-align: right;
  font-size: 1.32rem; line-height: 1.85; color: var(--ink); margin: 0; min-height: 3.4em;
}
.ocr-out .w { opacity: 0; transition: opacity .35s var(--ease); }
.ocr-out .w.on { opacity: 1; }
.ocr-translit {
  font-family: var(--mono); font-size: .78rem; line-height: 1.7; color: var(--ink-3);
  margin: 0; min-height: 2.6em; word-break: break-word;
}
.ocr-meter { height: 4px; border-radius: 999px; background: var(--rule-soft); overflow: hidden; }
.ocr-meter span { display: block; height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--sage), var(--indigo)); transition: width .4s var(--ease); }
.ocr-stats { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }
.ocr-stats b { color: var(--ink-2); font-weight: 500; }

.ocr-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.ocr-step {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .35em .7em; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-3);
  transition: all .3s var(--ease);
}
.ocr-step.on { border-color: transparent; background: var(--indigo-tint); color: var(--indigo-deep); }
.ocr-step.done { border-color: transparent; background: var(--sage-tint); color: var(--sage); }

/* ---------- Program timeline ---------- */
.day-tabs { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.day-tab {
  font-family: var(--sans); font-size: .88rem; padding: .6em 1.3em; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: all .25s var(--ease);
}
.day-tab:hover { border-color: var(--indigo); color: var(--indigo-deep); }
.day-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--parchment); }

.schedule { border-top: 1px solid var(--rule); }
.slot {
  display: grid; gap: 4px 28px; grid-template-columns: 1fr;
  padding: 22px 0; border-bottom: 1px solid var(--rule-soft);
}
@media (min-width: 720px) { .slot { grid-template-columns: 130px 1fr; } }
.slot-time { font-family: var(--mono); font-size: .82rem; color: var(--ink-3); padding-top: .2em; letter-spacing: .02em; }
.slot-title { font-family: var(--display); font-size: 1.22rem; font-weight: 600; margin: 0 0 .25em; }
.slot-desc { font-size: .92rem; color: var(--ink-2); margin: 0; }
.slot--break .slot-title { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--ink-3); }
.slot--keynote { background: linear-gradient(90deg, color-mix(in srgb, var(--gold-tint) 45%, transparent), transparent 62%); border-radius: var(--r-sm); padding-inline: 16px; margin-inline: -16px; }
.pill {
  display: inline-block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .25em .7em; border-radius: 999px; margin-left: .6em; vertical-align: .12em;
  background: var(--indigo-tint); color: var(--indigo-deep);
}
.pill--gold { background: var(--gold-tint); color: color-mix(in srgb, var(--gold) 80%, var(--ink)); }
.pill--sage { background: var(--sage-tint); color: var(--sage); }

/* ---------- People ---------- */
.person {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 24px; display: flex; gap: 16px; align-items: flex-start;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.person:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.person-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-size: 1.05rem; font-weight: 600;
  background: var(--indigo-tint); color: var(--indigo-deep); border: 1px solid var(--rule-soft);
}
.person:nth-child(3n+2) .person-avatar { background: var(--rose-tint); color: var(--rose); }
.person:nth-child(3n+3) .person-avatar { background: var(--sage-tint); color: var(--sage); }
.person-name { font-family: var(--display); font-size: 1.13rem; font-weight: 600; margin: 0 0 .15em; }
.person-role { font-size: .82rem; color: var(--indigo); margin: 0 0 .3em; letter-spacing: .01em; }
.person-affil { font-size: .85rem; color: var(--ink-3); margin: 0; line-height: 1.5; }

@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Callout ---------- */
.callout {
  border: 1px solid var(--rule); border-left: 3px solid var(--indigo);
  background: var(--indigo-tint);
  background: color-mix(in srgb, var(--indigo-tint) 40%, var(--surface));
  border-radius: 0 var(--r) var(--r) 0; padding: 22px 24px;
}
.callout h4 { margin-bottom: .4em; }
.callout p { font-size: .93rem; color: var(--ink-2); }
.callout--gold { border-left-color: var(--gold); background: var(--gold-tint); background: color-mix(in srgb, var(--gold-tint) 40%, var(--surface)); }
.callout--sage { border-left-color: var(--sage); background: var(--sage-tint); background: color-mix(in srgb, var(--sage-tint) 40%, var(--surface)); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--parchment-2); border-block: 1px solid var(--rule-soft); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-inner h2 { margin: 0; }
.cta-inner p { color: var(--ink-2); margin: .4em 0 0; }

/* ---------- Partners ---------- */
.partners { display: flex; flex-wrap: wrap; gap: 14px; }
.partner {
  flex: 1 1 210px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 20px 22px; text-decoration: none; color: inherit;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.partner:hover { transform: translateY(-3px); border-color: var(--indigo); }
.partner-name { font-family: var(--display); font-size: 1.05rem; font-weight: 600; display: block; margin-bottom: .2em; }
.partner-desc { font-size: .8rem; color: var(--ink-3); line-height: 1.5; }

.logos { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.logo-row { display: flex; justify-content: center; gap: 14px; width: 100%; }
.logo-tile {
  display: flex; align-items: center; justify-content: center; flex: 0 1 140px; min-width: 0; aspect-ratio: 1; padding: 12px;
  background: #fff; border: 1px solid var(--rule); border-radius: var(--r);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.logo-tile:hover { transform: translateY(-3px); border-color: var(--indigo); }
.logo-tile img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@media (max-width: 520px) { .logos, .logo-row { gap: 8px; } .logo-tile { padding: 6px; } }

/* ---------- Contact ---------- */
.contact-line { display: flex; gap: 14px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--rule-soft); }
.contact-line:last-child { border-bottom: 0; }
.contact-key { flex: none; width: 120px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-top: .25em; }
.contact-val { font-size: .98rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--parchment-2); border-top: 1px solid var(--rule); padding-block: clamp(48px, 6vw, 72px) 0; margin-top: 0; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.7fr 1fr 1.1fr; } }
.footer-brand .brand-mark { margin-bottom: 14px; }
.footer-title { font-family: var(--display); font-size: 1.2rem; font-weight: 600; margin: 0 0 .4em; }
.footer-blurb { font-size: .9rem; color: var(--ink-2); max-width: 42ch; }
.footer-h { font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 1em; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6em; }
.footer-links a { font-size: .9rem; color: var(--ink-2); text-decoration: none; transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--indigo-deep); }
.footer-bottom {
  margin-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--rule);
  padding-block: 22px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: .78rem; color: var(--ink-3);
}
.footer-bottom a { color: inherit; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- HTR demo: SVG internals ----------
   The panel is a simulated manuscript surface, so its colours stay
   "parchment" in both themes rather than following the ink tokens. */
.htr-rule   { stroke: rgba(185,154,85,.34); stroke-width: 1; }
.htr-word   { font-family: var(--hebrew); font-size: 30px; fill: #6B4A2A; }
.htr-region { fill: none; stroke: #7F9A8B; stroke-width: 1.2; stroke-dasharray: 5 4; opacity: 0; transition: opacity .5s var(--ease); }
.htr-region.on { opacity: .9; }
.htr-box {
  fill: rgba(93,110,142,.12); stroke: #5D6E8E; stroke-width: 1; opacity: 0;
  transform-box: fill-box; transform-origin: center; transform: scale(.84);
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.htr-box.on { opacity: 1; transform: scale(1); }
#htr-scan { opacity: 0; will-change: transform; }
.htr-stain { fill: rgba(150,110,60,.07); }

/* ---------- Narrow phones ---------- */
@media (max-width: 600px) {
  .header-inner { min-height: 66px; }
  .brand-mark { width: 34px; height: 34px; font-size: 1.1rem; border-radius: 9px; }
  .brand-title { font-size: .82rem; line-height: 1.25; max-width: none; }
  .brand-sub { display: none; }

  /* A 3:1 band collapses to a sliver on a phone; give it a readable shape. */
  .hero-band-credit { font-size: .6rem; right: 8px; bottom: 8px; }

  .pullquote { padding-left: 18px; font-size: 1.2rem; }
  .contact-line { flex-direction: column; gap: 4px; }
  .contact-key { width: auto; }
  .slot--keynote { margin-inline: 0; padding-inline: 12px; }
}
