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

:root {
  --bg:        #FFFFFF;
  --fg:        #0A0A0A;
  --card:      #FFFFFF;
  --secondary: #F4F4F5;
  --muted:     #71717A;
  --border:    #E4E4E7;
  --border-2:  #D4D4D8;
  --fg-hover:  #262626;
  --nav-bg:    rgba(255, 255, 255, 0.92);
  --glow:      rgba(244, 244, 245, 0.9);
  --pro:       #A8844A;
  --pro-fg:    #0A0A0A;
  /* Dark (footer) */
  --d-bg:      #0A0A0A;
  --d-fg:      #FAFAFA;
  --d-muted:   #A1A1AA;
  --d-border:  #262626;
  --serif:     ui-serif, Georgia, "Times New Roman", serif;
  --sans:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:        #0A0A0A;
  --fg:        #FAFAFA;
  --card:      #111113;
  --secondary: #18181B;
  --muted:     #A1A1AA;
  --border:    #27272A;
  --border-2:  #3F3F46;
  --fg-hover:  #D4D4D8;
  --nav-bg:    rgba(10, 10, 10, 0.85);
  --glow:      rgba(39, 39, 42, 0.6);
  --pro:       #D4B06A;
  --pro-fg:    #000000;
  color-scheme: dark;
}
/* Logo mark is black ink on transparent; invert it for dark backgrounds */
[data-theme="dark"] .nav-logo img { filter: invert(1); }
[data-theme="dark"] footer { border-top: 1px solid var(--d-border); }

:root:not([data-theme="dark"]) .only-dark, [data-theme="dark"] .only-light { display: none; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── TYPOGRAPHY ─── */
h1, h2, h3 { font-family: var(--serif); color: var(--fg); font-weight: 400; }
.serif { font-family: var(--serif); }

/* ─── FOCUS ─── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  height: 72px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
}
.nav-logo img { width: 32px; height: 32px; display: block; }
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }
.nav-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--fg);
  color: var(--bg) !important;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}
.nav-download:hover { background: var(--fg-hover); transform: translateY(-1px); }
.nav-download svg { width: 14px; height: 14px; }
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.2s;
}
.theme-toggle:hover { border-color: var(--border-2); }
.theme-toggle svg { width: 16px; height: 16px; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--fg);
}
.btn-outline:hover { background: var(--fg); color: var(--bg); }

/* App Store badge (monochrome recreation) */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 22px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-appstore:hover { background: var(--fg-hover); transform: translateY(-1px); }
.btn-appstore svg { width: 22px; height: 22px; flex-shrink: 0; }
.btn-appstore .as-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.btn-appstore .as-small { font-size: 0.6rem; letter-spacing: 0.04em; opacity: 0.65; }
.btn-appstore .as-big { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; }
/* Inverted for dark footer */
.btn-appstore.invert { background: #fff; color: #0A0A0A; }
.btn-appstore.invert:hover { background: #F4F4F5; }

/* ─── FOOTER ─── */
footer {
  background: var(--d-bg);
  color: var(--d-muted);
  padding: 64px 40px 40px;
}
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--d-border);
  flex-wrap: wrap;
}
.footer-brand { max-width: 320px; }
.footer-logo { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 1.5rem; color: var(--d-fg); letter-spacing: 0.02em; margin-bottom: 12px; }
.footer-logo img { width: 36px; height: 36px; display: block; filter: invert(1); }
.footer-brand p { font-size: 0.88rem; color: var(--d-muted); line-height: 1.65; }
.footer-cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-cta .fc-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: #71717A; }
.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links { display: flex; gap: 26px; list-style: none; }
.footer-links a { font-size: 0.82rem; color: var(--d-muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--d-fg); }
.footer-credit-row { text-align: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--d-border); }
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  color: #71717A;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-credit img { height: 20px; width: auto; display: block; transition: transform 0.2s; }
.footer-credit strong { color: var(--d-fg); font-weight: 600; }
.footer-credit:hover { color: var(--d-muted); }
.footer-credit:hover img { transform: scale(1.08); }

@media (max-width: 768px) {
  nav { padding: 14px 20px; }
  .nav-links { gap: 12px; }
  .nav-links li:not(.nav-cta-item):not(.nav-theme-item):not(.nav-pricing-item) { display: none; }
  footer { padding: 48px 20px 32px; }
  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column-reverse; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
}
@media (max-width: 480px) {
  nav { padding: 14px 16px; height: 64px; }
  .nav-logo { font-size: 1.2rem; gap: 8px; }
  .nav-logo img { width: 28px; height: 28px; }
  .nav-links { gap: 14px; }
  .nav-download { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .nav-download svg { width: 16px; height: 16px; }
  .nav-download-label { display: none; }
}
