/* ══════════════════════════════════════════════════════════════
   Talk & Code — Main Stylesheet
   Shared across all pages
   ══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.25s, color 0.25s;
}
a { color: inherit; text-decoration: none; }

/* ── Theme tokens ── */
:root {
  --tac-teal: #10BAB9;
  --bg: #faf8f3;
  --fg: #14181b;
  --muted: rgba(20,24,27,0.65);
  --muted-text: rgba(20,24,27,0.75);
  --border: rgba(15,20,23,0.08);
  --nav-bg: rgba(250,248,243,0.88);
  --bar-bg: rgba(255,255,255,0.92);
  --cta-bg: rgba(16,186,185,0.04);
  --toggle-track: rgba(15,20,23,0.12);
  --toggle-thumb: #fff;
  /* Gateway */
  --admin-bg: #faf8f3;
  --owner-bg: #0d1f1f;
  --admin-fg: #14181b;
  --owner-fg: #f2efe8;
  /* RentalCheck */
  --card-bg: rgba(255,255,255,0.7);
  --verified-bg: rgba(16,186,185,0.06);
  --action-bg: rgba(255,160,0,0.06);
  --refund-bg: rgba(80,80,200,0.05);
  --warning-bg: rgba(255,160,0,0.06);
  --warning-border: rgba(255,160,0,0.28);
}
[data-theme="dark"] {
  --bg: #0f1317;
  --fg: #f2efe8;
  --muted: rgba(242,239,232,0.55);
  --muted-text: rgba(242,239,232,0.72);
  --border: rgba(255,255,255,0.08);
  --nav-bg: rgba(15,19,23,0.88);
  --bar-bg: rgba(15,20,23,0.88);
  --cta-bg: rgba(16,186,185,0.05);
  /* Gateway */
  --admin-bg: #131a1a;
  --owner-bg: #051010;
  /* RentalCheck */
  --card-bg: rgba(255,255,255,0.04);
  --verified-bg: rgba(16,186,185,0.08);
  --action-bg: rgba(255,160,0,0.07);
  --refund-bg: rgba(80,80,200,0.07);
  --warning-bg: rgba(255,160,0,0.07);
  --warning-border: rgba(255,160,0,0.2);
}

body { background: var(--bg); color: var(--fg); }

/* ── Utilities ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tac-teal); margin-bottom: 24px;
}

.teal-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; background: var(--tac-teal);
  flex-shrink: 0; vertical-align: middle;
}
.teal-dot--sm { width: 8px; height: 8px; }

/* ── Navigation ── */
.site-nav {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  gap: 24px;
}

.site-nav__logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none;
}
.site-nav__logo-icon { display: block; }
.site-nav__logo-text {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px; color: var(--fg);
  letter-spacing: -0.01em; white-space: nowrap;
}
.site-nav__logo-amp { color: var(--tac-teal); }

.site-nav__links {
  display: flex; gap: 28px; list-style: none;
}
.site-nav__links a {
  font-size: 13px; font-weight: 500; color: var(--muted);
  letter-spacing: -0.005em; white-space: nowrap;
  border-bottom: 1.5px solid transparent; padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav__links a:hover { color: var(--fg); border-bottom-color: var(--tac-teal); }
.site-nav__links a.is-active {
  color: var(--fg); font-weight: 600; border-bottom-color: var(--tac-teal);
}
.site-nav__links li:first-child a {
  color: var(--fg); font-weight: 600; border-bottom-color: var(--tac-teal);
}

.site-nav__controls { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.site-nav__right    { display: flex; align-items: center; gap: 16px; }

.site-nav__back {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); transition: color 0.15s;
}
.site-nav__back:hover { color: var(--tac-teal); }

/* Language selector */
.lang-select {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: none;
  cursor: pointer; -webkit-appearance: none; appearance: none;
  max-width: 90px; padding: 0;
}
.lang-select option { color: #14181b; background: #fff; }

/* Dark mode toggle */
.theme-toggle {
  position: relative; width: 34px; height: 18px;
  background: var(--toggle-track); border-radius: 999px;
  cursor: pointer; border: none; padding: 0;
  transition: background 0.22s; flex-shrink: 0;
}
[data-theme="dark"] .theme-toggle { background: var(--tac-teal); }
.theme-toggle__thumb {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--toggle-thumb);
  transition: left 0.22s, background 0.22s;
}
[data-theme="dark"] .theme-toggle__thumb { left: 18px; background: #06201f; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 40px 40px 30px; }
.site-footer__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.site-footer__copy {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted);
}
.site-footer__links {
  display: flex; gap: 24px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.07em; text-transform: uppercase;
}
.site-footer__links a { color: var(--muted); transition: color 0.15s; }
.site-footer__links a:hover { color: var(--tac-teal); }

/* ── Back to top button ── */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; z-index: 50;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--tac-teal); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.22s, transform 0.22s, background 0.18s;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(16,186,185,0.28);
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.back-to-top:hover { background: #00a896; transform: translateY(-2px); }

/* ── Responsive base ── */
@media (max-width: 900px) {
  .site-nav { padding: 16px 20px; }
  .site-nav__links { display: none; }
  .site-footer { padding: 32px 20px 24px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
