/* Rally Pulse site — tokens mirror the in-game menu: deep teal-navy, teal pulse, lime ball. */
:root {
  --bg: #07131c;
  --bg-2: #0a1c28;
  --surface: #0f2230;
  --surface-2: #132a3a;
  --line: rgba(120, 220, 210, .14);
  --line-strong: rgba(120, 220, 210, .28);
  --text: #eef6f8;
  --dim: #a3b9c6;
  --faint: #6e8797;
  --teal: #4fe3cf;
  --teal-2: #2fc4d8;
  --lime: #c8ff3d;
  --gold: #f6c748;
  --coral: #ff6a5c;
  --violet: #9b87ff;
  --radius: 18px;
  --display: "Oxanium", "SF Pro Display", system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(47, 196, 216, .20), transparent 62%),
    radial-gradient(800px 520px at -10% 20%, rgba(79, 227, 207, .10), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: #7ff0e1; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* Language switching: both languages ship in the page; the root attribute picks one. */
html[data-lang="tr"] [data-l="en"],
html[data-lang="en"] [data-l="tr"] { display: none !important; }

.wrap { width: min(100% - 32px, 1120px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 780px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 19, 28, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line-strong); }
.brand span { font: 800 18px/1 var(--display); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--dim); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(79, 227, 207, .08); }
.lang {
  display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; margin-left: 6px;
}
.lang button {
  font: 700 12px/1 var(--display); letter-spacing: .08em; color: var(--dim);
  background: none; border: 0; padding: 7px 10px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--teal); color: #04161a; }
.header-cta { margin-left: 8px; }
@media (max-width: 860px) {
  .nav a.opt { display: none; }
  .header-cta { display: none; }
}
@media (max-width: 420px) {
  .brand span { font-size: 16px; }
  .nav a { padding: 8px 8px; font-size: 14px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 16px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  padding: 16px 26px; border-radius: 999px; border: 0; cursor: pointer;
  color: #04161a; background: linear-gradient(180deg, #6ff0de, var(--teal) 55%, var(--teal-2));
  box-shadow: 0 0 0 1px rgba(79, 227, 207, .5), 0 10px 34px rgba(79, 227, 207, .28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { color: #04161a; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(79, 227, 207, .7), 0 14px 40px rgba(79, 227, 207, .36); }
.btn.sm { font-size: 13px; padding: 11px 18px; }
.btn svg { width: 20px; height: 20px; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { color: var(--text); background: rgba(79, 227, 207, .08); }
.badge-link { display: inline-block; line-height: 0; border-radius: 12px; transition: transform .15s ease; }
.badge-link:hover { transform: translateY(-1px); }
.badge-link img { height: 56px; width: auto; }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 13px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--teal);
  margin: 0 0 18px;
}
.pulse-line { display: block; width: 180px; height: 22px; color: var(--teal); }
.pulse-line path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.6s .2s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
h1, h2, h3 { font-family: var(--display); letter-spacing: .01em; margin: 0; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; text-transform: uppercase; }
h2 { font-weight: 800; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; text-transform: uppercase; }
h3 { font-weight: 700; font-size: 21px; line-height: 1.25; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--dim); max-width: 34em; }
.accent { color: var(--teal); }
.lime { color: var(--lime); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin: 0 0 30px; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; color: var(--faint); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--teal); transform: rotate(45deg); }
.phones { position: relative; height: 620px; }
.phone {
  position: absolute; width: 272px; aspect-ratio: 1284 / 2778;
  border-radius: 40px; padding: 9px;
  background: linear-gradient(160deg, #22394a, #0c1a24);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 90px rgba(0, 0, 0, .6), 0 0 80px rgba(79, 227, 207, .10);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }
.phone.front { right: 8%; top: 0; z-index: 2; }
.phone.back { right: 50%; top: 70px; transform: rotate(-6deg); opacity: .9; }
.glow-ball {
  position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 18px var(--lime), 0 0 50px rgba(200, 255, 61, .6); right: 4%; top: 46%; z-index: 3;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-26px); } }
@media (max-width: 920px) {
  .hero { padding-top: 44px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { height: 520px; }
  .phone { width: 228px; }
  .phone.front { right: calc(50% - 200px); }
  .phone.back { right: calc(50% - 20px); top: 50px; }
  .glow-ball { right: calc(50% - 232px); }
}
@media (max-width: 480px) {
  .phones { height: 430px; }
  .phone { width: 188px; border-radius: 30px; padding: 7px; }
  .phone img { border-radius: 24px; }
  .phone.front { right: calc(50% - 170px); }
  .phone.back { right: calc(50% - 10px); }
  .glow-ball { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .glow-ball, .pulse-line path { animation: none; stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}

/* ---------- Stats ---------- */
.stats { padding: 24px 0 8px; }
.stats ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(15, 34, 48, .6);
}
.stats li { padding: 22px 24px; border-left: 1px solid var(--line); }
.stats li:first-child { border-left: 0; }
.stats b { display: block; font: 800 34px/1 var(--display); color: var(--text); margin-bottom: 6px; }
.stats span { color: var(--dim); font-size: 14.5px; }
@media (max-width: 720px) {
  .stats ul { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
section.block { padding: 96px 0; }
.section-head { max-width: 660px; margin-bottom: 44px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--dim); font-size: 18px; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li {
  position: relative; padding: 28px 26px 26px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
}
.steps li::before {
  counter-increment: s; content: "0" counter(s);
  font: 800 14px/1 var(--display); letter-spacing: .12em; color: var(--teal);
  display: block; margin-bottom: 18px;
}
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; color: var(--dim); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 56px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .feature-media { order: 2; }
.feature-media { display: flex; justify-content: center; }
.feature-media .phone { position: relative; width: 250px; }
.feature .tag {
  display: inline-block; font: 700 12px/1 var(--display); letter-spacing: .16em; text-transform: uppercase;
  color: var(--lime); border: 1px solid rgba(200, 255, 61, .35); border-radius: 999px; padding: 7px 11px; margin-bottom: 16px;
}
.feature h3 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; text-transform: uppercase; margin-bottom: 14px; }
.feature p { color: var(--dim); font-size: 17px; margin: 0 0 14px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; color: var(--text); }
.ticks li::before {
  content: ""; flex: 0 0 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--teal) 0 4px, rgba(79, 227, 207, .16) 5px);
}
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; gap: 32px; padding: 44px 0; }
  .feature.flip .feature-media { order: 0; }
  .feature-media .phone { width: 220px; }
}

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  padding: 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: rgba(15, 34, 48, .7);
}
.card .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: rgba(79, 227, 207, .1); color: var(--teal);
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { font-size: 18px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--dim); font-size: 15px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.gallery {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 16px 22px;
  margin: 0 -16px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; }
.gallery img {
  height: 520px; width: auto; border-radius: 26px; border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.gallery figcaption { color: var(--faint); font-size: 13.5px; margin-top: 10px; text-align: center; }
@media (max-width: 560px) { .gallery img { height: 420px; } }

.cta-band {
  position: relative; overflow: hidden; text-align: center;
  border-radius: 28px; padding: 72px 24px; border: 1px solid var(--line-strong);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(79, 227, 207, .22), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--dim); font-size: 18px; margin: 0 auto 30px; max-width: 32em; }

/* ---------- Document pages (privacy / terms / support) ---------- */
.doc-hero { padding: 64px 0 28px; }
.doc-hero h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 14px; }
.doc-hero .meta { color: var(--faint); font-size: 14.5px; margin: 0; }
.summary {
  border: 1px solid var(--line-strong); border-left: 3px solid var(--teal); border-radius: 14px;
  background: rgba(79, 227, 207, .06); padding: 18px 22px; margin: 28px 0 8px; color: var(--text); font-size: 16.5px;
}
.summary p { margin: 0; }
.doc { padding-bottom: 96px; }
.doc h2 {
  font-size: 22px; text-transform: none; font-weight: 700; letter-spacing: .01em;
  margin: 48px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
  display: flex; gap: 12px; align-items: baseline;
}
.doc h2 .n { font: 700 13px/1 var(--display); color: var(--teal); letter-spacing: .1em; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--dim); }
.doc strong { color: var(--text); }
.doc ul { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--teal); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 8px 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 13px 16px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { font: 700 12px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); background: rgba(15, 34, 48, .6); }
td { color: var(--dim); }
td:first-child { color: var(--text); font-weight: 600; }
.providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.provider { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: rgba(15, 34, 48, .6); }
.provider .who { font: 700 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin: 0 0 10px; }
.provider p { margin: 0 0 6px; font-size: 14.5px; }
.provider p:last-child { margin: 0; }
.pill { display: inline-block; font: 700 11px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; margin-bottom: 8px; }
.pill.ok { color: var(--teal); background: rgba(79, 227, 207, .12); }
.pill.opt { color: var(--gold); background: rgba(246, 199, 72, .12); }

.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 24px 26px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); margin: 28px 0 8px;
}
.contact-card .label { color: var(--faint); font-size: 13.5px; margin: 0 0 4px; }
.contact-card .mail { font: 700 18px/1.3 var(--display); letter-spacing: .02em; margin: 0; overflow-wrap: anywhere; }
.contact-card .mail a { color: var(--text); text-decoration: none; }

.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: rgba(15, 34, 48, .7); padding: 0 20px; }
.faq details[open] { border-color: var(--line-strong); padding-bottom: 18px; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font: 700 16.5px/1.35 var(--display); color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 24px/1 var(--display); color: var(--teal); flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 10px; color: var(--dim); }
.faq details p:last-child { margin: 0; }

.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.spec div { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: rgba(15, 34, 48, .6); }
.spec .k { font: 700 11.5px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.spec .v { margin: 0; color: var(--text); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 44px; margin-top: 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer p { color: var(--faint); font-size: 14.5px; margin: 12px 0 0; max-width: 26em; }
.site-footer h4 { font: 700 12px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 6px 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer ul a { color: var(--dim); text-decoration: none; font-size: 15px; }
.site-footer ul a:hover { color: var(--text); }
.legal { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 8px; }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* Self-drawn App Store badge (no external image dependency). */
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background: #000; color: #fff; border-radius: 14px; padding: 10px 22px 10px 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35), 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.store-badge:hover { color: #fff; transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6), 0 14px 36px rgba(0, 0, 0, .45); }
.store-badge svg { width: 30px; height: 30px; flex-shrink: 0; }
.store-badge > span { display: flex; flex-direction: column; font: 600 24px/1 var(--body); letter-spacing: -.01em; }
.store-badge small { font-size: 12px; font-weight: 500; letter-spacing: .01em; margin-bottom: 3px; opacity: .9; }

/* The header button keeps its own colours over the generic nav link style. */
.nav a.btn, .nav a.btn:hover { color: #04161a; background: linear-gradient(180deg, #6ff0de, var(--teal) 55%, var(--teal-2)); }
@media (max-width: 860px) { .nav .header-cta { display: none; } }

/* Phone: table rows become stacked cards so nothing scrolls sideways. */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; }
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { border: 1px solid var(--line); border-radius: 14px; background: rgba(15, 34, 48, .6); margin-bottom: 12px; padding: 6px 0; }
  td { border: 0; padding: 8px 16px; }
  td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font: 700 11px/1.3 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  }
  td:first-child { font-size: 16px; }
}
