/* Local Font Faces — Fraunces (Display Serif) & Inter (Clean Sans) */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-opsz-normal.woff2') format('woff2-variations'),
       url('/assets/fonts/fraunces-latin-opsz-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-opsz-italic.woff2') format('woff2-variations'),
       url('/assets/fonts/fraunces-latin-opsz-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-opsz-normal.woff2') format('woff2-variations'),
       url('/assets/fonts/inter-latin-opsz-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-opsz-italic.woff2') format('woff2-variations'),
       url('/assets/fonts/inter-latin-opsz-italic.woff2') format('woff2');
}

:root {
  /* Color Tokens */
  --navy: #050d1a;
  --navy-mid: #071222;
  --navy-card: #0b1a30;
  --navy-card-hover: #0f2442;
  --navy-border: #102038;
  --navy-border-glow: rgba(0, 195, 255, 0.25);

  --neon: #00c3ff;
  --neon-dim: rgba(0, 195, 255, 0.15);
  --neon-green: #00ffa3;
  --neon-green-dim: rgba(0, 255, 163, 0.15);

  --gold: #c8a232;
  --gold-light: #f0c84a;
  --gold-glow: rgba(200, 162, 50, 0.22);

  --white: #eef5ff;
  --white-dim: rgba(238, 245, 255, 0.72);
  --white-faint: rgba(238, 245, 255, 0.38);

  --danger: #ff4d6d;
  --danger-dim: rgba(255, 77, 109, 0.15);

  /* Typography Stack */
  --font-serif: 'Fraunces', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  /* Layout & Spacing */
  --container-max: 1120px;
  --header-height: 72px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
  background-color: var(--navy);
  color: var(--white);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--white);
  background-color: var(--navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Subtle Grid Texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0, 195, 255, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(200, 162, 50, 0.04) 0%, transparent 60%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 195, 255, 0.008) 2px,
      rgba(0, 195, 255, 0.008) 4px
    );
}

/* Focus Visible for Keyboard Accessibility */
:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Container */
.container {
  width: 100%;
  min-width: 0;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

img,
svg {
  max-width: 100%;
}

a,
code,
p,
li,
td,
th {
  overflow-wrap: anywhere;
}

/* Reusable layout utilities keep the CSP free of inline styles. */
.actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-surface {
  background: var(--navy-mid);
}

.centered-content {
  max-width: 700px;
  text-align: center;
}

.content-narrow {
  max-width: 860px;
}

.link-inline {
  color: var(--neon);
}

.link-inherit-strong {
  color: inherit;
  font-weight: 600;
}

/* Typography Classes */
.font-serif {
  font-family: var(--font-serif);
}

.text-gradient-neon {
  background: linear-gradient(135deg, var(--white) 30%, var(--neon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.accent-neon {
  color: var(--neon);
}

.accent-gold {
  color: var(--gold-light);
}

.accent-green {
  color: var(--neon-green);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(5, 13, 26, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 195, 255, 0.12);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.brand-link img {
  height: 38px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-item a {
  color: var(--white-dim);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
  padding: 0.5rem 0.25rem;
}

.nav-item a:hover {
  color: var(--neon);
}

.nav-item a[aria-current="page"] {
  color: var(--neon);
  font-weight: 600;
}

/* Hero Section */
.hero-section {
  padding-top: 4.5rem;
  padding-bottom: 4rem;
  position: relative;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 195, 255, 0.08);
  border: 1px solid rgba(0, 195, 255, 0.24);
  color: var(--neon);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.page-lead {
  font-size: clamp(1rem, 1.8vw, 1.175rem);
  color: var(--white-dim);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Sections & Grid */
.section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.section-subtitle {
  color: var(--white-dim);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.5rem;
}

.grid-2 > *,
.grid-3 > * {
  min-width: 0;
}

/* Cards */
.card {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(0, 195, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(0, 195, 255, 0.08);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0, 195, 255, 0.1);
  border: 1px solid rgba(0, 195, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--neon);
  font-size: 1.25rem;
  font-weight: bold;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--white);
}

.card-body {
  color: var(--white-dim);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card-body-spaced {
  margin-bottom: 1.25rem;
}

.card-pro {
  border-color: rgba(200, 162, 50, 0.4);
}

.hero-badge-compact {
  margin-bottom: 1rem;
}

.hero-badge-gold {
  margin-bottom: 1rem;
  color: var(--gold-light);
  background: rgba(200, 162, 50, 0.1);
  border-color: rgba(200, 162, 50, 0.3);
}

.hero-badge-danger {
  margin-bottom: 1.5rem;
  color: var(--danger);
  background: rgba(255, 77, 109, 0.1);
  border-color: rgba(255, 77, 109, 0.3);
}

/* Status / Notice Banners */
.notice-box {
  background: rgba(11, 26, 48, 0.85);
  border: 1px solid var(--navy-border);
  border-left: 4px solid var(--neon);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.notice-box-warning {
  border-left-color: var(--gold-light);
  background: rgba(200, 162, 50, 0.06);
}

.notice-box-danger {
  border-left-color: var(--danger);
  background: rgba(255, 77, 109, 0.06);
}

.notice-title {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notice-box-warning .notice-title {
  color: var(--gold-light);
}

.notice-box-danger .notice-title {
  color: var(--danger);
}

.notice-text {
  font-size: 0.875rem;
  color: var(--white-dim);
  line-height: 1.55;
}

.notice-centered {
  text-align: center;
}

.notice-centered .notice-title {
  justify-content: center;
}

/* Buttons & Links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon), #0099cc);
  color: var(--navy);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(0, 195, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 195, 255, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--navy-card);
  color: var(--white);
  border-color: var(--navy-border);
}

.btn-secondary:hover {
  border-color: var(--neon);
  color: var(--neon);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #cc1f45);
  color: var(--white);
  font-weight: 700;
}

.btn-danger:hover {
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.4);
  transform: translateY(-1px);
}

/* Legal & Long-form Content Layout */
.legal-layout {
  padding-top: 3rem;
  padding-bottom: 5rem;
}

.legal-content {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.legal-meta {
  border-bottom: 1px solid var(--navy-border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--white-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 1.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(0, 195, 255, 0.15);
}

.legal-h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-p {
  color: var(--white-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.legal-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--white-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}

.legal-list li {
  margin-bottom: 0.4rem;
}

.legal-placeholder {
  display: inline-block;
  background: rgba(200, 162, 50, 0.15);
  border: 1px dashed var(--gold);
  color: var(--gold-light);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
}

.legal-page-title {
  margin-bottom: 0.5rem;
  font-size: clamp(1.8rem, 6vw, 2.2rem);
  text-align: left;
}

.delete-mail-action {
  margin: 1.5rem 0;
}

.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(80vh - var(--header-height));
}

.error-content {
  padding-top: 4rem;
  padding-bottom: 4rem;
  text-align: center;
}

/* Tables */
.data-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.data-table th {
  background: var(--navy-mid);
  color: var(--neon);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--navy-border);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--navy-border);
  color: var(--white-dim);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(0, 195, 255, 0.02);
}

/* Steps List */
.steps-list {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
  margin: 1.5rem 0;
}

.step-item {
  counter-increment: step-counter;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
}

.step-item::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(0, 195, 255, 0.12);
  border: 1px solid var(--neon);
  color: var(--neon);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--navy-mid);
  border-top: 1px solid var(--navy-border);
  padding: 3rem 0 2rem 0;
  font-size: 0.875rem;
  color: var(--white-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  max-width: 320px;
  font-size: 0.85rem;
  color: var(--white-faint);
  line-height: 1.5;
}

.footer-col-title {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--white-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--neon);
}

.footer-bottom {
  border-top: 1px solid rgba(238, 245, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--white-faint);
}

/* Utility overrides intentionally follow component rules. */
.hero-section.space-top-sm,
.space-top-sm {
  padding-top: 2rem;
}

.space-top-md {
  margin-top: 2rem;
}

.space-top-lg {
  margin-top: 2.5rem;
}

.space-bottom-sm {
  margin-bottom: 1rem;
}

.space-bottom-md {
  margin-bottom: 1.5rem;
}

.space-bottom-lg {
  margin-bottom: 2.5rem;
}

.text-center {
  text-align: center;
}

/* Responsive Media Queries */
@media (max-width: 860px) {
  .site-header {
    height: auto;
    padding: 0.75rem 0;
  }

  .site-header .container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .legal-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .card {
    padding: 1.25rem;
  }

  .legal-content {
    padding: 1.15rem;
  }

  .notice-box {
    padding: 1rem;
  }

  .step-item {
    padding-left: 2.5rem;
  }

  .step-item::before {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8rem;
  }
}

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