/* ==========================================================================
   Dua Rank — Design tokens
   ========================================================================== */
:root {
  --color-void: #071634;
  --color-surface: #0e2050;
  --color-surface-2: #16276a;
  --color-border: #22306e;
  --color-border-soft: #14204a;

  --color-ink: #ffffff;
  --color-muted: #a9b0d0;
  --color-faint: #6f77a8;

  --color-primary: #3025c9;
  --color-primary-bright: #7024e8;
  --color-accent: #9416f4;
  --color-cta: #7024e8;
  --color-cta-dark: #5a1bbd;
  --color-on-cta: #ffffff;

  --color-text: var(--color-ink);
  --color-bg: var(--color-void);
  --color-bg-alt: var(--color-surface);
  --color-navy: var(--color-void);
  --color-white: #ffffff;
  --color-primary-dark: var(--color-primary-bright);
  --color-primary-light: var(--color-accent);

  --font-heading: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 26px 64px rgba(2, 6, 23, 0.55);
  --glow-primary: 0 0 1px rgba(112, 36, 232, 0.5), 0 0 46px rgba(112, 36, 232, 0.32);
  --glow-accent: 0 0 1px rgba(148, 22, 244, 0.6), 0 0 40px rgba(148, 22, 244, 0.28);

  --container-w: 1180px;
  --header-h: 76px;
  --dur: 220ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-void);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-heading); color: var(--color-ink); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--color-muted); }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--color-surface); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-sub { font-size: 1.05rem; }

.eyebrow {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.9em;
}

.grid { display: grid; gap: 28px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 36px 48px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-cta);
  color: var(--color-on-cta);
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 13px 26px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
  min-height: 44px;
  white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%); color: #fff; }
.btn-primary:hover { box-shadow: var(--glow-accent); transform: translateY(-1px); }
.btn-cta { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%); color: #fff; }
.btn-cta:hover { box-shadow: var(--glow-accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--color-ink); border-color: var(--color-border); }
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 9px 20px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn:active { transform: translateY(1px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 22, 52, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  background: #ffffff;
  border-radius: 8px;
  padding: 4px 6px;
}
.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-ink);
}
.site-nav ul { display: flex; gap: 32px; }
.site-nav a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-muted);
  transition: color var(--dur) var(--ease);
}
.site-nav a:hover { color: var(--color-accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--color-ink);
  margin-inline: auto;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: var(--color-void);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav ul { flex-direction: column; padding: 24px; gap: 4px; }
  .site-nav a { display: block; padding: 12px 8px; }
  .header-actions .btn-sm { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: 96px 0 104px; overflow: clip; position: relative; }
.hero::before {
  content: '';
  position: absolute;
  top: -240px;
  right: -160px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(112, 36, 232, 0.32) 0%, rgba(112, 36, 232, 0) 68%);
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -260px;
  left: -180px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(48, 37, 201, 0.22) 0%, rgba(48, 37, 201, 0) 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(2.6rem, 4.6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.text-accent {
  background: linear-gradient(135deg, #a78bfa 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede { font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 24px; }
.hero-trust { display: flex; gap: 24px; flex-wrap: wrap; font-size: 0.88rem; color: var(--color-muted); }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust .icon { color: var(--color-accent); width: 18px; height: 18px; }

.hero-visual {
  position: relative;
  height: 380px;
}
.rank-card {
  position: absolute;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  width: 220px;
}
.rank-card-1 { top: 0; right: 10px; z-index: 3; box-shadow: var(--shadow-lg), var(--glow-primary); }
.rank-card-2 { top: 130px; left: 0; z-index: 2; width: 190px; }
.rank-card-3 { bottom: 0; right: 60px; z-index: 1; width: 190px; }
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  margin-bottom: 14px;
}
.rank-card .icon-lg { color: var(--color-accent); margin-bottom: 14px; }
.rank-card-lines span {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--color-surface-2);
  margin-bottom: 8px;
}
.rank-card-lines span:first-child { width: 90%; }
.rank-card-lines span:last-child { width: 60%; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 300px; margin-top: 16px; }
}

/* ==========================================================================
   Cards / Services
   ========================================================================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md), var(--glow-primary); border-color: var(--color-primary-bright); }
.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(148, 22, 244, 0.15);
  color: #b98bff;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.08rem; margin-bottom: 0.4em; }
.card p { font-size: 0.95rem; margin-bottom: 0; }

/* ==========================================================================
   Process steps
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step {
  position: relative;
  padding: 32px 26px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.step-num {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.3rem;
  background: linear-gradient(135deg, #a78bfa 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
.step h3 { font-size: 1.12rem; }
.step p { font-size: 0.95rem; margin-bottom: 0; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Why us
   ========================================================================== */
.value-row { display: flex; gap: 18px; align-items: flex-start; }
.value-row .icon-md { color: var(--color-accent); flex-shrink: 0; margin-top: 3px; }
.value-row h3 { font-size: 1.02rem; margin-bottom: 0.3em; }
.value-row p { font-size: 0.95rem; margin-bottom: 0; }

.origin-note {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
  font-size: 1.1rem;
  color: var(--color-ink);
  max-width: 70ch;
}
.origin-note em { color: var(--color-accent); font-style: normal; font-weight: 600; }

/* ==========================================================================
   CTA band / contact
   ========================================================================== */
.cta-band { padding: 100px 0; background: var(--color-surface); position: relative; overflow: clip; border-top: 1px solid var(--color-border-soft); }
.cta-band::before {
  content: '';
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 780px;
  height: 480px;
  background: radial-gradient(ellipse, rgba(112, 36, 232, 0.25) 0%, rgba(112, 36, 232, 0) 70%);
  pointer-events: none;
}
.cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  position: relative;
}
.cta-copy h2 { color: var(--color-ink); font-size: clamp(1.8rem, 3vw, 2.4rem); }
.cta-copy p { color: var(--color-muted); font-size: 1.05rem; max-width: 42ch; }

.contact-form {
  background: var(--color-void);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 6px;
  color: var(--color-ink);
}
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-ink);
  background: var(--color-surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  min-height: 44px;
}
.form-row textarea { min-height: 88px; resize: vertical; }
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--color-faint); }
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--color-primary-bright);
  background: var(--color-surface-2);
}
.form-note { font-size: 0.85rem; text-align: center; margin: 14px 0 0; color: var(--color-muted); }
.form-note a { color: var(--color-accent); font-weight: 600; }

@media (max-width: 860px) {
  .cta-inner { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #050e26; padding: 56px 0 0; border-top: 1px solid var(--color-border-soft); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand .brand-name { color: var(--color-ink); }
.footer-brand p { color: var(--color-faint); font-size: 0.9rem; margin-top: 12px; }
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .footer-contact a { color: var(--color-muted); font-size: 0.92rem; transition: color var(--dur) var(--ease); }
.footer-nav a:hover, .footer-contact a:hover { color: var(--color-accent); }
.footer-bottom { padding: 22px 0; }
.footer-bottom p { color: var(--color-faint); font-size: 0.82rem; margin: 0; }

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Icons
   ========================================================================== */
.icon { width: 20px; height: 20px; }
.icon-md { width: 26px; height: 26px; }
.icon-lg { width: 28px; height: 28px; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
