/*
 * apps.eden.fm
 *
 * Styled to sit alongside eden.fm rather than beside it: the same deep navy
 * ground, the same electric blue, white headings carrying a soft shadow, and a
 * translucent header over a full-bleed hero. Someone arriving here from the
 * parent site should not have to wonder whether they are still on it.
 *
 * Two deliberate departures from eden.fm:
 *
 * - **No web fonts, no third-party CSS.** eden.fm pulls Open Sans, Poppins and
 *   Inter from Google, plus Bootstrap. This site hosts the privacy policy of an
 *   app whose whole claim is that it phones nobody, and a font request that
 *   leaks every visitor's IP to a third party would quietly make the page
 *   contradict its own contents. The type carries itself on scale, weight and
 *   spacing instead.
 * - **Dark only.** eden.fm has one look, and a site that flips to a light
 *   scheme for half its visitors does not read as the same family. The colours
 *   below are fixed rather than mirrored under a prefers-color-scheme block.
 */

:root {
  /* Grounds, darkest first. The base is eden.fm's #0e1d34 pulled a shade
     deeper so that surfaces sitting on it have somewhere to go. */
  --bg:         #080D17;
  --surface:    #0E1A2E;
  --surface-2:  #16243D;
  --line:       #1E3055;

  --text:       #EAF1FC;
  --heading:    #FFFFFF;
  --muted:      #93A6C4;

  /* eden.fm's link blue is #0d42ff with a #406aff hover. That reads well as a
     solid fill under white, but is too dark to be legible *as text* on navy,
     so the two jobs get two values. */
  --accent:      #6C93FF;
  --accent-hover:#9CB6FF;
  --accent-solid:#0D42FF;
  --accent-ink:  #FFFFFF;
  --accent-dim:  #132444;

  --warn:       #F0A44E;
  --radius:     14px;
  --shadow:     0 1px 2px rgba(0, 0, 0, .5), 0 18px 50px rgba(0, 0, 0, .45);
  --glow:       0 0 0 1px rgba(108, 147, 255, .22), 0 12px 40px rgba(13, 66, 255, .18);
  --max:        1080px;
  --head-h:     70px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

/* The browser's own [hidden] rule is `display: none` at user-agent origin, so
   any class that sets a display value beats it. `.cookie` does exactly that,
   which meant the banner ignored `hidden` in both directions: it showed before
   the script ran, and clicking Accept appeared to do nothing. Restating the
   rule here, above every component, is the fix and the guard against the next
   component that hits it. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* The ground itself. Two soft blue lights over the navy, drawn in CSS so the
   page still loads nothing from anywhere - eden.fm gets the same effect from a
   photograph, which would be a request. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(13, 66, 255, .30), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(60, 132, 255, .17), transparent 60%),
    linear-gradient(180deg, #0E1D34 0%, var(--bg) 58%);
}

h1, h2, h3 {
  line-height: 1.14;
  margin: 0;
  color: var(--heading);
  text-wrap: balance;
  letter-spacing: -.022em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.95rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -.01em; }
p  { margin: 0; }

a  { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

.muted { color: var(--muted); }

main { display: block; flex: 1 0 auto; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.stack > * + * { margin-top: 18px; }

/* ------------------------------------------------------------------ header */

.announce {
  background: var(--accent-solid);
  color: var(--accent-ink);
  text-align: center;
  padding: 9px 16px;
  font-size: .92rem;
  font-weight: 550;
  position: relative;
  z-index: 30;
}

/* Sticky and translucent, the way eden.fm's header behaves once scrolled. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 29, 52, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(108, 147, 255, .14);
}

.site-header > .header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--head-h);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--heading);
}
.brand-name {
  font-weight: 750;
  letter-spacing: -.02em;
  font-size: 1.08rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

/* The arch from the app icon, drawn in CSS so it needs no request. */
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 13px 13px 4px 4px;
  background: linear-gradient(160deg, #FFD46B, #FF7A59 55%, var(--accent-solid));
  box-shadow: inset 0 0 0 3px #0E1D34, 0 0 18px rgba(13, 66, 255, .5);
  border: 2px solid var(--accent);
}

.site-nav { display: flex; gap: 22px; font-size: .96rem; font-weight: 550; align-items: center; }
.site-nav a { color: var(--text); text-decoration: none; opacity: .82; }
.site-nav a:hover { color: var(--accent-hover); opacity: 1; }

/* One nav item styled as a button, which is how eden.fm treats its Discord
   link - it is the only outbound one and it earns the emphasis. */
.site-nav a.nav-cta {
  background: var(--accent-solid);
  color: var(--accent-ink);
  opacity: 1;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 650;
}
.site-nav a.nav-cta:hover { color: var(--accent-ink); filter: brightness(1.12); }

/* -------------------------------------------------------------------- hero */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 62px 20px 20px;
}
.hero .eyebrow {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero p.lede {
  font-size: 1.18rem;
  color: var(--muted);
  margin-top: 16px;
  max-width: 62ch;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-solid);
  color: var(--accent-ink);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 24px;
  font: inherit;
  font-weight: 650;
  font-size: .97rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 26px rgba(13, 66, 255, .34);
}
.btn:hover { filter: brightness(1.12); color: var(--accent-ink); }
.btn-quiet {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  border-color: var(--line);
  box-shadow: none;
}
.btn-quiet:hover { color: var(--heading); border-color: var(--accent); filter: none; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; filter: none; box-shadow: none; }

.pill {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
}
.pill-soon { background: var(--surface-2); color: var(--muted); }

/* ------------------------------------------------------------------- cards */

.section { max-width: var(--max); margin: 0 auto; padding: 44px 20px; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.app-card {
  display: block;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow), var(--glow);
}
.app-card h3 { margin-top: 14px; }
.app-card p { margin-top: 6px; color: var(--muted); font-size: .95rem; }

.app-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}

/* --------------------------------------------------------------- app page */

.feature-list { display: grid; gap: 20px; margin-top: 26px; }
@media (min-width: 720px) { .feature-list { grid-template-columns: 1fr 1fr; gap: 26px 40px; } }
.feature h3 { color: var(--heading); }
.feature p { color: var(--muted); margin-top: 4px; font-size: .97rem; }

.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 20px 20px;
  scroll-snap-type: x mandatory;
  max-width: 100%;
}
.shots figure { margin: 0; flex: none; width: 232px; scroll-snap-align: start; }
.shots img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
  background: var(--surface-2);
}
.shots figcaption { font-size: .84rem; color: var(--muted); margin-top: 7px; }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: .95rem; }
.spec-table th, .spec-table td {
  text-align: left; padding: 10px 0;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.spec-table th { color: var(--muted); font-weight: 550; width: 40%; }

/* ------------------------------------------------------------------- prose */

.prose { max-width: 68ch; }
.prose h2 { margin-top: 34px; margin-bottom: 8px; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose li { margin-top: 6px; color: var(--text); }

/* -------------------------------------------------------------------- form */

.form { max-width: 34rem; margin-top: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; color: var(--heading); }
.field .req { color: var(--accent); }

input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], textarea, select {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 10px;
}
select option {
  color: var(--heading);
  background: var(--surface);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
::placeholder { color: var(--muted); opacity: .7; }

/* The honeypot. Off-screen rather than display:none, because some bots skip
   fields that are explicitly hidden. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.flash {
  max-width: var(--max);
  margin: 12px auto 8px;
  padding: 12px 20px;
  background: var(--accent-dim);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .95rem;
}

.notice {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin-top: 20px;
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 34px 20px 44px;
  background: rgba(8, 13, 23, .55);
  flex: none;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-brand { font-weight: 700; color: var(--heading); }
.footer-links { display: flex; flex-direction: column; gap: 7px; font-size: .92rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent-hover); }
.footer-legal { max-width: var(--max); margin: 26px auto 0; font-size: .85rem; }

/* ------------------------------------------------------------------ cookie */

.cookie {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(14, 26, 46, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  font-size: .92rem;
  z-index: 40;
}
.cookie p { flex: 1 1 260px; margin: 0; color: var(--muted); }
.cookie-actions { display: flex; gap: 8px; margin-left: auto; }

/* ------------------------------------------------------------------- admin */

.admin-shell { max-width: 1180px; margin: 0 auto; padding: 0 20px 60px; }
.admin-nav {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px; padding-bottom: 12px;
}
.admin-nav a {
  padding: 7px 13px; border-radius: 9px; text-decoration: none;
  color: var(--muted); font-size: .93rem; font-weight: 550;
}
.admin-nav a:hover { background: var(--surface-2); color: var(--heading); }
.admin-nav a.on { background: var(--accent-solid); color: var(--accent-ink); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.panel h2 { font-size: 1.1rem; margin-bottom: 4px; }
.panel .hint { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }

.grid-2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.data-table th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem;
  letter-spacing: .05em; text-transform: uppercase; padding: 8px 10px 8px 0;
}
.data-table td { padding: 11px 10px 11px 0; border-top: 1px solid var(--line); vertical-align: top; }
.table-scroll { overflow-x: auto; }

.inline-form { display: inline; }
.danger { color: var(--warn); }

.stat-row { display: flex; gap: 26px; flex-wrap: wrap; }
.stat { min-width: 130px; }
.stat .n {
  font-size: 2rem; font-weight: 750; letter-spacing: -.02em;
  display: block; color: var(--heading);
}
.stat .k { color: var(--muted); font-size: .85rem; }

.checkline { display: flex; align-items: center; gap: 9px; margin: 10px 0; }
.checkline input { width: auto; }

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

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