/* Royalpie — shared design system */

:root {
  --bg: #0a0a0f;
  --bg-raised: #111318;
  --bg-card: #15171e;
  --border: #23262f;
  --text: #f2f3f5;
  --text-muted: #9aa0ac;
  --text-faint: #666b78;
  --cyan: #42ded1;
  --blue: #0798ff;
  --gradient: linear-gradient(120deg, var(--cyan), var(--blue));
  --danger: #ff5c72;
  --success: #42ded1;
  --radius: 14px;
  --radius-sm: 9px;
  --max-width: 1120px;
  --shadow-lg: 0 20px 60px -20px rgba(7, 152, 255, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 85% -5%, rgba(7, 152, 255, 0.16), transparent 60%),
    radial-gradient(500px 380px at 5% 10%, rgba(66, 222, 209, 0.10), transparent 60%);
}

a {
  color: inherit;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(10, 10, 15, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.wordmark {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--text);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Language toggle */

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: var(--bg-raised);
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-toggle button.is-active {
  background: var(--bg-card);
  color: var(--text);
}

/* CTA button */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient);
  color: #05070a;
  padding: 11px 22px;
  box-shadow: 0 8px 24px -8px rgba(7, 152, 255, 0.55);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(7, 152, 255, 0.7);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.nav__cta {
  padding: 9px 18px;
  font-size: 0.88rem;
}

/* Mobile nav toggle (kept simple: links collapse to just CTA below a breakpoint) */

.nav__burger {
  display: none;
}

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

main {
  display: block;
}

.hero {
  padding: 96px 24px 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(66, 222, 209, 0.08);
  border: 1px solid rgba(66, 222, 209, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  max-width: 820px;
  font-weight: 800;
}

.hero h1 .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 0 40px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.hero__note {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--text-faint);
}

section {
  padding: 72px 24px;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 800;
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(7, 152, 255, 0.12);
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.compare {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.compare .card.bad {
  border-color: rgba(255, 92, 114, 0.25);
}

.compare .card.bad h3 {
  color: #ff8b9b;
}

.compare .card.good {
  border-color: rgba(66, 222, 209, 0.3);
  background: linear-gradient(180deg, rgba(66, 222, 209, 0.06), transparent 40%), var(--bg-card);
}

.compare .card.good h3 {
  color: var(--cyan);
}

.compare ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.compare li {
  margin-bottom: 8px;
}

.cta-band {
  text-align: center;
  padding: 88px 24px;
  border-top: 1px solid var(--border);
}

.cta-band h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 0 0 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-band p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

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

footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.footer__legal {
  font-size: 0.8rem;
  color: var(--text-faint);
  max-width: 460px;
  line-height: 1.6;
}

/* ---------- Simple pages (contact / privacy) ---------- */

.page {
  padding: 72px 24px 96px;
  max-width: 780px;
  margin: 0 auto;
}

.page h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page > p.lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 40px;
}

.page h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
  font-weight: 700;
}

.page p,
.page li {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.page ul {
  padding-left: 20px;
}

.notice {
  display: flex;
  gap: 12px;
  background: rgba(7, 152, 255, 0.08);
  border: 1px solid rgba(7, 152, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 40px;
  font-size: 0.92rem;
  color: var(--text);
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 28px 0;
}

.info-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 20px;
  margin: 0;
}

.info-card dt {
  color: var(--text-faint);
  font-size: 0.85rem;
}

.info-card dd {
  margin: 0;
  font-size: 0.95rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.contact-methods .card {
  text-align: left;
}

.contact-methods a.email {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}

.modal__close:hover {
  color: var(--text);
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 800;
}

.modal p.modal__sub {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  padding: 11px 14px;
  font-family: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(66, 222, 209, 0.15);
}

.form-msg {
  margin-top: 14px;
  font-size: 0.88rem;
  min-height: 1.2em;
}

.form-msg.success {
  color: var(--success);
}

.form-msg.error {
  color: var(--danger);
}

.form-msg[hidden] {
  display: none;
}

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

@media (max-width: 860px) {
  .grid-3,
  .compare,
  .contact-methods {
    grid-template-columns: 1fr;
  }

  .nav__links {
    display: none;
  }

  .footer__inner {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 64px 20px 56px;
  }

  section {
    padding: 56px 20px;
  }

  .nav__inner {
    padding: 14px 16px;
  }

  .nav__cta span.full {
    display: none;
  }
}
