/* Eitan's own handwriting, from the "Ot Chaim" project (ot-hayim.co.il) */
@font-face { font-family: "EitanPrint"; font-display: swap;
  src: url(fonts/OHEitanFisch-Dfus.woff2) format("woff2"), url(fonts/OHEitanFisch-Dfus.woff) format("woff"); }
@font-face { font-family: "EitanHand"; font-display: swap;
  src: url(fonts/OHEitanFisch-Regular.woff2) format("woff2"), url(fonts/OHEitanFisch-Regular.woff) format("woff"); }

:root {
  --print: "EitanPrint", "Frank Ruhl Libre", "David", serif;   /* headings */
  --hand: "EitanHand", "EitanPrint", serif;                     /* his words: "שמעתי, צודק, אשפר" */
  --bg: #f0eee4;
  --paper: #fbfaf4;
  --ink: #262a1e;
  --muted: #646654;
  --line: #dbd7c4;
  --olive: #55663a;
  --gold: #a8873f;
  --gold-soft: #e9e1c3;
  --dark: #2c3322;
  --radius: 14px;
  --serif: "Frank Ruhl Libre", "David", serif;
  --sans: "Assistant", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.75 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--olive); }
h1, h2, h3 { font-family: var(--print); font-weight: 400; line-height: 1.25; margin: 0 0 .4em; }
.page-head h1 { font-size: 34px; }
h2 { font-size: 26px; }

.topbar { position: sticky; top: 0; z-index: 5; background: rgba(44,51,34,.97); color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.topbar a { color: #fff; text-decoration: none; }
.brandrow { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 2px; }
.brand { font-family: var(--print); font-weight: 400; font-size: 22px; }
.brand span { color: var(--gold-soft); font-weight: 500; }
.home-link { font-size: 15px; opacity: .85; }
body.is-home .brandrow { display: none; }

/* all categories always visible: they wrap onto as many centered rows as needed */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 6px 6px 8px;
  max-width: 1000px; margin: 0 auto; }
.chips a { text-align: center; font-size: 13.5px; font-weight: 600; padding: 4px 8px; border-radius: 999px;
  border: 1px solid rgba(233,225,195,.35); color: #eef0e2; white-space: nowrap; }
.chips a.active { background: var(--gold-soft); color: var(--dark); border-color: var(--gold-soft); }
body.is-home .hero { padding-top: 22px; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }

/* hero */
.hero { margin: 0 -16px; background: var(--dark); color: #fff; text-align: center; padding: 28px 20px 30px; }
.hero .portrait { width: 190px; height: 240px; object-fit: cover; object-position: center 25%; margin: 0 auto 18px;
  border-radius: 110px 110px 16px 16px; box-shadow: 0 0 0 4px rgba(233,225,195,.25), 0 0 40px rgba(200,190,120,.2); }
.hero h1 { font-size: clamp(28px, 9.5vw, 40px); white-space: nowrap; margin-bottom: 6px; }
.hero .hand-note { margin: 14px auto 0; max-width: 540px; font-size: 13px; color: #a9ad95; }
.hero .dates { color: var(--gold-soft); font-size: 16px; margin: 0; }
.hero .meta { color: #d5d8c4; font-size: 15px; margin: 4px 0 0; }
.hero .fell { color: #ebecdf; font-size: 16px; max-width: 540px; margin: 16px auto 0; line-height: 1.6; }

.intro { background: var(--paper); border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; border: 1px solid var(--line); }
.intro p { margin: 0 0 .5em; } .intro p:last-child { margin: 0; }

.motto { display: block; text-decoration: none; color: inherit; text-align: center; margin: 22px 0; padding: 22px 18px;
  border-radius: var(--radius); background: linear-gradient(180deg, #e9e1c3, #f6f2e2); border: 1px solid #d6cba2; }
.motto q { font-family: var(--hand); font-size: 40px; font-weight: 400; line-height: 1.3; quotes: none; color: var(--dark); display: block; }
.motto .sig { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.motto small { color: var(--muted); font-size: 15px; }
.motto .more { color: var(--olive); font-weight: 600; font-size: 15px; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 10px; }
.card { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 14px 12px; min-height: 92px; }
.card:active { transform: scale(.98); }
.card b { font-family: var(--print); font-weight: 400; font-size: 22px; display: block; color: var(--dark); }
.card span { color: var(--muted); font-size: 14px; line-height: 1.45; display: block; margin-top: 2px; }
.card.wide { grid-column: 1 / -1; background: var(--olive); border-color: var(--olive); }
.card.wide b, .card.wide span { color: #fff; }

/* pages */
.page-head { padding: 22px 0 6px; }
.page-head h1 { font-size: 30px; }
.page-head p { color: var(--muted); margin: 0; }
.back { display: inline-block; margin-top: 18px; font-size: 15px; text-decoration: none; padding: 8px 2px; }

.article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 14px 0; }
.article p { margin: 0 0 1em; }
.article p.em { font-family: var(--hand); font-size: 30px; font-weight: 400; line-height: 1.35; text-align: center; color: var(--dark); }
.article blockquote { margin: 1em 0; padding: 14px 16px; background: #eeead9; border-right: 4px solid var(--gold); border-radius: 8px; }
.article blockquote p { font-size: 17px; }
.article p.justify { text-align: justify; }
.article p.center { text-align: center; white-space: pre-wrap; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 30%; }
.article .hero-img { margin: -20px -20px 18px; border-radius: var(--radius) var(--radius) 0 0; width: calc(100% + 40px); max-width: none; }
.by { color: var(--muted); font-size: 15px; margin-top: -4px; }

.list { list-style: none; padding: 0; margin: 12px 0; }
.list a { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.list b { font-family: var(--print); font-weight: 400; font-size: 23px; color: var(--dark); display: block; }
.list span { color: var(--muted); font-size: 15px; line-height: 1.5; display: block; }

.timeline { list-style: none; padding: 0; margin: 14px 0; border-right: 3px solid var(--gold-soft); }
.timeline li { position: relative; padding: 0 18px 14px 0; }
.timeline li::before { content: ""; position: absolute; right: -8px; top: 9px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--bg); }
.timeline b { color: var(--olive); display: block; font-size: 15px; }

.quotes { display: grid; gap: 10px; margin: 14px 0; }
.quote { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.quote p { font-family: var(--serif); font-size: 19px; margin: 0 0 4px; line-height: 1.5; }
.quote cite { color: var(--muted); font-style: normal; font-size: 14px; }

.block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; }
.block h2 { font-size: 23px; }
.block p { margin: 0 0 .6em; }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 6px -16px 10px; padding: 0 16px 4px; }
.gallery img { height: 200px; width: auto; border-radius: 10px; scroll-snap-align: start; cursor: zoom-in; flex: none; background: #eee; }
.gallery.single img { height: auto; width: 100%; }
.contact { background: var(--gold-soft); border: 1px solid #d6cba2; border-radius: var(--radius); padding: 16px; margin: 14px 0; text-align: center; }
.contact p { margin: 0 0 8px; }
.contact .phone { display: block; font-size: 28px; font-weight: 700; color: var(--dark); text-decoration: none; direction: ltr; margin-bottom: 6px; }
.price { background: #eeead9; border-right: 4px solid var(--gold); border-radius: 8px; padding: 10px 14px; margin-top: 10px; }
.price b { display: block; font-size: 19px; color: var(--dark); }
.price ul { margin: 4px 0 0; padding-right: 18px; font-size: 16px; color: var(--muted); }
iframe.flipbook { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; margin: 6px 0 10px; }
h2.album-group { margin: 26px 0 0; }
.initial { color: var(--gold); font-size: 1.15em; }
.todo { background: #fff3cd; color: #7a5a00; border-radius: 4px; padding: 0 4px; font-size: .9em; }
.btn { display: inline-block; background: var(--olive); color: #fff; text-decoration: none; border-radius: 999px;
  padding: 8px 16px; font-size: 15px; font-weight: 600; margin: 4px 0 4px 6px; }
.btn.ghost { background: transparent; color: var(--olive); border: 1.5px solid var(--olive); }

.video { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; margin: 6px 0; cursor: pointer; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video::after { content: "▶"; position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; font-size: 26px; display: grid; place-items: center; padding-right: 4px; }
.video.playing::after { display: none; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vtitle { font-weight: 600; margin: 0 0 16px; }
/* review copy: YouTube opens outside, heavy videos show their cover */
a.yt { display: block; text-align: center; padding: 18px 12px; margin: 6px 0; border-radius: 12px; background: var(--dark); color: #fff; text-decoration: none; font-weight: 700; }
.clip-off { position: relative; margin: 6px 0; border-radius: 12px; overflow: hidden; background: #000; }
.clip-off img { width: 100%; opacity: .55; }
.clip-off span { position: absolute; inset: auto 0 0; padding: 10px; text-align: center; color: #fff; font-weight: 600; background: rgba(0,0,0,.55); }
.track { padding: 12px 14px; margin: 10px 0; }
.track .vtitle { margin-bottom: 6px; }
.track audio { width: 100%; }
video.clip { width: 100%; max-height: 70vh; background: #000; border-radius: 12px; margin: 6px 0; }

form.memory { display: grid; gap: 10px; }
form.memory input, form.memory textarea { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; width: 100%; }
form.memory textarea { min-height: 150px; }
form.memory button { font: inherit; font-weight: 700; background: var(--olive); color: #fff; border: 0; border-radius: 999px; padding: 12px; }
.note { color: var(--muted); font-size: 14px; }
.note.status { color: var(--dark); font-weight: 600; }
.qty-list { display: grid; gap: 6px; }
.qty { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.qty span { min-width: 0; font-size: 16px; line-height: 1.35; }
form.memory .qty input { width: 64px; flex: none; text-align: center; padding: 6px; }
.qty .unit-price { display: block; font-size: 14px; color: var(--muted); }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-radius: 10px; background: var(--gold-soft); border: 1px solid #d6cba2; font-size: 18px; }
.total b { font-size: 22px; color: var(--dark); font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 4px; font-size: 16px; }
form.memory select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; width: 100%; }
#order-form { scroll-margin-top: 140px; }
.thanks { font-size: 20px; font-weight: 700; color: var(--olive); text-align: center; margin: 10px 0; }

.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 16px 36px; border-top: 1px solid var(--line); }
.foot p { margin: 0 0 4px; }

#lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 16px; }
#lightbox[hidden] { display: none; }
#lightbox img { max-height: 92vh; border-radius: 6px; }
#lightbox button { position: absolute; top: 12px; left: 12px; background: none; border: 0; color: #fff; font-size: 28px; }

@media (min-width: 700px) {
  .hero { margin: 0; border-radius: 0 0 24px 24px; padding: 40px 30px; }
  .hero .portrait { width: 220px; height: 280px; }
  .hero h1 { font-size: 50px; }
  .cards { grid-template-columns: 1fr 1fr 1fr; }
  .quotes { grid-template-columns: 1fr 1fr; }
  .chips a { padding: 5px 13px; }
}

/* Crossword solution, hidden until opened */
details.solution { margin: 14px 0 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; }
details.solution summary { cursor: pointer; font-weight: 700; }
.sol-cols { display: flex; flex-wrap: wrap; gap: 8px 48px; margin-top: 10px; }
.sol-cols h3 { margin: 4px 0; font-size: 1rem; }
.sol-cols ol { list-style: none; margin: 0; padding: 0; line-height: 1.8; }
.sol-cols b { display: inline-block; min-width: 2em; }

/* Home page photo slideshow inside the portrait frame */
.hero .portrait.slides { position: relative; overflow: hidden; background: #1f1b16; }
.hero .slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero .slides img.on { opacity: 1; }

/* Home page: share button and English link */
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin: 18px 0 0; }
.hero .share { font: inherit; font-size: 16px; font-weight: 700; background: var(--gold-soft); color: var(--dark); border: 0;
  border-radius: 999px; padding: 10px 22px; cursor: pointer; }
.hero .en-link { font-size: 16px; font-weight: 700; background: var(--gold-soft); color: var(--dark); border-radius: 999px; padding: 10px 22px; text-decoration: none; }

/* English page */
.english { direction: ltr; text-align: left; }
.english .back { direction: ltr; }

/* Memories shared on the site */
.shared-memory { margin: 12px 0; background: var(--paper); border: 1px solid var(--line); border-right: 4px solid var(--olive);
  border-radius: var(--radius); padding: 14px 16px; }
.shared-memory p { margin: 0 0 .6em; }
.shared-memory figcaption { color: var(--muted); font-size: 15px; }

/* Order form: shipping or pickup */
fieldset.delivery { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 8px 12px 10px; margin: 0; display: grid; gap: 6px; }
fieldset.delivery legend { font-size: 16px; font-weight: 600; padding: 0 4px; }
fieldset.delivery label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 16px; cursor: pointer; }
fieldset.delivery input { width: auto; accent-color: var(--olive); }
fieldset.delivery .unit-price { flex-basis: 100%; padding-right: 24px; }
.field[hidden] { display: none; }

/* ---------- English version (?lang=en): left-to-right, and a regular font
   (Eitan's handwriting font has Hebrew letters only; its Latin letters come out garbled) ---------- */
html[lang="en"] { --print: "Frank Ruhl Libre", Georgia, serif; --hand: "Frank Ruhl Libre", Georgia, serif; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3, html[lang="en"] .brand, html[lang="en"] .card b, html[lang="en"] .list b { font-weight: 500; }
html[lang="en"] .motto q { font-size: 30px; font-style: italic; }
html[lang="en"] .article p.em { font-size: 24px; font-style: italic; }
html[lang="en"] .article blockquote, html[lang="en"] .price { border-right: 0; border-left: 4px solid var(--gold); }
html[lang="en"] .shared-memory { border-right-width: 1px; border-left: 4px solid var(--olive); }
html[lang="en"] .timeline { border-right: 0; border-left: 3px solid var(--gold-soft); }
html[lang="en"] .timeline li { padding: 0 0 14px 18px; }
html[lang="en"] .timeline li::before { right: auto; left: -8px; }
html[lang="en"] .price ul { padding: 0 0 0 18px; }
html[lang="en"] .btn { margin: 4px 6px 4px 0; }
html[lang="en"] fieldset.delivery .unit-price { padding: 0 0 0 24px; }
html[lang="en"] #lightbox button { left: auto; right: 12px; }
.topbar .lang-link { font-size: 14px; border: 1px solid rgba(233,225,195,.45); border-radius: 999px; padding: 1px 10px; margin-inline-start: auto; margin-inline-end: 12px; }

/* ambigram drawing: rotates in place when its button is pressed */
.gallery img { transition: transform .9s ease; }
.gallery img.turned { transform: rotate(180deg); }
button.btn { font: inherit; font-size: 15px; font-weight: 600; border: 0; cursor: pointer; }
