/* RDG Tecnology — Design tokens + base styles */

:root {
  /* Brand palette derived from logo */
  --rdg-navy-900: #0a1929;
  --rdg-navy-800: #0f2740;
  --rdg-navy-700: #16365c;
  --rdg-navy-600: #1e4a7a;
  --rdg-navy-500: #2a6097;
  --rdg-navy-400: #4a7eb3;
  --rdg-teal-700: #1f6e6e;
  --rdg-teal-600: #2a8e8e;
  --rdg-teal-500: #36a8a8;
  --rdg-teal-400: #58c0bf;
  --rdg-teal-300: #87d4d3;

  /* Semantic — light mode (default) */
  --bg: #fafbfc;
  --bg-elev: #ffffff;
  --bg-section: #f4f6f8;
  --bg-dark: #0a1929;
  --fg: #0a1929;
  --fg-muted: #4a5a6a;
  --fg-subtle: #7e8a96;
  --border: #e3e8ed;
  --border-strong: #c9d2db;
  --accent: var(--rdg-teal-600);
  --accent-hover: var(--rdg-teal-700);
  --accent-soft: rgba(42, 142, 142, 0.08);
  --primary: var(--rdg-navy-900);
  --primary-hover: var(--rdg-navy-800);
  --on-dark: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.68);
  --on-dark-subtle: rgba(255, 255, 255, 0.42);
  --on-dark-border: rgba(255, 255, 255, 0.12);

  --shadow-sm: 0 1px 2px rgba(10, 25, 41, 0.04);
  --shadow: 0 4px 16px rgba(10, 25, 41, 0.06), 0 1px 2px rgba(10, 25, 41, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(10, 25, 41, 0.18), 0 8px 16px -8px rgba(10, 25, 41, 0.08);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-sans: 'Inter Tight', 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-display: 'Fraunces', 'Inter Tight', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
}

[data-theme="dark"] {
  --bg: #0a1118;
  --bg-elev: #0f1923;
  --bg-section: #0c141d;
  --bg-dark: #050a10;
  --fg: #e8edf2;
  --fg-muted: #9aa8b6;
  --fg-subtle: #6a7886;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: var(--rdg-teal-400);
  --accent-hover: var(--rdg-teal-300);
  --accent-soft: rgba(88, 192, 191, 0.12);
  --primary: #ffffff;
  --primary-hover: #e8edf2;
  --on-dark: #0a1118;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.5), 0 8px 16px -8px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

body { font-feature-settings: "ss01", "cv11"; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent); color: white; }

/* Custom cursor */
.rdg-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s, border-color 0.2s;
  mix-blend-mode: difference;
  display: none;
}
.rdg-cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .rdg-cursor, .rdg-cursor-dot { display: block; }
  body.rdg-hide-cursor { cursor: none; }
  body.rdg-hide-cursor a, body.rdg-hide-cursor button, body.rdg-hide-cursor input, body.rdg-hide-cursor textarea, body.rdg-hide-cursor select { cursor: none; }
}
.rdg-cursor.hover {
  width: 56px; height: 56px;
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Type system */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(44px, 6.5vw, 88px);
  font-weight: 350;
}
.h-section {
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 350;
}
.h-card {
  font-size: 22px;
  letter-spacing: -0.015em;
}

p { margin: 0; text-wrap: pretty; }
.lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--fg-muted);
  max-width: 60ch;
  line-height: 1.55;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-dark);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
[data-theme="dark"] .btn-primary { color: var(--bg); }
[data-theme="dark"] .btn-primary:hover { color: white; }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--fg);
  background: var(--accent-soft);
}
.btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn .arrow {
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* Sections */
section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section-title-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: clamp(40px, 6vw, 72px);
  max-width: 760px;
}

/* Reveal animation — keyframe-based (transition-pipeline issues avoided) */
@keyframes rdgRevealUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rdgRevealUpSm {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.in {
  animation: rdgRevealUp 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.reveal-stagger > * { opacity: 0; }
.reveal-stagger.in > * {
  animation: rdgRevealUpSm 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.reveal-stagger.in > *:nth-child(1) { animation-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { animation-delay: 60ms; }
.reveal-stagger.in > *:nth-child(3) { animation-delay: 120ms; }
.reveal-stagger.in > *:nth-child(4) { animation-delay: 180ms; }
.reveal-stagger.in > *:nth-child(5) { animation-delay: 240ms; }
.reveal-stagger.in > *:nth-child(6) { animation-delay: 300ms; }
.reveal-stagger.in > *:nth-child(7) { animation-delay: 360ms; }
.reveal-stagger.in > *:nth-child(8) { animation-delay: 420ms; }
.reveal-stagger.in > *:nth-child(9) { animation-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1; animation: none; }
  .reveal.in, .reveal-stagger.in > * { animation: none; }
}

/* Utility */
.divider-dot::after {
  content: '·';
  margin: 0 8px;
  color: var(--fg-subtle);
}
