/* שמואל למדן · דף הבית
   Layout idea: one narrow column like a book page; a thin red bookmark hangs from the top
   beside the name, as on the cover of "גמרא לי בלב". Two cards below are the two ways out. */
@font-face { font-family: "Stam"; src: url("../fonts/StamA.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Keter"; src: url("../fonts/KeterYGM.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "FrankRuhl"; src: url("../fonts/FRL.ttf") format("truetype"); font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f5f2ea;      /* the book's cover paper */
  --sheet: #faf4e7;      /* the warmer cream of the lecture illustration */
  --ink: #1b1815;
  --blood: #a80f14;      /* the bookmark red */
  --grey: #6f6a64;
  --rule: #d8d2c4;
  --display: "Stam", "FrankRuhl", "Frank Ruhl Libre", "David", serif;
  --body: "Keter", "FrankRuhl", "Frank Ruhl Libre", "David", "Times New Roman", serif;
  --small: "FrankRuhl", "Frank Ruhl Libre", "David", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.7;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.page {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 22px 56px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* the bookmark: thin, close to the right edge (the spine side of a Hebrew book) */
.bookmark {
  position: absolute;
  top: 0;
  right: 24px;
  width: 8px;
  height: 132px;
  background: var(--blood);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 7px), 0 100%);
}

.masthead {
  padding: 62px 0 0;
  text-align: center;
}
.masthead h1 {
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(40px, 11.5vw, 68px);
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.portrait img { width: 100%; }

.about p {
  max-width: 30em;
  margin: 0 auto;
  font-size: 21px;
  line-height: 1.75;
  text-align: center;
  text-wrap: balance;
}

.ways {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ways h2 {
  font-family: var(--small);
  font-weight: normal;
  font-size: 15px;
  color: var(--grey);
  text-align: center;
  letter-spacing: 0.04em;
}
.way {
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--rule);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.way:hover { border-color: var(--ink); }
.way:active { transform: translateY(1px); }
.way:focus-visible { outline: 3px solid var(--blood); outline-offset: 3px; }
.way .media {
  aspect-ratio: 1500 / 662;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.way .media img { width: 100%; height: 100%; object-fit: cover; }
.way .media.book { background: #e9e4d8; }
.way .media.book img {
  width: auto;
  height: 86%;
  object-fit: contain;
  box-shadow: 0 6px 18px rgba(27, 24, 21, .22);
}
.way .text {
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.way .kind {
  font-family: var(--small);
  font-size: 14px;
  color: var(--grey);
  letter-spacing: 0.04em;
}
.way h3 {
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(28px, 8vw, 36px);
  line-height: 1.25;
  text-wrap: balance;
}
.way .line { font-size: 18px; line-height: 1.5; }
.way .go {
  margin-top: 10px;
  font-size: 18px;
  color: var(--blood);
}
.way .go::after { content: " \2190"; }

.foot {
  font-family: var(--small);
  font-size: 14px;
  color: var(--grey);
  text-align: center;
}

/* inner pages that are not built yet */
.stub { text-align: center; padding-top: 30px; display: flex; flex-direction: column; gap: 18px; }
.stub h2 { font-family: var(--display); font-weight: normal; font-size: 34px; line-height: 1.3; }
.stub a { color: var(--blood); }

@media (min-width: 700px) {
  .page { gap: 40px; }
  .bookmark { right: 44px; height: 176px; width: 10px; }
  .masthead { padding-top: 76px; }
}
@media (prefers-reduced-motion: reduce) { .way { transition: none; } }

/* inner pages: lecture and book */
.back { font-family: var(--small); font-size: 15px; color: var(--grey); text-decoration: none; }
.back::before { content: "\2192\00a0"; }
.back:hover { color: var(--ink); }
.masthead.inner { padding-top: 54px; display: flex; flex-direction: column; gap: 6px; }
.masthead.inner h1 { font-size: clamp(32px, 8.8vw, 54px); text-wrap: balance; padding: 0 22px; }
.masthead .sub { font-size: 21px; line-height: 1.5; }
.masthead .kind { font-family: var(--small); font-size: 14px; color: var(--grey); letter-spacing: 0.04em; }
.illus { background: var(--sheet); border: 1px solid var(--rule); }
.group { display: flex; flex-direction: column; gap: 14px; }
.group h2 { font-family: var(--display); font-weight: normal; font-size: 28px; line-height: 1.3; }
.group ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.group li { padding-right: 16px; border-right: 2px solid var(--blood); }
.group li strong { display: block; font-weight: normal; font-size: 21px; line-height: 1.45; }
.group li span { display: block; font-size: 18px; line-height: 1.6; color: #3d3833; }
.cta { display: flex; flex-direction: column; gap: 12px; }
.btn {
  display: block; text-align: center; text-decoration: none;
  font-size: 21px; line-height: 1.3; padding: 15px 18px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
}
.btn.primary { background: var(--blood); border-color: var(--blood); color: #fff; }
.btn:hover { filter: brightness(0.94); }
.btn:focus-visible, .back:focus-visible { outline: 3px solid var(--blood); outline-offset: 3px; }
.note { font-family: var(--small); font-size: 15px; line-height: 1.6; color: var(--grey); text-align: center; }
.cover { display: flex; justify-content: center; background: #e9e4d8; padding: 30px 0; }
.cover img { width: min(58%, 250px); box-shadow: 0 8px 24px rgba(27, 24, 21, .24); }
.prose p { font-size: 20px; line-height: 1.75; max-width: 30em; margin: 0 auto; }
.option { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; background: var(--sheet); border: 1px solid var(--rule); }
.option h2 { font-family: var(--display); font-weight: normal; font-size: 26px; line-height: 1.3; }
.option p { font-size: 18px; line-height: 1.6; }
