/* Moodmelon site styles — shared by all locale index.html files. */

:root {
  --bg: #FDF7EE;
  --bg-alt: #F6EEE5;
  --surface: #FFFFFF;
  --ink: #2A2034;
  --ink-strong: #1B0F26;
  --ink-muted: #5C4E6A;
  --accent: #7A4DB5;
  --accent-strong: #5E2F94;
  --accent-soft: #EFE0F7;
  --border: #E9DFD3;
  --peach: #F0B894;
  --rose: #E8B4C2;
  --lavender: #B8A4D9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15101D;
    --bg-alt: #1A1424;
    --surface: #1F1828;
    --ink: #F1E9F7;
    --ink-strong: #FFFFFF;
    --ink-muted: #B7A8C6;
    --accent: #C7A1F0;
    --accent-strong: #E0BFFF;
    --accent-soft: #2E2438;
    --border: #2E2438;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ============ Top bar ============ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.brand-mark {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-strong);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 18px;
}
.brand-mark img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.topbar nav a {
  color: var(--ink-muted);
  text-decoration: none;
  margin-left: 22px;
  font-size: 14px;
  font-weight: 500;
}
.topbar nav a:hover { color: var(--accent); }

/* Nav lives behind a kebab at every width; the links open as a popup styled
   as a connected button group. CSS-only via <details>/<summary> — no JS. */
.nav-menu { position: relative; }
/* Take visibility off the UA's closed-<details> mechanism so WE control it. */
.nav-menu::details-content { content-visibility: visible; }

/* Kebab toggle */
.nav-menu summary {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;     /* min touch target */
  margin: -8px 0;                /* don't inflate the topbar height */
  color: var(--ink-strong);
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
/* Suppress the default disclosure triangle in every engine. */
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::marker { content: ""; }
.nav-menu summary:hover,
.nav-menu[open] summary { background: var(--accent-soft); }
.nav-menu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Popup, styled as a connected (segmented) button group */
.nav-menu nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset-inline-end: 0;           /* flips to the kebab side under dir="rtl" */
  top: calc(100% + 12px);
  min-width: 184px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
  overflow: hidden;              /* clip the buttons to the rounded corners */
  z-index: 30;
  /* hidden until [open]; kept in flow so it can transition */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}
.nav-menu[open] nav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-menu nav a {
  margin: 0;
  padding: 13px 18px;            /* row height clears 44px */
  font-size: 15px;
  font-weight: 500;
  text-align: start;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--border);   /* hairline divider between buttons */
}
.nav-menu nav a:last-child { border-bottom: none; }
.nav-menu nav a:hover { background: var(--accent-soft); color: var(--accent); }

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 88px;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px; right: -180px;
  width: 620px; height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(240,184,148,0.55) 0%,
    rgba(232,180,194,0.32) 45%,
    rgba(184,164,217,0) 80%);
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -240px; left: -180px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(184,164,217,0.40) 0%,
    rgba(232,180,194,0.22) 50%,
    rgba(240,184,148,0) 80%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
}
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #B8A4D9 0%, #7A4DB5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 520px;
  margin: 0 0 32px;
}
@media (max-width: 820px) {
  .hero p.lead { margin-left: auto; margin-right: auto; }
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
@media (max-width: 820px) { .cta-row { justify-content: center; } }

.btn-play {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--accent);
  color: #FFFFFF;
  padding: 18px 30px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  box-shadow:
    0 12px 28px -10px rgba(122, 77, 181, 0.45),
    0 4px 10px -4px rgba(122, 77, 181, 0.30);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.btn-play:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow:
    0 16px 34px -10px rgba(122, 77, 181, 0.55),
    0 6px 14px -4px rgba(122, 77, 181, 0.35);
}
@media (prefers-color-scheme: dark) {
  .btn-play { color: #1B0F26; box-shadow: none; }
  .btn-play:hover { box-shadow: none; }
}
.btn-play svg { width: auto; height: 30px; flex-shrink: 0; }
.btn-play span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.12;            /* tight stack so the icon spans both lines */
}
.btn-play small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.88;
  letter-spacing: 0.04em;
}
.btn-play strong { font-size: 19px; font-weight: 700; letter-spacing: -0.005em; }

.hero-art { display: flex; justify-content: center; align-items: center; }
.phone-frame {
  width: min(280px, 80%);
  aspect-ratio: 1080 / 2376;
  border-radius: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow:
    0 30px 60px -20px rgba(60, 40, 90, 0.35),
    0 10px 24px -12px rgba(60, 40, 90, 0.18);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .phone-frame {
    box-shadow:
      0 30px 60px -20px rgba(0, 0, 0, 0.55),
      0 10px 24px -12px rgba(0, 0, 0, 0.4);
  }
}
.phone-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ============ Sections ============ */
section { padding: 72px 0; }
section h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
  margin: 0 0 12px;
  font-weight: 700;
}
section .section-sub {
  font-size: 17px;
  color: var(--ink-muted);
  max-width: 620px;
  margin: 0 0 48px;
}

/* ============ Features ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
}
@media (max-width: 820px) { .features-grid { grid-template-columns: 1fr; gap: 28px; } }

.feature {
  padding-top: 18px;
  border-top: 2px solid var(--border);
  transition: border-color 0.18s ease;
}
.feature:hover { border-top-color: var(--accent); }
.feature h3 {
  font-size: 19px;
  margin: 0 0 8px;
  color: var(--ink-strong);
  font-weight: 700;
  letter-spacing: -0.005em;
}
.feature p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ============ Screenshot strip ============ */
.shots {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.shots-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 0 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots-row::-webkit-scrollbar { height: 8px; }
.shots-row::-webkit-scrollbar-track { background: transparent; }
.shots-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.shot {
  flex: 0 0 220px;
  aspect-ratio: 1080 / 2376;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  scroll-snap-align: start;
  box-shadow: 0 12px 28px -16px rgba(60, 40, 90, 0.25);
}
.shot img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ============ Wear OS strip ============ */
.wear {
  background: var(--bg);
  padding: 72px 0 80px;
}
.wear-shots-row {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 0 16px;
}
.wear-shot {
  flex: 0 0 160px;
  width: 160px;
  height: 160px;
  position: relative;
  /* drop-shadow follows the alpha shape (round, not square) */
  filter:
    drop-shadow(0 8px 18px rgba(60, 40, 90, 0.22))
    drop-shadow(0 0 28px rgba(199, 161, 240, 0.28));
}
.wear-shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.wear-shot::after {
  /* polished-glass sheen on the upper-left, clipped to the circle */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.20) 0%,
    rgba(255, 255, 255, 0.05) 28%,
    rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}
.wear-note {
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
  margin: 16px 0 0;
}
@media (max-width: 620px) {
  .wear-shot { flex: 0 0 140px; width: 140px; height: 140px; }
  .wear-shots-row { gap: 20px; }
}

/* ============ Footer ============ */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 56px;
  color: var(--ink-muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
@media (max-width: 620px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
}
.footer-grid a { color: var(--ink-muted); text-decoration: none; margin-left: 18px; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid a:first-child { margin-left: 0; }

.lang-switcher {
  margin-top: 18px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 2;
}
.lang-switcher a {
  color: var(--ink-muted);
  text-decoration: none;
  margin: 0 6px 0 0;
  padding: 2px 10px;
  border-radius: 999px;
  display: inline-block;
}
.lang-switcher a:hover { background: var(--accent-soft); color: var(--accent); }
.lang-switcher a.current { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ============ RTL overrides (ar) ============ */
/* Flex/grid layout mirrors automatically under dir="rtl"; these flip the few
   remaining physical left/right rules so spacing + decorative blobs follow. */
/* Nav popup mirrors automatically (inset-inline-end + text-align:start). */
[dir="rtl"] .hero::before { right: auto; left: -180px; }
[dir="rtl"] .hero::after { left: auto; right: -180px; }
[dir="rtl"] .footer-grid a { margin-left: 0; margin-right: 18px; }
[dir="rtl"] .footer-grid a:first-child { margin-right: 0; }
[dir="rtl"] .lang-switcher a { margin: 0 0 0 6px; }
