/*
 * County Savvy website base: the app's "Direction" theme translated to CSS.
 * Colors, type scale and shapes mirror app-theme/DirectionTheme.kt
 * (Sunlit Chart = light, Amber Night = dark).
 */

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("fonts/barlow-semi-condensed-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("fonts/barlow-semi-condensed-800.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --font-display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --font-body: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  /* Shared across both app themes */
  --brand: #ffd23f;
  --on-brand: #171300;
  --correct: #2e8a62;
  --on-correct: #fff;
  --wrong: #c84b3d;
  --on-wrong: #fff;

  /* Learning-status progress ramp (light) */
  --p-not-started: #c2c9c5;
  --p-just-started: #62b995;
  --p-sticking: #419977;
  --p-almost-there: #1c7b5a;
  --p-mastered: #005c41;
  --p-lapsed: #ab50d0;

  /* Shapes from directionLayout */
  --radius-card: 8px;
  --radius-button: 8px;
  --button-height: 52px;
  --overlay-button: 56px;
  --forward-button: 84px;

  /* Sunlit Chart (light) */
  --sea: #e5eceb;
  --screen: #e5eceb;
  --surface: #fffdf7;
  --on-surface: #172b2f;
  --muted: #617579;
  --outline: #82979a;
  --surface-variant: #fff1b8;
  --on-surface-variant: #372e0c;
  --muted-variant: #7b744d;
  --variant-outline: #b39a38;
  --accent-text: var(--on-surface);
  --eyebrow: var(--muted);
  --inspected: #f2b544;
  --card-border: 1px solid var(--outline);
  color-scheme: light;
}

/* Amber Night (dark) */
.theme-night {
  --sea: #000;
  --screen: #080a0b;
  --surface: #171a1c;
  --on-surface: #f5f3ea;
  --muted: #a5aeb1;
  --outline: #3e464a;
  --surface-variant: #24292c;
  --on-surface-variant: #f5f3ea;
  --muted-variant: #8f999d;
  --variant-outline: #677277;
  --accent-text: var(--brand);
  --eyebrow: var(--brand);
  --inspected: #ffdf80;
  --card-border: 1px solid var(--outline);

  --p-not-started: #e0e0e0;
  --p-just-started: #6acaa7;
  --p-sticking: #47ac8d;
  --p-almost-there: #1d8e73;
  --p-mastered: #01705b;
  --p-lapsed: #c35dd9;
  color-scheme: dark;
}

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

[hidden] {
  display: none !important;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--screen);
  color: var(--on-surface);
  font: 400 16px/24px var(--font-body);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

/* ---------- type scale (directionTypography) ---------- */
.display {
  font: 800 clamp(40px, 7vw, 76px) / 0.98 var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

.headline {
  font: 800 clamp(28px, 4vw, 40px) / 1.1 var(--font-display);
  letter-spacing: -0.3px;
  margin: 0;
  text-wrap: balance;
}

.headline-small {
  font: 800 22px/26px var(--font-display);
  letter-spacing: -0.2px;
  margin: 0;
}

.title-large {
  font: 700 20px/26px var(--font-display);
  margin: 0;
}

.title-medium {
  font: 600 17px/22px var(--font-body);
  margin: 0;
}

.body-medium {
  font: 400 14px/20px var(--font-body);
}

.eyebrow {
  font: 700 13px/18px var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin: 0;
}

.label-small {
  font: 700 11px/16px var(--font-body);
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.tnum {
  font-variant-numeric: tabular-nums;
}

/* ---------- components ---------- */
.card {
  background: var(--surface);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 16px;
}

.card-variant {
  background: var(--surface-variant);
  color: var(--on-surface-variant);
  border: 1px solid var(--variant-outline);
  border-radius: var(--radius-card);
  padding: 16px;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--button-height);
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--brand);
  color: var(--on-brand);
  font: 600 16px/20px var(--font-body);
  text-decoration: none;
  cursor: pointer;
}

.button-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: 600 14px/20px var(--font-body);
  letter-spacing: 0.1px;
  cursor: pointer;
  text-decoration: none;
}

.forward-button {
  width: var(--forward-button);
  height: var(--forward-button);
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: var(--on-brand);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.overlay-button {
  width: var(--overlay-button);
  height: var(--overlay-button);
  border-radius: 50%;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--accent-text);
  display: grid;
  place-items: center;
}

/* Official "Get it on Google Play" badge (Partner Marketing Hub artwork, 3.37:1), shown unmodified. */
.play-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 8px;
}

.play-badge img {
  height: 54px;
  width: auto;
  aspect-ratio: 238.96 / 70.87;
}

.play-badge.small img {
  height: 40px;
}

/* The bracket "viewfinder" from the app icon */
.brackets {
  position: relative;
}

.brackets::before,
.brackets::after,
.brackets > .brackets-b::before,
.brackets > .brackets-b::after {
  content: "";
  position: absolute;
  width: 22%;
  height: 22%;
  border: 6px solid var(--brand);
  pointer-events: none;
}

.brackets::before {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 12px;
}

.brackets::after {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 12px;
}

.brackets > .brackets-b::before {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 12px;
}

.brackets > .brackets-b::after {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 12px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.trademark {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
}
