/* The website's look, shared by the home page and every topic page
   (server/sitePages.ts). Served at /site.css. Nothing here hides content
   until a script runs: a crawler, a reader with scripts off and a slow
   phone all see the whole page. */
@font-face { font-family: Platypi; src: url(/fonts/Platypi_400Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Platypi; src: url(/fonts/Platypi_400Regular_Italic.ttf) format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Platypi; src: url(/fonts/Platypi_600SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Platypi; src: url(/fonts/Platypi_700Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Koren; src: url(/fonts/VCKoren-Bold.otf) format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --cream: #FFFCF5;
  --paper: #FAF4EA;
  --blush: #F6E7EE;
  --lilac: #F1ECF8;
  --mint: #EEF5EF;
  --butter: #FBF3DD;
  --rose: #BA89A0;
  --plum: #8E5B75;
  --plum-deep: #6E4259;
  --ink: #34303A;
  --muted: #6B6570;
  --line: rgba(142, 91, 117, .14);
  --gold: #C9A646;
  --card: #FFFFFF;
  --shadow-sm: 0 6px 18px -10px rgba(110, 66, 89, .28);
  --shadow: 0 22px 50px -24px rgba(110, 66, 89, .38);
  --radius: 24px;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: Platypi, Koren, Georgia, serif; font-size: 18px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--plum); text-underline-offset: 3px; }
a:hover { color: var(--plum-deep); }
:focus-visible { outline: 3px solid rgba(142, 91, 117, .45); outline-offset: 3px; border-radius: 8px; }
.he, [lang="he"] { font-family: Koren, "Times New Roman", serif; font-weight: 700; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.012em; color: var(--ink); }
h1 { font-size: clamp(38px, 5.6vw, 70px); margin: 12px 0 18px; }
h2 { font-size: clamp(30px, 3.8vw, 46px); margin: 8px 0 14px; }
h3 { font-size: clamp(21px, 2vw, 25px); margin: 0 0 8px; }
p { margin: 0 0 14px; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--plum); font-weight: 600; }
.lead { font-size: clamp(19px, 2vw, 22px); color: var(--muted); max-width: 34em; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Header */
.site-nav { position: sticky; top: 0; z-index: 30; background: rgba(255, 252, 245, .84); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.site-nav .wrap { display: flex; align-items: center; gap: 18px; height: 72px; padding-top: 10px; position: relative; }
.site-nav .logo img { height: 38px; width: auto; }
.site-nav nav { display: flex; gap: 4px; margin-inline-start: auto; }
.site-nav nav a { text-decoration: none; color: var(--muted); font-size: 15.5px; padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s; }
.site-nav nav a:hover, .site-nav nav a[aria-current="page"] { color: var(--plum-deep); background: var(--blush); }
.site-nav .bsd { position: absolute; top: 2px; inset-inline-end: 0; font-family: Koren, serif; font-weight: 700; font-size: 12.5px; color: var(--ink); }
@media (max-width: 900px) { .site-nav nav { display: none; } .site-nav .btn { margin-inline-start: auto; } .site-nav .logo img { height: 31px; } }

/* Buttons and store badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; font-weight: 600; border-radius: 999px; padding: 14px 26px; font-size: 16.5px; line-height: 1.2; border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #C597AC, #8E5B75); color: #fff; box-shadow: 0 12px 26px -12px rgba(142, 91, 117, .8); }
.btn-primary:hover { color: #fff; }
.btn-soft { background: #fff; color: var(--plum-deep); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 10px 18px; font-size: 14.5px; white-space: nowrap; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store { display: inline-flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; text-decoration: none; border-radius: 15px; padding: 10px 20px 10px 16px; min-width: 182px; transition: transform .15s ease, background .15s; }
.store:hover { transform: translateY(-2px); background: #221F26; color: #fff; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11px; opacity: .78; line-height: 1.15; letter-spacing: .02em; }
.store b { display: block; font-size: 18px; line-height: 1.2; font-weight: 600; }

/* Cards and sections */
section { padding: 84px 0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } section { padding: 60px 0; } }

/* Topic tiles (links to the pages about each tefilla) */
.tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 22px 22px; border-radius: 20px; background: #fff; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; min-height: 118px; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); color: var(--ink); }
.tile .tile-he { font-family: Koren, serif; font-weight: 700; color: var(--plum); font-size: 19px; line-height: 1.3; }
.tile b { font-size: 19px; line-height: 1.25; }
.tile span.desc { color: var(--muted); font-size: 15px; line-height: 1.45; }
.tile::after { content: ""; position: absolute; inset-inline-end: 18px; top: 22px; width: 9px; height: 9px; border-top: 2px solid var(--rose); border-inline-end: 2px solid var(--rose); transform: rotate(45deg); opacity: .7; }
[dir="rtl"] .tile::after, .tile:dir(rtl)::after { transform: rotate(-135deg); }
.tile.t-lilac { background: linear-gradient(160deg, #fff 30%, var(--lilac)); }
.tile.t-blush { background: linear-gradient(160deg, #fff 30%, var(--blush)); }
.tile.t-butter { background: linear-gradient(160deg, #fff 30%, var(--butter)); }
.tile.t-mint { background: linear-gradient(160deg, #fff 30%, var(--mint)); }

/* Topic page */
.crumbs { font-size: 14.5px; color: var(--muted); margin: 26px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--plum); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 8px; opacity: .6; }
.topic-hero { padding: 26px 0 40px; background: radial-gradient(1200px 420px at 85% -10%, var(--blush), transparent 60%), radial-gradient(900px 380px at -10% 10%, var(--lilac), transparent 60%); }
.topic-hero h1 { margin-bottom: 10px; }
.topic-hero .title-he { font-family: Koren, serif; font-weight: 700; color: var(--plum); font-size: clamp(26px, 3.4vw, 38px); line-height: 1.3; margin: 0 0 14px; text-align: left; }
.topic-hero .lead { margin-bottom: 26px; }
.topic-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; padding: 10px 0 70px; }
.prose { font-size: 18.5px; }
.prose h2 { font-size: clamp(25px, 2.6vw, 31px); margin: 42px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #45404B; }
.prose ul { padding-inline-start: 22px; margin: 0 0 16px; }
.prose li { margin: 4px 0; }
.prose .note { background: var(--paper); border-radius: 16px; padding: 16px 20px; font-size: 16.5px; color: var(--muted); border-inline-start: 3px solid var(--rose); }
.topic-body .chapters, .chapters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; padding: 0; list-style: none; }
.chapters li { margin: 0; }
.chapters span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 40px; padding: 0 12px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm); font-weight: 600; color: var(--ink); font-size: 16px; }
.cycle { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); margin: 6px 0 18px; }
.cycle th, .cycle td { padding: 9px 14px; text-align: start; border-bottom: 1px solid var(--line); }
.cycle th { background: var(--paper); font-weight: 600; font-size: 14px; letter-spacing: .04em; color: var(--muted); }
.cycle tr:last-child td { border-bottom: 0; }
.sources { list-style: none; padding: 0; margin: 0; }
.sources li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16.5px; }
.sources li:last-child { border-bottom: 0; }

/* The app card beside a topic page */
.app-aside { position: sticky; top: 96px; padding: 26px 24px; text-align: center; background: linear-gradient(180deg, #fff, #FDF6F8); }
.app-aside .mini-phone { width: 150px; margin: 0 auto 16px; border-radius: 26px; padding: 6px; background: #2F2A33; box-shadow: 0 24px 40px -22px rgba(52, 48, 58, .7); }
.app-aside .mini-phone img { border-radius: 21px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; width: 100%; height: auto; display: block; }
.app-aside h3 { font-size: 22px; }
.app-aside p { color: var(--muted); font-size: 15.5px; }
.app-aside .stores { justify-content: center; flex-direction: column; }
.app-aside .store { width: 100%; justify-content: center; }
.app-aside .qr { display: flex; align-items: center; gap: 12px; text-align: start; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.app-aside .qr img { width: 74px; height: 74px; border-radius: 8px; }
@media (hover: none) and (pointer: coarse) { .qr { display: none !important; } }
@media (max-width: 940px) { .topic-body { grid-template-columns: 1fr; } .app-aside { position: static; } }

/* Band inviting her to the app, inside and after pages */
.invite { position: relative; overflow: hidden; border-radius: 28px; padding: 38px clamp(22px, 4vw, 52px); background: linear-gradient(135deg, #F7E6EE, #EFE7F7 55%, #FBF3DD); display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; }
.invite h2 { margin: 4px 0 8px; font-size: clamp(26px, 3vw, 36px); }
.invite p { color: var(--muted); margin: 0; max-width: 36em; }
.invite .flower { position: absolute; inset-inline-end: -18px; bottom: -26px; width: 130px; opacity: .22; pointer-events: none; }
@media (max-width: 820px) { .invite { grid-template-columns: 1fr; text-align: center; } .invite .stores { justify-content: center; } .invite p { margin-inline: auto; } }

/* FAQ */
.faq details { background: #fff; border-radius: 18px; box-shadow: var(--shadow-sm); margin-bottom: 10px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 34px 18px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 0; top: 13px; font-size: 25px; color: var(--plum); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0; padding-bottom: 20px; color: var(--muted); }

/* Footer */
.site-foot { background: #2E2932; color: #E7E0EA; padding: 56px 0 36px; font-size: 15px; }
.site-foot .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; gap: 28px; }
.site-foot h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #CDB5C4; font-weight: 600; }
.site-foot a { color: #E7E0EA; text-decoration: none; display: block; padding: 3.5px 0; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot .flogo { height: 36px; width: auto; filter: brightness(0) invert(1); opacity: .92; margin-bottom: 14px; }
.site-foot .about { color: #BFB6C3; line-height: 1.55; }
.site-foot .fine { margin-top: 34px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; color: #A39AA7; font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
@media (max-width: 980px) { .site-foot .cols { grid-template-columns: 1fr 1fr; } .site-foot .cols > div:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }
