/* jubilate.today, style A «Скрипторий» (docs/design/IDENTITY.md): Alegreya headings with a wine italic accent,
   Onest text, ivory field, flat cards without shadows. Built by tools/build_site.py; no inline styles (CSP). */

@font-face { font-family: "Alegreya"; font-weight: 400 900; font-display: swap; src: url(alegreya.woff2) format("woff2"); }
@font-face { font-family: "Alegreya"; font-weight: 400 900; font-style: italic; font-display: swap; src: url(alegreya-italic.woff2) format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 300 700; font-display: swap; src: url(onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Onest"; font-weight: 300 700; font-display: swap; src: url(onest-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --field: #FBF6F0;
  --card: #F2E7E2;
  --line: #E3D3C6;
  --ink: #2E1A0E;
  --ink-2: #7A5440;
  --choc: #5A3420;
  --wine: #7A2F3C;
  --wine-ink: #FBF6F0;
  --rose: #D9A5A0;
  --glow: rgba(217, 165, 160, .32);
  --bar: rgba(251, 246, 240, .82);
  --bezel: #22160F;
  --serif: "Alegreya", "Iowan Old Style", Georgia, serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --field: #17100C;
    --card: #231A15;
    --line: #3A2C24;
    --ink: #F6EBDD;
    --ink-2: #C4AE9A;
    --choc: #E8D6C4;
    --wine: #E2B5AC;
    --wine-ink: #17100C;
    --rose: #E2B5AC;
    --glow: rgba(226, 181, 172, .12);
    --bar: rgba(23, 16, 12, .8);
    --bezel: #000;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--field); color: var(--ink);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--wine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 em, h2 em { font-style: italic; color: var(--wine); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--wine); color: var(--wine-ink); padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }
.sub { color: var(--ink-2); font-size: 18px; max-width: 34em; margin-top: 14px; }

/* bar */
.bar { position: sticky; top: 0; z-index: 10; background: var(--bar); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.logo img { height: 44px; width: auto; }
.logo.small img { height: 36px; }
.bar nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.bar nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 99px; }
.bar nav a:hover, .bar nav a[aria-current] { background: var(--card); }
.bar nav .lang { border: 1px solid var(--line); margin-left: 6px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 99px; font-weight: 600; font-size: 16px; text-decoration: none; }
.btn.primary { background: var(--wine); color: var(--wine-ink); }
.btn.ghost { color: var(--wine); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--wine); }
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 22px 8px 16px; border-radius: 16px; background: var(--ink); color: var(--field); font-weight: 600; font-size: 19px; line-height: 1.1; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 12px; font-weight: 500; opacity: .75; letter-spacing: .02em; }

/* phone frame */
.phone { position: relative; border-radius: 36px; padding: 7px; background: var(--bezel); box-shadow: 0 30px 60px -28px rgba(46, 26, 14, .45), 0 0 0 1px rgba(255, 255, 255, .1) inset; }
.phone img { width: 100%; height: auto; border-radius: 30px; aspect-ratio: 9 / 20; object-fit: cover; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto 40%; height: 120%; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wine); margin-bottom: 18px; }
.hero h1 { font-size: clamp(46px, 6.4vw, 82px); }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); margin-top: 22px; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; font-size: 15px; color: var(--ink-2); }
.trust li { display: flex; align-items: center; gap: 7px; }
.trust svg, .ticks svg { width: 18px; height: 18px; flex: none; color: var(--wine); }
.hero-shots { position: relative; height: 690px; }
.hero-shots .phone { position: absolute; width: 272px; }
.hero-shots .front { right: 34%; top: 0; z-index: 2; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.hero-shots .back { right: 2%; top: 64px; transform: rotate(5deg); opacity: .96; animation: rise-tilt 1s .15s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes rise-tilt { from { opacity: 0; transform: translateY(40px) rotate(9deg); } }

/* verse of the day */
.verse { padding: 24px 0 40px; }
.verse-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; background: var(--card); border-radius: 28px; padding: 44px; }
.painting { margin: 0; }
.frame { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.frame blockquote { position: absolute; inset: auto 0 0; margin: 0; padding: 80px 26px 24px; background: linear-gradient(transparent, rgba(23, 16, 12, .78)); color: #FBF6F0; }
.frame blockquote p { font: italic 500 23px/1.3 var(--serif); }
.frame cite { display: block; margin-top: 10px; font: normal 600 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.painting figcaption, .strip figcaption { font-size: 13px; color: var(--ink-2); line-height: 1.4; margin-top: 12px; }
.painting figcaption i, .strip figcaption i { display: block; font: italic 500 16px var(--serif); color: var(--ink); }
.verse h2, .feature h2, .gallery h2, .steps h2, .plans h2, .faq h2 { font-size: clamp(34px, 4vw, 52px); }

/* features */
.feature { padding: 72px 0; }
.feature-in { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.feature.flip .feature-text { order: 2; }
.feature-shot { position: relative; display: flex; justify-content: center; }
.feature-shot::before { content: ""; position: absolute; width: 420px; max-width: 100%; aspect-ratio: 1; top: 50%; translate: 0 -50%; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); }
.feature-shot .phone { width: 290px; }
.ticks { margin-top: 26px; display: grid; gap: 14px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks svg { margin-top: 3px; padding: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); }
.feature + .feature { border-top: 1px solid var(--line); }

/* gallery */
.gallery { padding: 80px 0 64px; background: var(--card); }
.strip { --edge: max(20px, (100% - 1160px) / 2); display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); padding: 36px var(--edge) 12px; scrollbar-width: thin; scrollbar-color: var(--rose) transparent; }
.strip figure { flex: 0 0 210px; margin: 0; scroll-snap-align: start; }
.strip img { width: 210px; height: 360px; object-fit: cover; border-radius: 18px; background: var(--line); }
.strip figcaption span { display: block; }

/* steps */
.steps { padding: 88px 0 40px; }
.step-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; counter-reset: none; }
.step-list li { border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.num { display: block; font: italic 600 44px/1 var(--serif); color: var(--wine); margin-bottom: 18px; }
.step-list h3 { font-size: 24px; }
.step-list p { color: var(--ink-2); margin-top: 8px; }

/* plans */
.plans { padding: 72px 0; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
.plan { border-radius: 28px; padding: 34px; background: var(--card); }
.plan h3 { font-size: 30px; }
.plan-sub { color: var(--ink-2); margin-top: 4px; }
.plan.plus { background: var(--wine); color: var(--wine-ink); }
.plan.plus .plan-sub { color: inherit; opacity: .8; }
.plan.plus .ticks svg { background: rgba(251, 246, 240, .16); color: inherit; }
.note { color: var(--ink-2); font-size: 15px; margin-top: 18px; }

/* faq */
.faq { padding: 48px 0 72px; }
.faq-list { margin-top: 28px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 18px; padding: 20px 0; font: 600 21px/1.3 var(--serif); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 26px/1 var(--sans); color: var(--wine); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 0 22px; color: var(--ink-2); max-width: 40em; }
.more { margin-top: 22px; color: var(--ink-2); }

/* end */
.end { padding: 24px 0 96px; }
.end-in { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; background: var(--card); border-radius: 28px; padding: 56px 28px; }
.end-in img { width: 88px; height: 88px; }
.end h2 { font-size: clamp(32px, 4vw, 46px); }
.end p { color: var(--ink-2); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 14px; color: var(--ink-2); }
.foot-in { display: grid; grid-template-columns: auto 1fr; gap: 18px 32px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: flex-end; }
.foot nav a { color: var(--ink); text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.fine { grid-column: 1 / -1; line-height: 1.7; }

/* legal and support */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: clamp(38px, 5vw, 54px); margin-bottom: 12px; }
.doc h2 { font-size: 26px; margin: 38px 0 10px; }
.doc p, .doc li { color: var(--choc); }
.doc p + p { margin-top: 12px; }
.doc ul { margin: 10px 0; padding-left: 22px; list-style: disc; }
.doc li + li { margin-top: 6px; }
.doc .btn { margin: 26px 0 8px; }
.doc .faq-list { margin-top: 36px; }
.updated { color: var(--ink-2); font-size: 15px; }

/* gentle reveal on scroll, only where the browser can do it without script */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: fade-up linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
    @keyframes fade-up { from { opacity: 0; transform: translateY(36px); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-shots .front, .hero-shots .back { animation: none; }
}

/* tablet and phone */
@media (max-width: 960px) {
  .hero-in, .feature-in, .verse-in { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .hero-shots { height: 520px; max-width: 460px; width: 100%; margin-inline: auto; }
  .hero-shots .phone { width: 230px; }
  .hero-shots .front { right: auto; left: 4%; }
  .hero-shots .back { right: 4%; top: 52px; }
  .feature.flip .feature-text { order: 0; }
  .feature-in { gap: 40px; }
  .verse-in { gap: 32px; padding: 28px; }
  .painting { max-width: 420px; }
  .step-list, .plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .bar nav .anchor { display: none; }
  .bar-in { height: 60px; }
  .logo img { height: 38px; }
  .bar nav a { padding: 8px 10px; font-size: 14px; }
  .sub { font-size: 17px; }
  .hero-shots { height: 440px; }
  .hero-shots .phone { width: 196px; }
  .feature { padding: 56px 0; }
  .feature-shot .phone { width: 250px; }
  .verse-in { padding: 20px; border-radius: 24px; }
  .plan { padding: 26px; }
  .foot-in { grid-template-columns: 1fr; }
  .foot nav { justify-content: flex-start; }
}

/* link preview 1200x630, drawn by build_site.py --og */
.og { width: 1200px; height: 630px; overflow: hidden; display: grid; grid-template-columns: 1fr 520px; align-items: center; padding: 0 0 0 80px; background: radial-gradient(600px 500px at 85% 40%, var(--glow), transparent), var(--field); }
.og-text img { height: 60px; width: auto; margin-bottom: 40px; }
.og h1 { font-size: 76px; }
.og p { margin-top: 22px; font-size: 26px; color: var(--ink-2); }
.og-shots { position: relative; height: 630px; }
.og-shots .phone { position: absolute; width: 226px; animation: none; }
.og-shots .front { left: 40px; top: 52px; z-index: 2; }
.og-shots .back { left: 236px; top: 96px; transform: rotate(5deg); }
