/* DashRally — site styles.
   Palette: orange #ea6218 (brand), graphite #393939, warm cream #f7f4ef,
   map-park green #4a7c59, map-water blue #4a90b8. Mobile-first. */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins/poppins-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins/poppins-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins/poppins-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins/poppins-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins/poppins-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins/poppins-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins/poppins-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins/poppins-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/poppins/poppins-800-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/poppins/poppins-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --orange: #ea6218;
  --orange-dark: #c94f0f;
  --orange-soft: #fdeadd;
  --ink: #393939;
  --ink-dark: #2b2b2b;
  --cream: #f7f4ef;
  --green: #4a7c59;
  --green-soft: #e4efe7;
  --blue: #4a90b8;
  --blue-soft: #e3eef5;
  --muted: #6d6d6d;
  --line: #e4ded5;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(57, 57, 57, 0.10);
  --shadow-sm: 0 4px 14px rgba(57, 57, 57, 0.08);
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 { line-height: 1.2; color: var(--ink-dark); }
h1 { font-size: clamp(2rem, 5.5vw, 3.2rem); font-weight: 800; margin: 0.4em 0; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 700; margin: 0 0 0.6em; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 0.6em 0 0.4em; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 780px; }
.center { text-align: center; }

/* Accessibility helpers */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink-dark); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Honeypot — visually removed, still in the DOM for bots */
.hp-field {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden; opacity: 0;
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 1rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }

.logo-mark { display: inline-flex; }
.logo-mark svg {
  height: 40px; width: auto;
  animation: pin-drop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 50% 90%;
}
.brand:hover .logo-mark svg,
.brand:focus-visible .logo-mark svg {
  transform: translateY(-4px) rotate(-8deg) scale(1.05);
}

@keyframes pin-drop {
  0%   { opacity: 0; transform: translateY(-30px) scale(0.85); }
  55%  { opacity: 1; transform: translateY(4px) scale(1.02); }
  75%  { transform: translateY(-3px); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.logo-word {
  font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em;
  transition: letter-spacing 0.35s ease;
}
.brand:hover .logo-word { letter-spacing: 0.01em; }
.logo-dash { color: var(--orange); }
.logo-rally { color: var(--ink); }
.logo-rally-light { color: #d8d8d8; }

.nav-links {
  display: flex; align-items: center; gap: 1.4rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.nav-links a:not(.btn):hover { color: var(--orange); }

.nav-lang { font-size: 0.9rem; color: var(--muted); display: flex; gap: 0.35rem; align-items: center; }
.nav-lang a { color: var(--muted) !important; }
.nav-lang a.active { color: var(--orange) !important; font-weight: 700; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2.5px; background: var(--ink);
  margin: 5px 0; border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Buttons & badges ---------- */

.btn {
  display: inline-block; border: 0; cursor: pointer;
  padding: 0.7rem 1.5rem; border-radius: 999px;
  font-family: var(--font); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--orange); color: #fff !important; box-shadow: 0 6px 18px rgba(234, 98, 24, 0.35); }
.btn-primary:hover { background: var(--orange-dark); }

.btn-secondary { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 2px var(--ink); }
.btn-secondary:hover { box-shadow: inset 0 0 0 2px var(--orange); color: var(--orange) !important; }

.btn-discord { background: #5865f2; color: #fff !important; box-shadow: 0 6px 18px rgba(88, 101, 242, 0.35); }
.btn-discord:hover { background: #4752c4; }

.btn-lg { padding: 0.95rem 2.2rem; font-size: 1.05rem; }

.badge {
  display: inline-block; padding: 0.35rem 0.9rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
}
.badge-wip { background: var(--orange-soft); color: var(--orange-dark); }
.badge-wip::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange); margin-right: 0.5rem; animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.badge-soon { background: var(--green-soft); color: var(--green); }

/* ---------- Hero ---------- */

.hero {
  background: var(--cream) url('/assets/img/map-pattern.svg') repeat;
  background-size: 340px;
}

.hero-inner {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center;
  padding-top: clamp(3rem, 8vw, 5.5rem); padding-bottom: clamp(3rem, 8vw, 5.5rem);
}

.hero-claim {
  color: var(--green); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 0.95rem; margin: 0.4rem 0 1rem;
}

.hero-lead { font-size: 1.08rem; color: var(--muted); max-width: 34rem; }

.hero-actions { margin-top: 1.5rem; display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.8rem; border-top: 4px solid var(--orange);
}
.hero-card-title { font-size: 1.25rem; margin: 0 0 0.4rem; }
.hero-card-lead { font-size: 0.92rem; color: var(--muted); margin: 0 0 1.1rem; }

.hero-wave {
  height: 6px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--green) 50%, var(--blue) 100%);
}

/* ---------- Sections ---------- */

.section { padding: clamp(3rem, 7vw, 4.5rem) 0; }
.section-alt { background: var(--cream); }
.section-lead { color: var(--muted); max-width: 44rem; margin-bottom: 2rem; }

.page-head { background: var(--cream) url('/assets/img/map-pattern.svg') repeat; background-size: 340px; padding-bottom: 2.5rem; }
.page-head .badge-wip { margin-top: 0.6rem; }

.about-not {
  border-left: 4px solid var(--blue); background: var(--blue-soft);
  padding: 0.9rem 1.2rem; border-radius: 0 10px 10px 0; color: var(--ink);
}

/* Features */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem;
}
.feature-card {
  position: relative; background: var(--white); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  border-top: 3px solid transparent;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover { transform: translateY(-5px); border-top-color: var(--orange); box-shadow: var(--shadow); }
.feature-card .badge-soon { position: absolute; top: 1.1rem; right: 1.1rem; }
.feature-icon { display: inline-flex; color: var(--orange); margin-bottom: 0.3rem; }
.feature-icon svg { width: 1.375rem; height: 1.375rem; }
.feature-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; }

/* Where to play */
.section-where {
  background:
    linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)),
    var(--blue-soft) url('/assets/img/map-pattern.svg') repeat;
  background-size: auto, 340px;
}
.where-form {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.8rem; border-top: 4px solid var(--green);
}
.where-note { color: var(--blue); font-size: 0.88rem; }

/* Community */
.section-community { background: var(--ink-dark); color: #e7e2da; }
.section-community h2 { color: #fff; }
.section-community .section-lead { color: #b9b4ab; margin-left: auto; margin-right: auto; }

/* ---------- Forms ---------- */

.dr-form .field { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.dr-form label { font-weight: 600; font-size: 0.88rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field-row .field { margin-bottom: 1.1rem; }

.dr-form input[type="text"],
.dr-form input[type="email"],
.dr-form input[type="password"],
.dr-form select,
.dr-form textarea {
  width: 100%; padding: 0.7rem 0.95rem;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-family: var(--font); font-size: 0.95rem; color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dr-form input:focus, .dr-form select:focus, .dr-form textarea:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(234, 98, 24, 0.15);
}
.dr-form textarea { resize: vertical; }

/* Native select arrow varies wildly by browser/OS — replace it with a
   consistent icon so it matches the rest of the (custom-styled) form. */
.dr-form select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 2.6rem;
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d6d6d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Search icon in the city field signals that suggestions exist once a
   country is picked — the dropdown itself is our own combobox below. */
#where-city {
  padding-right: 2.6rem;
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1.05rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d6d6d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.34-4.34'/%3E%3C/svg%3E");
}

.dr-form select:disabled, #where-city:disabled {
  background-color: var(--cream); color: var(--muted); cursor: not-allowed; opacity: 0.75;
}

/* Custom city combobox — replaces <input list> + <datalist>, whose native
   suggestion popup can't be restyled in any browser, so it looked out of
   place next to the styled <select> for country. */
.combobox { position: relative; }

.combobox-list {
  position: absolute; top: calc(100% + 0.4rem); left: 0; right: 0; z-index: 20;
  margin: 0; padding: 0.4rem; list-style: none;
  max-height: 15rem; overflow-y: auto;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow);
}

.combobox-option {
  padding: 0.6rem 0.8rem; border-radius: 7px;
  font-size: 0.95rem; color: var(--ink); cursor: pointer;
}

.combobox-option:hover, .combobox-option.is-active {
  background: var(--orange-soft); color: var(--orange-dark);
}

.notify-row { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 0.9rem; }
.notify-row input { width: 100%; padding: 1.05rem 1.2rem; font-size: 1.1rem; }
.notify-row .btn { width: 100%; padding: 1rem 1.6rem; font-size: 1rem; }

.check-row {
  display: flex; align-items: flex-start; gap: 0.55rem;
  font-size: 0.83rem; color: var(--muted); margin-bottom: 1rem; cursor: pointer;
}
.check-row input { margin-top: 0.25rem; accent-color: var(--orange); }

.form-feedback { min-height: 1.2em; font-size: 0.9rem; font-weight: 600; margin: 0.8rem 0 0; }
.form-feedback.is-ok { color: var(--green); }
.form-feedback.is-error { color: #c0392b; }

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

.site-footer { background: var(--ink-dark); color: #b9b4ab; margin-top: 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.2fr 0.8fr 1fr; gap: 2rem;
  padding-top: 3rem; padding-bottom: 2rem;
}
.footer-brand .logo-word { font-size: 1.2rem; }
.footer-tagline { color: #fff; font-weight: 600; margin: 0.6rem 0 0.3rem; }
.footer-wip { font-size: 0.85rem; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a, .footer-credits a { color: #d8d8d8; }
.footer-links a:hover, .footer-credits a:hover { color: var(--orange); }
.footer-credits { font-size: 0.88rem; }
.footer-credits p { margin: 0.3rem 0; }
.footer-bottom {
  border-top: 1px solid #3f3f3f; padding-top: 1rem; padding-bottom: 1.2rem;
  font-size: 0.82rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Admin panel ---------- */

.admin-login { max-width: 420px; }
.admin-logout { margin-top: 0.5rem; }
.admin-count { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.table-wrap { overflow-x: auto; margin-bottom: 2.5rem; }
.admin-table {
  width: 100%; border-collapse: collapse; background: var(--white);
  border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
}
.admin-table th {
  background: var(--cream); text-align: left; padding: 0.7rem 0.9rem;
  font-weight: 600; white-space: nowrap;
}
.admin-table td { padding: 0.65rem 0.9rem; border-top: 1px solid var(--line); vertical-align: top; }
.admin-message { max-width: 420px; }
.admin-empty { color: var(--muted); text-align: center; }

/* ---------- Legal ---------- */

.legal-updated { color: var(--muted); font-size: 0.88rem; }
.legal-document h2 { margin-top: 2.2rem; font-size: 1.25rem; }
.legal-document ul { padding-left: 1.3rem; }
.legal-document li { margin-bottom: 0.5rem; }

/* ---------- Scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .logo-mark svg { animation: none; }
  .btn, .feature-card { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start;
    padding: 1rem 20px 1.4rem; gap: 1rem; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
}

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-card { padding: 1.3rem; }
}
