/* USANRetirement design system — soft, warm, dignified */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Cream / coral default palette */
  --cream-100: oklch(0.985 0.012 80);
  --cream-200: oklch(0.965 0.018 78);
  --cream-300: oklch(0.94 0.025 75);
  --cream-400: oklch(0.90 0.035 72);

  --ink-900: oklch(0.22 0.012 50);
  --ink-700: oklch(0.38 0.012 50);
  --ink-500: oklch(0.55 0.010 55);
  --ink-300: oklch(0.78 0.012 60);

  --accent: oklch(0.68 0.13 35);
  /* warm coral */
  --accent-soft: oklch(0.92 0.05 35);
  --accent-deep: oklch(0.52 0.14 32);
  --accent-text: oklch(0.99 0.005 80);

  --sage: oklch(0.62 0.06 145);
  --sage-soft: oklch(0.92 0.03 140);

  --gold: oklch(0.72 0.10 80);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  --shadow-soft: 0 1px 2px oklch(0.25 0.02 50 / 0.04), 0 8px 24px oklch(0.25 0.02 50 / 0.06);
  --shadow-card: 0 2px 4px oklch(0.25 0.02 50 / 0.05), 0 16px 40px oklch(0.25 0.02 50 / 0.08);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --max-w: 1180px;

  --space-1: 6px;
  --space-2: 12px;
  --space-3: 20px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 72px;
  --space-7: 112px;
  --space-8: 160px;
}

/* Density variants — toggled by data-density on root */
[data-density="compact"] {
  --space-5: 36px;
  --space-6: 56px;
  --space-7: 80px;
  --space-8: 110px;
}

/* Palette variants */
[data-palette="terracotta"] {
  --accent: oklch(0.58 0.13 38);
  --accent-soft: oklch(0.90 0.05 38);
  --accent-deep: oklch(0.45 0.13 35);
  --cream-100: oklch(0.975 0.018 70);
  --cream-200: oklch(0.95 0.025 68);
  --cream-300: oklch(0.92 0.035 65);
}

[data-palette="sage"] {
  --accent: oklch(0.55 0.08 150);
  --accent-soft: oklch(0.92 0.04 145);
  --accent-deep: oklch(0.42 0.08 148);
  --cream-100: oklch(0.985 0.012 110);
  --cream-200: oklch(0.96 0.020 110);
  --cream-300: oklch(0.93 0.028 108);
}

[data-palette="gold"] {
  --accent: oklch(0.68 0.11 75);
  --accent-soft: oklch(0.93 0.05 80);
  --accent-deep: oklch(0.52 0.11 72);
  --cream-100: oklch(0.985 0.014 88);
  --cream-200: oklch(0.96 0.020 85);
  --cream-300: oklch(0.93 0.028 82);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--cream-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'ss02';
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.05;
}

h2 {
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.1;
}

h3 {
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.2;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

button {
  font-family: var(--font-body);
  font-size: 18px;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- shared layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

.section {
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 18px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 60px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 8px 22px oklch(from var(--accent) l c h / 0.35);
}

.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px oklch(from var(--accent) l c h / 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--ink-900);
  border: 1.5px solid var(--ink-300);
}

.btn-secondary:hover {
  border-color: var(--ink-900);
  background: var(--cream-200);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  text-decoration: underline;
  text-decoration-color: var(--ink-300);
  text-underline-offset: 4px;
  height: auto;
  padding: 4px 0;
}

/* ---------- placeholder photo ---------- */
.photo-ph {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    linear-gradient(135deg, oklch(from var(--accent-soft) l c h) 0%, var(--cream-300) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
}

.photo-ph::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 35%, oklch(from var(--accent) l c h / 0.18) 0%, transparent 55%),
    radial-gradient(circle at 75% 70%, oklch(0.85 0.04 60 / 0.4) 0%, transparent 60%);
  pointer-events: none;
}

.photo-ph .ph-label {
  position: relative;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-700);
  background: oklch(from var(--cream-100) l c h / 0.85);
  padding: 6px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

/* ---------- card ---------- */
.card {
  background: var(--cream-100);
  border-radius: var(--radius-lg);
  border: 1px solid var(--cream-300);
  padding: 36px;
}

.card-elevated {
  background: var(--cream-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 36px;
}

/* ---------- scroll fade-in ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: oklch(from var(--cream-100) l c h / 0.82);
  border-bottom: 1px solid oklch(from var(--cream-300) l c h / 0.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-brand-mark {
  height: 80px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 16px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-700);
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--ink-900);
}

@media (max-width: 820px) {
  .nav-links a:not(.btn) {
    display: none;
  }
}

@media (max-width: 540px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section {
    padding-top: var(--space-5);
    padding-bottom: var(--space-5);
  }

  .nav {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .btn-lg,
  .btn {
    font-size: 16px;
    padding: 12px 20px;
  }
}

/* ---------- form ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-700);
}

.field input,
.field select {
  font-family: var(--font-body);
  font-size: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--cream-400);
  background: var(--cream-100);
  color: var(--ink-900);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 56px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field.error input,
.field.error select {
  border-color: oklch(0.55 0.18 25);
}

.field-error {
  font-size: 13px;
  color: oklch(0.50 0.18 25);
  margin-top: 2px;
}

/* ---------- waveform ---------- */
.wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 64px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.wave:hover {
  transform: scale(1.05);
}

.wave-bar {
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  animation: wave 1.6s ease-in-out infinite;
  transition: background 0.3s ease;
}

.wave:hover .wave-bar {
  animation-duration: 0.8s;
  background: linear-gradient(180deg, var(--accent-deep), var(--accent));
}

@keyframes wave {

  0%,
  100% {
    height: 18%;
  }

  50% {
    height: 100%;
  }
}