/* Muddle — the site wears the app's one theme: "Night bar". Tokens mirror
   src/themes/index.ts so a colour changed there is changed here by hand. */

@font-face {
  font-family: 'Unbounded';
  src: url('/assets/fonts/Unbounded-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/Manrope-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/Manrope-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/Manrope-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0e0d10;
  --surface: #19181d;
  --raised: #23212a;
  --border: #2e2c35;
  --text: #f5f2ec;
  --muted: #a39faa;
  --amber: #ffb547;
  --amber-ink: #1a1206;
  --mint: #4fd1a5;
  --coral: #ff6b5e;
  --display: 'Unbounded', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --body: 'Manrope', 'Hiragino Sans', 'Yu Gothic', system-ui, -apple-system,
    'Segoe UI', sans-serif;
  --radius: 22px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 20;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
}
.skip:focus {
  left: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  overflow-wrap: anywhere;
}

/* ---------- header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 13, 16, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(46, 44, 53, 0.6);
}
.top__row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}
.brand svg {
  width: 28px;
  height: 28px;
}
.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.nav a:hover {
  color: var(--text);
}

.lang {
  position: relative;
}
.lang summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.lang summary::-webkit-details-marker {
  display: none;
}
.lang summary svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  margin: 0;
  padding: 6px;
  list-style: none;
  min-width: 190px;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}
.lang a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}
.lang a:hover {
  background: var(--surface);
}
.lang a[aria-current='true'] {
  color: var(--amber);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 88px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 820px;
  height: 820px;
  background: radial-gradient(
    closest-side,
    rgba(255, 181, 71, 0.18),
    rgba(255, 181, 71, 0)
  );
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--amber);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 60px);
  text-wrap: balance;
}
.hero__lead {
  margin: 24px 0 32px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 36em;
}
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 178px;
  padding: 10px 22px;
  border-radius: 16px;
  line-height: 1.2;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.store small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.store strong {
  font-family: var(--display);
  font-size: clamp(16px, 4.2vw, 19px);
  white-space: nowrap;
}
.store--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}
.store--primary small {
  color: rgba(26, 18, 6, 0.7);
}
a.store {
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.store:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -12px rgba(255, 181, 71, 0.55);
}
a.store:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
.hero__note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.phone {
  position: relative;
  margin: 0 auto;
  width: min(100%, 320px);
  aspect-ratio: 1206 / 2622;
  border-radius: 44px;
  padding: 10px;
  background: linear-gradient(160deg, #2b2932, #121115);
  box-shadow:
    0 0 0 1px #34313c,
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 120px rgba(255, 181, 71, 0.12);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 34px;
}

/* ---------- sections ---------- */

.section {
  padding: clamp(56px, 8vw, 104px) 0;
  scroll-margin-top: 40px;
}
.section--surface {
  background: linear-gradient(180deg, rgba(25, 24, 29, 0.55), rgba(14, 13, 16, 0));
}
.section__head {
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  text-wrap: balance;
}
.section__lead {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
  padding: 0;
  margin: 0;
  list-style: none;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.steps .card::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber-ink);
  font-family: var(--display);
  font-size: 17px;
}
.card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.card p {
  margin: 0;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: rgba(255, 181, 71, 0.12);
  color: var(--amber);
}
.icon svg {
  width: 24px;
  height: 24px;
}

.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
}
.screens .phone {
  width: min(100%, 290px);
}
.screens figure {
  margin: 0;
}
.screens figure:nth-child(2) {
  transform: translateY(32px);
}

.pro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 32px;
  border: 1px solid rgba(255, 181, 71, 0.4);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 181, 71, 0.16), transparent 60%),
    var(--surface);
}
.pro ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.pro li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 18px;
  font-weight: 500;
}
.pro li svg {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--amber-ink);
  background: var(--amber);
  border-radius: 50%;
  padding: 5px;
}

.note {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.note h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.note p {
  margin: 0 0 10px;
  color: var(--muted);
}
.badge18 {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--coral);
  color: var(--coral);
  font-family: var(--display);
  font-size: 16px;
}

.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 24px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 32px 20px 0;
  position: relative;
  font-weight: 700;
  font-size: 18px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq p {
  margin: 0 0 20px;
  color: var(--muted);
}

/* ---------- footer ---------- */

.foot {
  margin-top: clamp(40px, 6vw, 80px);
  padding: 48px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}
.foot__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.foot h2 {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}
.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.foot a {
  color: var(--muted);
  text-decoration: none;
}
.foot a:hover {
  color: var(--text);
}
.foot__base {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 13px;
}

/* ---------- legal documents ---------- */

.doc {
  max-width: 780px;
  padding: clamp(40px, 6vw, 72px) 0 24px;
}
.doc h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  margin-bottom: 24px;
}
.doc h2 {
  font-size: 22px;
  margin: 44px 0 14px;
  scroll-margin-top: 84px;
}
.doc h3 {
  font-size: 17px;
  margin: 28px 0 10px;
  scroll-margin-top: 84px;
}
.doc p,
.doc li {
  color: #d9d5ce;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li {
  margin: 6px 0;
}
.doc strong {
  color: var(--text);
}
.doc code {
  font-size: 0.92em;
  background: var(--raised);
  padding: 1px 6px;
  border-radius: 6px;
}
.table {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.doc th {
  background: var(--surface);
  color: var(--text);
}
.doc tr:last-child td {
  border-bottom: 0;
}

.notfound {
  min-height: 60vh;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 18px;
  padding: 80px 0;
}
.notfound h1 {
  font-size: clamp(32px, 6vw, 60px);
}
.notfound p {
  margin: 0;
  color: var(--muted);
}
.button {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- small screens ---------- */

@media (max-width: 960px) {
  .nav {
    display: none;
  }
  .lang {
    margin-left: auto;
  }
  .hero__grid,
  .pro {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero .phone {
    width: min(78%, 300px);
  }
  .steps,
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
  .foot__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .screens {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }
  .screens figure {
    scroll-snap-align: center;
  }
  .screens figure:nth-child(2) {
    transform: none;
  }
  .store {
    flex: 1 1 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .faq summary::after {
    transition: none;
  }
  a.store,
  a.store:hover {
    transition: none;
    transform: none;
  }
}
