@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --brand: #d83b01;
  --brand-deep: #8e2a00;
  --brand-mid: #ea4300;
  --brand-soft: #f6cbb3;
  --brand-mist: #fdece1;
  --ink: #1b1a19;
  --ink-muted: #484644;
  --paper: #fafbfd;
  --white: #ffffff;
  --surface: #ffffff;
  --header-bg: rgba(250, 251, 253, 0.88);
  --line: rgba(150, 60, 0, 0.14);
  --shadow: 0 24px 60px rgba(120, 45, 0, 0.18);
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1280px;
  --header-h: 64px;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --ink: #f3f2f1;
  --ink-muted: #c8c6c4;
  --paper: #14181d;
  --surface: #1f242b;
  --brand-soft: #274156;
  --brand-mist: rgba(216, 59, 1, 0.16);
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(20, 24, 29, 0.85);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(216, 59, 1, 0.13), transparent 55%),
    radial-gradient(700px 360px at 92% 0%, rgba(127, 186, 0, 0.09), transparent 50%);
}

a {
  color: var(--brand-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-deep);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--brand-mist);
  color: var(--ink);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.45rem;
  border-radius: 4px;
  border: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(216, 59, 1, 0.35);
}

.btn-primary:hover {
  background: var(--brand-mid);
  color: var(--white);
}

.btn-disabled,
.btn-disabled:hover {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--line);
  border-style: dashed;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-wordmark .dash {
  color: var(--brand);
}

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

.nav-link {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--brand);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.5rem;
  margin: -0.22rem -0.5rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  line-height: inherit;
  white-space: nowrap;
}

.nav-dropdown.is-open .nav-dropdown-toggle,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible {
  color: var(--brand);
  border-color: var(--brand);
}

.nav-dropdown-chevron {
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.nav-dropdown.is-open .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 70;
  min-width: 11.75rem;
  padding: 0.4rem 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.nav-dropdown-panel::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 0.5rem;
}

.nav-dropdown.is-open .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 0.55rem 0.95rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-dropdown-link:hover,
.nav-dropdown-link:focus-visible {
  color: var(--brand);
  background: var(--brand-mist);
}

.nav-coffee {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-coffee:hover {
  border-color: var(--brand-soft);
}

.nav-cta {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.nav-cta:hover {
  color: var(--white);
}

.nav-cta.btn-disabled,
.nav-cta.btn-disabled:hover {
  color: var(--ink-muted);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  color: var(--brand);
  border-color: var(--brand-soft);
}

.theme-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-moon {
  display: none;
}

:root[data-theme='dark'] .theme-icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-icon-moon {
  display: block;
}

.mobile-menu {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.mobile-menu-bar {
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--ink-muted);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu.is-open .mobile-menu-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu.is-open .mobile-menu-bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu.is-open .mobile-menu-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-panel {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 0.4rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
  border-radius: 0 0 16px 16px;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 60;
}

.mobile-menu.is-open .mobile-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu-link {
  padding: 0.85rem 0.1rem;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--paper);
  text-decoration: none;
}

.mobile-menu-link:last-child {
  border-bottom: none;
}

.mobile-menu-link:hover {
  color: var(--brand);
}

.mobile-menu-backdrop {
  position: fixed;
  inset: var(--header-h) 0 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 55;
}

@media (max-width: 780px) {
  .nav-link:not(.nav-cta),
  .nav-dropdown {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 480px) {
  .site-header .container {
    gap: 0.75rem;
  }

  .nav {
    gap: 0.6rem;
  }

  .nav-cta {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  .theme-toggle {
    flex-shrink: 0;
  }
}

/* Legal content */

.legal {
  width: min(100% - 2.5rem, 56rem);
  margin: 0 auto;
  padding: 3.5rem 0 5rem;
}

.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.legal-updated {
  font-family: var(--font-display);
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin: 0 0 2rem;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand-deep);
  margin: 2.25rem 0 0.65rem;
}

.legal p,
.legal li {
  color: var(--ink-muted);
}

.legal ul {
  padding-left: 1.25rem;
}

.legal strong {
  color: var(--ink);
  font-weight: 600;
}

.legal ol {
  padding-left: 1.25rem;
  color: var(--ink-muted);
}

.legal-callout {
  list-style: none;
  margin: 0;
  padding: 1.1rem 1.4rem;
  background: var(--brand-mist);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.legal-callout li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}

.legal-callout li:first-child {
  border-top: none;
  padding-top: 0.1rem;
}

.legal-callout li:last-child {
  padding-bottom: 0.1rem;
}

.legal-callout strong {
  color: var(--brand-deep);
}

:root[data-theme='dark'] .legal h2 {
  color: var(--ink);
}

:root[data-theme='dark'] .legal-callout strong {
  color: var(--brand);
}

/* Footer */

.footer {
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 0 1.75rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-about {
  max-width: 24rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  text-decoration: none;
}

.footer-brand .dash {
  color: #ffb27a;
}

.footer-tagline {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  font-family: var(--font-display);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  padding-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}
