@import url("https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Figtree:wght@400;500;600;700&display=swap");

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0c10;
  --bg-elevated: #12161d;
  --bg-soft: #0e1218;
  --bg-input: #0c1016;
  --ink: #e6e9ef;
  --ink-strong: #ffffff;
  --muted: #9aa3b2;
  --line: rgba(230, 233, 239, 0.1);
  --line-strong: rgba(230, 233, 239, 0.18);
  --accent: #f0b429;
  --accent-soft: rgba(240, 180, 41, 0.16);
  --accent-ink: #1a1404;
  --danger: #ff6b5a;
  --ok: #5dffb0;
  --warn: #ffc857;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(10, 12, 16, 0.94);
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;
  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f1ec;
  --bg-elevated: #ffffff;
  --bg-soft: #eae6de;
  --bg-input: #faf8f4;
  --ink: #1a1f2a;
  --ink-strong: #0a0c10;
  --muted: #5c6575;
  --line: rgba(26, 31, 42, 0.1);
  --line-strong: rgba(26, 31, 42, 0.16);
  --accent: #c98900;
  --accent-soft: rgba(201, 137, 0, 0.14);
  --accent-ink: #fff8e8;
  --danger: #d6453a;
  --ok: #1f9d63;
  --warn: #c48900;
  --shadow: 0 16px 40px rgba(26, 31, 42, 0.1);
  --header-bg: rgba(243, 241, 236, 0.96);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 10% -10%, var(--accent-soft), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(40, 90, 120, 0.18), transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-soft) 48%, var(--bg) 100%);
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(-12deg, transparent 0, transparent 11px, rgba(127,127,127,0.02) 11px, rgba(127,127,127,0.02) 12px);
  z-index: 0;
}

main, .site-footer, .flash-wrap { position: relative; z-index: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.75rem 1.25rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-strong);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.9rem;
  align-items: center;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--accent); }

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  font: inherit;
}

.page { width: min(1100px, calc(100% - 2rem)); margin: 1.5rem auto 3rem; }
.site-footer { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 0.9rem; }

.flash-wrap { width: min(1100px, calc(100% - 2rem)); margin: 1rem auto 0; }
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin: 0.4rem 0; }
.flash-success { background: rgba(93,255,176,0.12); border: 1px solid rgba(93,255,176,0.3); }
.flash-danger { background: rgba(255,107,90,0.12); border: 1px solid rgba(255,107,90,0.3); }
.flash-warning { background: rgba(255,200,87,0.12); border: 1px solid rgba(255,200,87,0.3); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink-strong);
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(255,107,90,0.15); color: var(--danger); border-color: rgba(255,107,90,0.35); }
.btn-small { padding: 0.35rem 0.7rem; font-size: 0.85rem; }

.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: rise 0.7s var(--ease) both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
  max-width: 14ch;
}
.lede { color: var(--muted); max-width: 36rem; font-size: 1.1rem; }
.hero-actions { margin-top: 1.5rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.muted { color: var(--muted); }
h1, h2 { font-family: var(--font-display); }
a { color: var(--accent); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: calc(100% + 0.35rem);
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a,
  .site-nav .theme-toggle {
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.75rem;
  }
  .page { width: min(1100px, calc(100% - 1.25rem)); margin: 1rem auto 2.5rem; }
}
