/* GridDesk marketing site — dark, motorsport-inspired minimal */

:root {
  --bg: #080809;
  --bg-elevated: #101012;
  --surface: #161618;
  --surface-2: #1e1e22;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f2f4;
  --text-dim: #9b9ba3;
  --text-muted: #6e6e78;
  --accent: #ffffff;
  --gold: #c9a227;
  --gold-dim: rgba(201, 162, 39, 0.14);
  --green: #3ecf8e;
  --red: #e85d5d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Segoe UI", system-ui, sans-serif;
  --max: 1120px;
  --header-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background:
    var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 162, 39, 0.07), transparent 55%),
    repeating-linear-gradient(
      -14deg,
      transparent 0,
      transparent 72px,
      rgba(255, 255, 255, 0.018) 72px,
      rgba(255, 255, 255, 0.018) 73px
    );
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: 5.5rem 0;
}

.section--tight {
  padding: 4rem 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 999px;
  background: var(--gold-dim);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 3rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--text-dim);
  font-size: 1.05rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(8, 8, 9, 0.72);
  backdrop-filter: blur(14px);
  transition: border-color 0.2s, background 0.2s;
}

.site-header.is-scrolled {
  border-color: var(--border);
  background: rgba(8, 8, 9, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: 0.22rem auto;
  background: currentColor;
  border-radius: 1px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  color: #0a0a0a;
  background: var(--accent);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: #e8e8e8;
}

.btn--ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
}

.btn--gold {
  color: #0a0a0a;
  background: var(--gold);
  border-color: var(--gold);
}

.btn--gold:hover {
  filter: brightness(1.06);
}

.btn--discord {
  color: #fff;
  background: #5865f2;
  border-color: #5865f2;
}

.btn--discord:hover {
  background: #4752c4;
  border-color: #4752c4;
}

.btn__icon {
  flex-shrink: 0;
}

.discord-online {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.85;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
}

.btn--disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.btn--sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
}

.lang-btn {
  min-width: 2.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* Hero */
.hero {
  padding: 4.5rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero-copy .lead {
  margin: 0 0 1.75rem;
  max-width: 32rem;
  font-size: 1.1rem;
  color: var(--text-dim);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* App preview mockup */
.preview {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 40%),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(201, 162, 39, 0.08), transparent 45%);
  pointer-events: none;
}

.preview-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.preview-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3a3a40;
}

.preview-dot:nth-child(1) { background: #ff5f57; }
.preview-dot:nth-child(2) { background: #febc2e; }
.preview-dot:nth-child(3) { background: #28c840; }

.preview-title {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.preview-body {
  padding: 1rem 1rem 1.25rem;
}

.preview-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.preview-tab {
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-radius: 6px;
}

.preview-tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.preview-table th,
.preview-table td {
  padding: 0.45rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.preview-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-table tr:last-child td {
  border-bottom: none;
}

.pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  font-weight: 700;
  font-size: 0.72rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.pos--p1 {
  background: rgba(201, 162, 39, 0.22);
  color: var(--gold);
}

.delta-up { color: var(--green); }
.delta-down { color: var(--red); }

.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.preview-stat {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.preview-stat strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.preview-stat span {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-card {
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.03), transparent 50%), var(--bg-elevated);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-card__icon {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* Steps */
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.step-card {
  position: relative;
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-card__n {
  display: block;
  margin-bottom: 0.85rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(201, 162, 39, 0.45);
  line-height: 1;
}

.step-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.step-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 52rem;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.pricing-card--featured {
  border-color: rgba(201, 162, 39, 0.45);
  background:
    linear-gradient(160deg, rgba(201, 162, 39, 0.08), transparent 45%),
    var(--surface);
}

.pricing-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.pricing-card .price {
  margin: 0.35rem 0 1.25rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pricing-card ul {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  flex: 1;
}

.pricing-card li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.35rem;
  font-size: 0.92rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.pricing-card li:last-child {
  border-bottom: none;
}

.pricing-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* Download */
.download-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 50%),
    var(--surface);
  box-shadow: var(--shadow);
}

.download-panel h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.download-panel .lead {
  margin: 0 0 1.5rem;
  color: var(--text-dim);
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.download-meta strong {
  color: var(--text);
}

.download-missing {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: #f0c674;
  border: 1px solid rgba(240, 198, 116, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(240, 198, 116, 0.08);
}

.download-missing[hidden] {
  display: none;
}

.req-card {
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
}

.req-card h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}

.req-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.req-card li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.req-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--gold);
}

/* Community / Discord */
.community-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.08), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
}

.community-head {
  margin-bottom: 1.25rem;
}

.community-online-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}

.community-online-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(62, 207, 142, 0.55);
  flex-shrink: 0;
}

.community-widget {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #2f3136;
  min-height: 400px;
}

.community-widget iframe {
  display: block;
  width: 100%;
  min-height: 400px;
}

/* FAQ */
.faq-list {
  max-width: 44rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 1.1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--text-muted);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0 0 1.1rem;
  padding-right: 2rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  margin: 0.65rem 0 0;
  max-width: 22rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.footer-col h4 {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.45rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.15s;
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-bottom p {
  margin: 0 0 0.5rem;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .features-grid,
  .steps-row,
  .pricing-grid,
  .download-panel,
  .community-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 2rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 8, 9, 0.98);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s, opacity 0.2s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .header-actions .btn--primary {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    padding-top: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
