/* Hearth of Ages — landing & legal page styles
 * Coastal palette: sky/seafoam dominant, sandy cream surfaces, coral CTA accent */

:root {
  --sky: #BDE0F0;
  --sky-deep: #7FC8D4;
  --sky-ink: #2E6A88;
  --mint: #B5EBD8;
  --mint-deep: #5FC5A8;
  --sand: #FFF8EC;
  --sand-soft: #FFFAF0;
  --sand-deep: #E8C880;
  --coral: #FF8FA0;
  --coral-deep: #E26878;
  --gold: #F4C56A;
  --ink: #2C3E4E;
  --ink-2: #506878;
  --muted: #8A8070;

  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 6px 24px rgba(80,120,150,0.12);
  --shadow-cta: 0 8px 24px rgba(255,130,150,0.40);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--sand);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sky-deep); text-decoration: none; transition: color 150ms; }
a:hover { color: var(--coral-deep); }

img, svg { max-width: 100%; display: block; }

/* ── Header ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px max(20px, env(safe-area-inset-left));
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,248,236,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(80,120,150,0.10);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  font-size: 1.1rem;
}
.site-brand:hover { color: var(--ink); }
.brand-mark { font-size: 1.4rem; }

.site-nav {
  display: flex;
  gap: 22px;
  font-weight: 700;
  font-size: 0.95rem;
}
@media (max-width: 480px) {
  .site-nav { display: none; }
}

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px max(20px, env(safe-area-inset-left)) 80px;
  max-width: 1180px;
  margin: 0 auto;
}
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 50px 22px 60px;
    text-align: center;
  }
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--sky-deep);
  margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 18px;
  color: var(--ink);
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--coral), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-blurb {
  font-size: 1.05rem;
  color: var(--ink-2);
  margin-bottom: 28px;
  max-width: 480px;
}
@media (max-width: 880px) { .hero-blurb { margin-left: auto; margin-right: auto; } }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 880px) { .hero-cta { justify-content: center; } }

.store-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 22px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2C3E4E 0%, #1A2630 100%);
  color: #FFFFFF;
  min-width: 168px;
  font-weight: 600;
  transition: transform 150ms, box-shadow 150ms;
  box-shadow: 0 6px 16px rgba(40,55,80,0.30);
}
.store-btn:hover {
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(40,55,80,0.40);
}
.store-eyebrow { font-size: 0.65rem; opacity: 0.85; letter-spacing: 0.04em; }
.store-brand   { font-size: 1.18rem; font-weight: 800; line-height: 1.15; }

.hero-foot { font-size: 0.82rem; color: var(--muted); }

/* Hero art */
.hero-art {
  position: relative;
  height: 460px;
}
@media (max-width: 880px) { .hero-art { height: 360px; } }

.hero-scene {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(80,120,150,0.22), 0 0 0 1px rgba(255,255,255,0.4) inset;
  background: linear-gradient(180deg, #BDE0F0 0%, #DCEAEC 30%, #E8D4A0 60%, #C49A66 100%);
}
.hs-sky { position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(120,200,230,0.4), transparent); }
.hs-sun {
  position: absolute; top: 14%; right: 12%;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF080 30%, #FFC040 70%, #FF9020 100%);
  box-shadow: 0 0 50px 18px rgba(255,220,80,0.5), 0 0 100px 30px rgba(255,180,40,0.25);
  animation: hs-sun-pulse 4s ease-in-out infinite;
}
@keyframes hs-sun-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }

.hs-mountain {
  position: absolute;
  bottom: 35%; width: 60%; height: 38%;
  clip-path: polygon(0 100%, 35% 8%, 60% 50%, 80% 20%, 100% 100%);
}
.hs-mountain.mountain-back  { left: -8%;  background: #B09878; opacity: 0.6; }
.hs-mountain.mountain-front { right: -8%; bottom: 28%; background: #8A7858; opacity: 0.75; }

.hs-arch {
  position: absolute;
  background: #C8A878;
  box-shadow: inset 0 0 0 2px rgba(100,60,10,0.2), 2px 4px 8px rgba(80,40,0,0.2);
  z-index: 2;
}
.arch-l { left: 28%; bottom: 32%; width: 30px; height: 130px; border-radius: 8px 8px 4px 4px; }
.arch-r { right: 28%; bottom: 32%; width: 30px; height: 130px; border-radius: 8px 8px 4px 4px; }
.arch-top { left: 26%; right: 26%; bottom: 154px; height: 28px; border-radius: 8px; }

.hs-water {
  position: absolute;
  inset: auto 0 0 0; height: 30%;
  background:
    linear-gradient(90deg, transparent 0 10%, rgba(255,255,255,0.28) 10% 14%, transparent 14% 34%, rgba(255,255,255,0.22) 34% 38%, transparent 38%),
    linear-gradient(180deg, #5AB4D0 0%, #3890B0 100%);
}

.hs-sprout {
  position: absolute;
  bottom: 28%;
  width: 44px; height: 60px;
  z-index: 4;
}
.hs-sprout::before, .hs-sprout::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 22px; height: 50px;
  border-radius: 100% 10% 100% 10%;
  background: #5AA840;
}
.hs-sprout::before { left: 2px; transform: rotate(-28deg); }
.hs-sprout::after  { right: 2px; transform: rotate(28deg); }
.sprout-l { left: 12%; }
.sprout-r { right: 12%; }

.hero-tile-cluster {
  position: absolute;
  bottom: -22px; right: -22px;
  display: grid;
  grid-template-columns: 64px 64px;
  gap: 8px;
  z-index: 10;
}
.tile-card {
  width: 64px; height: 64px;
  border-radius: 16px;
  border: 3px solid rgba(255,255,255,0.7);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  animation: hero-tile-bob 3.5s ease-in-out infinite;
}
.tile-1 { background: linear-gradient(145deg, #FFE9DD, #FFB89E); animation-delay: 0s;   grid-column: 1; grid-row: 1; }
.tile-2 { background: linear-gradient(145deg, #DCEBFF, #7AB3E8); animation-delay: 0.5s; grid-column: 2; grid-row: 1; }
.tile-3 { background: linear-gradient(145deg, #DAF2DC, #88C898); animation-delay: 1.0s; grid-column: 1 / -1; grid-row: 2; transform: translateX(32px); }
@keyframes hero-tile-bob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}
.tile-3 { animation-name: hero-tile-bob-3; }
@keyframes hero-tile-bob-3 {
  0%,100% { transform: translateX(32px) translateY(0); }
  50%     { transform: translateX(32px) translateY(-6px); }
}

/* ── Features ── */
.features {
  background: var(--sand-soft);
  padding: 90px max(20px, env(safe-area-inset-left));
  border-top: 1px solid rgba(80,120,150,0.08);
  border-bottom: 1px solid rgba(80,120,150,0.08);
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 50px;
  color: var(--ink);
  letter-spacing: -0.02em;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.feature-card {
  background: #FFFFFF;
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1.5px solid rgba(80,120,150,0.10);
  box-shadow: var(--shadow-card);
  transition: transform 200ms, box-shadow 200ms;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(80,120,150,0.18);
}
.feature-emoji {
  font-size: 2.4rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 6px rgba(80,120,150,0.18));
}
.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ── Story ── */
.story {
  padding: 90px max(20px, env(safe-area-inset-left));
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 880px) {
  .story { grid-template-columns: 1fr; gap: 36px; text-align: center; }
}
.story-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--coral-deep);
  margin-bottom: 14px;
}
.story .section-title {
  text-align: left;
  margin-left: 0;
  margin-bottom: 22px;
}
@media (max-width: 880px) { .story .section-title { text-align: center; margin: 0 auto 22px; } }
.story p {
  font-size: 1rem;
  color: var(--ink-2);
  margin-bottom: 14px;
}
.story-credits {
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}
.story-art {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.story-portrait {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #FFFFFF;
  border-radius: var(--radius);
  border: 1.5px solid rgba(80,120,150,0.10);
  box-shadow: var(--shadow-card);
}
.portrait-emoji {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  font-size: 1.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--sky-deep));
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(80,120,150,0.25);
}
.portrait-kai .portrait-emoji  { background: linear-gradient(135deg, #B8D8F0, #5FC5A8); }
.portrait-elena .portrait-emoji { background: linear-gradient(135deg, #E8D4A0, #C49A66); }
.portrait-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
}
.portrait-title {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── CTA ── */
.cta {
  text-align: center;
  padding: 90px max(20px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 600px 200px at 50% 0%, rgba(127,200,212,0.25), transparent 70%),
    linear-gradient(180deg, var(--sand-soft) 0%, var(--sand) 100%);
}
.cta h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 14px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.cta p {
  color: var(--ink-2);
  max-width: 540px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}
.cta-btn {
  display: inline-block;
  padding: 16px 36px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #FFC0A8, #FF8FA0 60%, #E26878);
  color: #FFFFFF !important;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: var(--shadow-cta), inset 0 1.5px 0 rgba(255,255,255,0.4);
  text-shadow: 0 1px 2px rgba(180,60,80,0.30);
  transition: transform 150ms;
}
.cta-btn:hover { transform: translateY(-2px); color: #FFFFFF; }

/* ── Footer ── */
.site-footer {
  background: linear-gradient(180deg, var(--ink) 0%, #1A2630 100%);
  color: #BFD5E0;
  padding: 50px max(20px, env(safe-area-inset-left)) 36px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 1.05rem;
}
.footer-nav {
  display: flex;
  gap: 24px;
  font-weight: 600;
  font-size: 0.9rem;
}
.footer-nav a { color: #BFD5E0; }
.footer-nav a:hover { color: var(--mint); }
.footer-copy {
  font-size: 0.82rem;
  color: rgba(191,213,224,0.6);
  width: 100%;
  text-align: center;
  border-top: 1px solid rgba(191,213,224,0.15);
  padding-top: 22px;
  margin-top: 12px;
}

/* ── Legal pages (privacy.html, terms.html, eula.html, support.html) ── */
.legal-shell {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px max(22px, env(safe-area-inset-left));
}
.legal-shell h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.legal-shell .legal-updated {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 36px;
}
.legal-shell h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 36px;
  margin-bottom: 12px;
}
.legal-shell h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 22px;
  margin-bottom: 10px;
}
.legal-shell p,
.legal-shell li {
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 12px;
}
.legal-shell ul, .legal-shell ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.legal-shell strong { color: var(--ink); }
.legal-shell .legal-callout {
  background: #FFFAF0;
  border-left: 4px solid var(--coral);
  padding: 14px 18px;
  border-radius: 4px 12px 12px 4px;
  margin: 18px 0;
  font-size: 0.92rem;
}
.legal-shell a { font-weight: 700; }
.back-home {
  display: inline-block;
  margin-bottom: 26px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--sky-deep);
}

/* Reduced-motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
