/* Crimate project page. The palette is the app's own: an off-white canvas, navy
   ink, and the blue / green / purple / red the editor and its decks use. */
:root {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-tint: #f1f5f9;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.16);
  --blue: #2563eb;
  --green: #059669;
  --purple: #7c3aed;
  --violet: #8b5cf6;
  --amber: #d97706;
  --red: #dc2626;
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --code-muted: #94a3b8;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 24px 48px -20px rgba(15, 23, 42, 0.28);
  --dot: rgba(15, 23, 42, 0.11);
  --radius: 14px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1120;
    --bg-tint: #0f172a;
    --surface: #111827;
    --ink: #f1f5f9;
    --ink-2: #cbd5e1;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.14);
    --line-strong: rgba(148, 163, 184, 0.26);
    --blue: #60a5fa;
    --green: #34d399;
    --purple: #a78bfa;
    --violet: #c4b5fd;
    --amber: #fbbf24;
    --red: #f87171;
    --code-bg: #020617;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
    --dot: rgba(148, 163, 184, 0.14);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* One language at a time: the other is in the page, out of sight. */
html:not([lang='ko']) .ko,
html[lang='ko'] .en {
  display: none !important;
}

html[lang='ko'] body {
  word-break: keep-all;
  line-height: 1.7;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.88em;
}

p code,
li code,
.lead code {
  padding: 0.1em 0.38em;
  border-radius: 6px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  white-space: nowrap;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  margin: 0 0.12em;
  padding: 0.05em 0.35em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
  line-height: 1.4;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  transition: border-color 160ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 19px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-right: auto;
}

.site-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.site-nav a:hover {
  background: var(--bg-tint);
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  margin-left: auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang-switch button {
  min-width: 44px;
  white-space: nowrap;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
}

.lang-switch button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}

/* The page's repository on GitHub, beside the language switch. */
.header-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  margin-left: -16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 140ms ease;
}

.header-github:hover {
  background: var(--bg-tint);
}

.header-github svg {
  width: 18px;
  height: 18px;
}

/* Hero: the slide canvas's dot grid, fading out. */
.hero {
  position: relative;
  padding: 88px 0 24px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0 0 30% 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 20%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 20%, #000 30%, transparent 75%);
}

.hero-copy {
  max-width: 840px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.005em;
}

.eyebrow-green {
  color: var(--green);
}

.eyebrow-purple {
  color: var(--purple);
}

.eyebrow-violet {
  color: var(--violet);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.036em;
}

html[lang='ko'] h1 {
  letter-spacing: -0.035em;
  line-height: 1.18;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 780;
  letter-spacing: -0.026em;
}

html[lang='ko'] h2 {
  line-height: 1.25;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.lead {
  max-width: 720px;
  margin: 24px auto 0;
  color: var(--ink-2);
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.6;
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
  margin-left: -4px;
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.6);
}

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

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

.button-quiet:hover {
  background: var(--bg-tint);
}

.hero-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-shot {
  margin-top: 64px;
}

/* A window frame around app captures. */
.window {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  gap: 7px;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-tint);
}

.window-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f87171;
}

.window-bar i:nth-child(2) {
  background: #fbbf24;
}

.window-bar i:nth-child(3) {
  background: #34d399;
}

.window img {
  width: 100%;
}

.window figcaption {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

/* A close-up of one feature, cut from an app capture. */
.shot {
  margin: 56px 0 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shot img {
  width: 100%;
}

.shot figcaption {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.shot-narrow {
  max-width: 680px;
  margin-inline: auto;
}

.shot.lecturer-shot {
  margin-top: 0;
}

.cards.lecture-cards {
  margin-top: 28px;
}

.lecture-cards .card h3 {
  margin-top: 0;
}

/* Sections */
.section {
  padding: 112px 0;
}

.section-tint {
  border-block: 1px solid var(--line);
  background: var(--bg-tint);
}

.section-tint p code,
.section-tint li code {
  background: var(--surface);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head > p:last-child,
.split-copy > p {
  color: var(--ink-2);
}

.section-head > p:last-child {
  margin: 16px 0 0;
  font-size: 19px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.split-media {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

/* Room for the .crim sample's longest line without scrolling. */
.split-code {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
}

.split-copy h2 {
  margin-bottom: 20px;
}

.split-copy > p {
  margin: 0 0 16px;
}

.ticks {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  margin-top: 10px;
  padding-left: 28px;
  color: var(--ink-2);
  font-size: 16px;
}

.ticks li::before {
  content: '';
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 14px;
  height: 7px;
  border-left: 2.2px solid var(--green);
  border-bottom: 2.2px solid var(--green);
  transform: rotate(-45deg);
}

/* The chat window, captured at its own width beside the copy. */
.split-chat {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.chat-card {
  justify-self: center;
  width: min(100%, 380px);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chat-card img {
  width: 100%;
}

.chat-card figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* The demo video. */
.video-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #f8fafc;
  box-shadow: var(--shadow);
}

.video-frame video {
  width: 100%;
  aspect-ratio: 1280 / 1000;
}

.video-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.video-toggle svg {
  width: 18px;
  height: 18px;
}

.video-toggle .icon-play,
.video-toggle.is-paused .icon-pause {
  display: none;
}

.video-toggle.is-paused .icon-play {
  display: block;
}

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 28px 26px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 {
  margin-top: 18px;
}

.card p {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}

.card-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tone-blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 11%, transparent); }
.tone-green { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); }
.tone-amber { color: var(--amber); background: color-mix(in srgb, var(--amber) 13%, transparent); }
.tone-purple { color: var(--purple); background: color-mix(in srgb, var(--purple) 11%, transparent); }
.tone-violet { color: var(--violet); background: color-mix(in srgb, var(--violet) 13%, transparent); }
.tone-red { color: var(--red); background: color-mix(in srgb, var(--red) 11%, transparent); }

/* Code */
.code-card {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-ink);
  box-shadow: var(--shadow);
}

.code-card figcaption {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--code-muted);
  font-family: var(--mono);
  font-size: 13px;
}

.code-card pre {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  tab-size: 2;
}

.code-card code {
  font-size: inherit;
}

.code-card .k { color: #7dd3fc; }
.code-card .id { color: #86efac; }
.code-card .s { color: #fde68a; }
.code-card .n { color: #c4b5fd; }

/* A hex color with its swatch. */
.code-card .c::before {
  content: '';
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.35em;
  border-radius: 3px;
  background: var(--swatch);
  vertical-align: -0.08em;
}

.chat-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.chat-details article,
.web-availability {
  padding-top: 24px;
  border-top: 1px solid var(--line-strong);
}

.chat-details p,
.web-availability p {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}

.web-availability {
  margin-top: 32px;
  max-width: 760px;
}

.status-updated {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Platforms and availability */
.status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-item {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.status-item h3 {
  margin-top: 16px;
}

.status-item p {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill-blue { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.pill-green { color: var(--green); background: color-mix(in srgb, var(--green) 13%, transparent); }
.pill-muted { color: var(--muted); background: color-mix(in srgb, var(--muted) 14%, transparent); }

.stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.stack > span:not(.stack-item) {
  margin-right: 4px;
}

.stack-item {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
}

/* Footer */
.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}

.footer-row p {
  margin: 0;
}

/* Narrower windows */
@media (max-width: 1100px) {
  .site-nav {
    display: none;
  }
}

@media (max-width: 960px) {
  .site-nav {
    display: none;
  }

  .split,
  .split-media {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .cards,
  .status,
  .chat-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding: 88px 0;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .header-row {
    gap: 14px;
  }

  /* Phones: the mark alone, the name kept for screen readers. */
  .header-github {
    flex: none;
    width: 38px;
    margin-left: -6px;
    padding: 0;
    justify-content: center;
  }

  .header-github-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .header-row {
    height: 58px;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-shot {
    margin-top: 44px;
  }

  .window-bar {
    height: 26px;
    gap: 6px;
  }

  .window-bar i {
    width: 9px;
    height: 9px;
  }

  .cards,
  .status,
  .chat-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 72px 0;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .code-card pre {
    padding: 16px;
    font-size: 12.5px;
  }

  .window figcaption,
  .shot figcaption {
    padding: 12px 14px;
    font-size: 14px;
  }

  .shot {
    margin-top: 40px;
  }

  .video-toggle {
    right: 10px;
    bottom: 10px;
    height: 32px;
    font-size: 13px;
  }
}
