/* Run Arena website. Tokens mirror Shared/Theme.swift: one color per meaning, puffy surfaces, no glass or blur. */

@font-face { font-family: "Lilita One"; src: url("/fonts/LilitaOne-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Baloo 2"; font-weight: 600; src: url("/fonts/Baloo2-SemiBold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Baloo 2"; font-weight: 700; src: url("/fonts/Baloo2-Bold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Baloo 2"; font-weight: 800; src: url("/fonts/Baloo2-ExtraBold.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0B1236;
  --panel: #17225C;
  --tray: #121B4A;
  --outline: #070C26;
  --drop: #050820;
  --text: #FFFFFF;
  --muted: #9FB2F0;
  --accent: #7CC8FF;

  --blue-top: #63C2FF;   --blue-bottom: #2D7BF5;   --blue-outline: #071A4D;
  --gold-top: #FFE27A;   --gold-bottom: #F7A920;   --gold-outline: #5A2E00;   --gold-drop: #3A1E00;
  --orange-top: #FFB45E; --orange-bottom: #F2731D; --orange-outline: #5A2300;

  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Baloo 2", ui-rounded, system-ui, sans-serif;
  --wrap: 1080px;
  --gutter: 20px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #B5E0FF; }
:focus-visible { outline: 3px solid var(--gold-top); outline-offset: 3px; border-radius: 8px; }

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

/* ---------- type ---------- */

.outlined {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .4px;
  line-height: 1.04;
  text-wrap: balance;
  margin: 0;
  text-shadow: 0 .06em 0 var(--outline), .045em 0 0 var(--outline), -.045em 0 0 var(--outline), 0 -.045em 0 var(--outline),
               .03em .03em 0 var(--outline), -.03em .03em 0 var(--outline), .03em -.03em 0 var(--outline), -.03em -.03em 0 var(--outline);
}

/* ---------- puffy surfaces ---------- */

.puffy {
  background: var(--panel);
  border: 4px solid var(--outline);
  border-radius: 26px;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .12), inset 0 -6px 0 rgba(0, 0, 0, .28), 0 6px 0 var(--drop);
}

/* The App Store slot. While the app isn't out it's a gold "coming soon" plate, not a link. */
.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 10px 26px 12px;
  border-radius: 22px;
  border: 4px solid var(--gold-outline);
  background: linear-gradient(var(--gold-top), var(--gold-bottom));
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .45), inset 0 -5px 0 rgba(0, 0, 0, .18), 0 6px 0 var(--gold-drop);
  color: #fff;
  text-decoration: none;
  user-select: none;
}
.store small {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold-outline);
  line-height: 1.2;
}
.store strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: .5px;
  text-shadow: 0 3px 0 var(--gold-outline), 2px 0 0 var(--gold-outline), -2px 0 0 var(--gold-outline), 0 -2px 0 var(--gold-outline);
}
a.store { transition: transform .12s ease, box-shadow .12s ease; }
a.store:hover { color: #fff; transform: translateY(-2px); }
a.store:active { transform: translateY(4px); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .45), inset 0 -5px 0 rgba(0, 0, 0, .18), 0 2px 0 var(--gold-drop); }

/* ---------- header and footer ---------- */

.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--outline); box-shadow: 0 4px 0 var(--drop); }
.brand span { font-family: var(--display); font-size: 26px; letter-spacing: .5px; text-shadow: 0 3px 0 var(--outline), 2px 0 0 var(--outline), -2px 0 0 var(--outline), 0 -2px 0 var(--outline); }

.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--muted); font-weight: 800; font-size: 16px; text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { color: #fff; }

main { flex: 1; }

.foot { padding: 34px 0 44px; color: var(--muted); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--muted); font-weight: 800; text-decoration: none; }
.foot a:hover { color: #fff; }

/* ---------- home: hero ---------- */

.hero { padding: 30px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; }

.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero h1 { font-size: clamp(50px, 7vw, 84px); }
.lede { margin: 0; max-width: 24em; color: var(--muted); font-size: 23px; line-height: 1.5; }

/* A marker line under one word, drawn by hand rather than set as an underline. */
.scribble { position: relative; display: inline-block; color: var(--gold-top); }
.scribble svg {
  position: absolute; left: -3%; bottom: -.16em; width: 106%; height: .3em; overflow: visible;
  fill: none; stroke: var(--gold-top); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 3px 0 var(--outline));
}
.scribble svg path + path { stroke-width: 3.5; opacity: .75; }

/* A phone around a real screenshot from the app. */
.phone {
  width: 300px;
  padding: 9px;
  border-radius: 50px;
  background: #02040F;
  border: 4px solid #2A3570;
  box-shadow: 0 0 0 4px var(--outline), 0 14px 0 4px var(--drop);
}
.phone img { width: 100%; border-radius: 40px; }
.tilt-right { transform: rotate(3deg); }
.tilt-left { transform: rotate(-2.5deg); }

/* ---------- home: rows ---------- */

.row { padding: 64px 0; }
.row .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 56px; }
.row.flip .row-copy { order: 2; }
.row-copy { max-width: 470px; }
.row-copy h2 { font-size: clamp(36px, 4.4vw, 50px); margin-bottom: 18px; }
.row-copy p { margin: 0 0 14px; color: var(--muted); font-size: 21px; line-height: 1.55; }
.row-copy p:last-child { margin-bottom: 0; }
.row .wrap > :not(.row-copy) { justify-self: center; }

.aside { font-size: 16px !important; border-left: 4px solid var(--panel); padding-left: 16px; margin-top: 22px !important; }
.aside a { white-space: nowrap; }

/* The streak calendar: the app's rule drawn out. Two missed days in a row are bridged; the third would end it. */
.calendar { width: 100%; max-width: 400px; padding: 20px 20px 18px; }
.calendar { background: var(--panel); border: 4px solid var(--outline); border-radius: 26px; box-shadow: inset 0 4px 0 rgba(255, 255, 255, .12), inset 0 -6px 0 rgba(0, 0, 0, .28), 0 6px 0 var(--drop); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { font-weight: 800; font-size: 15px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.flame-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px 2px 8px; border-radius: 999px;
  background: linear-gradient(var(--orange-top), var(--orange-bottom)); border: 3px solid var(--orange-outline);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(0, 0, 0, .2), 0 3px 0 #3A1600;
  font-family: var(--display); font-size: 20px; line-height: 1.1; text-shadow: 0 2px 0 var(--orange-outline);
}
.flame-pill svg { width: 18px; height: 18px; fill: #fff; filter: drop-shadow(0 2px 0 var(--orange-outline)); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-grid .wd { text-align: center; font-weight: 800; font-size: 13px; color: var(--muted); }
.calendar i { display: block; aspect-ratio: 1; border-radius: 11px; }
.calendar i.r {
  background: linear-gradient(var(--blue-top), var(--blue-bottom)) ;
  border: 3px solid var(--blue-outline);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4);
  position: relative;
}
.calendar i.r::after {
  content: ""; position: absolute; left: 32%; top: 22%; width: 22%; height: 38%;
  border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(40deg);
}
.calendar i.m { background: var(--tray); border: 3px dashed rgba(255, 180, 94, .7); }
.calendar i.today { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4), 0 0 0 3px var(--gold-top); }
.cal-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-weight: 700; font-size: 14px; color: var(--muted); }
.cal-key span { display: inline-flex; align-items: center; gap: 8px; }
.cal-key i { width: 18px; border-radius: 6px; border-width: 2.5px !important; }
.cal-key i.r::after { display: none; }

/* The app's two real reminders (StreakReminders), drawn the way iOS draws a notification, in system type. */
.notes { display: grid; gap: 8px; max-width: 390px; margin-top: 24px; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
.note {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start;
  padding: 11px 13px; border-radius: 20px;
  background: #1C2453; border: 1px solid rgba(255, 255, 255, .08);
  font-size: 14px; line-height: 1.3; color: #fff;
}
.note:nth-child(2) { margin-left: 18px; }
.note img { width: 34px; height: 34px; border-radius: 8px; }
.note b { display: block; font-weight: 600; }
.note span { display: block; opacity: .9; }
.note time { font-size: 12px; opacity: .55; padding-top: 1px; white-space: nowrap; }

.monsters { display: flex; align-items: flex-end; gap: 4px; margin-top: 26px; }
.monsters img { width: 72px; }
.monsters img:nth-child(2) { width: 66px; transform: translateY(-4px) rotate(-4deg); }
.monsters img:nth-child(3) { width: 80px; }
.monsters img:nth-child(4) { width: 70px; transform: translateY(-6px) rotate(5deg); }
.monsters img:nth-child(5) { width: 88px; }

.closer { padding: 56px 0 24px; }
.closer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 26px; border-top: 3px solid var(--tray); border-bottom: 3px solid var(--tray); padding-top: 34px; padding-bottom: 34px; }
.closer .blob { width: 84px; flex: none; animation: wobble 3.4s ease-in-out infinite; transform-origin: 50% 90%; }
.closer .wrap > div:not(.store) { flex: 1; min-width: 240px; }
.closer h2 { font-size: clamp(30px, 3.6vw, 40px); margin-bottom: 6px; }
.closer p { margin: 0; color: var(--muted); font-size: 17px; }

/* ---------- legal and support pages ---------- */

.page { padding: 26px 0 20px; }
.page .wrap { max-width: 820px; }
.page-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(42px, 6vw, 60px); }
.page-head p { margin: 0; color: var(--muted); }

.doc { padding: 30px 32px 34px; }
.doc > :first-child { margin-top: 0; }
.doc h2 { font-family: var(--display); font-weight: 400; font-size: 27px; letter-spacing: .4px; line-height: 1.15; margin: 34px 0 10px; }
.doc h3 { font-weight: 800; font-size: 19px; margin: 22px 0 6px; }
.doc p, .doc li { color: #DCE4FF; font-size: 17px; line-height: 1.65; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--accent); }
.doc strong { color: #fff; font-weight: 800; }
.doc .summary { background: var(--tray); border: 3px solid var(--outline); border-radius: 20px; padding: 18px 22px 6px; margin-bottom: 8px; }
.doc .summary p, .doc .summary li { color: #fff; }

.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; padding: 22px 24px; margin-bottom: 22px; }
.contact img { width: 84px; flex: none; }
.contact div { flex: 1; min-width: 220px; }
.contact h2 { font-size: 28px; margin: 0 0 4px; }
.contact p { margin: 0; color: var(--muted); font-size: 17px; }
.contact a.mail { font-weight: 800; font-size: 20px; }

.faq details { border-bottom: 3px solid var(--tray); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 2px; font-weight: 800; font-size: 18px; color: #fff;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px;
  border-right: 3.5px solid var(--accent); border-bottom: 3.5px solid var(--accent);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.faq details > div { padding: 0 2px 10px; }

.notfound { text-align: center; padding: 50px 0 30px; }
.notfound .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.notfound img { width: 170px; }
.notfound h1 { font-size: clamp(44px, 7vw, 70px); }
.notfound p { margin: 0; color: var(--muted); font-size: 19px; }

/* ---------- motion ---------- */

@keyframes wobble {
  0%, 100% { transform: scale(1, 1); }
  30% { transform: scale(1.06, .94); }
  55% { transform: scale(.96, 1.05); }
  75% { transform: scale(1.02, .98); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- smaller screens ---------- */

@media (max-width: 860px) {
  .hero .wrap, .row .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-bottom: 30px; }
  .row { padding: 44px 0; }
  .row.flip .row-copy { order: 0; }
  .row-copy { max-width: none; }
  .phone { width: 270px; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .brand img { width: 38px; height: 38px; border-radius: 10px; }
  .brand span { font-size: 22px; }
  .hero { padding-top: 12px; }
  .lede, .row-copy p { font-size: 19px; }
  .phone { width: 240px; border-radius: 42px; padding: 8px; }
  .phone img { border-radius: 34px; }
  .monsters img { width: 58px; }
  .monsters img:nth-child(2) { width: 54px; }
  .monsters img:nth-child(3) { width: 64px; }
  .monsters img:nth-child(4) { width: 56px; }
  .monsters img:nth-child(5) { width: 70px; }
  .note:nth-child(2) { margin-left: 12px; }
  .doc { padding: 22px 18px 24px; border-radius: 22px; }
  .doc .summary { padding: 14px 14px 2px; border-radius: 16px; }
  .doc ul { padding-left: 20px; }
  .contact { padding: 18px; }
  .foot .wrap { flex-direction: column; align-items: flex-start; }
}
