/* ===================================================================
   Nakshatra — shared design system
   =================================================================== */

:root {
  --navy-0: #3a1420;
  --navy-1: #fffdf8;
  --navy-2: #fff4e0;
  --navy-3: #fbf6ea;
  --gold: #e8890c;
  --saffron-hi: #ffb246;
  --gold-bright: #a14a00;
  --text: #3a1420;
  --text-dim: #6a4a52;
  --text-faint: #79585f;
  --text-muted: #79585f;
  --text-quiet: #79585f;
  --surface: #ffffff;
  --surface-2: #fff4e0;
  --border: rgba(94, 52, 38, 0.16);
  --border-strong: rgba(94, 52, 38, 0.3);
  --success: #0f7a43;
  --danger: #a31d15;
  --radius: 20px;
  --radius-sm: 12px;
  --wrap-max: 1220px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html {
  background: var(--navy-3);
}

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--navy-3);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--text);
}

a { color: var(--gold-bright); text-decoration: none; }

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

/* ---------- Starfield backdrop ----------
   Same twinkling-dot effect as the app's landing screen (see app.css /
   app.js #stars-bg), so these marketing pages read as part of the same
   site rather than an older, static-background version of it. Fixed to
   the viewport so it stays in place behind the page as you scroll. */
#stars-bg {
  display: none; /* ivory theme: no starfield */
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.nk-star {
  position: absolute; background: #fff; border-radius: 50%;
  opacity: 0.75; animation: nk-twinkle 3.2s ease-in-out infinite;
}
@keyframes nk-twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.9; } }

header, main, footer { position: relative; z-index: 1; }

/* Sticky so the nav (and its language toggle) stays reachable while
   scrolling. Also carries the nav's background/blur/border directly, since
   header is a normal full-width block (unlike .nk-nav, which is capped by
   --wrap-max) — no full-bleed trick needed here.

   z-index: 30 is also load-bearing for stacking: with header tied at the
   same z-index as main/footer, tied stacking order falls back to DOM order,
   and main (later in the document) was painting OVER header, silently
   swallowing clicks on anything inside header that overflows below its own
   box (the language dropdown, the mobile menu). 30 outranks both with room
   to spare. */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 246, 234, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nk-wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

.nk-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--gold-bright);
  font-weight: 600;
}

.nk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
}

/* ---------- Buttons ---------- */

.nk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  line-height: 1;
}

.nk-btn-primary {
  background: linear-gradient(135deg, var(--saffron-hi), var(--gold));
  color: #3a1420;
  box-shadow: 0 14px 30px rgba(196, 105, 10, 0.28);
}

.nk-btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(94, 52, 38, 0.22);
}

.nk-btn-ghost {
  background: transparent;
  color: var(--gold-bright);
  padding: 10px 6px;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Nav ---------- */

.nk-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 18px 40px;
}

.nk-logo {
  display: flex;
  align-items: center;
  gap: 11px;
}

.nk-logo-word {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}

.nk-nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
}

.nk-nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
}

.nk-nav-link[aria-current="page"] {
  color: var(--gold-bright);
}

.nk-nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nk-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nk-nav-toggle svg { color: var(--gold-bright); }

/* ---------- Language toggle (marketing pages) ----------
   Mirrors the app's own .icon-btn (app.css) so the marketing pages' globe
   button matches the homepage's language switcher look exactly. Deliberately
   NOT inside the .nk-nav-actions .nk-btn-ghost/.nk-btn-primary { display: none }
   rule at the mobile breakpoint, so it stays visible next to the hamburger
   on mobile too — same as the homepage, where the globe icon is always
   reachable. */
.nk-lang-toggle-wrap {
  position: relative;
}

.nk-lang-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nk-lang-toggle:hover { background: var(--surface-2); }

.nk-lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 150px;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--navy-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 34px rgba(74, 28, 16, 0.18);
  z-index: 30;
}

.nk-lang-menu.is-open { display: flex; }

.nk-lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.nk-lang-menu button:hover { background: var(--surface); color: var(--text); }

.nk-lang-menu button.is-active {
  color: var(--gold-bright);
  font-weight: 600;
  background: rgba(232, 137, 12, 0.14);
}

.nk-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 24px 22px;
  border-bottom: 1px solid rgba(94, 52, 38, 0.14);
  background: var(--navy-1);
}

.nk-mobile-menu.is-open { display: flex; }

.nk-mobile-menu a {
  padding: 12px 4px;
  font-size: 15px;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(94, 52, 38, 0.08);
}

.nk-mobile-menu a[aria-current="page"] { color: var(--gold-bright); }

.nk-mobile-menu .nk-btn { margin-top: 10px; width: 100%; }

.nk-mobile-menu .nk-mobile-login { color: var(--gold-bright); }

/* ---------- Footer ---------- */

.nk-footer {
  padding: 50px 0 36px;
  border-top: 1px solid rgba(94, 52, 38, 0.14);
}

.nk-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.nk-footer-links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: center;
}

.nk-footer-links a {
  font-size: 13px;
  color: var(--text-faint);
}

.nk-footer-fine {
  font-size: 12px;
  color: var(--text-quiet);
}

/* ---------- Section rhythm ---------- */

.nk-section { padding: 96px 0; }
.nk-section-tight { padding: 70px 0; }
.nk-section-bordered { border-top: 1px solid rgba(94, 52, 38, 0.14); }

/* ---------- Responsive ---------- */

@media (min-width: 1024px) {
  .nk-nav {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  }
  .nk-nav-actions { justify-self: end; }
}

@media (max-width: 1023px) {
  .nk-wrap { padding: 0 24px; }
  .nk-nav { padding: 18px 20px; }
  .nk-nav-links { display: none; }
  .nk-nav-actions .nk-btn-ghost,
  .nk-nav-actions .nk-btn-primary { display: none; }
  .nk-nav-toggle { display: inline-flex; }
  .nk-section { padding: 64px 0; }
  .nk-section-tight { padding: 48px 0; }
}

@media (max-width: 640px) {
  .nk-wrap { padding: 0 20px; }
}
