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

:root {
  color-scheme: light;
  --background: oklch(98.5% 0.006 248);
  --panel: oklch(95% 0.025 244);
  --panel-strong: oklch(91% 0.045 244);
  --text: oklch(24% 0.02 255);
  --muted: oklch(49% 0.02 255);
  --soft: oklch(61% 0.018 255);
  --border: oklch(85% 0.025 244);
  --link: oklch(49% 0.16 260);
  --accent: oklch(59% 0.19 28);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.home-page {
  min-height: 100svh;
  overflow-x: hidden;
}

a {
  color: var(--link);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

::selection {
  background: var(--panel-strong);
}

.site-nav,
.footer-inner,
main {
  width: min(980px, calc(100% - 32px));
  margin-inline: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.mail-icon {
  position: relative;
  display: inline-block;
  width: 27px;
  height: 19px;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: oklch(99.5% 0.003 248);
}

.mail-icon::before {
  position: absolute;
  top: -9px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  content: "";
  transform: rotate(45deg);
}

.home-page main {
  min-height: calc(100svh - 72px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(48px, 8vw, 96px);
  align-items: center;
  min-height: calc(100svh - 72px);
  padding: 28px 0 48px;
}

.hero h1,
.legal-page h1 {
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.055em;
}

.hero h1 {
  max-width: 650px;
  font-size: clamp(2.8rem, min(5vw, 8vh), 4.6rem);
  line-height: 1;
}

.hero-copy,
.legal-intro {
  max-width: 530px;
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.55;
}

.hero-copy {
  margin-top: 24px;
}

.home-legal {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.home-legal a {
  font-size: 11px;
}

.prompt-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: oklch(99.5% 0.003 248);
  box-shadow: 0 18px 50px oklch(35% 0.05 255 / 10%);
}

.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: oklch(98% 0.005 248);
  cursor: pointer;
  font: 600 11px ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 150ms ease, transform 150ms var(--ease-out);
}

.copy-button:active {
  transform: scale(0.97);
}

.copy-icon {
  position: relative;
  width: 12px;
  height: 12px;
}

.copy-icon::before,
.copy-icon::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 1px;
  content: "";
}

.copy-icon::before {
  top: 1px;
  left: 1px;
  opacity: 0.7;
}

.copy-icon::after {
  right: 1px;
  bottom: 1px;
  background: var(--accent);
}

.terminal {
  min-height: 200px;
  padding: 30px;
  background: oklch(99.5% 0.003 248);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.7;
  white-space: pre-wrap;
}

.legal-page {
  padding: 72px 0 96px;
}

.hero-label {
  color: var(--muted);
  font-size: 12px;
}

.legal-page h1 {
  margin: 10px 0 18px;
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 0.9;
}

.updated {
  margin: 16px 0 34px;
  color: var(--soft);
  font-size: 11px;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.card {
  min-height: 180px;
  padding: 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: oklch(99.5% 0.003 248);
}

.card h2,
.card h3 {
  margin: -20px -20px 16px;
  padding: 10px 12px;
  background: var(--panel);
  font-size: 14px;
}

.card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card code {
  color: var(--accent);
}

footer {
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.home-page .site-nav {
  animation: fade-in 450ms ease-out both;
}

.home-page .mail-icon {
  animation: mark-in 550ms var(--ease-out) both;
}

.home-page .hero h1,
.home-page .hero-copy,
.home-page .home-legal,
.home-page .prompt-shell {
  animation: rise-in 600ms var(--ease-out) both;
}

.home-page .hero-copy {
  animation-delay: 60ms;
}

.home-page .home-legal {
  animation-delay: 110ms;
}

.home-page .prompt-shell {
  animation-delay: 100ms;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mark-in {
  from { opacity: 0; transform: scale(0.94) rotate(-4deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.footer-inner,
.footer-inner nav {
  display: flex;
  align-items: center;
}

.footer-inner {
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}

.footer-inner nav {
  gap: 16px;
}

.footer-inner a {
  font-size: 12px;
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
    align-content: center;
    padding: 22px 0 34px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, min(11vw, 7.5vh), 3.4rem);
  }

  .hero-copy {
    margin-top: 14px;
    font-size: 13px;
  }

  .home-legal {
    margin-top: 12px;
  }

  .terminal {
    min-height: 0;
    padding: 16px;
    font-size: clamp(10px, 2.4vw, 12px);
    line-height: 1.5;
  }

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

  .card {
    min-height: 0;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 22px 0;
  }
}

@media (hover: hover) and (pointer: fine) {
  .copy-button:hover {
    background: oklch(54% 0.19 28);
    transform: translateY(-1px);
  }
}

@media (max-height: 620px) {
  .hero h1 {
    font-size: clamp(2.2rem, 7vh, 3.2rem);
  }

  .hero-copy {
    margin-top: 10px;
  }

  .home-legal {
    margin-top: 9px;
  }

  .terminal {
    padding: 12px;
    line-height: 1.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .home-page .site-nav,
  .home-page .mail-icon,
  .home-page .hero h1,
  .home-page .hero-copy,
  .home-page .home-legal,
  .home-page .prompt-shell {
    animation: none;
  }

  .copy-button {
    transition: none;
  }
}
