/* Cap Clash site: the look of the app's menus (Theme.swift).
   Night sky navy to indigo with a warm gold glow and a cool cyan glow, gold pill buttons,
   rounded black type, the condensed gold CAP CLASH wordmark. */

@font-face {
  font-family: "Nunito";
  src: url("/capclash/assets/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 600 900;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("/capclash/assets/fonts/barlow-condensed-800-latin.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Theme.swift */
  --night: #0D1729;   /* Theme.navy */
  --indigo: #1C173D;  /* Theme.indigo */
  --ink: #0A1217;     /* Theme.ink */
  --gold: #F5A300;    /* Theme.gold */
  --sun: #FFCC3D;     /* Theme.sun */
  --cyan: #1FB5D6;    /* Theme.cyan */
  --red: #E30514;     /* Theme.red */
  /* The board */
  --field: #2CC5B4;
  --mat: #2A1C5C;
  --rim: #8B6CFF;
  --pink: #FF3EA5;

  --text: #F7F3EA;
  --soft: rgba(247, 243, 234, 0.8);
  --faint: rgba(247, 243, 234, 0.58);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-line: rgba(255, 255, 255, 0.1);

  --gold-grad: linear-gradient(180deg, var(--sun), var(--gold));
  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --brand: "Avenir Next Condensed", "Barlow Condensed", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--rounded);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}
/* AppBackground: fixed layer so it also stays put on iOS. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(560px 440px at 50% 10%, rgba(245, 163, 0, 0.2), transparent 70%),
    radial-gradient(680px 560px at 6% 100%, rgba(31, 181, 214, 0.15), transparent 70%),
    linear-gradient(180deg, var(--night), var(--indigo));
}

a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }
.wrap.narrow { width: min(760px, 100% - 32px); }
.wrap.slim { width: min(560px, 100% - 32px); }

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(245, 163, 0, 0.45)); }
.brand span,
.wordmark span {
  font-family: var(--brand);
  font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand span { font-size: 25px; line-height: 1; letter-spacing: 0.01em; padding-top: 2px; }
.brand-text { filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.55)); display: inline-flex; }

.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  color: var(--soft);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.topbar nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.topbar nav a[aria-current="page"] { color: var(--ink); background: var(--gold-grad); }
@media (max-width: 520px) {
  .brand img { width: 28px; height: 28px; }
  .brand span { font-size: 21px; }
  .topbar nav { gap: 0; }
  .topbar nav a { padding: 7px 10px; font-size: 14px; }
}
.brand-text { white-space: nowrap; }
/* Phones: the emblem alone is the home link, so the three links fit on one row. */
@media (max-width: 400px) {
  .brand-text { display: none; }
}

/* ---------- Type ---------- */

.display {
  font-family: var(--rounded);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}

/* ---------- Buttons (PrimaryButtonLabel / SecondaryButtonLabel) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font-family: var(--rounded);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1), filter 0.15s ease;
}
.btn:active { transform: scale(0.95); filter: brightness(0.96); }
.btn-gold {
  color: var(--ink);
  background: var(--gold-grad);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.45),
    0 6px 18px rgba(245, 163, 0, 0.42);
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-glass {
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.12); }

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 88px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--glass-line);
  color: var(--faint);
  font-size: 14px;
}
.foot p { margin: 0; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--soft); text-decoration: none; font-weight: 700; }
.foot a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Content pages (support, privacy) ---------- */

.page-head { margin: 56px 0 28px; text-align: center; }
.page-head .display { font-size: clamp(38px, 7vw, 56px); }
.page-head p { margin: 8px 0 0; color: var(--soft); font-size: 18px; }
.page-head .date { color: var(--faint); font-size: 15px; }

.sheet {
  padding: 8px 32px;
  border-radius: 28px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
@media (max-width: 560px) { .sheet { padding: 4px 20px; border-radius: 22px; } }

.topic { padding: 26px 0; }
.topic + .topic { border-top: 1px solid var(--glass-line); }
.topic h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--tint, var(--sun));
}
.topic p, .topic li { color: var(--soft); max-width: 66ch; }
.topic p { margin: 0 0 12px; }
.topic p:last-child { margin-bottom: 0; }
.topic ul, .topic ol { margin: 0 0 12px; padding-left: 22px; }
.topic li { margin-bottom: 8px; }
.topic li::marker { color: var(--tint, var(--sun)); font-weight: 900; }
.topic strong { color: var(--text); font-weight: 800; }
.topic a, .card a.text-link {
  color: var(--sun);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 204, 61, 0.4);
}
.topic a:hover, .card a.text-link:hover { text-decoration-color: var(--sun); }

/* IconChip: rounded square with a white symbol. */
.chip {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 72%, var(--ink)));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 35%, transparent);
}
.chip svg { width: 19px; height: 19px; }

/* The Dutch version under each English topic. */
.nl {
  position: relative;
  margin-top: 14px !important;
  padding: 12px 16px 12px 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  max-width: none !important;
  color: var(--faint) !important;
  font-size: 15.5px;
}
.nl::before {
  content: "NL";
  position: absolute;
  left: 14px;
  top: 13px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(247, 243, 234, 0.55);
}

/* ---------- Centered card (contact, feedback, thanks) ---------- */

.card {
  margin-top: 48px;
  padding: 40px 36px 36px;
  border-radius: 32px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 30px 80px rgba(0, 0, 0, 0.25);
  text-align: center;
}
@media (max-width: 560px) { .card { margin-top: 32px; padding: 32px 20px 26px; border-radius: 26px; } }
.card .emblem {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  display: block;
  filter: drop-shadow(0 0 18px rgba(245, 163, 0, 0.5));
}
.card .display { font-size: clamp(32px, 6vw, 42px); }
.card .sub { margin: 10px auto 28px; max-width: 42ch; color: var(--soft); }
.card .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.card .note { margin: 22px 0 0; color: var(--faint); font-size: 15px; }
.card .note a { color: var(--soft); font-weight: 800; }
.card .note a:hover { color: var(--text); }

/* ---------- Form (feedback) ---------- */

.form { text-align: left; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.field .optional { font-weight: 600; color: var(--faint); }
.field input[type="text"],
.field input[type="email"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 16px;
  background: rgba(10, 18, 23, 0.55);
  box-shadow: inset 0 0 0 1px var(--glass-line);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: box-shadow 0.15s ease;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field ::placeholder { color: rgba(247, 243, 234, 0.38); }
.field input:focus, .field select:focus, .field textarea:focus {
  box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 4px rgba(245, 163, 0, 0.18);
}
.field select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23FFCC3D' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field select option { background: var(--indigo); color: var(--text); }
.field input[type="file"] { padding: 10px 12px; color: var(--soft); cursor: pointer; }
.field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 163, 0, 0.16);
  color: var(--sun);
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}
.field .hint { margin: 7px 0 0; color: var(--faint); font-size: 14px; line-height: 1.45; }
.form .btn { width: 100%; margin-top: 6px; }

/* Segmented category picker (the app's mode picker). */
fieldset.field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 7px; font-size: 15px; font-weight: 800; }
.segmented {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(10, 18, 23, 0.55);
  box-shadow: inset 0 0 0 1px var(--glass-line);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  margin: 0;
  padding: 9px 4px;
  border-radius: 999px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--soft);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.segmented label:hover { color: var(--text); }
.segmented input:checked + label { color: var(--ink); background: var(--gold-grad); }
.segmented input:focus-visible + label { outline: 3px solid var(--sun); outline-offset: 2px; }

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

.nowrap { white-space: nowrap; }
