/* ShadowBorn website: the first-start set-up's look (FirstStartSetup.kt). The live brand background (background.js)
   with frosted glass panels on it: 28 px blur, the browser's Auto glass tint for the logo cyan (the colour at half
   lightness, 0.35), a thin white edge, dark grey text (the app's TextBlack), cyan buttons with Ink text. */
:root {
  color-scheme: light;
  --ink: #323238;
  --ink-soft: rgba(50, 50, 56, 0.74);
  --ink-faint: rgba(50, 50, 56, 0.55);
  --cyan: #10e1ea;
  --glass-tint: rgba(16, 229, 239, 0.35);
  --glass-edge: rgba(255, 255, 255, 0.25);
  --glow: rgba(16, 225, 234, 0.55);
  --warning: #ffc14d;
  --red: #ed1e1e;
  --orange: #fa8e1a;
  --yellow: #f4ed0d;
  --green: #46ef10;
  --teal: #17efb1;
  --blue: #2b46ff;
  --purple: #a53fff;
  --magenta: #f20ee7;
  --r-panel: 28px;
  --r-button: 12px;
  --blur: 28px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1); /* FastOutSlowIn */
  --gutter: 16px;
}

* { box-sizing: border-box; }

html {
  /* Behind the canvas (and in place of it without WebGL): the spots as plain gradients */
  background:
    radial-gradient(circle at 16% 13%, rgba(237, 30, 30, 0.9), transparent 45%),
    radial-gradient(circle at 84% 14%, rgba(244, 237, 13, 0.9), transparent 45%),
    radial-gradient(circle at 88% 50%, rgba(70, 239, 16, 0.85), transparent 45%),
    radial-gradient(circle at 84% 87%, rgba(23, 239, 177, 0.9), transparent 45%),
    radial-gradient(circle at 16% 86%, rgba(43, 70, 255, 0.9), transparent 45%),
    radial-gradient(circle at 12% 50%, rgba(165, 63, 255, 0.9), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(242, 14, 231, 0.85), transparent 45%),
    #7a5fa8;
  background-attachment: fixed;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--ink);
  font-family: Roboto, "Google Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

#backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh; /* phones: no jump when the address bar hides */
  z-index: -1;
  display: block;
}

a { color: inherit; }
img { max-width: 100%; }

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

/* ---- Glass ---- */

.glass {
  position: relative;
  background: var(--glass-tint);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-panel);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: 0 0 36px rgba(16, 225, 234, 0.28), 0 12px 32px rgba(0, 0, 0, 0.12);
}
/* Long reading (the privacy policy): a white layer under the tint so small text stays easy to read on any colour */
.glass.read { background: linear-gradient(var(--glass-tint), var(--glass-tint)), rgba(255, 255, 255, 0.5); }

.panel { padding: 24px; }
@media (max-width: 599px) { .panel { padding: 18px; } }

/* ---- Top bar ---- */

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 24px;
  border-radius: 18px;
}
.topbar .brand { display: flex; align-items: center; text-decoration: none; }
/* The letters sit high in wordmark.png (their middle is 8 of 118 px above the picture's), so it's moved down that much */
.topbar .brand img { height: 22px; width: auto; display: block; object-fit: contain; object-position: left center; transform: translateY(7%); filter: drop-shadow(1px 1px 1.5px rgba(0, 0, 0, 0.45)); }
.topbar nav { display: flex; gap: 4px; flex-wrap: nowrap; }
.topbar nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px; /* the bar's 18 px less its 8 px padding, so the highlight's corners follow the bar's */
  white-space: nowrap;
  transition: background 200ms var(--ease);
}
.topbar nav a:hover, .topbar nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.35); }
@media (max-width: 520px) {
  .topbar { padding-left: 18px; }
  .topbar .brand img { height: 16px; }
  .topbar nav a { padding: 8px 10px; font-size: 13px; }
  .topbar nav .wide-only { display: none; }
}

/* ---- Hero ---- */

.hero {
  min-height: calc(100vh - 80px);
  min-height: calc(100svh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 0 56px;
}
.hero .wordmark {
  width: min(680px, 92%);
  height: auto;
  /* Like the extension's wordmark: a dark shadow keeps the letters apart from a background of the same colour */
  filter: drop-shadow(3px 3px 4px rgba(0, 0, 0, 0.45));
}
.hero .card {
  margin-top: 36px;
  max-width: 640px;
  width: 100%;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hero p.lead {
  margin: 0 auto;
  max-width: 520px;
  font-size: clamp(15px, 2vw, 17px);
  color: var(--ink-soft);
}
.actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Home: app list ---- */

.apps { margin-top: 22px; display: grid; gap: 12px; text-align: left; }
.app-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: transform 200ms var(--ease), background 200ms var(--ease), box-shadow 200ms var(--ease);
}
.app-card:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.38); box-shadow: 0 0 22px var(--glow); }
.app-card img { width: 64px; height: 64px; flex: none; border-radius: 16px; }
.app-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.app-name { font-size: 17px; font-weight: 600; line-height: 1.25; }
.app-about { font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.app-tag { margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--ink-faint); }
.app-card .chevron { width: 24px; height: 24px; flex: none; fill: var(--ink-soft); }
@media (max-width: 420px) { .app-card img { width: 52px; height: 52px; border-radius: 13px; } }

/* ---- Buttons ---- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--r-button);
  border: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 200ms var(--ease);
}
.button svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.button.primary { background: var(--cyan); box-shadow: 0 0 22px var(--glow); }
.button.primary:hover { transform: translateY(-1px); box-shadow: 0 0 30px var(--glow); }
.button.quiet { background: rgba(255, 255, 255, 0.35); border: 1px solid var(--glass-edge); }
.button.quiet:hover { background: rgba(255, 255, 255, 0.5); }
.button[aria-disabled="true"] { cursor: default; }
.button[aria-disabled="true"]:hover { transform: none; }
.button .small { display: block; font-size: 11px; font-weight: 500; opacity: 0.75; line-height: 1.1; }
.button .stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }

/* ---- Sections ---- */

section.block { margin: 0 auto 28px; max-width: 920px; }

.panel-head { display: flex; align-items: center; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.panel-head p { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }

/* The glass pop-ups' round icon, coloured (AccentIcon) */
.accent-icon {
  --accent: var(--cyan);
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
}
.accent-icon svg { width: 23px; height: 23px; fill: var(--accent); filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.35)); }
.accent-icon.big { width: 52px; height: 52px; }
.accent-icon.big svg { width: 27px; height: 27px; }

.features {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 680px) { .features { grid-template-columns: 1fr; } }
.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.feature h3 { margin: 0 0 3px; font-size: 15px; }
.feature p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }

.notice { display: flex; gap: 12px; align-items: flex-start; }
.notice h3 { margin: 4px 0 3px; font-size: 15px; color: #8a5a00; }
.notice p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.privacy-points { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.privacy-points li { display: flex; gap: 10px; font-size: 14.5px; }
.privacy-points li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--glow);
}

/* ---- Policy text ---- */

.policy h1 { margin: 0; font-size: clamp(26px, 4vw, 34px); line-height: 1.2; }
.policy .updated { margin: 4px 0 0; font-size: 14px; color: var(--ink-faint); }
.policy h2 { margin: 30px 0 8px; font-size: 19px; line-height: 1.3; }
.policy h3 { margin: 18px 0 6px; font-size: 16px; }
.policy p, .policy li { font-size: 15px; color: var(--ink); }
.policy ul { padding-left: 22px; }
.policy li { margin: 4px 0; }
.policy .summary {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.policy .summary p { margin: 0; }
.policy .summary ul { margin: 8px 0 0; }
.policy code { font-size: 0.92em; background: rgba(255, 255, 255, 0.5); padding: 1px 5px; border-radius: 6px; word-break: break-all; }
.policy .toc { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
  display: inline-block;
  font-size: 13px;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.toc a:hover { background: rgba(255, 255, 255, 0.6); }
.policy section { scroll-margin-top: 90px; }

/* ---- Footer ---- */

footer { margin: 40px auto 28px; max-width: 920px; }
footer .glass {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-radius: 22px;
  font-size: 14px;
}
footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { text-decoration: none; font-weight: 500; }
footer a:hover { text-decoration: underline; }

/* ---- Pop-up entry (PopupEnter: 350 ms fade, 450 ms scale from 1.15, FastOutSlowIn) ---- */

.reveal { opacity: 0; transform: scale(1.15); }
.reveal.shown {
  opacity: 1;
  transform: none;
  transition: opacity 350ms var(--ease), transform 450ms var(--ease);
}
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.shown { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
