* { box-sizing: border-box; }
html, body { height: 100%; }

:root {
  --container: 1200px;
  --container-narrow: 800px;
  --container-wide: 1400px;
  --header-h: 78px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 0 rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 2px 0 rgba(16, 24, 40, 0.06), 0 16px 50px rgba(16, 24, 40, 0.10);
  --shadow-lg: 0 4px 0 rgba(16, 24, 40, 0.04), 0 24px 64px rgba(16, 24, 40, 0.14);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 200ms;
  --brand: #10AFC8;
  --brand-rgb: 16, 175, 200;
  --brand-dark: #0d8fa5;
  --brand-light: #67e8f9;
  --canvas: #ffffff;
  --surface: #ffffff;
  --surface-2: #F6FAFF;
  --surface-3: #EDF2F7;
  --text: #0F172A;
  --text-secondary: #334155;
  --muted: #66748B;
  --border: rgba(148, 163, 184, 0.35);
  --border-strong: rgba(148, 163, 184, 0.55);
  --link: #0E8EA5;
  --focus: rgba(var(--brand-rgb), 0.22);
  --gradient-1: rgba(16, 175, 200, 0.03);
  --gradient-2: rgba(139, 92, 246, 0.02);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
}

html[data-theme="dark"] {
  --canvas: #090f1a;
  --surface: #0f1829;
  --surface-2: #141f33;
  --surface-3: #1a2744;
  --text: #e6eefc;
  --text-secondary: #b8c5d9;
  --muted: #9aa9c2;
  --border: rgba(148, 163, 184, 0.25);
  --border-strong: rgba(148, 163, 184, 0.35);
  --link: #4bd6eb;
  --gradient-1: rgba(16, 175, 200, 0.08);
  --gradient-2: rgba(139, 92, 246, 0.06);
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 22px); }
section[id] { scroll-margin-top: calc(var(--header-h) + 22px); }

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

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--canvas);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 25% 25%, var(--gradient-1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, var(--gradient-2) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, var(--gradient-1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: gradientShift 25s ease infinite;
  opacity: 0.7;
}

@keyframes gradientShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(3%, 3%) rotate(3deg); }
  66% { transform: translate(-3%, 3%) rotate(-3deg); }
}

main, header, footer { position: relative; z-index: 1; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--brand); }

.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }
.container-narrow { width: min(var(--container-narrow), calc(100% - 48px)); margin: 0 auto; }
.container-wide { width: min(var(--container-wide), calc(100% - 48px)); margin: 0 auto; }
.section { padding: 100px 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: none; }

h1, h2, h3, h4, h5, h6 { 
  font-family: 'Cabinet Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  line-height: 1.15; 
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
}

h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; }
h3 { font-size: clamp(20px, 2.5vw, 28px); font-weight: 700; }
h4 { font-size: clamp(18px, 2vw, 22px); font-weight: 700; }

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.lead { font-size: clamp(18px, 2vw, 20px); line-height: 1.6; max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.section-title { margin-bottom: 20px; }
.section-subtitle { font-size: clamp(18px, 2vw, 20px); color: var(--muted); max-width: 700px; line-height: 1.6; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  z-index: 9999;
}
.skip-link:focus { left: 10px; outline: none; box-shadow: 0 0 0 4px var(--focus); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.icon-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); background: var(--surface-2); }
.icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
.icon-btn svg { color: var(--text); opacity: 0.9; }

svg.icon { display: block; }
html[data-theme="light"] svg.icon-sun { display: none; }
html[data-theme="dark"] svg.icon-moon { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  user-select: none;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); color: var(--text); }
.btn:active { transform: translateY(0px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }

.btn-primary { background: var(--brand); border-color: rgba(var(--brand-rgb), 0.35); color: #ffffff; }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(var(--brand-rgb), 0.28); color: #ffffff; }
.btn-secondary { background: var(--surface); }
.btn-glass { background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(8px); border-color: rgba(255, 255, 255, 0.15); }
html[data-theme="dark"] .btn-glass { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-xl { padding: 16px 32px; font-size: 17px; font-weight: 600; }
.btn-glow { position: relative; }
.btn-glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.4), rgba(var(--brand-rgb), 0.1));
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  z-index: -1;
  filter: blur(12px);
}
.btn-glow:hover::before { opacity: 1; }

.input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input:focus { outline: none; border-color: rgba(var(--brand-rgb), 0.45); box-shadow: 0 0 0 4px var(--focus); }
.input::placeholder { color: var(--muted); }
.label { display: grid; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text-secondary); }
.form { display: grid; gap: 16px; }
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }

.reveal { opacity: 0; transform: translateY(8px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal-premium { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal-premium.is-in { opacity: 1; transform: translateY(0); }
.reveal-premium-delay { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease) 200ms, transform 600ms var(--ease) 200ms; }
.reveal-premium-delay.is-in { opacity: 1; transform: translateY(0); }
.reveal-premium-scroll { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.reveal-premium-scroll.is-in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-premium, .reveal-premium-delay, .reveal-premium-scroll { opacity: 1; transform: none; transition: none; }
}

.text-center { text-align: center; }
.mt { margin-top: 24px; }
.mb { margin-bottom: 24px; }

@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .container { width: calc(100% - 32px); }
  .form-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
