/* The root screen: brand, feature blocks, city grid, legal footer. */

.afk-root button,
.afk-root a {
  -webkit-tap-highlight-color: transparent;
}

.afk-root {
  --brand: #008000;
  --brand-green: #1fa66a;
  --wordmark: #1fa66a;
  --bg-glow: #22324a;
  --bg-top: #101a2a;
  --bg-mid: #0b1220;
  --bg-bottom: #070b12;
  --text: #f7fafc;
  --muted: #b9c6d8;
  --muted-2: #8fa3bb;
  --card-bg: rgba(255, 255, 255, 0.055);
  --card-border: rgba(255, 255, 255, 0.12);
  --feature-bg: rgba(255, 255, 255, 0.045);
  --feature-text: #c9d5e4;
  --footer: #71809a;
  --footer-link: #a9b8cc;
  --afk-muted: #8fa3bb;
  --afk-rule-color: rgba(255, 255, 255, 0.14);
  --afk-item-text: #f7fafc;
  --afk-item-hover: rgba(255, 255, 255, 0.1);
  --afk-control-border: rgba(255, 255, 255, 0.22);
  --afk-control-bg: rgba(10, 15, 25, 0.55);
  --afk-control-text: #e7edf6;
  --afk-control-hover: rgba(255, 255, 255, 0.1);
  --afk-control-active-bg: #008000;
  --afk-control-active-text: #ffffff;
  --afk-focus: #1fa66a;

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow-y: auto;
  color: var(--text);
  background:
    radial-gradient(1100px 650px at 12% -10%, var(--bg-glow) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 58%, var(--bg-bottom) 100%);
  -webkit-font-smoothing: antialiased;
}

.afk-root[data-theme="light"] {
  --wordmark: #008000;
  --bg-glow: #f2fbf3;
  --bg-top: #f2fbf3;
  --bg-mid: #e7f5e9;
  --bg-bottom: #dbeee0;
  --text: #1e2a22;
  --muted: #4b5a50;
  --muted-2: #6c7d72;
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: rgba(43, 35, 32, 0.14);
  --feature-bg: rgba(255, 255, 255, 0.72);
  --feature-text: #3c4b41;
  --footer: #6c7d72;
  --footer-link: #4b5a50;
  --afk-muted: #6c7d72;
  --afk-rule-color: rgba(30, 42, 34, 0.14);
  --afk-item-text: #1e2a22;
  --afk-item-hover: rgba(30, 42, 34, 0.08);
  --afk-control-border: rgba(30, 42, 34, 0.18);
  --afk-control-bg: rgba(255, 255, 255, 0.78);
  --afk-control-text: #1e2a22;
  --afk-control-hover: rgba(30, 42, 34, 0.08);
  --afk-control-active-bg: #008000;
  --afk-control-active-text: #ffffff;
  --afk-focus: #008000;
}

.afk-root:focus,
.afk-root:focus-visible {
  outline: none;
}

.afk-home {
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 4vw, 40px);
  width: 100%;
  max-width: 1080px;
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(20px, 5vw, 56px) 0;
}

.afk-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.afk-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--afk-control-border);
  border-radius: var(--afk-radius);
  background: var(--afk-control-bg);
  color: var(--afk-control-text);
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

.afk-theme svg {
  width: 16px;
  height: 16px;
}

.afk-hero {
  max-width: 760px;
}

.afk-brand {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 18px);
}

.afk-logo {
  width: clamp(44px, 6vw, 64px);
  height: auto;
  border-radius: 20%;
  flex: none;
}

.afk-wordmark {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  background: var(--wordmark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.afk-tagline {
  max-width: 640px;
  margin: 14px 0 0;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.6;
  color: var(--muted);
}

.afk-continue {
  min-height: 42px;
  margin-top: 18px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--afk-radius);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.afk-continue:hover {
  filter: brightness(1.08);
}

.afk-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-items: start;
  gap: 12px;
}

.afk-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--feature-bg);
  color: var(--feature-text);
  font-size: 14.5px;
  line-height: 1.55;
}

.afk-feature p {
  margin: 0;
}

.afk-feature-icon {
  display: inline-flex;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: #1fa66a;
}

.afk-feature-icon svg {
  width: 20px;
  height: 20px;
}

.afk-feature-eco {
  border-left: 3px solid var(--brand-green);
}

.afk-feature-eco .afk-feature-icon {
  color: var(--brand-green);
}

.afk-cities {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.afk-section {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.afk-grid {
  /* The label sits right above the first card: a little air keeps the section
   * heading from reading as part of the card. */
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.afk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 96px;
  padding: 16px 16px 16px 20px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card-bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.afk-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--flag, var(--brand));
}

.afk-card:hover,
.afk-card:focus-visible {
  border-color: var(--afk-focus);
  transform: translateY(-2px);
}

.afk-card-name {
  font-size: 19px;
  font-weight: 700;
}

.afk-card-country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.afk-card-go {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--brand);
  font-size: 18px;
}

.afk-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
  padding: 22px 0 max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--card-border);
}

.afk-footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 24px;
}

.afk-footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.afk-footer-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  /* tracking trails the last letter too; cancel it so the credit sits close
   * to the wordmark, as one lockup (asserted in check-ui.mjs). */
  margin-right: -0.12em;
}

.afk-footer-by {
  color: var(--footer-link);
  font-size: 12px;
  text-decoration: none;
}

.afk-footer-by:hover,
.afk-footer-by:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.afk-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12.5px;
}

.afk-footer-links a {
  color: var(--footer-link);
  text-decoration: none;
}

.afk-footer-links a:hover,
.afk-footer-links a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.afk-footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  color: var(--footer);
  font-size: 11.5px;
}

.afk-footer-meta a {
  color: var(--footer-link);
  text-decoration: none;
}

.afk-footer-meta a:hover {
  color: var(--text);
}
