/* Language Toybox: night-sky site styles */
:root {
  --space: #070B24;
  --midnight: #111A4B;
  --violet: #3A2B7C;
  --rose: #A84C8E;
  --star: #FFF4DC;
  --star-soft: rgba(255, 244, 220, 0.74);
  --star-faint: rgba(255, 244, 220, 0.5);
  --flame: #F47B2A;
  --sun: #FFC85A;
  --sea: #4CC3F0;
  --glass: rgba(20, 28, 78, 0.55);
  --glass-line: rgba(255, 244, 220, 0.14);
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --text: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--space);
  color: var(--star);
  font: 18px/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--star); text-decoration-color: rgba(255, 200, 90, 0.6); text-underline-offset: 3px; }
a:hover { color: var(--sun); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0 0 0.45em; letter-spacing: -0.01em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h3 { font-size: 1.5rem; line-height: 1.15; }
p { margin: 0 0 1em; }

/* Sky layers */
.sky { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 85% 8%, rgba(168, 76, 142, 0.30), transparent 70%),
    radial-gradient(70vmax 50vmax at 5% 45%, rgba(58, 43, 124, 0.55), transparent 70%),
    radial-gradient(60vmax 50vmax at 70% 95%, rgba(34, 120, 190, 0.25), transparent 70%),
    linear-gradient(180deg, #0A0F31 0%, var(--space) 55%, #050720 100%);
}
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--star); color: var(--space); padding: 8px 14px; border-radius: 10px; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 30; transition: background-color .3s ease, backdrop-filter .3s ease; }
.site-header.scrolled { background: rgba(7, 11, 36, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--glass-line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--star); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px var(--glass-line), 0 6px 20px rgba(0,0,0,.4); }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--star-soft); font-weight: 700; font-size: 0.95rem; padding: 8px 13px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--star); background: rgba(255, 244, 220, 0.08); }
.header-badge { margin-left: 10px; display: block; line-height: 0; }
.header-badge img { height: 40px; width: auto; }
@media (max-width: 900px) { .nav { display: none; } .header-badge { margin-left: auto; } }
@media (max-width: 380px) { .brand span { display: none; } }

/* App Store badge (Apple artwork, unaltered) */
.badge { display: inline-block; line-height: 0; border-radius: 9px; }
.badge img { height: 56px; width: auto; }
.badge:hover { filter: drop-shadow(0 0 16px rgba(255, 200, 90, 0.35)); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 110px 0 80px; overflow: hidden; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.hero h1 { font-size: clamp(3.1rem, 8vw, 6.4rem); line-height: 0.95; margin-bottom: 0.3em; text-shadow: 0 0 40px rgba(255, 200, 120, 0.25); }
.hero h1 .line2 { display: block; font-size: 0.48em; line-height: 1.15; font-weight: 500; color: var(--star-soft); margin-top: 0.35em; text-shadow: none; max-width: 15em; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--star-soft); max-width: 33em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 30px 0 12px; }
.fine { font-size: 0.92rem; color: var(--star-faint); margin: 0; }
.hero-art { position: relative; aspect-ratio: 1 / 0.95; }
.hero-window { position: absolute; inset: 6% 2% auto 4%; width: 94%; filter: drop-shadow(0 30px 60px rgba(10, 6, 40, .7)) drop-shadow(0 0 70px rgba(76, 195, 240, 0.35)); animation: bob 9s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-14px) rotate(-1deg); } }
.word-card { position: absolute; left: -2%; bottom: 4%; display: flex; align-items: center; gap: 14px; background: #FFFDF6; color: #24414F; border-radius: 22px; padding: 12px 22px 12px 14px; box-shadow: 0 0 0 4px rgba(76, 195, 240, 0.45), 0 18px 40px rgba(0,0,0,.45); min-width: 230px; }
.word-card img { width: 42px; height: auto; }
.word-card .w { font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1.1; display: block; transition: opacity .35s ease, transform .35s ease; }
.word-card .l { display: block; font-size: 0.85rem; font-weight: 700; color: #5B7380; }
.word-card.swap .w, .word-card.swap .l { opacity: 0; transform: translateY(6px); }
.hero .planet { position: absolute; pointer-events: none; }
.p-saturn { width: clamp(120px, 15vw, 210px); right: -3%; top: 14%; }
.p-moon { width: clamp(50px, 6vw, 86px); left: 46%; top: 12%; opacity: .9; }
.p-mars { width: clamp(46px, 5vw, 70px); right: 8%; bottom: 10%; }
@media (max-width: 860px) {
  .hero { padding-top: 96px; min-height: auto; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: min(100%, 460px); margin: 0 auto 6px; }
  .word-card { left: 0; bottom: 0; min-width: 0; }
  .p-moon { left: 4%; top: 2%; }
}

/* Sections */
section { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { color: var(--star-soft); font-size: 1.15rem; }
.center { text-align: center; margin-inline: auto; }

/* Play (screenshot) */
.play .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 70px); align-items: center; }
.device { position: relative; border-radius: 34px; padding: 12px; background: linear-gradient(145deg, #2B3160, #12173A); box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 30px 80px rgba(0,0,0,.55), 0 0 90px rgba(76, 195, 240, 0.18); }
.device img { border-radius: 24px; width: 100%; }
.device .float-word { position: absolute; font-family: var(--display); font-weight: 600; background: rgba(255, 253, 246, 0.95); color: #24414F; border-radius: 14px; padding: 6px 14px; font-size: 1.05rem; box-shadow: 0 10px 30px rgba(0,0,0,.4); white-space: nowrap; }
.device .float-word small { font-family: var(--text); font-weight: 700; color: #5B7380; font-size: 0.75rem; margin-left: 6px; }
.fw1 { top: -18px; right: 8%; transform: rotate(3deg); }
.fw2 { bottom: -20px; left: 10%; transform: rotate(-3deg); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 26px; }
.steps h3 { font-size: 1.3rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--star-soft); }
.steps li { padding-left: 22px; border-left: 2px solid rgba(255, 200, 90, 0.5); }
@media (max-width: 860px) { .play .wrap { grid-template-columns: 1fr; } }

/* Journey through the worlds */
.journey { overflow: hidden; }
.flight { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.flight path { fill: none; stroke: rgba(255, 244, 220, 0.38); stroke-width: 2.5; stroke-dasharray: 2 12; stroke-linecap: round; }
.rocket { position: absolute; left: 0; top: 0; width: 70px; z-index: 3; pointer-events: none; will-change: transform; filter: drop-shadow(0 0 18px rgba(244, 123, 42, 0.55)); }
.rocket img { width: 100%; }
.rocket::after { content: ""; position: absolute; left: 50%; bottom: -26px; width: 18px; height: 34px; transform: translateX(-50%); border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: radial-gradient(circle at 50% 30%, #FFE7A0, var(--flame) 55%, rgba(244,123,42,0) 75%); }
.worlds { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(60px, 9vw, 130px); }
.world { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.world .portal { position: relative; }
.world .portal::before { content: ""; position: absolute; inset: 8% 10%; border-radius: 50%; background: radial-gradient(closest-side, var(--glow, rgba(76,195,240,.45)), transparent); filter: blur(30px); z-index: -1; }
.world .portal img { width: min(100%, 470px); margin-inline: auto; filter: drop-shadow(0 26px 40px rgba(0, 0, 20, .6)); }
.world:nth-child(even) .portal { order: 2; }
.world .copy { max-width: 30em; }
.world h3 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 10px; }
.world p { color: var(--star-soft); }
.world .heard { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 16px; padding: 8px 16px; font-size: 0.95rem; color: var(--star-soft); }
.world .heard b { font-family: var(--display); font-weight: 600; font-size: 1.35rem; color: var(--star); }
@media (max-width: 760px) {
  .world { grid-template-columns: 1fr; }
  .world:nth-child(even) .portal { order: 0; }
  .flight, .rocket { display: none; }
}

/* Languages: an orbit around Earth */
.orbit { position: relative; width: min(100%, 860px); aspect-ratio: 1.55 / 1; margin: 0 auto; }
.orbit .earth { position: absolute; left: 50%; top: 50%; width: 30%; transform: translate(-50%, -50%); filter: drop-shadow(0 0 50px rgba(76, 195, 240, 0.5)); }
.orbit .ring { position: absolute; inset: 6% 2%; border-radius: 50%; border: 1px dashed rgba(255, 244, 220, 0.22); }
.orbit ul { list-style: none; margin: 0; padding: 0; }
.orbit li { position: absolute; transform: translate(-50%, -50%); text-align: center; white-space: nowrap; }
.orbit .native { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 2.2vw, 1.6rem); line-height: 1.2; text-shadow: 0 0 18px rgba(255, 220, 160, 0.35); }
.orbit .en { display: block; font-size: 0.82rem; color: var(--star-faint); font-weight: 700; }
@media (max-width: 700px) {
  .orbit { aspect-ratio: auto; }
  .orbit .earth { position: relative; left: auto; top: auto; transform: none; width: 46%; margin: 0 auto 28px; }
  .orbit .ring { display: none; }
  .orbit ul { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .orbit li { position: static; transform: none; left: auto !important; top: auto !important; }
}
.note { text-align: center; color: var(--star-soft); max-width: 36em; margin: 34px auto 0; }

/* Grown-ups */
.grownups .wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(30px, 6vw, 90px); align-items: center; }
.grownups .moon-art { position: relative; }
.grownups .moon-art .planet-moon { width: 78%; margin: 0 auto; filter: drop-shadow(0 0 60px rgba(255, 244, 220, 0.25)); }
.grownups .moon-art .astro { position: absolute; width: 34%; right: 4%; top: -6%; transform: rotate(12deg); }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.points h3 { font-size: 1.25rem; margin-bottom: 4px; }
.points p { margin: 0; color: var(--star-soft); }
.points li { padding: 18px 22px; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (max-width: 860px) { .grownups .wrap { grid-template-columns: 1fr; } .grownups .moon-art { width: min(70%, 300px); margin: 0 auto; } }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 840px; margin: 0 auto; }
.plan { position: relative; padding: 30px 30px 26px; border-radius: 26px; background: var(--glass); border: 1px solid var(--glass-line); }
.plan.featured { border-color: rgba(255, 200, 90, 0.6); box-shadow: 0 0 60px rgba(255, 200, 90, 0.12); }
.plan .tag { position: absolute; top: -14px; left: 26px; background: var(--sun); color: #2A1B05; font-weight: 800; font-size: 0.82rem; padding: 4px 12px; border-radius: 999px; }
.plan h3 { font-size: 1.35rem; margin-bottom: 6px; }
.plan .price { color: var(--star); font-family: var(--display); font-weight: 600; font-size: 3rem; line-height: 1; margin: 6px 0 10px; }
.plan .price small { font-family: var(--text); font-size: 1rem; font-weight: 700; color: var(--star-faint); }
.plan p { color: var(--star-soft); margin: 0; font-size: 0.98rem; }
.plan s { color: var(--star-faint); }
.trial { text-align: center; font-family: var(--display); font-size: 1.35rem; margin: 0 0 30px; color: var(--sun); }
.pricing-notes { max-width: 760px; margin: 28px auto 0; color: var(--star-faint); font-size: 0.92rem; text-align: center; }
@media (max-width: 680px) { .plans { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
details { border-bottom: 1px solid var(--glass-line); }
summary { cursor: pointer; list-style: none; font-family: var(--display); font-weight: 500; font-size: 1.3rem; padding: 20px 40px 20px 0; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border-right: 2.5px solid var(--sun); border-bottom: 2.5px solid var(--sun); transform: translateY(-70%) rotate(45deg); transition: transform .25s ease; }
details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
details > p { color: var(--star-soft); margin: 0 0 22px; max-width: 40em; }

/* Final call */
.launch { text-align: center; padding-bottom: clamp(100px, 14vw, 180px); }
.launch .saturn { width: clamp(220px, 34vw, 420px); margin: 0 auto 10px; filter: drop-shadow(0 0 80px rgba(255, 200, 90, 0.3)); }
.launch h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.launch p { color: var(--star-soft); max-width: 32em; margin-inline: auto; }
.launch .badge img { height: 64px; }
.launch .fine { margin-top: 16px; }

/* Footer */
.site-footer { padding: 30px 0 46px; border-top: 1px solid var(--glass-line); color: var(--star-faint); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.site-footer a { color: var(--star-soft); }

/* Parallax helpers */
[data-depth] { will-change: transform; }

/* Article pages */
.article { position: relative; padding: 130px 0 100px; }
.article .wrap { max-width: 780px; }
.article .paper { background: rgba(14, 20, 60, 0.72); border: 1px solid var(--glass-line); border-radius: 30px; padding: clamp(26px, 5vw, 56px); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.article h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
.article h2 { font-size: 1.5rem; margin-top: 1.8em; }
.article p, .article li { color: var(--star-soft); }
.article .updated { color: var(--sun); font-weight: 700; margin-bottom: 10px; }
.article .contact { background: rgba(255, 244, 220, 0.07); border-radius: 18px; padding: 18px 22px; margin: 22px 0 10px; }
.article .contact p:last-child { margin: 0; }
.article .deco { position: absolute; pointer-events: none; z-index: 0; opacity: .9; }
.article .paper { position: relative; z-index: 1; }
.article details > p { margin-bottom: 18px; }
@media (max-width: 900px) { .article .deco { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-window { animation: none; }
  .word-card .w, .word-card .l { transition: none; }
}
