/* ==========================================================
   FāyDer — shared styles for privacy / support / delete pages

   Typeface:  Caudex, self-hosted (same font the app uses as its
              default via ThemeData). No Google Fonts request — a
              privacy policy page shouldn't be phoning a third party.
   Palette:   lifted from lib/ — teal #0D7377 / #45B3A8, green
              #08A52A, off-white #F5F5F0 on black.
   Edit colors in one place: the :root block below.
   ========================================================== */

@font-face {
  font-family: "Caudex";
  src: url("fonts/Caudex-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Caudex";
  src: url("fonts/Caudex-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Caudex";
  src: url("fonts/Caudex-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Caudex ships only 400 and 700 — never ask for 500/600 or the
   browser will synthesize a fake weight that looks muddy. */

/* Registering --edge as a real colour lets it animate on hover. Browsers
   without @property just snap between the two values instead. */
@property --edge {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(69, 179, 168, 0.42);
}

:root {
  --bg: #08090A;
  --bg-glow-1: rgba(13, 115, 119, 0.30);
  --bg-glow-2: rgba(8, 165, 42, 0.12);
  --panel: rgba(255, 255, 255, 0.040);
  --panel-line: rgba(69, 179, 168, 0.20);
  --ink: #F5F5F0;
  --ink-soft: #9DAFAB;
  --teal: #45B3A8;
  --teal-deep: #0D7377;
  --green: #08A52A;
  --radius: 18px;
  --maxw: 720px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 20px 80px;
  background: var(--bg);
  background-image:
    radial-gradient(900px 520px at 12% -8%, var(--bg-glow-1), transparent 65%),
    radial-gradient(760px 500px at 92% 4%, var(--bg-glow-2), transparent 62%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Caudex", Georgia, "Times New Roman", serif;
  font-size: 17.5px;
  line-height: 1.68;
}

.wrap { max-width: var(--maxw); margin: 0 auto; }

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

header {
  padding: 44px 0 26px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

/* Italic, echoing the "FāyDer/" wordmark on the app's splash screen. */
.mark {
  font-weight: 700;
  font-style: italic;
  font-size: 31px;
  letter-spacing: 0.3px;
  color: var(--ink);
  text-decoration: none;
}

.mark span { color: var(--teal); }

.eyebrow {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- signature rule ----------
   Deep teal → teal → green: the app's own accent ramp. Divides sections. */

.rule {
  height: 2px;
  border: 0;
  margin: 34px 0;
  background: linear-gradient(
    90deg,
    var(--teal-deep) 0%,
    var(--teal) 55%,
    var(--green) 100%
  );
  opacity: 0.6;
  border-radius: 2px;
}

/* ---------- glass panel ----------
   Mirrors the app's dark bet card: semi-transparent black, teal-tinted
   glass-pane border that DISSOLVES AT THE CORNERS rather than closing
   into a hard rounded rectangle — the same trick as _CardBorderPainter
   in bet_card.dart, where the border deliberately fades out instead of
   meeting itself.

   How it works: the border isn't a `border` at all. It's a 1px ring
   drawn by ::before, made by punching the middle out of a filled shape
   (mask-composite). The ring is painted with two crossed gradients —
   a horizontal one that fades out at the left and right ends, and a
   vertical one that fades at the top and bottom. Along the middle of
   any edge at least one gradient is at full strength, so the line is
   solid. At a corner BOTH are running out at once, so it melts away. */

.panel,
.card {
  --edge: rgba(69, 179, 168, 0.42);
}

.panel::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background:
    linear-gradient(90deg, transparent 0%, var(--edge) 20%, var(--edge) 80%, transparent 100%),
    linear-gradient(180deg, transparent 0%, var(--edge) 20%, var(--edge) 80%, transparent 100%);
  /* Punch out the interior, leaving only the 1px ring. */
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  transition: --edge 140ms ease;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 0;
  border-radius: var(--radius);
  padding: 30px 30px 34px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-bottom: 20px;
}

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

h1 {
  font-weight: 700;
  font-size: 38px;
  line-height: 1.18;
  letter-spacing: 0.2px;
  margin: 0 0 10px;
}

h2 {
  font-weight: 700;
  font-size: 23px;
  letter-spacing: 0.2px;
  margin: 34px 0 8px;
  color: var(--ink);
}

h2:first-of-type { margin-top: 0; }

h3 {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2px;
  margin: 22px 0 4px;
  color: var(--teal);
}

p { margin: 0 0 14px; }

ul { margin: 0 0 16px; padding-left: 20px; }

li { margin-bottom: 7px; }

li::marker { color: var(--teal-deep); }

strong { font-weight: 700; color: #fff; }

.lede { font-size: 19px; color: var(--ink-soft); margin-bottom: 4px; }

.updated {
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 26px;
}

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }

a:hover { color: #fff; }

a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- link cards on the home page ---------- */

.cards { display: grid; gap: 14px; margin-top: 4px; }

.card {
  position: relative;
  display: block;
  padding: 20px 22px;
  background: var(--panel);
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: transform 140ms ease, background 140ms ease;
}

/* Hover brightens the ring. Because the ring colour is a custom property
   the corner dissolve is preserved — only its intensity changes. */
.card:hover {
  --edge: rgba(69, 179, 168, 0.85);
  transform: translateY(-2px);
  background: rgba(69, 179, 168, 0.07);
}

.card-title {
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.2px;
  display: block;
  margin-bottom: 2px;
}

.card-sub { color: var(--ink-soft); font-size: 15.5px; display: block; line-height: 1.5; }

/* ---------- callout ---------- */

.note {
  border-left: 3px solid var(--teal-deep);
  background: rgba(13, 115, 119, 0.13);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  margin: 18px 0;
}

.note p:last-child { margin-bottom: 0; }

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

/* The divider above the footer gets the same treatment — solid through
   the middle, gone by the time it reaches either end. */
footer {
  position: relative;
  margin-top: 40px;
  padding-top: 22px;
  border: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--panel-line) 18%,
    var(--panel-line) 82%,
    transparent 100%
  );
}

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  body { padding: 0 16px 60px; font-size: 17px; }
  .panel { padding: 24px 20px 26px; }
  h1 { font-size: 31px; }
  h2 { font-size: 21px; }
}

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