:root {
  color-scheme: light;
  --bg: #0e1312;
  --paper: #ededeb;
  --ink: #0e1312;
  --muted: rgba(14, 19, 18, 0.72);
  --dark-text: #ededec;
  --dark-muted: #a9a39b;
  --dark-line: rgba(237, 237, 236, 0.15);
  --dark-line-strong: rgba(237, 237, 236, 0.28);
  --sample-radius: 18px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

button,
pre {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.mono {
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(237, 237, 235, 0.92);
  border-bottom: 1px solid rgba(14, 19, 18, 0.18);
  backdrop-filter: blur(16px);
}

.site-header.dark {
  background: rgba(14, 19, 18, 0.92);
  border-bottom-color: var(--dark-line);
  color: var(--dark-text);
}

.nav {
  width: min(1180px, calc(100% - 40px));
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.brand {
  font-weight: 900;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: inherit;
  font-size: 0.68rem;
}

.nav-links a {
  text-decoration: none;
  opacity: 0.72;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  opacity: 1;
}

.hero {
  min-height: 88vh;
  display: grid;
  align-items: center;
  padding: 72px 0 58px;
  background: var(--paper);
  box-shadow: 0 0 0 100vmax var(--paper);
  clip-path: inset(0 -100vmax);
}

.hero.compact {
  min-height: auto;
  padding: 72px 0 64px;
}

.hero-meta {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 58px;
  color: rgba(14, 19, 18, 0.86);
  font-size: 0.68rem;
  line-height: 1.55;
}

.hero-meta::before {
  content: attr(data-left);
  white-space: pre;
}

.hero-meta::after {
  content: attr(data-right);
  justify-self: end;
}

.hero-rule {
  height: 1px;
  margin-top: 0.55rem;
  background: rgba(14, 19, 18, 0.68);
}

.eyebrow {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(0.68rem, 0.82vw, 0.78rem);
  line-height: 1.65;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(4rem, 10vw, 10.5rem);
  line-height: 0.84;
  letter-spacing: 0;
  font-weight: 820;
}

.compact h1,
.detail-hero h1 {
  max-width: 980px;
  font-size: clamp(3.4rem, 7vw, 7.4rem);
  line-height: 0.92;
}

.subtitle {
  max-width: 780px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.64;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(14, 19, 18, 0.32);
  border-radius: 0;
  background: #f7f7f4;
  color: var(--ink);
  cursor: pointer;
  padding: 0 20px;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 180ms ease-out,
    background-color 180ms ease-out,
    color 180ms ease-out;
}

.button:hover {
  transform: translateY(-1px);
  background: #ffffff;
}

.button:active {
  transform: scale(0.98);
}

.button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.button.small {
  min-height: 36px;
  padding: 0 13px;
  font-size: 0.7rem;
}

.dark-section {
  padding: 86px 0 0;
  color: var(--dark-text);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 34px;
  padding: 28px 0 56px;
  border-top: 1px solid var(--dark-line);
  border-bottom: 1px solid var(--dark-line);
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro p,
.callout p,
.category-card p,
.site-footer p,
.detail-copy {
  margin: 0;
  color: var(--dark-muted);
  font-size: 0.97rem;
  line-height: 1.7;
}

.grid-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.grid-heading p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--dark-muted);
}

.category-grid,
.idea-grid {
  counter-reset: item;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.idea-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-card,
.idea-card {
  counter-increment: item;
  position: relative;
  min-width: 0;
  border: 1px solid var(--dark-line);
  border-top-color: var(--dark-line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.016)),
    #101615;
}

.category-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 22px 22px;
}

.idea-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 58px 22px 22px;
}

.category-card::before,
.idea-card::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  top: 20px;
  left: 22px;
  padding: 4px 8px;
  background: var(--dark-text);
  color: var(--bg);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
}

.category-card::after,
.idea-card::after {
  content: "";
  position: absolute;
  top: 29px;
  left: 62px;
  right: 22px;
  height: 1px;
  background: var(--dark-line);
}

.category-card h3,
.idea-card h3 {
  margin: 0;
  color: var(--dark-text);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.06;
}

.purpose {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--dark-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.preview {
  min-height: 230px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--sample-radius);
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.9), transparent 38%),
    repeating-radial-gradient(circle at 0 0, rgba(14, 19, 18, 0.17) 0 1px, transparent 1px 15px),
    linear-gradient(135deg, #f5f5f3 0%, #dfdfdc 54%, #bdbdb9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.detail-preview {
  min-height: 420px;
  margin: 42px 0 0;
}

.mini-stack {
  width: min(300px, 86%);
  display: grid;
  gap: 10px;
}

.mini-card,
.hover-card,
.command-panel,
.toast,
.accordion-demo,
.sample-panel {
  border: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f1f1ef 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.mini-card {
  min-height: 48px;
  border-radius: 13px;
  padding: 12px;
  animation: fade-up 2600ms var(--ease-out) infinite both;
}

.mini-card:nth-child(2) {
  animation-delay: 160ms;
}

.mini-card:nth-child(3) {
  animation-delay: 320ms;
}

.mini-line {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1d1d1d, #737373);
}

.mini-line.short {
  width: 58%;
  margin-top: 9px;
  background: linear-gradient(90deg, #b7b7b7, #dddddd);
}

.hover-card {
  width: min(300px, 84%);
  border-radius: 15px;
  padding: 22px;
  transition:
    transform 180ms ease-out,
    box-shadow 180ms ease-out;
}

.hover-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.18);
}

.press-button {
  min-width: 168px;
  min-height: 48px;
  border-radius: 12px;
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: transform 100ms ease-out;
}

.press-button:active {
  transform: scale(0.98);
}

.command-panel {
  width: min(320px, 86%);
  border-radius: 16px;
  padding: 14px;
  animation: command-reveal 2300ms ease-out infinite both;
}

.command-input {
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(90deg, #e2e2e2, #f6f6f6);
  margin-bottom: 9px;
}

.command-row {
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(90deg, #ffffff, #eeeeee);
  margin-top: 8px;
}

.accordion-demo {
  width: min(330px, 88%);
  border-radius: 15px;
  overflow: hidden;
}

.accordion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 760;
}

.accordion-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 220ms ease-out,
    opacity 220ms ease-out;
}

.accordion-demo.open .accordion-content {
  max-height: 120px;
  opacity: 1;
}

.accordion-body {
  padding: 0 16px 16px;
  color: #555555;
  font-size: 0.86rem;
}

.toast-wrap {
  width: min(340px, 88%);
  display: flex;
  justify-content: end;
}

.toast {
  width: 235px;
  border-radius: 14px;
  padding: 14px 15px;
  animation: toast-slide 2500ms ease-out infinite both;
}

.toast strong {
  display: block;
  font-size: 0.9rem;
}

.toast span {
  display: block;
  color: #555555;
  font-size: 0.8rem;
  margin-top: 2px;
}

.sample-panel {
  width: min(330px, 86%);
  min-height: 150px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #767676;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
}

.code-grid {
  display: grid;
  gap: 12px;
}

.code-block {
  min-width: 0;
  border: 1px solid rgba(237, 237, 236, 0.12);
  background: linear-gradient(180deg, #151b19 0%, #0b1110 100%);
  color: #f7f7f7;
  overflow: hidden;
}

.code-block header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #d7d7d5;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

pre {
  margin: 0;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  color: #f4f4f4;
  font-size: 0.78rem;
  line-height: 1.6;
}

.callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 34px 0 70px;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-text);
}

.callout + .callout {
  padding-top: 34px;
}

.callout h2 {
  margin-bottom: 10px;
}

.callout .button,
.dark-section .button {
  border-color: var(--dark-text);
  background: var(--dark-text);
  color: var(--bg);
}

.site-footer {
  margin-top: 86px;
  padding: 36px 0 56px;
  border-top: 1px solid var(--dark-line);
  color: var(--dark-text);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(120px, 0.6fr));
  gap: 24px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  font-size: 0.74rem;
}

.footer-grid a {
  display: block;
  margin-top: 8px;
  color: var(--dark-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--dark-text);
}

@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  16%,
  74% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(0);
  }
}

@keyframes command-reveal {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  12%,
  78% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-slide {
  0% {
    opacity: 0;
    transform: translateX(16px);
  }
  14%,
  78% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(0);
  }
}

@media (max-width: 960px) {
  .category-grid,
  .idea-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page,
  .nav {
    width: min(100% - 28px, 1180px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .hero {
    min-height: auto;
    padding: 54px 0 42px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 40px;
  }

  .hero-meta::after {
    justify-self: start;
  }

  .hero-rule {
    width: 100%;
  }

  h1 {
    font-size: clamp(4.8rem, 21vw, 6.8rem);
  }

  .compact h1,
  .detail-hero h1 {
    font-size: clamp(3.2rem, 16vw, 5rem);
  }

  .intro,
  .callout,
  .footer-grid {
    grid-template-columns: 1fr;
    padding: 26px 0 42px;
  }

  .grid-heading {
    display: block;
  }

  .preview {
    min-height: 190px;
  }

  .detail-preview {
    min-height: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .button:hover,
  .hover-card:hover {
    transform: none;
  }
}
