@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&family=Roboto+Mono:wght@400;500&family=Roboto:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --canvas: #FCFBFA;
  --surface: #F4F3F0;
  --ink: #1A1A18;
  --muted: #7C7A75;
  --border: rgba(124, 122, 117, 0.22);
  --accent: #2E5BFF;
  --accent-hover: #1A46E6;
  --icon-bg: #4A4A4D;
  --icon-fg: #ECEAE6;
  --shadow: 0 24px 80px rgba(26, 26, 24, 0.08);
  --grid-line: rgba(26, 26, 24, 0.028);
  --max: 1120px;
  --radius-lg: 30px;
  --radius-md: 16px;
  --radius-sm: 8px;
}

[data-theme="dark"] {
  --canvas: #121212;
  --surface: #1E1E1E;
  --ink: #E3E3E3;
  --muted: #9E9C96;
  --border: rgba(255, 255, 255, 0.12);
  --accent: #5E81FF;
  --accent-hover: #7D9BFF;
  --icon-bg: #2E2E32;
  --icon-fg: #E3E3E3;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --grid-line: rgba(255, 255, 255, 0.03);
}

/* Dark theme activates explicitly via [data-theme="dark"] attribute */

* {
  box-sizing: border-box;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Roboto, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 200ms ease, color 200ms ease;
}

/* Background aesthetic grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(180deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
  z-index: 0;
}

/* Accessibility skip link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--accent);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition: top 150ms ease;
}

.skip-to-content:focus {
  top: 16px;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color 150ms ease;
}

.site-header,
.site-footer,
.section-shell {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

/* Header & Navigation */
.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--icon-bg);
  color: var(--icon-fg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1;
  box-shadow: inset 0 -8px 18px rgba(0, 0, 0, 0.18);
  transition: transform 200ms ease;
}

.brand:hover .mark {
  transform: rotate(-6deg) scale(1.05);
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  padding: 6px 0;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

/* Theme Switcher Button */
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.theme-toggle:hover {
  transform: scale(1.06);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mobile Nav Toggle */
.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 168px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.88fr);
  gap: 64px;
  align-items: center;
  padding: 64px 0 96px;
}

.eyebrow,
.small-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(44px, 7.5vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.05em;
  word-spacing: 0.03em;
  font-weight: 700;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(26px, 3.8vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.lede {
  max-width: 640px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

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

.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(46, 91, 255, 0.25);
}

.button.primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(46, 91, 255, 0.35);
}

.button.secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--muted);
}

/* Device Frame & Live Workspace Showcase */
.device-frame {
  border: 1px solid var(--border);
  border-radius: 36px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 200ms ease, background-color 200ms ease;
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  font-family: Roboto, ui-sans-serif, system-ui, sans-serif;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.phone-top .path {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-top .path .active-node {
  color: var(--ink);
  font-weight: 700;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.workspace-preview {
  min-height: 480px;
  display: grid;
  grid-template-columns: 35% 65%;
  overflow: hidden;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  background: var(--canvas);
}

.workspace-preview aside {
  background: var(--surface);
  padding: 24px 16px;
  border-right: 1px solid var(--border);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.file-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-family: "JetBrains Mono", "Roboto Mono", monospace;
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.file-btn:hover {
  background: rgba(124, 122, 117, 0.08);
  color: var(--ink);
}

.file-btn.active {
  background: var(--canvas);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.workspace-preview article {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  max-width: 680px;
  margin: 0 auto;
}

.editor-tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 12px;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.editor-input {
  width: 100%;
  min-height: 320px;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: "JetBrains Mono", "Roboto Mono", monospace;
  font-size: 15px;
  line-height: 1.6;
  resize: none;
  outline: none;
}

.live-render {
  min-height: 320px;
  font-family: "JetBrains Mono", "Roboto Mono", monospace;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

.live-render h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--ink);
}

.live-render h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  margin-top: 20px;
  margin-bottom: 12px;
  color: var(--ink);
}

.live-render h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.015em;
  margin-top: 16px;
  margin-bottom: 8px;
  color: var(--ink);
}

/* Video Preview Placeholder */
.video-placeholder {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
  background: linear-gradient(145deg, var(--surface), var(--canvas));
  overflow: hidden;
  cursor: pointer;
  padding: 48px 24px;
  text-align: center;
}

.video-poster-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.play-btn-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(46, 91, 255, 0.3);
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.video-placeholder:hover .play-btn-wrapper {
  transform: scale(1.08);
  box-shadow: 0 16px 40px rgba(46, 91, 255, 0.4);
}

.play-btn-wrapper svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  margin-left: 4px;
}

.video-caption {
  font-family: Roboto, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 8px 0 0;
}

.video-subcaption {
  font-family: "JetBrains Mono", "Roboto Mono", monospace;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

.live-render code {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--accent);
  font-family: "JetBrains Mono", "Roboto Mono", monospace;
  font-size: 13px;
  border: 1px solid var(--border);
}

/* Feature Grid */
.features,
.privacy-band,
.contact,
.page {
  padding: 88px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 40px;
}

.feature-list {
  border-top: 1px solid var(--border);
}

.feature-item {
  display: grid;
  grid-template-columns: minmax(200px, 0.36fr) minmax(0, 1fr);
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  transition: background-color 150ms ease;
}

.feature-item p {
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
}

/* Privacy Band */
.privacy-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.privacy-band p {
  color: var(--muted);
  font-size: 16px;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Contact & Pages */
.contact {
  max-width: 760px;
}

.contact p,
.prose-block p {
  color: var(--muted);
  font-size: 16px;
}

.page {
  max-width: 820px;
}

.prose-block,
.contact-card {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.contact-card .small-label {
  display: block;
  margin-bottom: 12px;
}

.contact-card a {
  display: inline-block;
  max-width: 100%;
  color: var(--accent);
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 0 56px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

/* Responsive Media Queries */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 32px;
    gap: 40px;
  }

  .privacy-band {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .workspace-preview {
    grid-template-columns: 1fr;
  }

  .workspace-preview aside {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 72px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow);
    z-index: 100;
  }

  .nav.open {
    display: flex;
  }

  .site-footer {
    flex-direction: column;
    gap: 16px;
  }
}
