/* Site design system: landing (index.php) + legal pages. Tokens from the app design (Figma 0111). */
@font-face {
  font-family: "Roboto Flex";
  src: url("fonts/RobotoFlex.ttf") format("truetype");
  font-weight: 100 1000;
  font-stretch: 25% 151%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-primary: #110E1B;          /* bg/screen */
  --surface-primary: #1A1628;     /* bg/surface */
  --surface-muted: #221D34;       /* bg/surface-muted */
  --surface-raised: #2C2642;      /* bg/raised */
  --accent-soft: #261F45;         /* bg/accent-soft */
  --text-primary: #F5F3FB;
  --text-secondary: #C3BDD8;
  --text-tertiary: #958EAE;
  --text-link: #C6B5FF;
  --text-inverse: #FFFFFF;        /* text/on-action */
  --action-primary: #7C4DFF;
  --action-primary-strong: #6936F2;
  --action-disabled: #3A3452;
  --accent: #FFC81F;              /* accent/energy */
  --accent-text: #110E1B;         /* text/on-energy */
  --border-default: #6E6789;
  --border-subtle: #2A253C;
  --border-accent: #A68AFF;
  --gradient-action: linear-gradient(98.7deg, #8350F9 50%, #A258F7 100%);
  --gradient-energy: linear-gradient(119.4deg, #FFE27A 14%, #FFB800 86%);
  --glow: linear-gradient(180deg, rgba(74, 47, 168, 0.55), rgba(17, 14, 27, 0));
  --font-heading: "Roboto Flex", -apple-system, system-ui, sans-serif;
  --font-body: "Roboto Flex", -apple-system, system-ui, sans-serif;
  --radius-card: 24px;
  --radius-md: 16px;
  --page: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 88px; }
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font: 400 16px/1.5 var(--font-body);
  font-size-adjust: from-font;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 420px; z-index: -1;
  background: var(--glow);
  pointer-events: none;
}
h1, h2, h3 { font-family: var(--font-heading); margin: 0; color: var(--text-primary); text-wrap: balance; }
a { color: var(--text-link); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--border-accent); outline-offset: 2px; }
img { max-width: 100%; display: block; }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(17, 14, 27, 0.72);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); font: 800 18px/1.3 var(--font-heading); }
.brand-mark { display: block; width: 36px; height: 36px; border-radius: 8px; flex: none; }
.site-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: none; font: 500 13px/16px var(--font-body); color: var(--text-secondary); text-decoration: none;
  padding: 9px 12px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--surface-primary);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-color: var(--border-accent); background: var(--accent-soft); color: var(--text-primary); }

/* Cards and text */
.card { background: var(--surface-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); padding: 20px; }
.eyebrow { font: 700 12px/1.4 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.lead { font-size: 17px; line-height: 1.5; color: var(--text-secondary); margin: 12px 0 0; }

/* Landing */
.hero { display: grid; gap: 24px; padding-block: 40px 24px; align-items: center; }
.hero h1 { font-size: clamp(32px, 7vw, 52px); line-height: 1.1; font-weight: 900; letter-spacing: -0.5px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
  border-radius: 999px; font: 800 16px/1.3 var(--font-body); text-decoration: none; text-align: center;
}
.btn-primary { background: var(--gradient-action); color: var(--text-inverse); box-shadow: 0 10px 20px rgba(124, 77, 255, 0.3); }
.btn-secondary { border: 1px solid var(--border-accent); color: var(--text-link); background: var(--accent-soft); }
.hero-visual { display: grid; justify-items: center; }
.hero-art { position: relative; justify-self: center; width: min(320px, 100%); aspect-ratio: 1; display: grid; place-items: center; }
.hero-art .halo { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .mascot { position: relative; width: 75%; height: auto; }
.charge-card { position: relative; margin-top: -24px; width: min(320px, 100%); justify-self: center; padding: 16px; }
.charge-card .amount-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.amount-label { font: 500 14px/1.4 var(--font-body); color: var(--text-secondary); }
.amount { font: 900 32px/1.2 var(--font-heading); }
.charge-bar { display: grid; grid-template-columns: repeat(25, 1fr); gap: 3px; margin-top: 12px; }
.charge-bar span { height: 12px; border-radius: 2px; background: var(--border-subtle); }
.charge-bar span.on { background: var(--gradient-energy); }
.charge-range { display: flex; justify-content: space-between; margin-top: 8px; font: 500 12px/1.4 var(--font-body); color: var(--text-tertiary); }

.section { padding-block: 32px; }
.section-head { max-width: 640px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(26px, 5vw, 34px); line-height: 1.2; font-weight: 800; }
.steps { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step h3 { font-size: 18px; line-height: 1.3; font-weight: 800; }
.step p { margin: 4px 0 0; color: var(--text-secondary); font-size: 15px; line-height: 1.5; }
.step-num {
  flex: none; display: grid; place-items: center; width: 44px; height: 36px; border-radius: 8px;
  font: 800 14px/1 var(--font-body); color: var(--accent-text); background: var(--accent);
}

.terms-grid { display: grid; gap: 12px; }
.terms-grid .card h3 { font: 500 14px/1.4 var(--font-body); color: var(--text-secondary); }
.terms-grid .figure { font: 900 28px/1.2 var(--font-heading); margin-top: 4px; }
.example { margin-top: 12px; }
.fine { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.fine strong { color: var(--text-primary); }

.notice { display: flex; gap: 16px; align-items: flex-start; background: var(--accent-soft); border: 1px solid var(--border-accent); border-radius: var(--radius-card); padding: 20px; }
.notice-mark { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--action-primary); }
.notice-mark img { width: 24px; height: 24px; }
.notice-mark.warn { background: var(--surface-raised); }
.notice h2 { font-size: 22px; line-height: 1.3; font-weight: 800; }
.notice p { margin: 6px 0 0; color: var(--text-secondary); font-size: 15px; line-height: 1.5; }

.faq { display: grid; gap: 8px; }
.faq-item { background: var(--surface-primary); border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
.faq-item summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font: 500 16px/1.4 var(--font-body); position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 600 22px/1 var(--font-body); color: var(--text-link); }
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] { border-color: var(--border-accent); background: var(--surface-muted); }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--text-secondary); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

.company { display: grid; gap: 12px; }
.company dl { margin: 0; display: grid; gap: 12px; }
.company dt { font: 500 13px/1.4 var(--font-body); color: var(--text-tertiary); }
.company dd { margin: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

/* Legal pages */
.legal { padding: 24px 0 40px; }
.legal .card { max-width: 760px; margin: 0 auto; padding: 24px 20px 32px; }
.legal h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; font-weight: 900; }
.legal h2 { font-size: 19px; line-height: 1.3; font-weight: 800; margin: 28px 0 8px; padding-top: 20px; border-top: 1px solid var(--border-subtle); }
.legal p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.legal p.legal-meta { font-size: 13px; line-height: 1.4; color: var(--text-tertiary); margin-top: 8px; }
.legal-facts { list-style: none; margin: 0 0 12px; padding: 0; }
.legal-facts li { padding: 10px 0; border-bottom: 1px solid var(--border-subtle); font-size: 15px; line-height: 1.5; color: var(--text-secondary); overflow-wrap: anywhere; }
.legal-facts li span { display: block; font: 500 13px/1.4 var(--font-body); color: var(--text-tertiary); }
.legal a { overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--border-subtle); margin-top: 24px; padding: 24px 0 40px; font-size: 13px; line-height: 1.5; color: var(--text-tertiary); }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.15fr 1fr; padding-block: 64px 40px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { flex-direction: column; }
  .terms-grid { grid-template-columns: repeat(3, 1fr); }
  .company { grid-template-columns: 1fr 1fr; }
  .legal .card { padding: 40px 48px 48px; }
}
