/* Matly website. Same palette as the app: near-black, off-white, one gold accent. */
:root {
  --bg: #0b0b0c;
  --card: #141416;
  --card-2: #1a1a1d;
  --border: #232326;
  --divider: #1c1c1f;
  --text: #f2f2f0;
  --secondary: #b4b4ba;
  --muted: #8e8e94;
  --faint: #6e6e74;
  --gold: #d4b483;
  --link: #8ab4ff;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
  --r: 20px;
}

* { 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(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; }
h1 { font-size: clamp(44px, 7vw, 84px); }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
h3 { font-size: 22px; letter-spacing: -0.015em; line-height: 1.2; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.secondary { color: var(--secondary); }
.gold { color: var(--gold); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--secondary); max-width: 620px; }

/* Wordmark: "matly." with the gold dot */
.wordmark { font-family: var(--display); font-weight: 800; letter-spacing: -0.045em; line-height: 1; color: var(--text); }
.wordmark i { font-style: normal; color: var(--gold); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(11, 11, 12, 0.82); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--divider); }
.nav .wrap { display: flex; align-items: center; height: 68px; gap: 32px; }
.nav .wordmark { font-size: 26px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 15px; color: var(--secondary); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav .btn { height: 40px; padding: 0 18px; font-size: 15px; }
.menu-btn { display: none; margin-left: auto; width: 40px; height: 40px; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--text); align-items: center; justify-content: center; cursor: pointer; }
.mobile-menu { display: none; }
@media (max-width: 820px) {
  .nav-links, .nav .btn-desktop { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-menu.open { display: block; border-top: 1px solid var(--divider); padding: 8px 24px 24px; }
  .mobile-menu a { display: block; padding: 14px 0; font-size: 20px; border-bottom: 1px solid var(--divider); }
  .mobile-menu .btn { margin-top: 20px; width: 100%; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 24px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 16px; border: 1px solid var(--text); cursor: pointer; transition: transform .15s, opacity .15s; white-space: nowrap; }
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--muted); opacity: 1; }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Store badges (pre-launch) */
.store { display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px 0 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--card); }
.store svg { width: 24px; height: 24px; }
.store small { display: block; font-size: 11px; color: var(--muted); line-height: 1.1; }
.store b { display: block; font-size: 17px; font-weight: 600; line-height: 1.2; }

/* Sections */
section { padding: 112px 0; }
section.tight { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 + p { margin-top: 18px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.rule { border: 0; border-top: 1px solid var(--divider); margin: 0; }

/* Hero */
.hero { padding: 72px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { margin: 18px 0 22px; }
.hero .btn-row { margin-top: 36px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }
.hero-visual { display: flex; justify-content: center; position: relative; }
.hero-visual::before { content: ""; position: absolute; inset: 10% -10% auto; height: 70%; background: radial-gradient(closest-side, rgba(212, 180, 131, 0.16), transparent); filter: blur(10px); }
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
}

/* Pills (disciplines) */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { height: 40px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--border); color: var(--secondary); font-size: 15px; font-weight: 500; }
.pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Grids + cards */
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .grid.three, .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.three, .grid.two, .grid.four { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--divider); border-radius: var(--r); padding: 28px; }
.card h3 { margin: 18px 0 8px; }
.card p { color: var(--muted); font-size: 16px; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.icon svg { width: 22px; height: 22px; }
.icon.gold { color: var(--gold); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }

/* Feature rows (text + visual, alternating) */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding: 56px 0; }
.feature + .feature { border-top: 1px solid var(--divider); }
.feature.flip .feature-text { order: 2; }
.feature h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 14px 0 18px; }
.feature ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.feature li { display: flex; gap: 12px; color: var(--secondary); }
.feature li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 3px; background: var(--gold); margin-top: 11px; }
.feature-visual { display: flex; justify-content: center; }
@media (max-width: 920px) {
  .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .feature-text { order: 0; }
}

/* Band (callout) */
.band { background: var(--card); border: 1px solid var(--divider); border-radius: 28px; padding: 56px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.band h2 { font-size: clamp(30px, 3.8vw, 46px); }
.band p { margin-top: 16px; }
@media (max-width: 820px) { .band { grid-template-columns: 1fr; padding: 32px; } }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat b { display: block; font-family: var(--display); font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 15px; }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; } }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 56px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 18px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; color: var(--gold); }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 920px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--card); border: 1px solid var(--divider); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.plan .eyebrow { display: flex; justify-content: space-between; align-items: center; }
.plan .badge { color: var(--bg); background: var(--gold); padding: 4px 10px; border-radius: 999px; letter-spacing: .06em; font-size: 11px; }
.price { margin: 20px 0 6px; font-family: var(--display); font-weight: 800; font-size: 52px; letter-spacing: -0.035em; line-height: 1; }
.price small { font-family: var(--sans); font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.plan .sub { color: var(--muted); font-size: 15px; min-height: 46px; }
.plan ul { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 12px; font-size: 15px; color: var(--secondary); }
.plan li { display: flex; gap: 10px; }
.plan li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--gold); }
.plan .btn { margin-top: auto; width: 100%; }
.fine { font-size: 14px; color: var(--muted); }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--divider); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 40px 24px 0; font-size: 19px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-75%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { padding: 0 0 24px; color: var(--secondary); max-width: 720px; }
.faq details p + p { margin-top: -10px; }

/* Closing CTA */
.cta { text-align: center; }
.cta h2 { font-size: clamp(40px, 6vw, 72px); }
.cta p { margin: 18px auto 34px; }
.cta .btn-row { justify-content: center; }

/* Footer */
footer { border-top: 1px solid var(--divider); padding: 56px 0 40px; font-size: 15px; }
.foot { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.foot h4 { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.foot a { display: block; color: var(--secondary); padding: 5px 0; }
.foot a:hover { color: var(--text); }
.foot .wordmark { font-size: 30px; }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--divider); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: 14px; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr 1fr; } .foot > div:first-child { grid-column: 1 / -1; } }

/* Legal / text pages */
.doc { max-width: 760px; padding: 64px 0 112px; }
.doc h1 { font-size: clamp(40px, 6vw, 60px); margin-bottom: 12px; }
.doc .updated { color: var(--muted); margin-bottom: 40px; }
.doc h2 { font-size: 26px; letter-spacing: -0.02em; margin: 44px 0 14px; }
.doc p, .doc li { color: var(--secondary); }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 20px; margin: 12px 0; display: grid; gap: 8px; }
.doc a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.doc strong { color: var(--text); font-weight: 600; }
.note { background: var(--card); border: 1px solid var(--divider); border-radius: 16px; padding: 20px 22px; color: var(--secondary); }

/* ---------- Phone mockups (built in HTML, mirrors the app UI) ---------- */
.phone { width: 300px; flex: none; border-radius: 48px; padding: 10px; background: #1b1b1e; border: 1px solid #2c2c30; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,255,255,0.03) inset; position: relative; }
.screen { border-radius: 39px; background: var(--bg); height: 610px; overflow: hidden; position: relative; padding: 54px 16px 16px; font-size: 13px; }
.screen::before { content: ""; position: absolute; top: 12px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 14px; background: #000; }
.status { position: absolute; top: 15px; left: 28px; right: 28px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.s-title { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; margin: 4px 2px 12px; }
.s-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.s-tab { height: 28px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--border); display: inline-flex; align-items: center; font-size: 12px; color: var(--secondary); }
.s-tab.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.s-card { background: var(--card); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.s-row { display: flex; align-items: center; gap: 10px; }
.av { width: 34px; height: 34px; border-radius: 17px; flex: none; background: linear-gradient(135deg, #3a3a40, #222226); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; color: var(--secondary); }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
.s-name { font-weight: 600; font-size: 14px; }
.s-meta { color: var(--muted); font-size: 11.5px; }
.s-h { font-weight: 700; font-size: 16px; margin: 12px 0 2px; letter-spacing: -0.01em; }
.s-stats { display: flex; gap: 18px; margin-top: 10px; }
.s-stats div span { display: block; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.s-stats div b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.s-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.s-chip { font-size: 10.5px; padding: 3px 8px; border-radius: 10px; background: var(--card-2); color: var(--secondary); }
.s-oss { margin-left: auto; height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; }
.s-oss.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.s-label { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 16px 2px 8px; }
.s-btn { height: 44px; border-radius: 22px; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; margin-top: 12px; }
.s-gold { color: var(--gold); }
.s-seal { display: inline-flex; align-items: center; gap: 4px; color: var(--link); font-size: 11px; }
.s-checkin { background: var(--text); color: var(--bg); border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.s-checkin b { display: block; font-size: 15px; }
.s-checkin span { font-size: 12px; opacity: .75; }
.s-list .s-row { padding: 10px 0; border-bottom: 1px solid var(--divider); }
.s-list .s-row:last-child { border-bottom: 0; }
.s-bar { height: 5px; border-radius: 3px; background: var(--divider); overflow: hidden; margin-top: 6px; }
.s-bar i { display: block; height: 100%; border-radius: 3px; background: var(--text); }
.s-bar i.g { background: var(--gold); }
.rank { width: 18px; text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.s-tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 66px; border-top: 1px solid var(--divider); background: var(--bg); display: flex; justify-content: space-around; align-items: center; padding-bottom: 8px; }
.s-tabbar i { width: 22px; height: 22px; border-radius: 6px; border: 1.6px solid var(--faint); }
.s-tabbar i.plus { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--text); position: relative; }
.s-tabbar i.plus::before, .s-tabbar i.plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--bg); border-radius: 1px; }
.s-tabbar i.plus::before { width: 16px; height: 2px; margin: -1px 0 0 -8px; }
.s-tabbar i.plus::after { width: 2px; height: 16px; margin: -8px 0 0 -1px; }

/* Belt bar, same drawing as the app */
.belt { position: relative; display: inline-block; width: 34px; height: 9px; border-radius: 3px; flex: none; overflow: hidden; }
.belt .end { position: absolute; top: 0; bottom: 0; right: 7%; width: 36%; display: flex; justify-content: flex-end; gap: 1.6px; padding-right: 2px; align-items: stretch; }
.belt .end i { width: 2.4px; background: #f2f2f0; }
.belt.white { background: #f2f2f0; box-shadow: 0 0 0 .5px rgba(0,0,0,.35) inset; }
.belt.blue { background: #2f6feb; }
.belt.purple { background: #7c4dcc; }
.belt.brown { background: #8b5a2b; }
.belt.black { background: #000; box-shadow: 0 0 0 .5px #3a3a3f inset; }
.belt.green { background: #3fa45b; }
.belt .end { background: #0b0b0c; }
.belt.black .end { background: #c8382e; }
.belt.green .end, .belt.plain .end { background: transparent; }
.belt.lg { width: 64px; height: 14px; border-radius: 4px; }
.belt.lg .end i { width: 4px; }

/* Small screens: shrink phones */
@media (max-width: 380px) {
  .phone { width: 270px; }
  .screen { height: 560px; }
}

/* Join page */
.join { min-height: 70vh; display: flex; align-items: center; }
.join .card { max-width: 520px; margin: 0 auto; text-align: center; padding: 44px 32px; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 34px; letter-spacing: .18em; font-weight: 700; margin: 18px 0 6px; }

/* Reveal on scroll (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* mockup polish */
.s-tab, .s-oss, .s-chip { white-space: nowrap; }
.tag svg { width: 15px; height: 15px; }
.s-tabbar svg { width: 24px; height: 24px; }
.s-time { width: 62px; flex: none; font-size: 12px; white-space: nowrap; }
.hero, .feature-visual { overflow-x: clip; }
body { overflow-x: hidden; }
.join .btn-row, .cta .btn-row { justify-content: center; }
