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

:root {
  --bg: #ffffff;
  --text: #1c1c1c;
  --text-dim: #8f8f8f;
  --text-muted: #bbbbbb;
  --border: #e8e8e8;
  --accent: #3a7bd5;
  --font: 'JetBrains Mono', monospace;
  --max-w: 1100px;
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  --transition: 0.18s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 52px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: -0.03em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid transparent;
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text-dim);
}

.btn-outline:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.btn-dark {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.btn-dark:hover {
  opacity: 0.8;
}

.feature-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 92px 32px 56px;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 0.72fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 24px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.12em;
}

h1 {
  max-width: 680px;
  margin-bottom: 24px;
  font-size: clamp(2.3rem, 5vw, 4.3rem);
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.hero-copy {
  max-width: 500px;
  margin-bottom: 34px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.8;
}

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

.panel {
  border: 1px solid var(--border);
  background: #f8f8f8;
  box-shadow: var(--shadow-lg);
}

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 32px 92px;
}

.section-label {
  margin-bottom: 26px;
  color: var(--text-dim);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.detail-card {
  min-height: 154px;
  padding: 28px;
  background: #fff;
}

.detail-card h2 {
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.detail-card p {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.8;
}

.theme-board {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.theme-tile {
  min-height: 116px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(0,0,0,0.12);
}

.theme-tile span {
  font-size: 10px;
}

.theme-tile i {
  display: block;
  width: 68%;
  height: 8px;
  background: currentColor;
  opacity: 0.34;
}

.theme-white { background: #fff; color: #1c1c1c; }
.theme-dark { background: #191919; color: #d0d0d0; }
.theme-sepia { background: #f6e8cb; color: #3d2a1c; }
.theme-forest { background: #edf0e7; color: #2c3828; }
.theme-low { background: #1b1c1f; color: #a8abb1; }
.theme-high { background: #11141a; color: #f0f3f7; border-color: #78a8ff; }
.theme-cool { background: #f6fbfc; color: #22343c; }
.theme-warm { background: #fff8ef; color: #3d2a22; }

.typewriter-feature {
  --bg: #ffffff;
  --text: #1c1c1c;
  --text-dim: #8f8f8f;
  --text-muted: #bbbbbb;
  --border: #e8e8e8;
  --accent: #3a7bd5;
  background:
    linear-gradient(180deg, rgba(58, 123, 213, 0.04), transparent 34%),
    var(--bg);
}

.typewriter-feature nav {
  background: rgba(255,255,255,0.9);
}

.typewriter-feature h1 {
  max-width: 760px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300;
  letter-spacing: -0.07em;
}

.typewriter-feature .eyebrow,
.typewriter-feature .section-label {
  border-color: var(--border);
  color: var(--accent);
}

.typewriter-feature .detail-grid {
  box-shadow: none;
}

.typewriter-feature .detail-card {
  background: #fff;
}

.mode-stage {
  height: 520px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-stage--focus {
  background: #080808;
  color: #e0e0e0;
}

.mode-stage--typewriter {
  background: #f5efe4;
  color: #2a241b;
}

.typewriter-feature .mode-stage--typewriter {
  position: relative;
  overflow: hidden;
  border-color: #d8d8d8;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.06), transparent 30%),
    #080808;
  color: #e0e0e0;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.18),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}

.typewriter-feature .mode-stage--typewriter::before,
.typewriter-feature .mode-stage--typewriter::after {
  display: none;
}

.mode-page {
  position: relative;
  width: min(100%, 430px);
  min-height: 330px;
  padding: 70px 52px;
  overflow: hidden;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 4%, transparent);
  box-shadow: 0 22px 60px rgba(0,0,0,0.28);
}

.typewriter-feature .mode-page {
  width: min(100%, 470px);
  min-height: 356px;
  padding: 78px 58px;
  border: 1px solid rgba(224,224,224,0.46);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    rgba(8,8,8,0.26);
  box-shadow:
    0 28px 70px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transform: none;
}

.typewriter-feature .mode-page::before {
  display: none;
}

.typewriter-feature .mode-page::after {
  inset: 0;
  height: auto;
  border-radius: 0;
  background:
    linear-gradient(to bottom, #080808 0%, transparent 28%, transparent 72%, #080808 100%);
  opacity: 1;
}

.mode-page::before,
.mode-page::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 94px;
  z-index: 1;
  pointer-events: none;
}

.mode-page::before {
  top: 0;
  background: linear-gradient(to bottom, currentColor, transparent);
  opacity: 0.08;
}

.mode-page::after {
  bottom: 0;
  background: linear-gradient(to top, currentColor, transparent);
  opacity: 0.08;
}

.mode-line {
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
  color: currentColor;
  font-size: 12px;
  line-height: 1.8;
  opacity: 0.24;
}

.typewriter-feature .mode-line {
  font-size: 12.5px;
  letter-spacing: -0.01em;
  opacity: 0.28;
  text-align: left;
}

.mode-line.active {
  opacity: 1;
  outline: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  outline-offset: 10px;
}

.typewriter-feature .mode-line.active {
  color: #f3f3f3;
  outline: none;
  text-shadow: none;
}

.mode-line.typewriter-active {
  transform: translateY(48px);
}

.typewriter-feature .mode-line.typewriter-active::after {
  content: '';
  position: absolute;
  left: calc(100% - 2px);
  top: calc(100% + 9px);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid #3a7bd5;
  transform: translateX(-50%);
}

.mode-cursor {
  display: inline-block;
  width: 2px;
  height: 15px;
  margin-left: 4px;
  background: currentColor;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 820px) {
  .nav-inner,
  .feature-hero,
  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .feature-hero {
    grid-template-columns: 1fr;
    padding-top: 64px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .mode-stage {
    height: auto;
    padding: 20px;
  }
}
