/* style.css — Riggs Financial LLC design system + components */

/* ============ FONTS ============ */
/* Playfair Display (authoritative serif display) + DM Sans (clean sans body) via Google Fonts */

/* ============ DESIGN TOKENS ============ */
:root {
  /* Type scale — fluid clamp() */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);
  --text-hero: clamp(2.75rem, 0.8rem + 6vw, 6rem);

  /* Spacing — 4px system */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.4rem;
  --radius-lg: 0.6rem;
  --radius-xl: 0.85rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1220px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
}

/* ============ LIGHT MODE (default) — Navy + warm neutral + brass ============ */
:root,
[data-theme='light'] {
  /* Surfaces — warm ivory/parchment neutrals */
  --color-bg: #f6f3ec;
  --color-surface: #fbf9f4;
  --color-surface-2: #ffffff;
  --color-surface-offset: #efe9dc;
  --color-surface-offset-2: #e7dfcd;
  --color-border: #ddd3bc;
  --color-divider: #e5dcc8;

  /* Text — deep navy-charcoal ink */
  --color-text: #1b2333;
  --color-text-muted: #545f72;
  --color-text-faint: #8b93a3;
  --color-text-inverse: #f6f3ec;

  /* Primary — deep navy */
  --color-primary: #16233f;
  --color-primary-hover: #0d1830;
  --color-primary-active: #091022;
  --color-primary-highlight: #dbe0ea;

  /* Accent — restrained brass/gold */
  --color-accent: #a97e34;
  --color-accent-hover: #8c6527;
  --color-accent-active: #6f4f1e;
  --color-accent-highlight: #ecdfc3;

  /* Semantic */
  --color-warning: #92451a;
  --color-warning-highlight: #e6d3c4;
  --color-error: #9c2b3a;
  --color-error-highlight: #e6cdd0;
  --color-success: #3d6b3f;
  --color-success-highlight: #d4e0d1;

  --shadow-sm: 0 1px 2px oklch(0.2 0.03 260 / 0.08);
  --shadow-md: 0 4px 14px oklch(0.2 0.03 260 / 0.1);
  --shadow-lg: 0 14px 36px oklch(0.2 0.03 260 / 0.14);
}

/* ============ DARK MODE — deep navy surfaces, warm brass accent ============ */
[data-theme='dark'] {
  --color-bg: #0d1526;
  --color-surface: #121b30;
  --color-surface-2: #17213a;
  --color-surface-offset: #182238;
  --color-surface-offset-2: #1e2a44;
  --color-border: #2c3a56;
  --color-divider: #263450;

  --color-text: #e8e6dd;
  --color-text-muted: #a3aabb;
  --color-text-faint: #6c7690;
  --color-text-inverse: #0d1526;

  --color-primary: #cdd8ec;
  --color-primary-hover: #eef2f9;
  --color-primary-active: #ffffff;
  --color-primary-highlight: #24314d;

  --color-accent: #d3a75c;
  --color-accent-hover: #e3bc79;
  --color-accent-active: #f0cf9a;
  --color-accent-highlight: #3a3020;

  --color-warning: #d99461;
  --color-warning-highlight: #3d2c20;
  --color-error: #dd8a92;
  --color-error-highlight: #3a2226;
  --color-success: #8fbf8a;
  --color-success-highlight: #22301f;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0d1526;
    --color-surface: #121b30;
    --color-surface-2: #17213a;
    --color-surface-offset: #182238;
    --color-surface-offset-2: #1e2a44;
    --color-border: #2c3a56;
    --color-divider: #263450;
    --color-text: #e8e6dd;
    --color-text-muted: #a3aabb;
    --color-text-faint: #6c7690;
    --color-text-inverse: #0d1526;
    --color-primary: #cdd8ec;
    --color-primary-hover: #eef2f9;
    --color-primary-active: #ffffff;
    --color-primary-highlight: #24314d;
    --color-accent: #d3a75c;
    --color-accent-hover: #e3bc79;
    --color-accent-active: #f0cf9a;
    --color-accent-highlight: #3a3020;
    --color-warning: #d99461;
    --color-warning-highlight: #3d2c20;
    --color-error: #dd8a92;
    --color-error-highlight: #3a2226;
    --color-success: #8fbf8a;
    --color-success-highlight: #22301f;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}

/* ============ GLOBAL LAYOUT HELPERS ============ */
.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--narrow {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

main {
  display: block;
}

section {
  padding-block: clamp(var(--space-10), 5vw, var(--space-20));
}

.hero {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text);
}
h1 {
  font-size: var(--text-2xl);
}
h2 {
  font-size: var(--text-xl);
}
h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}
.hero h1 {
  font-size: var(--text-2xl);
  line-height: 1.15;
}

p {
  color: var(--color-text-muted);
  max-width: 68ch;
}
p.lede {
  font-size: var(--text-lg);
  color: var(--color-text);
  max-width: 62ch;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
[data-theme='dark'] a,
@media (prefers-color-scheme: dark) {
  a {
    color: var(--color-accent);
  }
}
a.text-link {
  color: var(--color-accent);
  border-bottom: 1px solid oklch(from var(--color-accent) l c h / 0.4);
}
a.text-link:hover {
  border-color: var(--color-accent);
}

/* ============ SKIP LINK ============ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-5);
  z-index: 100;
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.brand svg {
  width: 34px;
  height: 34px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.brand .brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand .brand-name small {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.main-nav ul {
  display: flex;
  gap: var(--space-6);
}
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: var(--space-2) 0;
  position: relative;
}
.main-nav a:hover,
.main-nav a[aria-current='page'] {
  color: var(--color-text);
}
.main-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text);
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  min-height: 44px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: #fffdf8;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
}
.btn-secondary {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.btn-block {
  width: 100%;
}

/* ============ BANNER ============ */
.status-banner {
  background: #101a2e;
  color: #eceafc;
  border-bottom: 1px solid color-mix(in oklab, #d3a75c 45%, transparent);
}
.status-banner .container {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3);
  flex-wrap: wrap;
}
.status-banner strong {
  color: #d3a75c;
}
.status-banner .badge {
  background: color-mix(in oklab, #d3a75c 22%, transparent);
  color: #e9c988;
}
.status-banner .badge::before {
  background: #e9c988;
}
.status-banner p {
  color: #c7ccdb;
  font-size: var(--text-xs);
  max-width: none;
  margin: 0;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--space-16), 10vw, var(--space-32)) clamp(var(--space-12), 8vw, var(--space-20));
  color: #f4f1e8;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 1;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    oklch(0.16 0.03 260 / 0.82) 0%,
    oklch(0.16 0.03 260 / 0.6) 45%,
    oklch(0.16 0.03 260 / 0.32) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero .eyebrow {
  color: var(--color-accent);
}
.hero h1 {
  color: #f8f6ef;
}
.hero p.lede {
  color: color-mix(in oklab, #f4f1e8 92%, transparent);
}
.hero .eyebrow {
  margin-bottom: var(--space-4);
  display: block;
}
.hero h1 {
  margin-bottom: var(--space-6);
}
.hero p.lede {
  margin-bottom: var(--space-8);
}
.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.hero .btn-secondary {
  border-color: color-mix(in oklab, #f4f1e8 45%, transparent);
  color: #f8f6ef;
}
.hero .btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ============ CARDS ============ */
.card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

/* ============ PROCESS STEPS ============ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}
.process-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-6);
  border-top: 2px solid var(--color-accent);
}
.process-step .step-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-accent);
}
.process-step h3 {
  font-size: var(--text-base);
  font-weight: 700;
}
.process-step p {
  font-size: var(--text-sm);
}

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

/* ============ SECTION LAYOUTS ============ */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-16);
  align-items: center;
}
.split.reverse {
  grid-template-columns: 0.9fr 1.1fr;
}
.split.reverse > *:first-child {
  order: 2;
}
@media (max-width: 860px) {
  .split,
  .split.reverse {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .split.reverse > *:first-child {
    order: 0;
  }
}

.section-header {
  max-width: 640px;
  margin-bottom: var(--space-10);
}
.section-header h2 {
  margin-top: var(--space-3);
}

/* ============ FEATURE LIST (avoid 3-col icon cards; use asymmetric callouts) ============ */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.feature-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-6);
  padding-block: var(--space-8);
  border-top: 1px solid var(--color-divider);
}
.feature-row:last-child {
  border-bottom: 1px solid var(--color-divider);
}
.feature-row .feature-index {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text-faint);
}
@media (max-width: 640px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}

/* ============ CALLOUT / PULL QUOTE ============ */
.callout {
  background: var(--color-surface-offset);
  border-left: none;
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-10);
  position: relative;
}
.pull-quote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text);
  line-height: 1.5;
  max-width: 60ch;
}
.pull-quote cite {
  display: block;
  margin-top: var(--space-4);
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============ FORMS ============ */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.field input,
.field textarea,
.field select {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
  min-height: 44px;
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.field-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-3);
}
.form-status {
  font-size: var(--text-sm);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  margin-top: var(--space-4);
  display: none;
}
.form-status.is-visible {
  display: block;
}
.form-status.is-info {
  background: var(--color-primary-highlight);
  color: var(--color-text);
}

/* ============ NEWSLETTER / DISCLAIMER BOXES ============ */
.disclaimer-box {
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.disclaimer-box h3 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}
.disclaimer-box p,
.disclaimer-box li {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.disclaimer-box ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.disclaimer-box li {
  position: relative;
  padding-left: var(--space-4);
}
.disclaimer-box li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-text-faint);
}

/* ============ PRE-LAUNCH BADGE ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-accent-highlight);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
  padding-block: var(--space-16) var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}
.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}
.footer-brand svg {
  width: 32px;
  height: 32px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.footer-brand p {
  font-size: var(--text-sm);
  margin-top: var(--space-2);
  max-width: 34ch;
}
.footer-col h3 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  font-weight: 700;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-col a:hover {
  color: var(--color-accent);
}
.footer-legal {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-6);
}
.footer-disclosure {
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 90ch;
  margin-bottom: var(--space-4);
}
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-meta a {
  color: var(--color-text-faint);
}
.footer-meta a:hover {
  color: var(--color-accent);
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ============ MOBILE NAV ============ */
@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    height: calc(100vh - 68px);
    height: calc(100dvh - 68px);
    background: var(--color-bg);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-6) var(--space-5);
    transform: translateX(100%);
    transition: transform var(--transition-interactive);
    z-index: 40;
    overflow-y: auto;
  }
  .main-nav.is-open {
    transform: translateX(0);
  }
  .main-nav ul {
    flex-direction: column;
    gap: var(--space-1);
  }
  .main-nav ul a {
    display: block;
    padding: var(--space-4) var(--space-2);
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--color-divider);
  }
  .nav-toggle {
    display: inline-flex;
  }
  .split {
    gap: var(--space-8);
  }
}

/* ============ MISC PAGE HERO (non-home) ============ */
.page-hero {
  padding-block: clamp(var(--space-12), 6vw, var(--space-20)) var(--space-10);
  border-bottom: 1px solid var(--color-divider);
}
.page-hero .eyebrow {
  margin-bottom: var(--space-4);
  display: block;
}
.page-hero p.lede {
  margin-top: var(--space-5);
}

/* ============ UTILITIES ============ */
.mt-0 {
  margin-top: 0;
}
.text-center {
  text-align: center;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.divider {
  height: 1px;
  background: var(--color-divider);
  border: none;
  margin-block: var(--space-10);
}
.img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
