/* Cinderlight website. Tokens follow the Cindel app (IconicChat/DESIGN.md). Dark only. */

@font-face { font-family: "M PLUS 1"; src: url("fonts/MPLUS1-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "M PLUS 1"; src: url("fonts/MPLUS1-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "M PLUS 1"; src: url("fonts/MPLUS1-700.ttf") format("truetype"); font-weight: 700 800; font-display: swap; }
/* Outfit is cut down to A-Z: it only sets the CINDERLIGHT wordmark. */
@font-face { font-family: Outfit; src: url("fonts/Outfit-wordmark.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --bg0: #100E24;
  --bg1: #1D1838;
  --panel: #262240;
  --line: #3B355C;
  --ink: #F1EDFA;
  --muted: #ABA5C6;
  --violet: #7C5CF0;
  --violet-hover: #6A47E6;
  --violet-soft: #C3B2FF;
  --turq: #36D6C3;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --font: "M PLUS 1", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bar: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar); }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%) fixed var(--bg0);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: rgba(124, 92, 240, .45); }
a { color: var(--turq); text-underline-offset: .2em; }
a:hover { color: var(--violet-soft); }
:focus-visible { outline: 1.5px solid var(--violet-soft); outline-offset: 3px; border-radius: 8px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
@media (min-width: 900px) { .wrap { padding-left: 40px; padding-right: 40px; } }

/* Sky decoration: faint rings and a few points, behind everything. */
.sky { position: absolute; inset: 0 0 auto 0; height: 1200px; overflow: hidden; pointer-events: none; z-index: -1; }
.sky .ring { position: absolute; left: 50%; top: 300px; border: 1px solid rgba(255, 255, 255, .05); border-radius: 50%; transform: translate(-50%, -50%); }
.sky .r1 { width: 760px; height: 760px; }
.sky .r2 { width: 1180px; height: 1180px; border-color: rgba(255, 255, 255, .04); }
.sky i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 209, 102, .3); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 9999px;
  background: var(--violet); color: #fff; font: 700 15px var(--font);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--violet-hover); color: #fff; }
.btn svg { transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); min-height: 48px; padding: 0 24px; }
.btn-ghost:hover { background: rgba(195, 178, 255, .08); border-color: var(--violet-soft); color: var(--ink); }

/* Navbar */
.bar { position: sticky; top: 0; z-index: 10; background: var(--bg0); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.bar-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--bar); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; display: block; }
.wordmark { font-family: Outfit, var(--font); font-weight: 600; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
.links { display: flex; align-items: center; gap: 4px; }
.links a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; transition: color .2s var(--ease); }
.links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 3px; border-radius: 3px; background: transparent; transition: background .2s var(--ease); }
.links a:hover, .links a[aria-current="page"] { color: var(--ink); }
.links a:hover::after, .links a[aria-current="page"]::after { background: var(--turq); }
.bar-end { display: flex; align-items: center; gap: 8px; }
.btn-cta { min-height: 40px; padding: 0 18px; font-size: 14px; }
.menu { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.menu:hover { border-color: var(--violet-soft); }
.menu .i-close { display: none; }
.menu[aria-expanded="true"] .i-open { display: none; }
.menu[aria-expanded="true"] .i-close { display: block; }
.mnav { display: flex; flex-direction: column; padding-bottom: 12px; border-top: 1px solid var(--line); }
.mnav a { display: flex; align-items: center; min-height: 48px; color: var(--ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--panel); }
.mnav a:last-child { border-bottom: 0; }
@media (max-width: 860px) { .links { display: none; } .menu { display: inline-flex; } }
@media (max-width: 420px) { .btn-cta { display: none; } }
@media (min-width: 861px) { .mnav { display: none !important; } }

/* Sections */
section { border-top: 1px solid var(--line); padding-block: 64px 72px; }
section.hero { border-top: 0; padding-block: 72px 88px; }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.head { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 32px; text-align: center; }
h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); max-width: 34em; }

/* Hero */
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px; padding: 6px 14px; border-radius: 9999px; background: rgba(54, 214, 195, .14); border: 1px solid rgba(54, 214, 195, .45); color: var(--turq); font-size: 13px; font-weight: 700; line-height: 1.2; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--turq); animation: ring 2.6s var(--ease) infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(54, 214, 195, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(54, 214, 195, 0); } }
.slides { display: grid; width: 100%; min-height: 228px; align-content: center; justify-items: center; }
.slide { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.slide.in { animation: slideIn .45s var(--ease); }
@keyframes slideIn { from { opacity: .25; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.slide h1, .slide h2 { margin: 0; max-width: 14em; font-size: clamp(38px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
.slide p { margin: 0; max-width: 34em; font-size: 17px; color: var(--muted); text-wrap: pretty; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; margin-top: 20px; }
.tab { position: relative; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font: 700 14px var(--font); cursor: pointer; transition: color .2s var(--ease); }
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 3px; border-radius: 3px; background: transparent; transition: background .2s var(--ease); }
.tab:hover { color: var(--ink); }
.tab[aria-current="true"] { color: var(--turq); }
.tab[aria-current="true"]::after { background: var(--turq); }
.tab.icon { width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.tab .i-play { display: none; }
.tab[aria-pressed="true"] .i-pause { display: none; }
.tab[aria-pressed="true"] .i-play { display: block; }

.join { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 520px; margin-top: 32px; padding: 6px 6px 6px 22px; border-radius: 9999px; border: 1px solid #716B97; background: var(--panel); }
.join .addr { flex: 1 1 auto; min-width: 0; text-align: left; font-weight: 500; overflow-wrap: anywhere; user-select: all; }
.join .btn { min-height: 44px; padding: 0 22px; flex: none; }
.hint { margin: 12px 0 0; max-width: 34em; font-size: 14px; color: var(--muted); }
@media (max-width: 420px) { .join { flex-wrap: wrap; border-radius: 24px; padding: 12px; } .join .addr { padding-left: 8px; } .join .btn { width: 100%; } }

/* Timeline */
.tl { list-style: none; margin: 0 auto; padding: 0; position: relative; width: 100%; max-width: 720px; }
.tl::before { content: ""; position: absolute; left: 131px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.tl li { display: grid; grid-template-columns: 112px 40px minmax(0, 1fr); align-items: start; padding-bottom: 32px; }
.tl li:last-child { padding-bottom: 0; }
.tl time { padding-top: 2px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.tl .dot { justify-self: center; margin-top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg0); border: 2px solid var(--line); position: relative; z-index: 1; }
.tl .now .dot { background: var(--turq); border-color: var(--turq); }
.tl h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; letter-spacing: -.2px; line-height: 1.3; }
.tl p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 46ch; }
@media (max-width: 600px) {
  .tl::before { left: 5px; }
  .tl li { grid-template-columns: 24px minmax(0, 1fr); row-gap: 2px; }
  .tl .dot { grid-row: 1 / 3; justify-self: start; margin-top: 5px; }
  .tl time { text-align: left; padding: 0; grid-column: 2; }
  .tl .body { grid-column: 2; }
}

/* Countdown */
.clock { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.unit { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.num { font-size: clamp(40px, 5.5vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.unit:last-child .num { color: var(--turq); }
.unit span:last-child { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sep { font-size: clamp(30px, 4vw, 48px); font-weight: 700; line-height: 1; color: var(--line); padding-bottom: 22px; }
@media (max-width: 560px) { .sep { display: none; } }

/* Legal pages */
.legal { max-width: 840px; margin: 0 auto; padding-top: 56px; padding-bottom: 96px; line-height: 1.7; }
.legal h1 { margin: 0 0 4px; font-size: clamp(28px, 8vw, 40px); hyphens: auto; overflow-wrap: break-word; font-weight: 800; letter-spacing: -1px; line-height: 1.1; text-wrap: balance; }
.legal .meta { margin: 0 0 32px; color: var(--muted); font-size: 14px; }
.legal .meta:has(+ .lang) { margin-bottom: 16px; }
.lang { display: inline-flex; gap: 4px; margin-bottom: 32px; padding: 4px; border-radius: 9999px; border: 1px solid var(--line); background: var(--bg0); }
.lang a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 9999px; color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; transition: color .2s var(--ease), background .2s var(--ease); }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { background: var(--violet); color: #fff; }
.legal h2 { margin: 36px 0 8px; font-size: 18px; font-weight: 700; letter-spacing: -.2px; color: var(--violet-soft); }
.legal p, .legal ul { margin: 0 0 16px; max-width: 65ch; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 32px; margin: 0 0 24px; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .legal dl { grid-template-columns: 1fr; gap: 0; } .legal dd { margin-bottom: 12px; } }
.note { max-width: 65ch; margin-bottom: 24px; padding: 20px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.note p { margin: 0; }

/* Footer */
footer { border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 24px 28px; font-size: 14px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse, .slide.in { animation: none; }
  .btn, .btn svg, .links a, .tab { transition: none; }
}
