/* ===== Design Tokens ===== */
:root {
  /* Base colors – Dark mode is default */
  --colour-bg: #0d0f14;
  --colour-surface: #181b22;
  --colour-text: #e8e4dd;
  --colour-text-secondary: #a09c94;
  --colour-muted: #a09c94;
  --colour-accent: #c8a96e;
  --colour-accent-muted: #a8894e;
  --colour-border: #2a2d35;
  --colour-input-bg: #181b22;

  /* Semantic */
  --colour-success: #c8a96e;
  --colour-error: #c47a7a;

  /* Typography */
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;

  /* Other tokens */
  --transition-theme: background-color 0.3s ease, color 0.3s ease, 
                      border-color 0.3s ease, box-shadow 0.3s ease;
  --content-width: 720px;
  --body-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
}

/* Light mode */
[data-theme="light"] {
  --colour-bg: #fafafa;
  --colour-surface: #ffffff;
  --colour-text: #1a1a1a;
  --colour-text-secondary: #555555;
  --colour-muted: #555555;
  --colour-accent: #b8860b;
  --colour-accent-muted: #a8894e;
  --colour-border: #e0e0e0;
  --colour-input-bg: #ffffff;
}

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

/* Persistent subtle scrollbar to prevent layout shift */
html {
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: var(--colour-border) transparent;
}

body {
  background: var(--colour-bg);
  color: var(--colour-text);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;transition: var(--transition-theme);
  font-size: var(--body-size);
}

/* ===== Typography Utilities ===== */
h1, h2 {
  letter-spacing: 0.3px;
}

.muted,
.note {
  color: var(--colour-muted);
}

.note {
  font-style: italic;
}

/* ===== Q Letter ===== */
.hero-q {
  font-family: var(--font-serif);
  font-size: clamp(6rem, 22vw, 24rem);
  line-height: 1;
  color: var(--colour-accent);
  margin-bottom: 2.5rem;
  user-select: none;
  text-align: center;
}

.nav-q-container {
  width: 2.8rem;
  height: 33px;
  position: relative;
}

.nav-q {
  position: absolute;	
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
  color: var(--colour-accent);
  user-select: none;
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

/* ===== Tagline ===== */
.tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  color: var(--colour-muted);
  margin-top: 0.75rem;
  text-align: center;
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Waitlist Form ===== */
.waitlist-form {
  display: flex;
  gap: 0.75rem;
  margin: 2rem auto 0;
  width: 100%;
  max-width: 28rem;
}

.waitlist-form input[type="email"] {
  flex: 1;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--colour-border);
  border-radius: 6px;
  background: var(--colour-input-bg);
  color: var(--colour-text);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.waitlist-form input[type="email"]:focus {
  border-color: var(--colour-accent);
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15);
}

.waitlist-form input[type="email"]::placeholder {
  color: #5a5751;
}

.waitlist-form button {
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 6px;
  background: var(--colour-accent);
  color: #0d0f14;                    /* dark text on accent */
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.waitlist-form button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.waitlist-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===== Turnstile & Form Feedback ===== */
.turnstile-wrapper {
  margin-top: 1.75rem;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.5s ease;
  max-height: 110px;
  opacity: 1;
}

.turnstile-wrapper.hidden {
  opacity: 0;
  max-height: 0;
}

.form-message {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  min-height: 1.3em;
  text-align: center;
}

.form-message.success { color: var(--colour-success); }
.form-message.error   { color: var(--colour-error); }

/* ===== Theme Toggle ===== */
.theme-toggle {
  background: none;
  border: 1px solid var(--colour-border);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  cursor: pointer;
  color: var(--colour-text-secondary);
  font-size: 0.875rem;
  line-height: 1;
  transition: var(--transition-theme);
  white-space: nowrap;
  &:hover, &:focus-visible {
    border-color: var(--colour-link);
    color: var(--colour-link);
    outline: none;
  }
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--colour-accent);
}

/* ===== Header & Navigation ===== */
.site-header {
  padding-block: 1.5rem;
  border-block-end: 1px solid var(--colour-border);
  flex-shrink: 0;
  transition: var(--transition-theme);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-family: var(--font-mono);
  color: var(--colour-accent);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--colour-accent-muted);
}

.site-nav a[aria-current="page"] {
  color: var(--colour-accent-muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Main Content Area */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 5rem;
  text-align: center;
  gap: 1.5rem;
}

/* Footer */
.site-footer {
  flex-shrink: 0;           
  padding-block: 2rem;
  border-top: 1px solid var(--colour-border);
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--colour-muted);
  text-align: center;
}

.site-footer .container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-footer a {
  color: var(--colour-accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 650px) {
  .site-header .container { flex-wrap: wrap; }
  .site-footer .container { flex-direction: column; text-align: center; }

  .wom-page {
    padding: 2.5rem 1.25rem 4rem;
  }

  .wom-page h1 {
    font-size: 1.8rem;
  }

  .wom-page h2 {
    font-size: 1.35rem;
  }
}

/* ---- Mobile Navigation Logic ---- */

/* 1. Hide burger on desktop */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 100;
}

/* 1. Set the origin to center for perfect rotation */
.burger-menu span {
  width: 100%;
  height: 2px;
  background-color: var(--colour-accent);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* 2. Mobile styles for screens under 650px */
@media (max-width: 650px) {
  .burger-menu {
    display: flex;
  }

  .site-nav {
    display: none; /* Hide the menu by default */
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;

    /* Position it as a dropdown */
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    right: 0;
    background-color: var(--colour-bg);
    padding: 2rem 2rem;
    border-bottom: 1px solid var(--colour-border);
    z-index: 99;
  }

  /* When the 'active' class is added via JS, show the menu */
  .site-nav.active {
    display: flex;
  }

  /* Burger to 'X' animation */
  .burger-menu.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .burger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
  }

  .burger-menu.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav.active ~ .theme-toggle {
    display: none;   /* optional */
  }
}
