:root {
  --ink: #172434;
  --blue: #537296;
  --blue-deep: #142a44;
  --cream: #f3ead8;
  --cream-light: #fbf7ef;
  --gold: #c79a4d;
  --olive: #657350;
  --line: rgba(20, 42, 68, 0.16);
  --shadow: 0 22px 60px rgba(20, 42, 68, 0.18);
  --radius: 8px;
  font-family: "Noto Sans Hebrew", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream-light);
  font-size: 18px;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.62), transparent 28%, transparent 72%, rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 18% 8%, rgba(199, 154, 77, 0.13), transparent 34%);
  z-index: -1;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 34px;
  background: rgba(251, 247, 239, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--blue-deep);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 10px;
  border: 1.5px solid var(--olive);
  border-top: 0;
  border-radius: 0 0 20px 20px;
}

.brand-mark::before {
  right: 4px;
  top: 7px;
  transform: rotate(-26deg);
}

.brand-mark::after {
  left: 3px;
  bottom: 7px;
  transform: rotate(154deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 16px;
  color: rgba(23, 36, 52, 0.78);
}

.main-nav a {
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--blue-deep);
  border-color: var(--gold);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 6px auto;
  background: var(--blue-deep);
}

.hero {
  position: relative;
  min-height: 86vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: white;
  background: var(--blue-deep);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 42, 68, 0.78), rgba(20, 42, 68, 0.38) 48%, rgba(20, 42, 68, 0.08)),
    linear-gradient(0deg, rgba(20, 42, 68, 0.72), transparent 46%);
}

.hero-content {
  position: relative;
  width: min(760px, calc(100% - 44px));
  margin: 0 auto 72px;
  padding-inline-start: min(10vw, 110px);
  justify-self: start;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #f6d99b;
  font-size: clamp(19px, 2.2vw, 26px);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.hero h1 {
  margin: 0;
  font-size: clamp(54px, 9vw, 112px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-subtitle {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
}

.hero-copy {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.hero-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.filter-button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: white;
  background: var(--blue);
  box-shadow: 0 12px 32px rgba(20, 42, 68, 0.22);
}

.button.secondary {
  color: var(--blue-deep);
  border-color: var(--line);
  background: white;
}

.button.ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.section,
.intro-band,
.book-section,
.quote-band {
  padding: 92px 0;
}

.section-inner {
  width: min(1120px, calc(100% - 42px));
  margin: 0 auto;
}

.intro-band {
  background: var(--cream);
}

.intro-grid,
.book-grid,
.two-column,
.contact-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(34px, 6vw, 76px);
  align-items: center;
}

.portrait-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--blue-deep);
  max-height: 560px;
}

.portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h2 {
  margin: 0;
  color: var(--blue-deep);
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.15;
  letter-spacing: 0;
}

.intro-text p:not(.eyebrow),
.book-copy p,
.prose p {
  color: rgba(23, 36, 52, 0.78);
  font-size: 19px;
}

.two-column {
  align-items: start;
}

.prose p:first-child {
  margin-top: 0;
}

.bio-details {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.bio-details summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: var(--blue-deep);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.bio-details summary::marker {
  color: var(--gold);
}

.bio-full {
  padding: 4px 24px 26px;
  border-top: 1px solid var(--line);
}

.bio-full h3 {
  margin: 28px 0 8px;
  color: var(--blue-deep);
  font-size: 25px;
  line-height: 1.25;
}

.bio-full p {
  margin: 0 0 14px;
}

.timeline-embed {
  margin: 34px 0 0;
}

.timeline-embed img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 16px 42px rgba(20, 42, 68, 0.12);
}

.timeline-embed figcaption {
  margin-top: 10px;
  color: rgba(23, 36, 52, 0.64);
  font-size: 15px;
}

.bio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.book-section {
  background: linear-gradient(135deg, var(--blue-deep), #244666);
  color: white;
  position: relative;
  overflow: hidden;
}

.book-section::before {
  content: "";
  position: absolute;
  inset-inline-start: 5%;
  top: 40px;
  width: 180px;
  height: 220px;
  border: 1px solid rgba(199, 154, 77, 0.26);
  border-radius: 46% 54% 52% 48%;
  transform: rotate(-18deg);
}

.book-section h2,
.book-section .book-copy p {
  color: white;
}

.book-section .book-copy p {
  color: rgba(255, 255, 255, 0.82);
}

.book-photo {
  margin: 0;
}

.book-photo img {
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.book-photo figcaption {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.library-note {
  max-width: 620px;
  margin: 12px 0 0;
  color: rgba(23, 36, 52, 0.66);
  font-size: 17px;
}

.search-box {
  display: grid;
  gap: 7px;
  min-width: min(320px, 100%);
  color: rgba(23, 36, 52, 0.68);
  font-size: 14px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--ink);
  background: white;
  font: inherit;
  font-size: 16px;
}

.filter-row {
  margin: 0 0 28px;
}

.filter-button {
  color: var(--blue-deep);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.filter-button.is-active {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.resource-card {
  min-height: 148px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 14px 40px rgba(20, 42, 68, 0.08);
}

.resource-type {
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
}

.resource-card h3 {
  margin: 0;
  color: var(--blue-deep);
  font-size: 22px;
  line-height: 1.25;
}

.resource-card p {
  margin: 0;
  color: rgba(23, 36, 52, 0.68);
  font-size: 16px;
}

.resource-link {
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.quote-band {
  background: var(--cream);
}

.quote-band p {
  width: min(860px, 100%);
  margin: 0 auto;
  color: var(--blue-deep);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.35;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr 1fr;
  grid-auto-rows: 240px;
  gap: 14px;
}

.gallery-item {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  background: var(--cream);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.gallery-item:hover img {
  transform: scale(1.035);
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-stations {
  display: grid;
  gap: 42px;
}

.gallery-station {
  display: grid;
  gap: 14px;
}

.gallery-station-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.gallery-station h3 {
  margin: 0;
  color: var(--blue-deep);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.gallery-controls {
  display: flex;
  gap: 8px;
  direction: ltr;
}

.gallery-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.station-drive-link {
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.carousel-control {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--blue-deep);
  background: white;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.gallery-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 0 12px;
  direction: ltr;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.gallery-slide {
  flex: 0 0 clamp(230px, 30vw, 360px);
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  background: var(--cream);
  cursor: zoom-in;
  scroll-snap-align: start;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.gallery-slide:hover img {
  transform: scale(1.035);
}

.memories-section {
  background: var(--cream);
}

.memories-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.memory-form,
.memory-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 14px 40px rgba(20, 42, 68, 0.08);
}

.memory-form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

.memory-form label {
  display: grid;
  gap: 7px;
  color: rgba(23, 36, 52, 0.72);
  font-size: 14px;
  font-weight: 800;
}

.memory-form input,
.memory-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  color: var(--ink);
  background: var(--cream-light);
  font: inherit;
  font-size: 16px;
}

.memory-form textarea {
  resize: vertical;
  min-height: 150px;
}

.checkbox-label {
  grid-template-columns: auto 1fr;
  align-items: start;
  color: var(--ink);
  font-weight: 600;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  margin-top: 5px;
}

.hidden-field {
  display: none;
}

.form-note {
  margin: 0;
  color: rgba(23, 36, 52, 0.62);
  font-size: 14px;
}

.memories-board {
  display: grid;
  gap: 16px;
}

.memory-list {
  display: grid;
  gap: 16px;
}

.memory-card {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.memory-card h3 {
  margin: 8px 0 10px;
  color: var(--blue-deep);
  font-size: 24px;
  line-height: 1.25;
}

.memory-card p {
  margin: 0;
  color: rgba(23, 36, 52, 0.74);
  font-size: 16px;
}

.memory-meta {
  color: rgba(23, 36, 52, 0.56);
  font-size: 14px;
  font-weight: 700;
}

.memory-card img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
}

.memory-empty {
  padding: 20px;
  border: 1px dashed rgba(20, 42, 68, 0.24);
  border-radius: var(--radius);
  color: rgba(23, 36, 52, 0.62);
  background: rgba(255, 255, 255, 0.5);
}

.contact-panel {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.site-footer {
  padding: 28px 0;
  color: rgba(255, 255, 255, 0.74);
  background: var(--blue-deep);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 15px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(20, 42, 68, 0.86);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  inset-inline-start: 18px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  color: white;
  background: rgba(255, 255, 255, 0.12);
  font-size: 30px;
  cursor: pointer;
}

@media (max-width: 900px) {
  body {
    font-size: 17px;
  }

  .site-header {
    padding: 0 20px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 74px;
    inset-inline: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    width: min(100% - 34px, 680px);
    margin-bottom: 42px;
    padding-inline-start: 0;
  }

  .hero-media::after {
    background:
      linear-gradient(0deg, rgba(20, 42, 68, 0.82), rgba(20, 42, 68, 0.28) 68%),
      linear-gradient(90deg, rgba(20, 42, 68, 0.58), transparent);
  }

  .intro-grid,
  .book-grid,
  .two-column,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .section,
  .intro-band,
  .book-section,
  .quote-band {
    padding: 66px 0;
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 210px;
  }

  .gallery-slide {
    flex-basis: min(76vw, 330px);
  }

  .memories-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand span:last-child {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero-copy {
    font-size: 18px;
  }

  .hero-actions {
    display: grid;
  }

  .button,
  .filter-button {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
  }

  .gallery-station-head {
    align-items: start;
  }

  .gallery-head-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .carousel-control {
    width: 38px;
    height: 38px;
  }

  .gallery-item.tall,
  .gallery-item.wide {
    grid-row: auto;
    grid-column: auto;
  }

  .memory-form {
    padding: 20px;
  }

  .contact-panel {
    padding: 26px;
  }

  .footer-inner {
    display: grid;
  }
}
