/* ─────────────────────────────────────────
   Drift — styles.css
   ───────────────────────────────────────── */

/* ─────────────────────────────────────────
   Logo mark
   ───────────────────────────────────────── */
.logo-mark {
  display: block;
  flex-shrink: 0;
  overflow: visible;
}

.logo-mark--sm {
  width: 28px;
  height: 28px;
}

.logo-mark--hero {
  width: 140px;
  height: 140px;
  margin-bottom: var(--space-lg);
  animation: logo-breathe 28s ease-in-out infinite;
}

@keyframes logo-breathe {
  0%   { opacity: 0.85; transform: scale(1);    }
  45%  { opacity: 1;    transform: scale(1.04); }
  100% { opacity: 0.85; transform: scale(1);    }
}

@media (prefers-reduced-motion: reduce) {
  .logo-mark--hero { animation: none; }
}

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

:root {
  /* Palette */
  --bg:           #13100d;
  --surface:      #1c1713;
  --amber:        #c8956a;
  --amber-dim:    #9b6e49;
  --blue-dim:     #4a6080;
  --text-primary: #e2d9ce;
  --text-secondary: #8a7f74;
  --text-muted:   #4e4740;
  --divider:      rgba(200, 149, 106, 0.08);

  /* Type */
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-2xl: 11rem;

  /* Layout */
  --max-width:        1100px;
  --max-width-narrow: 680px;

  /* Motion */
  --dur-glow: 30s;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Focus styles ── */
:focus-visible {
  outline: 1px solid var(--amber-dim);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─────────────────────────────────────────
   Atmosphere
   ───────────────────────────────────────── */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform, opacity;
}

.glow--amber {
  width: 70vw;
  height: 70vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(180, 110, 55, 0.13) 0%, transparent 70%);
  top: -15%;
  right: -15%;
  animation: drift-amber var(--dur-glow) ease-in-out infinite alternate;
}

.glow--blue {
  width: 60vw;
  height: 60vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(50, 75, 110, 0.10) 0%, transparent 70%);
  bottom: 5%;
  left: -10%;
  animation: drift-blue calc(var(--dur-glow) * 1.2) ease-in-out infinite alternate;
}

@keyframes drift-amber {
  0%   { transform: translate(0, 0) scale(1);      opacity: 0.8; }
  33%  { transform: translate(-4%, 6%) scale(1.05); opacity: 1;   }
  66%  { transform: translate(5%, -3%) scale(0.97); opacity: 0.85;}
  100% { transform: translate(-2%, 4%) scale(1.03); opacity: 0.9; }
}

@keyframes drift-blue {
  0%   { transform: translate(0, 0) scale(1);      opacity: 0.7; }
  33%  { transform: translate(5%, -4%) scale(1.04); opacity: 0.9; }
  66%  { transform: translate(-3%, 5%) scale(0.96); opacity: 0.75;}
  100% { transform: translate(4%, -2%) scale(1.02); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
}

/* Slow pulse elements — echo the overlapping logo circles */
.pulse {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
  pointer-events: none;
}

.pulse--amber {
  width: 55vw;
  height: 55vw;
  max-width: 520px;
  max-height: 520px;
  background: radial-gradient(circle, rgba(195, 140, 75, 0.09) 0%, rgba(185, 120, 55, 0.04) 45%, transparent 70%);
  filter: blur(60px);
  top: 8%;
  left: 5%;
  animation: pulse-amber 26s ease-in-out infinite;
}

.pulse--blue {
  width: 48vw;
  height: 48vw;
  max-width: 460px;
  max-height: 460px;
  background: radial-gradient(circle, rgba(130, 165, 200, 0.08) 0%, rgba(100, 140, 185, 0.03) 45%, transparent 70%);
  filter: blur(70px);
  top: 12%;
  left: 20%;
  animation: pulse-blue 32s ease-in-out infinite;
  animation-delay: -8s;
}

@keyframes pulse-amber {
  0%   { transform: scale(0.88); opacity: 0.6; }
  50%  { transform: scale(1.12); opacity: 1;   }
  100% { transform: scale(0.88); opacity: 0.6; }
}

@keyframes pulse-blue {
  0%   { transform: scale(0.92); opacity: 0.5; }
  50%  { transform: scale(1.10); opacity: 0.9; }
  100% { transform: scale(0.92); opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
}

/* Grain overlay */
.grain {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.028;
  mix-blend-mode: overlay;
  animation: grain-shift 8s steps(2) infinite;
  pointer-events: none;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-1%, 1%); }
  50%  { transform: translate(1%, -1%); }
  75%  { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}

/* ─────────────────────────────────────────
   Navigation
   ───────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav__wordmark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.nav__wordmark:hover {
  color: var(--amber);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}

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

.nav__link--cta {
  color: var(--amber-dim);
  border: 1px solid rgba(200, 149, 106, 0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 3px;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.nav__link--cta:hover {
  color: var(--amber);
  border-color: rgba(200, 149, 106, 0.45);
  background: rgba(200, 149, 106, 0.06);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text-secondary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 640px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(19, 16, 13, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--divider);
    padding: var(--space-sm) var(--space-md) var(--space-md);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links li {
    width: 100%;
  }

  .nav__link {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--divider);
  }

  .nav__link--cta {
    margin-top: var(--space-sm);
    border: 1px solid rgba(200, 149, 106, 0.25);
    display: inline-block;
    padding: 0.5rem 1rem;
  }

  .nav__toggle[aria-expanded="true"] span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .nav__toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* ─────────────────────────────────────────
   Layout
   ───────────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

/* ─────────────────────────────────────────
   Sections
   ───────────────────────────────────────── */
.section {
  padding: var(--space-xl) var(--space-md);
}

.section + .section {
  border-top: 1px solid var(--divider);
}

.section__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.01em;
}

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

.section__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.section__body p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.85;
  max-width: 58ch;
}

.section__meta {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: var(--space-lg);
  letter-spacing: 0.03em;
}

/* ─────────────────────────────────────────
   Hero
   ───────────────────────────────────────── */
.section--hero {
  padding-top: calc(var(--space-2xl) + 4rem);
  padding-bottom: var(--space-2xl);
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.section--hero .container {
  width: 100%;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(4rem, 14vw, 9rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.hero__sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: var(--space-lg);
  letter-spacing: 0.01em;
}

.hero__body {
  margin-bottom: var(--space-lg);
}

.hero__body p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 2;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

.hero__note {
  color: var(--text-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────
   Button
   ───────────────────────────────────────── */
.btn--primary {
  display: inline-block;
  color: var(--amber-dim);
  border: 1px solid rgba(200, 149, 106, 0.3);
  background: rgba(200, 149, 106, 0.05);
  padding: 0.8rem 1.6rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.btn--primary:hover {
  color: var(--amber);
  border-color: rgba(200, 149, 106, 0.5);
  background: rgba(200, 149, 106, 0.09);
}

/* ─────────────────────────────────────────
   Screenshots
   ───────────────────────────────────────── */
.section--screenshots {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-xl);
  overflow: hidden;
}

.screenshots {
  list-style: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  max-width: 900px;
  margin: 0 auto;
}

.screenshot {
  flex: 0 1 260px;
  position: relative;
}

/* Stagger heights to create a gentle rhythm */
.screenshot:nth-child(1) { transform: translateY(0); }
.screenshot:nth-child(2) { transform: translateY(-28px); }
.screenshot:nth-child(3) { transform: translateY(10px); }

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 36px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Soft amber underglow on the centre screenshot */
.screenshot:nth-child(2)::after {
  content: '';
  position: absolute;
  bottom: -24px;
  left: 10%;
  width: 80%;
  height: 60px;
  background: radial-gradient(ellipse, rgba(180, 120, 55, 0.18) 0%, transparent 70%);
  filter: blur(12px);
  pointer-events: none;
  z-index: -1;
}

@media (max-width: 640px) {
  .screenshots {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .screenshot {
    flex: 0 0 auto;
    width: min(280px, 72vw);
    transform: none !important;
  }

  .screenshot:nth-child(2)::after {
    display: none;
  }
}

/* ─────────────────────────────────────────
   How it works — steps
   ───────────────────────────────────────── */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  counter-reset: steps;
}

@media (max-width: 640px) {
  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

.step {
  position: relative;
  padding-top: var(--space-md);
  border-top: 1px solid var(--divider);
}

.step__number {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  color: var(--amber-dim);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
  opacity: 0.7;
}

.step__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.step__body {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* ─────────────────────────────────────────
   Features list
   ───────────────────────────────────────── */
.features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 520px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.feature {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--divider);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.feature:nth-child(odd) {
  padding-right: var(--space-md);
}

.feature__dot {
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber-dim);
  opacity: 0.5;
  position: relative;
  top: -1px;
}

/* ─────────────────────────────────────────
   Science — disclaimer + sources
   ───────────────────────────────────────── */
/* Science section internal divider */
.science-divider {
  width: 32px;
  height: 1px;
  background: var(--divider);
  margin: var(--space-xl) 0;
}

.disclaimer {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-left: 1px solid rgba(200, 149, 106, 0.2);
  color: var(--text-muted) !important;
  font-size: 0.875rem !important;
  font-style: italic;
  line-height: 1.7 !important;
}

.sources {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--divider);
}

.sources__title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.sources__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: sources;
}

.sources__list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.75rem;
  border-bottom: 1px solid var(--divider);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.65;
  counter-increment: sources;
}

.sources__list li:first-child {
  border-top: 1px solid var(--divider);
}

.sources__list li::before {
  content: counter(sources);
  position: absolute;
  left: 0;
  top: 0.9rem;
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 0.7rem;
}

.sources__list a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(138, 127, 116, 0.35);
  transition: color 0.3s ease, text-decoration-color 0.3s ease;
  word-break: break-word;
}

.sources__list a:hover {
  color: var(--amber-dim);
  text-decoration-color: rgba(200, 149, 106, 0.5);
}

.source-note {
  display: block;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.65;
  margin-top: 0.2rem;
  font-size: 0.75rem;
}

/* ─────────────────────────────────────────
   Support — FAQ
   ───────────────────────────────────────── */
.faq {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-lg);
}

.faq__item {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--divider);
}

.faq__item:last-child {
  border-bottom: 1px solid var(--divider);
}

.faq__question {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.faq__answer {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.75;
  max-width: 52ch;
}

/* ─────────────────────────────────────────
   Privacy
   ───────────────────────────────────────── */
.privacy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: var(--space-sm) 0 var(--space-sm) var(--space-sm);
  border-left: 1px solid rgba(200, 149, 106, 0.15);
}

.privacy-list li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.privacy-body strong {
  color: var(--text-primary);
  font-weight: 400;
}

/* ─────────────────────────────────────────
   Contact
   ───────────────────────────────────────── */
.contact {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--divider);
}

.contact p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.contact a,
.section__body a {
  color: var(--text-secondary);
  text-underline-offset: 3px;
  text-decoration-color: rgba(138, 127, 116, 0.4);
  transition: color 0.3s ease;
}

.contact a:hover,
.section__body a:hover {
  color: var(--amber-dim);
}

/* ─────────────────────────────────────────
   Footer
   ───────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  border-top: 1px solid var(--divider);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer__wordmark {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.footer__tagline {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer__nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
}

@media (max-width: 480px) {
  .footer__inner {
    flex-direction: column;
  }

  .footer__nav ul {
    align-items: flex-start;
  }
}

.footer__nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.3s ease;
}

.footer__nav a:hover {
  color: var(--text-secondary);
}

.footer__copy {
  max-width: var(--max-width);
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ─────────────────────────────────────────
   Utility — skip link
   ───────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  background: var(--surface);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border: 1px solid var(--divider);
  border-radius: 3px;
  z-index: 9999;
}

/* ─────────────────────────────────────────
   Section body strong (science)
   ───────────────────────────────────────── */
.section__body strong {
  color: var(--text-primary);
  font-weight: 400;
}
