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

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Focus visible ── */
*:focus-visible {
  outline: 2px solid rgb(var(--sage));
  outline-offset: 2px;
}

/* ── Design tokens (dark) ── */
:root {
  --bg-primary: 26 24 20;
  --bg-secondary: 35 32 26;
  --bg-tertiary: 46 42 34;
  --text-primary: 232 226 216;
  --text-secondary: 184 176 162;
  --text-muted: 155 148 138;
  --border: 58 53 44;
  --border-light: 74 68 58;
  --sage: 124 154 114;
  --sage-light: 163 194 150;
  --sage-dark: 90 120 80;
  --gold: 196 164 78;
  --gold-light: 221 196 110;
  --gold-dark: 160 128 48;
  --coral: 196 122 90;
  --coral-light: 224 160 128;
  --coral-dark: 160 88 56;
}

/* ── Base ── */
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: rgb(var(--text-primary));
  background-color: rgb(var(--bg-primary));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

a { color: inherit; text-decoration: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgb(var(--bg-primary)); }
::-webkit-scrollbar-thumb { background: rgb(var(--border)); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--border-light)); }

/* ── Layout ── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0;
}

.section-tight {
  padding-top: 48px;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(26, 24, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(var(--border), 0.5);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgb(var(--text-primary));
}

.wordmark span {
  color: rgb(var(--sage));
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgb(var(--sage));
  color: rgb(var(--bg-primary));
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 8px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 150ms, transform 150ms;
}

.nav-cta:hover { background: rgb(var(--sage-light)); }
.nav-cta:active { transform: scale(0.98); }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 64px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(var(--sage), 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
}

.hero-label {
  display: inline-block;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgb(var(--sage));
  margin-bottom: 24px;
  padding: 6px 16px;
  border: 1px solid rgba(var(--sage), 0.3);
  border-radius: 9999px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: italic;
  color: rgb(var(--sage-light));
}

.hero-sub {
  font-size: 1.125rem;
  line-height: 1.6;
  color: rgb(var(--text-secondary));
  max-width: 540px;
  margin: 0 auto 48px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgb(var(--sage));
  color: rgb(var(--bg-primary));
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-weight: 600;
  font-size: 1.0625rem;
  padding: 14px 32px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 150ms;
}

.btn-primary:hover { background: rgb(var(--sage-light)); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: rgb(var(--sage));
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-weight: 600;
  font-size: 1.0625rem;
  padding: 14px 32px;
  border-radius: 10px;
  border: 1px solid rgb(var(--sage));
  cursor: pointer;
  transition: all 150ms;
}

.btn-secondary:hover { background: rgba(var(--sage), 0.1); }
.btn-secondary:active { transform: scale(0.98); }

/* ── Three pillars ── */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .pillars { grid-template-columns: 1fr; }
}

.pillar {
  background: rgb(var(--bg-secondary));
  border: 1px solid rgb(var(--border));
  border-radius: 16px;
  padding: 36px 28px;
  transition: box-shadow 250ms, border-color 250ms;
}

.pillar:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
  border-color: rgb(var(--border-light));
}

.pillar-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.pillar-icon.sage { background: rgba(var(--sage), 0.15); color: rgb(var(--sage-light)); }
.pillar-icon.gold { background: rgba(var(--gold), 0.15); color: rgb(var(--gold-light)); }
.pillar-icon.coral { background: rgba(var(--coral), 0.15); color: rgb(var(--coral-light)); }

.pillar h3 {
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.pillar p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgb(var(--text-secondary));
}

/* ── Section headers ── */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-label {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgb(var(--text-muted));
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgb(var(--text-secondary));
}

/* ── Context Isolation deep-dive ── */
.isolation-block {
  background: rgb(var(--bg-secondary));
  border: 1px solid rgb(var(--border));
  border-radius: 16px;
  overflow: hidden;
}

.isolation-tabs {
  display: flex;
  border-bottom: 1px solid rgb(var(--border));
}

.isolation-tab {
  flex: 1;
  padding: 16px;
  text-align: center;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-weight: 600;
  font-size: 0.9375rem;
  color: rgb(var(--text-muted));
  background: none;
  border: none;
  cursor: pointer;
  transition: color 150ms, background 150ms;
  position: relative;
}

.isolation-tab:hover { color: rgb(var(--text-secondary)); }

.isolation-tab.active,
.isolation-tab[aria-selected="true"] {
  color: rgb(var(--sage-light));
  background: rgba(var(--sage), 0.05);
}

.isolation-tab.active::after,
.isolation-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: rgb(var(--sage));
}

.isolation-content {
  padding: 40px 36px;
}

@media (max-width: 640px) {
  .isolation-content { padding: 28px 20px; }
}

.isolation-panel { display: none; }
.isolation-panel.active { display: block; }
.isolation-panel[aria-hidden="true"] { display: none; }
.isolation-panel[aria-hidden="false"] { display: block; }

.isolation-panel h3 {
  font-size: 1.375rem;
  font-weight: 500;
  margin-bottom: 24px;
  color: rgb(var(--text-primary));
}

.isolation-panel p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgb(var(--text-secondary));
  margin-bottom: 16px;
}

.isolation-panel p:last-child {
  margin-bottom: 0;
}

.isolation-panel strong {
  color: rgb(var(--text-primary));
  font-weight: 500;
}

.isolation-panel .highlight {
  color: rgb(var(--sage-light));
  font-weight: 500;
}

.tech-detail {
  background: rgb(var(--bg-tertiary));
  border: 1px solid rgb(var(--border));
  border-radius: 10px;
  padding: 20px 24px;
  margin: 20px 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgb(var(--text-secondary));
}

.tech-detail code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.85em;
  background: rgba(var(--sage), 0.12);
  color: rgb(var(--sage-light));
  padding: 2px 6px;
  border-radius: 4px;
}

.tech-bullets {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.tech-bullets li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgb(var(--text-secondary));
}

.tech-bullets li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: rgb(var(--sage));
}

/* ── Visual demo: circles ── */
.circles-demo {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.demo-circle {
  text-align: center;
}

.demo-circle-ring {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  position: relative;
}

.demo-circle-ring.sage-ring { border-color: rgba(var(--sage), 0.5); }
.demo-circle-ring.gold-ring { border-color: rgba(var(--gold), 0.5); }
.demo-circle-ring.coral-ring { border-color: rgba(var(--coral), 0.5); }

.demo-circle-inner {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-weight: 600;
  font-size: 1.125rem;
}

.demo-circle-inner.sage-bg { background: rgba(var(--sage), 0.2); color: rgb(var(--sage-light)); }
.demo-circle-inner.gold-bg { background: rgba(var(--gold), 0.2); color: rgb(var(--gold-light)); }
.demo-circle-inner.coral-bg { background: rgba(var(--coral), 0.2); color: rgb(var(--coral-light)); }

.demo-circle-name {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgb(var(--text-primary));
  margin-bottom: 4px;
}

.demo-circle-id {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.6875rem;
  color: rgb(var(--text-muted));
  letter-spacing: 0.02em;
}

.demo-caption {
  text-align: center;
  color: rgb(var(--text-muted));
  font-size: 0.8125rem;
  margin-top: 16px;
  margin-bottom: 64px;
}

.demo-separator {
  display: flex;
  align-items: center;
  color: rgb(var(--border-light));
  font-size: 1.5rem;
  user-select: none;
}

@media (max-width: 640px) {
  .demo-separator { display: none; }
  .circles-demo { gap: 32px; }
}

/* ── Comparison ── */
.comparison {
  background: rgb(var(--bg-secondary));
  border-radius: 16px;
  border: 1px solid rgb(var(--border));
  overflow: hidden;
}

.comparison-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
  .comparison-row { grid-template-columns: 1fr; }
}

.comparison-col {
  padding: 36px 32px;
}

.comparison-col + .comparison-col {
  border-left: 1px solid rgb(var(--border));
}

@media (max-width: 640px) {
  .comparison-col + .comparison-col {
    border-left: none;
    border-top: 1px solid rgb(var(--border));
  }
}

.comparison-col h3 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.comparison-col.others h3 { color: rgb(var(--text-muted)); }
.comparison-col.bastion-col h3 { color: rgb(var(--sage-light)); }

.comparison-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgb(var(--text-secondary));
}

.comparison-item:last-child { margin-bottom: 0; }

.comparison-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 1px;
}

.icon-x {
  background: rgba(var(--coral), 0.15);
  color: rgb(var(--coral));
}

.icon-check {
  background: rgba(var(--sage), 0.15);
  color: rgb(var(--sage-light));
}

/* ── Honesty note ── */
.honesty-note {
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 28px;
  background: rgb(var(--bg-secondary));
  border: 1px solid rgb(var(--border));
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgb(var(--text-secondary));
  text-align: center;
}

/* ── Final CTA ── */
.final-cta {
  text-align: center;
  padding: 96px 0 120px;
  position: relative;
}

.final-cta::before {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(var(--sage), 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.final-cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.final-cta p {
  font-size: 1.0625rem;
  color: rgb(var(--text-secondary));
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.final-cta .container {
  position: relative;
}

/* ── Footer ── */
footer {
  border-top: 1px solid rgb(var(--border));
  padding: 36px 0;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  font-size: 0.8125rem;
  color: rgb(var(--text-muted));
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-left .wordmark {
  font-size: 1.125rem;
}

.footer-left .copyright {
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.8125rem;
  color: rgb(var(--text-muted));
  transition: color 150ms;
}

.footer-links a:hover { color: rgb(var(--text-secondary)); }

/* ── Animations ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  animation: fade-up 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Tagline accent line ── */
.accent-line {
  width: 48px;
  height: 2px;
  background: rgb(var(--sage));
  margin: 0 auto 48px;
  border-radius: 1px;
}

/* ── Privacy page ── */
.privacy-body {
  max-width: 680px;
  margin: 0 auto;
  padding-top: 120px;
  padding-bottom: 96px;
}

.privacy-body h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.privacy-body .subtitle {
  font-size: 1.0625rem;
  color: rgb(var(--text-secondary));
  line-height: 1.6;
  margin-bottom: 48px;
}

.privacy-body h2 {
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-top: 48px;
  margin-bottom: 16px;
  color: rgb(var(--text-primary));
}

.privacy-body p {
  font-size: 1rem;
  line-height: 1.7;
  color: rgb(var(--text-secondary));
  margin-bottom: 16px;
}

.privacy-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.privacy-body ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.7;
  color: rgb(var(--text-secondary));
}

.privacy-body ul li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: rgb(var(--sage));
}

.privacy-body a {
  color: rgb(var(--sage-light));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-body a:hover {
  color: rgb(var(--sage));
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
