/*
 * EDITH landing page.
 *
 * The palette is the one from the predecessor project's Tailwind @theme block,
 * transcribed unchanged -- it was already plain custom properties, and Tailwind
 * was only generating utility classes on top of them. No framework here, so the
 * sm:/lg: variants have become two media queries at the bottom.
 *
 * Dark mode is the same class strategy as before: an inline script in <head>
 * stamps .dark on <html> before first paint, and every colour below is a token
 * redefined in one place for that case.
 */

/* ---- BFP palette ---- */
:root {
  /* Primary Red — BFP's signature red */
  --bfp-red-50:  #fff1f1;
  --bfp-red-100: #ffd9d9;
  --bfp-red-200: #ffb3b3;
  --bfp-red-300: #ff7a7a;
  --bfp-red-400: #ff3a3a;
  --bfp-red-500: #e80000;
  --bfp-red-600: #cc0000;
  --bfp-red-700: #a80000;
  --bfp-red-800: #8a0000;
  --bfp-red-900: #6b0000;
  --bfp-red-950: #3d0000;

  /* Navy Blue — secondary BFP colour */
  --bfp-navy-50:  #f0f4ff;
  --bfp-navy-100: #dce6ff;
  --bfp-navy-200: #b8cdff;
  --bfp-navy-300: #7aa8ff;
  --bfp-navy-400: #3a7bff;
  --bfp-navy-500: #1a56db;
  --bfp-navy-600: #1040b5;
  --bfp-navy-700: #0d3091;
  --bfp-navy-800: #0a2270;
  --bfp-navy-900: #071855;
  --bfp-navy-950: #030d35;

  /* Gold/Yellow — BFP accent colour */
  --bfp-gold-50:  #fffbeb;
  --bfp-gold-100: #fef3c7;
  --bfp-gold-200: #fde68a;
  --bfp-gold-300: #fcd34d;
  --bfp-gold-400: #fbbf24;
  --bfp-gold-500: #f59e0b;
  --bfp-gold-600: #d97706;
  --bfp-gold-700: #b45309;
  --bfp-gold-800: #92400e;
  --bfp-gold-900: #78350f;
  --bfp-gold-950: #451a03;

  /* Fire / ember tones */
  --fire-ember: #ff4500;
  --fire-flame: #ff6b00;
  --fire-glow:  #ffaa00;
  --fire-smoke: #4a4a4a;
  --fire-ash:   #8c8c8c;

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
               Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-card: 0.75rem;

  /* Semantic surface tokens — the only things the layout below reads. */
  --page:        #f4f5f7;
  --card:        #ffffff;
  --card-fg:     #111111;
  --border:      #e4e4e7;
  --text:        #111111;
  --text-muted:  #71717a;
  --text-subtle: #a1a1aa;
  --footer-bg:   #ffffff;
}

html.dark {
  --page:        #09090b;
  --card:        #18181b;
  --card-fg:     #fafafa;
  --border:      #27272a;
  --text:        #f0f0f0;
  --text-muted:  #a1a1aa;
  --text-subtle: #71717a;
  --footer-bg:   #18181b;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--page);
  color: var(--text);
  transition: background-color .2s, color .2s;
}

a { color: inherit; text-decoration: none; }

svg { width: 1em; height: 1em; }

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(168, 0, 0, .3);
  background-color: rgba(3, 13, 53, .95);
  backdrop-filter: blur(6px);
}

html.dark .navbar {
  border-bottom-color: rgba(107, 0, 0, .4);
  background-color: rgba(9, 9, 11, .95);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  user-select: none;
}

.brand-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  flex: 0 0 auto;
  border-radius: 9999px;
  background-color: var(--bfp-red-600);
  color: var(--bfp-gold-300);
  box-shadow: 0 10px 15px -3px rgba(107, 0, 0, .5);
  outline: 2px solid rgba(251, 191, 36, .6);
  transition: transform .2s;
}

.brand-mark svg { width: 1.25rem; height: 1.25rem; }
.brand:hover .brand-mark { transform: scale(1.05); }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: #fff;
}

.brand-sub {
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--bfp-gold-400);
}

.nav-links {
  display: none;
  align-items: center;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .875rem;
  font-weight: 500;
  color: #d4d4d8;
}

.nav-links a {
  display: block;
  padding: .5rem .75rem;
  border-radius: .375rem;
  transition: background-color .15s, color .15s;
}

.nav-links a:hover {
  background-color: rgba(204, 0, 0, .2);
  color: #fff;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  width: 2.25rem;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 9999px;
  border: 1px solid #3f3f46;
  background-color: rgba(39, 39, 42, .6);
  color: #d4d4d8;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}

.theme-toggle:hover {
  border-color: rgba(251, 191, 36, .6);
  background-color: #3f3f46;
  color: var(--bfp-gold-300);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--bfp-gold-400);
  outline-offset: 2px;
}

.theme-toggle svg { width: 1rem; height: 1rem; }

/* The toggle shows the theme you would switch *to*. */
.icon-sun { display: none; }
html.dark .icon-sun { display: block; }
html.dark .icon-moon { display: none; }

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--bfp-navy-950);
  padding: 5rem 0;
}

.hero-wash,
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-wash {
  background-image: linear-gradient(to bottom right,
    rgba(107, 0, 0, .4), transparent 55%, var(--bfp-navy-950));
}

.hero-grid {
  opacity: .10;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-title {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: #fff;
}

.hero-sub {
  margin: .75rem 0 0;
  max-width: 42rem;
  font-size: 1rem;
  color: #a1a1aa;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.cta-note {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: .8125rem;
  color: #71717a;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1.75rem;
  border-radius: .75rem;
  border: 2px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s, transform .1s, border-color .2s, color .2s;
}

.btn svg { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }

.btn-label { display: flex; flex-direction: column; line-height: 1.25; }

.btn-meta {
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .03em;
  opacity: .75;
}

.btn:active { transform: scale(.98); }

.btn:focus-visible {
  outline: 2px solid var(--bfp-gold-400);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--bfp-red-600);
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(107, 0, 0, .4);
}

.btn-primary:hover {
  background-color: var(--bfp-red-500);
  box-shadow: 0 20px 25px -5px rgba(107, 0, 0, .5);
}

.btn-secondary {
  border-color: rgba(251, 191, 36, .5);
  background-color: rgba(251, 191, 36, .08);
  color: var(--bfp-gold-300);
}

.btn-secondary:hover {
  border-color: var(--bfp-gold-400);
  background-color: rgba(251, 191, 36, .16);
  color: var(--bfp-gold-200);
}

/*
 * No build yet. Left visible rather than removed: "the download is not ready"
 * is information, and a button that quietly vanishes reads as a broken page.
 */
.btn.is-disabled {
  background-color: #3f3f46;
  color: #a1a1aa;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Steps ---- */
.steps,
.features {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.section-title {
  margin: 0 0 1.5rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-subtle);
  text-align: center;
}

.step-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background-color: var(--card);
  color: var(--card-fg);
}

.card h3 {
  margin: 0;
  font-size: .875rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  font-size: 1.125rem;
  font-weight: 700;
}

.step-num-gold  { background-color: rgba(251, 191, 36, .1); color: var(--bfp-gold-500); }
.step-num-ember { background-color: rgba(255, 69, 0, .1);   color: var(--fire-ember); }
.step-num-navy  { background-color: rgba(10, 34, 112, .1);  color: var(--bfp-navy-500); }

html.dark .step-num-navy {
  background-color: rgba(58, 123, 255, .1);
  color: var(--bfp-navy-300);
}

/* ---- Features ---- */
.features { padding-top: 0; }

.feature-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.feature {
  padding: 1.25rem 1.25rem 1.25rem 1rem;
  border-left: 3px solid var(--bfp-red-600);
  background-color: var(--card);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

.feature h4 {
  margin: 0 0 .375rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--card-fg);
}

.feature p {
  margin: 0;
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---- Footer ---- */
.footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background-color: var(--footer-bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-size: .75rem;
  color: var(--text-subtle);
  text-align: center;
}

.footer-tag { display: flex; align-items: center; gap: .375rem; }

.dot {
  height: .375rem;
  width: .375rem;
  border-radius: 9999px;
  background-color: var(--bfp-red-500);
}

/* ---- Breakpoints ---- */
@media (min-width: 640px) {
  .navbar-inner,
  .hero-inner,
  .steps,
  .features,
  .footer-inner { padding-left: 1.5rem; padding-right: 1.5rem; }

  .hero { padding: 7rem 0; }
  .hero-title { font-size: 3rem; }
  .hero-sub { font-size: 1.125rem; }

  .step-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { flex-direction: row; text-align: left; }
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

@media (min-width: 1024px) {
  .navbar-inner,
  .hero-inner,
  .steps,
  .features,
  .footer-inner { padding-left: 2rem; padding-right: 2rem; }

  .hero-title { font-size: 3.75rem; }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
