:root {
  --bg: #f8f5ec;
  --surface: #ffffff;
  --text: #1a2238;
  --muted: #4d5a73;
  --accent: #22406b;
  --accent-soft: #e9e2cd;
  --border: #e3dccb;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f2140;
    --surface: #152b4e;
    --text: #ede7d3;
    --muted: #bfd0ee;
    --accent: #e9d9a6;
    --accent-soft: #1e3a63;
    --border: #2c4a75;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header.site {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); letter-spacing: .02em; }
nav.langs { display: flex; gap: 10px; flex-wrap: wrap; font-size: 15px; }
nav.langs a { text-decoration: none; color: var(--muted); }
nav.langs a[aria-current="page"] { color: var(--accent); font-weight: 700; }
main.wrap { padding-top: 32px; padding-bottom: 48px; }
.hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.hero img { width: 112px; height: 112px; border-radius: 24px; flex: none; }
.hero h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.2; }
.hero p { margin: 0; color: var(--muted); }
.cta {
  display: inline-block; margin-top: 18px; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: var(--bg); text-decoration: none; font-weight: 700;
}
.note { color: var(--muted); font-size: 15px; }
.features { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.features li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px;
}
.features strong { display: block; }
.apps { display: grid; gap: 16px; margin-top: 24px; }
.app-card {
  display: flex; gap: 16px; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px; padding: 16px; text-decoration: none; color: var(--text);
}
.app-card img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.app-card .names { font-weight: 700; }
.app-card .links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; font-size: 15px; }
.policy h2 { margin-top: 32px; font-size: 21px; }
.policy li { margin: 6px 0; }
footer.site { border-top: 1px solid var(--border); padding: 20px 0 32px; color: var(--muted); font-size: 15px; }
footer.site a { color: var(--muted); }

/* ---- Symbol pages (SPEC 11) ---- */
.crumbs { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.letters { display: flex; flex-wrap: wrap; gap: 6px 12px; font-weight: 700; }
.letters a { text-decoration: none; }
.symbol-list { list-style: none; padding: 0; columns: 2 180px; column-gap: 24px; }
.symbol-list li { padding: 3px 0; break-inside: avoid; }
.folk { margin: 20px 0; padding: 14px 18px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; }
.folk strong { display: block; margin-bottom: 4px; }
.related a { white-space: nowrap; }
.cta-box { margin: 32px 0 16px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.cta-box p { margin: 0 0 6px; }
.all-symbols { font-weight: 700; }

/* ---- Home page: Žemyna, goddess of the earth (always dark, fantasy) ---- */
body.home {
  --bg: #0a0811;
  --surface: rgba(255, 236, 200, .045);
  --text: #f3eadb;
  --muted: #c8b8a2;
  --accent: #f2c46d;
  --border: rgba(255, 214, 150, .16);
  color-scheme: dark;
  background: var(--bg);
}
body.home h1, body.home h2 {
  font-family: 'Cormorant Garamond', Georgia, "Times New Roman", serif; font-weight: 600;
}
body.home header.site {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3; border: 0;
  background: linear-gradient(rgba(4, 5, 13, .6), rgba(4, 5, 13, 0));
}
body.home .brand { color: var(--text); font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; font-weight: 600; letter-spacing: .06em; }
body.home nav.langs a { color: var(--muted); }
body.home nav.langs a[aria-current="page"] { color: var(--accent); }

.home-hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end; justify-content: center;
  background: #04050d;
}
.home-hero .hero-art, .home-hero .hero-photo, .home-hero .hero-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
}
.home-hero .hero-photo img { object-fit: cover; object-position: center 40%; }
.home-hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(10, 8, 17, 0), rgba(10, 8, 17, .75) 55%, var(--bg));
}
.home-hero .intro { text-align: center; padding: 0 16px 8vh; max-width: 820px; }
.home-hero .eyebrow {
  margin: 0 0 12px; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: #e9cf9a;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .9);
}
.home-hero h1 {
  margin: 0; font-size: clamp(52px, 11vw, 116px); line-height: .95; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff6dc 10%, #f2c46d 60%, #d9894a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 24px rgba(255, 170, 80, .35));
}
.home-hero .tagline {
  margin: 16px auto 0; max-width: 560px;
  font: italic 500 clamp(21px, 3.2vw, 28px)/1.35 'Cormorant Garamond', Georgia, serif;
  color: #f3eadb; text-shadow: 0 2px 16px rgba(0, 0, 0, .9);
}
.scroll-hint {
  display: inline-block; margin-top: 28px; width: 26px; height: 42px;
  border: 1.5px solid rgba(243, 234, 219, .5); border-radius: 14px; position: relative;
}
.scroll-hint::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--accent); animation: hint 2.2s ease-in-out infinite;
}

body.home main.wrap { max-width: 980px; padding-top: 24px; padding-bottom: 72px; }
body.home h2 { font-size: clamp(32px, 5vw, 46px); line-height: 1.1; margin: 0 0 22px; text-align: center; color: #f6e3b8; }
.story { max-width: 640px; margin: 0 auto; text-align: center; font-size: 19px; color: #e6dccb; }
.story p { margin: 0 0 14px; }

.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.values li {
  padding: 28px 24px 24px; border-radius: 22px; text-align: center;
  background: linear-gradient(160deg, rgba(255, 236, 200, .08), rgba(143, 107, 255, .05));
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .4s ease, border-color .4s ease;
}
.values li:hover { transform: translateY(-4px); border-color: rgba(242, 196, 109, .45); }
.values svg { width: 44px; height: 44px; color: var(--accent); filter: drop-shadow(0 0 10px rgba(242, 196, 109, .5)); }
.values strong { display: block; margin: 10px 0 6px; font: 600 25px/1.2 'Cormorant Garamond', Georgia, serif; color: #f6e3b8; }
.values span { color: var(--muted); font-size: 16px; }

.first {
  display: flex; gap: 18px; align-items: center; max-width: 560px; margin: 0 auto; padding: 18px 20px;
  border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none;
  transition: border-color .3s ease, background .3s ease;
}
.first:hover { border-color: rgba(242, 196, 109, .45); background: rgba(255, 236, 200, .07); }
.first img { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.first .label { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.first .name { font: 600 24px/1.2 'Cormorant Garamond', Georgia, serif; }
.first .note { margin: 2px 0 0; }

.divider {
  height: 24px; margin: 56px auto 40px; max-width: 420px; opacity: .8;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='24'%3E%3Cpath%20d='M20%202%20L32%2012%20L20%2022%20L8%2012%20Z%20M20%208%20L14%2012%20L20%2016%20L26%2012%20Z'%20fill-rule='evenodd'/%3E%3Ccircle%20cx='0'%20cy='12'%20r='2.4'/%3E%3Ccircle%20cx='40'%20cy='12'%20r='2.4'/%3E%3C/svg%3E") repeat-x center / 40px 24px;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='24'%3E%3Cpath%20d='M20%202%20L32%2012%20L20%2022%20L8%2012%20Z%20M20%208%20L14%2012%20L20%2016%20L26%2012%20Z'%20fill-rule='evenodd'/%3E%3Ccircle%20cx='0'%20cy='12'%20r='2.4'/%3E%3Ccircle%20cx='40'%20cy='12'%20r='2.4'/%3E%3C/svg%3E") repeat-x center / 40px 24px;
}
body.home footer.site { border-top-color: var(--border); text-align: center; }

/* Hero animations (classes set by tool/make_hero_svg.py) */
.hero-art .tw { animation: twinkle 4s ease-in-out infinite; }
.hero-art .aurora { animation: aurora 14s ease-in-out infinite alternate; }
.hero-art .a1 { animation-duration: 19s; animation-delay: -6s; }
.hero-art .a2 { animation-duration: 23s; animation-delay: -11s; }
.hero-art .mist { animation: mist 26s ease-in-out infinite alternate; }
.hero-art .spark { animation: twinkle 5s ease-in-out infinite; }
.hero-art .ff { animation: float 8s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes aurora { from { opacity: .35; transform: translateX(-40px); } to { opacity: .95; transform: translateX(40px); } }
@keyframes mist { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
@keyframes float {
  0%, 100% { opacity: 0; transform: translate(0, 0); }
  20%, 80% { opacity: 1; }
  50% { transform: translate(18px, -40px); }
}
@keyframes hint { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.home-hero .intro > * { animation: rise 1.2s ease both; }
.home-hero .intro > :nth-child(2) { animation-delay: .25s; }
.home-hero .intro > :nth-child(3) { animation-delay: .5s; }
.home-hero .intro > :nth-child(4) { animation-delay: .9s; }
@media (prefers-reduced-motion: reduce) {
  .hero-art *, .home-hero .intro > *, .scroll-hint::after { animation: none !important; }
  .values li { transition: none; }
}
@media (max-width: 600px) {
  .home-hero .intro { padding-bottom: 6vh; }
  .story { font-size: 18px; }
}
