/* ==========================================================
   Reptide — Aurora Design System
   Deep-navy base, aurora-trio accents, glass surfaces.
   Ported from the app's flutter/lib/core/theme.dart.
   ========================================================== */

/* --- Font Faces (self-hosted for GDPR) --- */
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/InstrumentSerif-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/InstrumentSerif-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --- Custom Properties (from AppColors / AppGradients) --- */
:root {
  /* Aurora base & elevated surfaces */
  --bg: #0B0F1A;
  --bg2: #141A2B;
  --bg3: #1C2340;

  /* Glass overlays */
  --paper: rgba(255, 255, 255, 0.05);
  --paper-strong: rgba(255, 255, 255, 0.08);

  /* Borders / hairlines */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* Aurora accent trio */
  --iris: #6F8CFF;
  --violet: #B57BFF;
  --mint: #4EE2B4;

  /* Semantic */
  --warn: #FFB86B;
  --danger: #FF6B8A;

  /* Text ramp */
  --text-primary: #F5F6FA;
  --text-secondary: #A9B0C2;
  --text-tertiary: #6B7286;

  /* Signature gradients */
  --aurora: linear-gradient(135deg, var(--iris) 0%, var(--violet) 50%, var(--mint) 100%);
  --iris-violet: linear-gradient(135deg, var(--iris) 0%, var(--violet) 100%);

  /* Radius */
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  /* Typography */
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Layout */
  --max-width: 1120px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Aurora backdrop — three radial glow pools over the deep navy base. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 12% -5%, rgba(111, 140, 255, 0.20) 0%, transparent 60%),
    radial-gradient(50% 45% at 90% 8%, rgba(181, 123, 255, 0.16) 0%, transparent 60%),
    radial-gradient(65% 50% at 50% 108%, rgba(78, 226, 180, 0.10) 0%, transparent 60%);
}

a {
  color: var(--iris);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--violet);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography (DM Sans display, mixed-case, tight tracking) --- */
h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 5rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

p {
  color: var(--text-secondary);
  max-width: 62ch;
}

/* --- Shared utilities --- */
/* Sparing serif-italic accent — punctuation moments & numerals only. */
.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--iris);
  letter-spacing: 0;
}

/* Mono eyebrow / overline label. */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: var(--aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: var(--paper);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
}

/* --- Layout --- */
.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 15, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  height: var(--nav-height);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Wordmark logo (nav + footer) */
.logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.logo .dot {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--iris);
  margin-left: 1px;
}

.logo:hover {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 3rem) 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

/* Brand mark — the real app icon framed by the aurora gradient ring. */
.brand-mark {
  display: inline-block;
  padding: 2px;
  border-radius: 32px;
  background: var(--aurora);
  margin-bottom: 2.25rem;
  box-shadow:
    0 0 60px rgba(111, 140, 255, 0.28),
    0 0 120px rgba(181, 123, 255, 0.14);
}

.brand-mark img {
  width: 116px;
  height: 116px;
  border-radius: 30px;
  display: block;
}

.hero-content h1 {
  margin-bottom: 1.75rem;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 auto 2.75rem;
  max-width: 640px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  padding: 0.9rem 1.9rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #fff;
  background-image: var(--iris-violet);
  box-shadow: 0 6px 24px rgba(111, 140, 255, 0.28);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(111, 140, 255, 0.42);
}

.btn-outline {
  background: var(--paper);
  color: var(--text-primary);
  border: 1px solid var(--line-strong);
}

.btn-outline:hover {
  background: var(--paper-strong);
  border-color: var(--iris);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Section heading block --- */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-head p {
  color: var(--text-secondary);
  margin: 0.75rem auto 0;
}

/* --- Features Section --- */
.features {
  padding: 7rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--paper);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(111, 140, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(111, 140, 255, 0.15), 0 18px 40px rgba(0, 0, 0, 0.35);
}

.feature-icon {
  width: 30px;
  height: 30px;
  color: var(--iris);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- How It Works / Steps --- */
.how-it-works {
  padding: 7rem 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step {
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--paper);
}

.step-number {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 3.25rem;
  line-height: 1;
  margin-bottom: 1rem;
  background: var(--aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step h3 {
  color: var(--text-primary);
}

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- CTA / Coming Soon --- */
.cta-section {
  padding: 7rem 0 8rem;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 4.5rem 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(111, 140, 255, 0.16) 0%, rgba(181, 123, 255, 0.12) 50%, rgba(78, 226, 180, 0.08) 100%),
    var(--bg2);
}

.cta-panel h2 {
  margin-bottom: 0.75rem;
}

.cta-panel p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 0 auto;
  max-width: 42ch;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0;
  background: rgba(20, 26, 43, 0.4);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.footer-logo .dot {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--iris);
  margin-left: 1px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 0.35rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--text-primary);
}

/* --- Page Content (Legal, Privacy) --- */
.page-content {
  padding: calc(var(--nav-height) + 3.5rem) 0 5rem;
  min-height: 100vh;
}

.page-content .section-container {
  max-width: 760px;
}

.page-content h1 {
  margin-bottom: 2rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.page-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.page-content h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--iris);
}

.page-content p,
.page-content li {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.page-content ul,
.page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.page-content a {
  color: var(--iris);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-content a:hover {
  color: var(--violet);
}

/* --- Tables (Privacy Policy) --- */
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.page-content th,
.page-content td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  color: var(--text-secondary);
}

.page-content th {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--paper-strong);
}

.page-content tr:last-child td {
  border-bottom: none;
}

.page-content tr:hover td {
  background: rgba(111, 140, 255, 0.04);
}

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

/* --- Responsive: Tablet --- */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
  }
}

/* --- Responsive: Mobile --- */
@media (max-width: 620px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 1.1rem;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .hero {
    min-height: 92vh;
  }

  .brand-mark img {
    width: 96px;
    height: 96px;
  }

  .cta-panel {
    padding: 3rem 1.25rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }
}
