/* Musiva website — tokens mirror mobile/lib/design/musiva_theme.dart */

@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --background: #0a080a;
  --surface: #17121d;
  --surface-raised: #262628;
  --outline: #786553;
  --text-primary: #ffffff;
  --text-secondary: #827d8a;
  --text-muted: #808087;
  --text-soft: #e5e5eb;
  --accent-pink: #ff6b6b;
  --accent-orange: #ff9f43;
  --accent-yellow: #ffd66b;
  --accent: linear-gradient(90deg, var(--accent-pink), var(--accent-yellow));
  --amber-card: linear-gradient(90deg, #59331a, #4d400d);
  --amber-outline: #b38c26;
  --radius-card: 16px;
  --radius-button: 28px;
  --shadow-soft: 0 8px 12px rgba(0, 0, 0, 0.35);
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Geeza Pro", "Noto Sans Arabic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-yellow); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-yellow); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.gradient-text {
  background: var(--accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 8, 10, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header .wrap { display: flex; align-items: center; min-height: 64px; gap: 8px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-primary); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: var(--text-primary); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text-primary); background: var(--surface); }
@media (max-width: 859px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; }
  .brand { flex: 1; }
  .nav { order: 3; width: 100%; margin: 0 -8px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 8px; font-size: 13px; }
}

/* Language picker: a pill showing the short code with a native select laid over it */
.lang-pick { display: none; position: relative; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--text-soft); font-size: 13px; font-weight: 600; cursor: pointer; }
.js .lang-pick { display: inline-flex; }
.lang-pick:hover { background: var(--surface-raised); }
.lang-pick:focus-within { outline: 2px solid var(--accent-yellow); outline-offset: 2px; }
.lang-pick svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.lang-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.lang-pick select option { color: #000; }

/* Hide untranslated text until i18n.js has applied the chosen language */
.i18n-pending body { visibility: hidden; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px;
  border-radius: var(--radius-button);
  font-weight: 700; font-size: 15px;
  border: 0; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #1a1a1a; box-shadow: 0 8px 24px rgba(255, 140, 89, 0.4); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--text-primary); border: 1px solid rgba(255, 255, 255, 0.08); }
.btn-ghost:hover { background: var(--surface-raised); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none;
}
.hero::before { width: 520px; height: 520px; background: #3a1414; top: -180px; left: -160px; opacity: 0.9; }
.hero::after { width: 520px; height: 520px; background: #2e2410; bottom: -220px; right: -120px; opacity: 0.9; }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; } .hero { padding: 104px 0 120px; } }

.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; margin: 0 0 16px; }
.hero h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px; }
.hero p.lead { color: var(--text-soft); font-size: clamp(17px, 2vw, 19px); max-width: 520px; margin: 0 0 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store-note { color: var(--text-muted); font-size: 13px; margin: 16px 0 0; }

.hero-shot { justify-self: center; width: min(340px, 100%); }
.hero-shot img {
  width: 100%; height: auto; border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Sections */
section.block { padding: 72px 0; }
.section-head { max-width: 620px; margin: 0 0 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.01em; }
.section-head p { color: var(--text-secondary); margin: 0; font-size: 17px; }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px;
}
.card h3 { font-size: 17px; font-weight: 600; margin: 14px 0 6px; }
.card p { color: var(--text-secondary); margin: 0; font-size: 15px; }
.icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber-card);
  border: 1px solid rgba(179, 140, 38, 0.4);
}
.icon svg { width: 22px; height: 22px; stroke: var(--accent-yellow); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }
.split .media { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-soft); aspect-ratio: 1 / 1; }
.split .media img { width: 100%; height: 100%; object-fit: cover; }
.split .shot-media { aspect-ratio: auto; justify-self: center; width: min(340px, 100%); border-radius: 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.split .shot-media img { height: auto; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 40px; }
.shots img { width: 100%; height: auto; border-radius: 22px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
@media (max-width: 719px) {
  .shots { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 70%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
  .shots img { scroll-snap-align: start; }
}

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: step; }
.steps li { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border-radius: var(--radius-card); padding: 18px 20px; counter-increment: step; }
.steps li::before {
  content: counter(step); flex: 0 0 32px; height: 32px; border-radius: 999px;
  background: var(--accent); color: #1a1a1a; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.steps strong { display: block; font-weight: 600; margin-bottom: 2px; }
.steps span { color: var(--text-secondary); font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--text-soft); }

.cta-band {
  border-radius: 24px; padding: 48px 28px; text-align: center;
  background: radial-gradient(120% 140% at 0% 0%, #3a1414 0%, transparent 55%), radial-gradient(120% 140% at 100% 100%, #2e2410 0%, transparent 55%), var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.cta-band h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; line-height: 1.2; }
.cta-band p { color: var(--text-secondary); margin: 0 auto 28px; max-width: 520px; }
.cta-band .cta-row { justify-content: center; }

.faq details { background: var(--surface); border-radius: var(--radius-card); padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-yellow); font-weight: 700; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-secondary); margin: 0 0 18px; }

/* Legal / doc pages */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.15; margin: 0 0 8px; font-weight: 800; letter-spacing: -0.02em; }
.doc .updated { color: var(--text-muted); font-size: 14px; margin: 0 0 32px; }
.doc h2 { scroll-margin-top: 88px; font-size: 22px; margin: 44px 0 12px; font-weight: 700; }
.doc h3 { font-size: 17px; margin: 28px 0 8px; font-weight: 600; }
.doc p, .doc li { color: var(--text-soft); }
.doc ul, .doc ol:not(.steps) { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--text-primary); }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: start; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); vertical-align: top; }
.doc th { color: var(--text-secondary); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.note {
  background: var(--amber-card); border: 1px solid var(--amber-outline);
  border-radius: var(--radius-card); padding: 16px 20px; margin: 0 0 32px; color: var(--text-soft); font-size: 15px;
}
.note strong { color: var(--accent-yellow); }
.toc { background: var(--surface); border-radius: var(--radius-card); padding: 18px 22px; margin-bottom: 8px; }
.toc p { margin: 0 0 8px; font-weight: 600; color: var(--text-primary); }
.toc ol { margin: 0; padding-inline-start: 20px; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

.contact-card { display: flex; flex-direction: column; gap: 6px; }
.contact-card .label { color: var(--text-secondary); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.contact-card a.big { font-size: 20px; font-weight: 700; word-break: break-all; }

/* Footer */
.site-footer { border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 40px 0 48px; color: var(--text-muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer .links a { color: var(--text-secondary); }
.site-footer .links a:hover { color: var(--text-primary); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


/* Right-to-left (Arabic): the accent gradient follows reading direction, as in the app */
[dir="rtl"] { --accent: linear-gradient(270deg, var(--accent-pink), var(--accent-yellow)); }
[dir="rtl"] [dir="ltr"] { --accent: linear-gradient(90deg, var(--accent-pink), var(--accent-yellow)); }
/* Letter spacing breaks Arabic joining and hurts CJK; drop it for those scripts */
html[lang="ar"] body *, html[lang="ja"] body * { letter-spacing: 0 !important; }
html[lang="ar"] .eyebrow, html[lang="ja"] .eyebrow { text-transform: none; }

/* ---------------------------------------------------------------------------
   Motion (motion.js adds .motion only when reduced motion is not requested)
   --------------------------------------------------------------------------- */

.read-progress {
  position: absolute; inset-inline: 0; bottom: -1px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left center;
  pointer-events: none;
}
[dir="rtl"] .read-progress { transform-origin: right center; }

@media (prefers-reduced-motion: no-preference) {
  .motion .reveal, .motion .card.reveal {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--delay, 0ms);
  }
  .motion .reveal.in { opacity: 1; transform: none; }

  .motion .hero::before { animation: glow-drift 14s ease-in-out infinite alternate; }
  .motion .hero::after { animation: glow-drift 17s ease-in-out infinite alternate-reverse; }
  @keyframes glow-drift { to { translate: 60px 40px; scale: 1.12; } }

  .motion .hero-shot {
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.4s ease-out;
    animation: phone-float 6s ease-in-out infinite;
  }
  @keyframes phone-float { 50% { translate: 0 -12px; } }


  .motion .card {
    background:
      radial-gradient(260px circle at var(--mx, -300px) var(--my, -300px), rgba(255, 159, 67, 0.09), transparent 65%),
      var(--surface);
    transition: transform 0.25s ease, border-color 0.25s ease;
  }
  .motion .card:hover { transform: translateY(-3px); border-color: rgba(255, 214, 107, 0.22); }

  .btn { transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
  .btn:hover { transform: translateY(-2px); }
  .btn-primary:hover { box-shadow: 0 10px 30px rgba(255, 140, 89, 0.5); }

  .brand img { transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
  .brand:hover img { transform: rotate(-8deg) scale(1.08); }

  .site-header { transition: box-shadow 0.3s ease, background 0.3s ease; }
  .site-header.scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }

  .faq details[open] p { animation: faq-open 0.35s ease; }
  @keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } }
}

/* Legal pages (about, privacy, terms) */
.doc .lead-doc { font-size: 19px; color: var(--text-primary); margin: 0 0 8px; }
.doc .doc-sub { color: var(--text-secondary); margin: -16px 0 28px; }
.doc .prevails {
  border-inline-start: 3px solid var(--accent-orange); background: var(--surface);
  border-radius: 10px; padding: 12px 16px; margin: -12px 0 28px; font-size: 14px; color: var(--text-soft);
}
.doc .draft-option {
  border: 1px dashed var(--amber-outline); border-radius: var(--radius-card);
  padding: 4px 20px; margin: 12px 0; background: rgba(58, 42, 18, 0.35);
}
.doc .draft-label { font-size: 13px; font-weight: 600; color: var(--accent-yellow); text-transform: uppercase; letter-spacing: 0.04em; }
.doc ol:not(.steps) > li > strong:first-child { color: var(--text-primary); }
.lang-links { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.lang-links p { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }
.lang-links div { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-links a { background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 500; color: var(--text-soft); }
.lang-links a:hover { color: var(--text-primary); text-decoration: none; background: var(--surface-raised); }
