/* omacast.site: Catppuccin Mocha by default, Latte in light mode; typecraft's stripe colours stay fixed. */
@font-face { font-family: Cartridge; src: url("/fonts/Cartridge-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Cartridge; src: url("/fonts/Cartridge-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Cartridge; src: url("/fonts/Cartridge-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --base: #1e1e2e; --mantle: #181825; --crust: #11111b;
  --surface0: #313244; --surface1: #45475a; --overlay0: #6c7086;
  --text: #cdd6f4; --subtext: #a6adc8;
  --mauve: #cba6f7; --sky: #89dceb; --blue: #89b4fa; --green: #a6e3a1;
  --peach: #fab387; --red: #f38ba8; --yellow: #f9e2af; --lavender: #b4befe;
  --navy: #242936; --teal: #1a9298; --orange: #e08e1d; --brand-red: #e74553; --cream: #eed6d0;
  --radius: 12px;
  --shadow: 0 30px 70px -28px rgb(0 0 0 / 0.7);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --display: Cartridge, "Arial Black", system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --base: #eff1f5; --mantle: #e6e9ef; --crust: #dce0e8;
    --surface0: #ccd0da; --surface1: #bcc0cc; --overlay0: #9ca0b0;
    --text: #4c4f69; --subtext: #6c6f85;
    --mauve: #8839ef; --sky: #04a5e5; --blue: #1e66f5; --green: #40a02b;
    --peach: #fe640b; --red: #d20f39; --yellow: #df8e1d; --lavender: #7287fd;
    --shadow: 0 30px 60px -30px rgb(76 79 105 / 0.5);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--base); color: var(--text); overflow-x: hidden;
  font: 16px/1.65 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre { font-family: "JetBrains Mono", ui-monospace, monospace; }
code { font-size: 0.88em; background: var(--surface0); padding: 0.1em 0.4em; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
/* Cartridge is always set in capitals. */
.display { font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1; }
.label { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- nav ---------- */
nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--base) 80%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--surface0);
}
nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.6rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; transition: transform 450ms var(--ease-spring); }
.brand:hover svg { transform: rotate(-8deg) scale(1.08); }
/* The logo is drawn on a 30-unit grid, so 30px (or a multiple) keeps its edges on whole pixels. Its cursor blinks. */
.cursor { animation: blink 1.1s steps(1) infinite; }
.links { display: flex; gap: 22px; margin-left: auto; font-size: 0.93rem; font-weight: 500; }
.links a { color: var(--subtext); position: relative; }
.links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: var(--brand-red); transform: scaleX(0); transform-origin: left; transition: transform 250ms var(--ease-out);
}
.links a:hover { color: var(--text); text-decoration: none; }
.links a:hover::after { transform: scaleX(1); }
@media (max-width: 860px) { .links { display: none; } nav .btn { margin-left: auto; } }

/* ---------- buttons, chips, kbd ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; position: relative; overflow: hidden;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 0.97rem;
  border: 2px solid var(--text); color: var(--text); transition: transform 200ms var(--ease-spring);
  background: none; font-family: inherit; line-height: inherit; cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn.primary { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.btn.small { padding: 7px 16px; font-size: 0.88rem; border-width: 1.5px; }
kbd {
  display: inline-block; min-width: 1.9em; padding: 0.1em 0.5em; text-align: center;
  font-size: 0.8rem; font-weight: 600; color: var(--text);
  background: var(--mantle); border: 1.5px solid var(--surface1); border-bottom-width: 3px; border-radius: 7px;
  transition: transform 90ms ease, border-bottom-width 90ms ease, background 150ms ease, color 150ms ease;
}
kbd.pressed, .keys kbd:hover { transform: translateY(2px); border-bottom-width: 1.5px; background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600;
  padding: 3px 10px; border-radius: 6px; background: var(--surface0); color: var(--subtext);
}

/* ---------- hero ---------- */
.hero { padding: 64px 0 56px; position: relative; isolation: isolate; overflow-x: clip; }
/* typecraft.dev's dot grid: texture without a gradient wash */
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1.12fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 5.2rem); margin: 0 0 24px; }
.hero h1 span { display: block; opacity: 0; transform: translateY(0.4em); animation: rise 800ms var(--ease-out) forwards; }
.hero h1 span:nth-child(2) { animation-delay: 120ms; }
.hero h1 span:nth-child(3) { animation-delay: 240ms; }
.hero h1 .accent { color: var(--brand-red); }
.hero p.lead, .hero .cta, .hero .hint { opacity: 0; animation: rise 800ms var(--ease-out) forwards; }
.hero p.lead { animation-delay: 360ms; font-size: 1.15rem; color: var(--subtext); max-width: 34em; margin: 0 0 30px; }
.hero .cta { animation-delay: 460ms; }
.hero .hint { animation-delay: 560ms; margin-top: 22px; color: var(--subtext); font-size: 0.92rem; }
.btn kbd { margin-left: 4px; }
/* No keyboard, no shortcut to advertise. */
@media (hover: none) { .btn kbd { display: none; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stage { opacity: 0; animation: pop 900ms 300ms var(--ease-out) forwards; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

/* ---------- the live launcher (launcher.css styles the window itself) ---------- */
.desk {
  --m-accent: #89b4fa;
  position: relative; border-radius: var(--radius); padding: 26px; cursor: pointer;
  background: color-mix(in srgb, var(--m-accent) 14%, var(--crust));
  border: 1px solid var(--surface0); box-shadow: var(--shadow);
  transition: background 600ms ease;
}
/* The demo says it can be taken over: a label on hover, and a line underneath for touch and keyboard. */
.desk::after {
  content: "Click to take over"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.96);
  padding: 10px 18px; border-radius: 10px; background: var(--brand-red); color: #fff; font-weight: 600; font-size: 0.97rem;
  opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 180ms var(--ease-out);
}
.desk .oc { transition: filter 180ms ease, background 500ms ease, color 500ms ease, border-color 500ms ease; }
@media (hover: hover) {
  .stage.ready .desk:hover::after { opacity: 1; transform: translate(-50%, -50%); }
  .stage.ready .desk:hover .oc { filter: brightness(0.55); }
}
.takeover { margin: 10px 0 0; text-align: center; color: var(--subtext); font-size: 0.92rem; }
.takeover button {
  font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--brand-red); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.takeover button:hover { color: var(--brand-red); }
.presses { display: flex; justify-content: center; gap: 6px; min-height: 30px; margin-top: 16px; }
.presses kbd { animation: keyIn 220ms var(--ease-spring) both; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; border-top: 1px solid var(--surface0); }
.stat { padding: 20px 0 0; }
.stat b { display: block; font: 900 2.4rem/1 var(--display); color: var(--text); }
.stat span { color: var(--subtext); font-size: 0.9rem; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* typecraft's three stripes as a divider that sweeps in */
.stripes { height: 14px; background: linear-gradient(100deg, var(--teal) 0 33.3%, var(--orange) 33.3% 66.6%, var(--brand-red) 66.6%); transform-origin: left; }
.stripes.reveal { transform: scaleX(0); opacity: 1; }
.stripes.reveal.in { transform: scaleX(1); transition: transform 1.2s var(--ease-out); }

/* ---------- section connector: typecraft.dev's dashed line, drawn down to each heading as you scroll ---------- */
.connector { --p: 0; --c: var(--sky); width: min(1120px, 100% - 32px); margin-inline: auto; padding: 24px 0 28px 3px; }
.connector .track {
  position: relative; width: 2px; height: clamp(4rem, 9vw, 7rem);
  background-image: linear-gradient(to bottom, var(--surface1) 0 60%, transparent 60% 100%); background-size: 2px 12px;
}
.connector .fill {
  position: absolute; inset: 0; clip-path: inset(0 0 calc((1 - var(--p)) * 100%) 0);
  background-image: linear-gradient(to bottom, var(--c) 0 60%, transparent 60% 100%); background-size: 2px 12px;
}
.connector .head {
  position: absolute; left: 50%; top: calc(var(--p) * 100%); width: 8px; height: 8px;
  background: var(--c); transform: translate(-50%, -50%); opacity: calc(var(--p) * 4);
}

/* ---------- sections ---------- */
section { padding: 24px 0 96px; }
section.alt { background: var(--mantle); }
.head { max-width: 46em; margin-bottom: 44px; }
.head h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); margin: 0 0 16px; }
.head p { color: var(--subtext); font-size: 1.08rem; margin: 0; }

/* scroll reveal, staggered by --i */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--base); border: 1px solid var(--surface0); border-radius: var(--radius);
  padding: 26px;
}
.card.reveal.in { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out), border-color 250ms ease, box-shadow 250ms ease; }
.card:hover { border-color: var(--surface1); box-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.6); }
.card.in:hover { transform: translateY(-4px); }
section:not(.alt) .card { background: var(--mantle); }
.card h3 { font-size: 1rem; margin: 0 0 8px; }
.card p { margin: 0; color: var(--subtext); font-size: 0.97rem; }
.card ul { margin: 12px 0 0; padding-left: 1.1em; color: var(--subtext); font-size: 0.95rem; }
.card li { margin: 4px 0; }
.card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

/* ---------- calculator ---------- */
.calcwrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: start; }
@media (max-width: 900px) { .calcwrap { grid-template-columns: 1fr; } }
.calc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.calc-list li { display: flex; gap: 12px; color: var(--subtext); }
.calc-list b { color: var(--text); font-weight: 600; }
.calc-list li::before { content: "▸"; color: var(--peach); }
.window {
  background: var(--mantle); border: 1px solid var(--surface0); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.window-bar {
  display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  background: var(--crust); font: 600 0.78rem "JetBrains Mono", monospace; color: var(--subtext);
}
.dots { display: flex; gap: 7px; margin-right: 8px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: var(--teal); }
.dots i:nth-child(2) { background: var(--orange); }
.dots i:nth-child(3) { background: var(--brand-red); }
.rows { padding: 8px; }
.crow {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: 12px; font-family: "JetBrains Mono", monospace; font-size: 0.9rem;
  transition: background 300ms ease;
}
.crow.sel { background: var(--surface0); }
.crow .q { color: var(--subtext); overflow-wrap: anywhere; min-height: 1.4em; }
.crow .arrow { color: var(--overlay0); opacity: 0; transition: opacity 300ms ease; }
.crow .a { color: var(--text); font-weight: 600; text-align: right; overflow-wrap: anywhere; opacity: 0; transform: translateX(10px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-spring); }
.crow.done .arrow { opacity: 1; }
.crow.done .a { opacity: 1; transform: none; }
.crow small { display: block; font: 500 0.72rem Inter, sans-serif; color: var(--overlay0); }

/* ---------- gallery ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1200px; }
.shots figure { margin: 0; }
.shots .window { transition: transform 400ms var(--ease-out), box-shadow 400ms ease; }
.shots figure:hover .window { transform: translateY(-6px) rotateX(4deg); }
.shots figcaption { margin-top: 12px; font-size: 0.93rem; color: var(--subtext); text-align: center; }
.shots .full { grid-column: 1 / -1; }
.shots .full:hover .window { transform: translateY(-6px); }
@media (max-width: 800px) { .shots { grid-template-columns: 1fr; } }

/* ---------- keys ---------- */
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 4px 36px; }
.key { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--surface0); }
.key span:first-child { color: var(--subtext); }
.key span:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; flex-shrink: 0; }
.note { margin-top: 26px; color: var(--subtext); font-size: 0.93rem; }

/* ---------- code ---------- */
pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-size: 0.86rem; line-height: 1.7; background: var(--crust); color: var(--text); }
pre .c { color: var(--overlay0); }
pre .k { color: var(--mauve); }
pre .s { color: var(--green); }
pre .ok { color: var(--green); }
.code { position: relative; }
.copy {
  position: absolute; top: 10px; right: 10px; font: 600 0.75rem Inter, sans-serif;
  padding: 5px 11px; border-radius: 8px; cursor: pointer;
  background: var(--surface0); color: var(--text); border: 1px solid var(--surface1); transition: background 150ms ease, transform 150ms var(--ease-spring);
}
.copy:hover { background: var(--surface1); }
.copy.done { background: var(--green); color: var(--crust); transform: scale(1.06); }
.typed::after { content: "▌"; color: var(--brand-red); animation: blink 1s steps(1) infinite; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

/* ---------- roadmap ---------- */
.road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .road { grid-template-columns: 1fr; } }
.road h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 0.95rem; }
.road h3 i { width: 12px; height: 12px; border-radius: 50%; }
.road ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.road li { position: relative; padding: 12px 14px 12px 40px; border-radius: 12px; background: var(--base); border: 1px solid var(--surface0); font-size: 0.95rem; }
.road li::before {
  content: ""; position: absolute; left: 14px; top: 16px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--surface1);
}
.road .done li::before {
  content: "✓"; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: var(--crust);
  border-color: var(--green); background: var(--green); transform: scale(0); transition: transform 400ms var(--ease-spring);
  transition-delay: calc(var(--i, 0) * 110ms + 300ms);
}
.road .done li.in::before { transform: scale(1); }
.road .next li::before { border-color: var(--peach); }
.road li small { display: block; color: var(--subtext); font-size: 0.84rem; margin-top: 2px; }

/* ---------- install ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font: 900 1.3rem var(--display); background: var(--brand-red); color: #fff;
  transform: scale(0.4) rotate(-20deg); opacity: 0; transition: transform 500ms var(--ease-spring), opacity 300ms ease;
}
.step.in::before { transform: none; opacity: 1; }
.step h3 { margin: 8px 0 8px; font-size: 0.95rem; }
.step p { margin: 0 0 12px; color: var(--subtext); }
.step .window { box-shadow: none; }

.closing { text-align: center; padding: 110px 0; position: relative; overflow: hidden; isolation: isolate; }
.closing h2 { font-size: clamp(2.1rem, 5.4vw, 3.8rem); margin: 0 0 18px; }
.closing p { color: var(--subtext); font-size: 1.1rem; margin: 0 auto 32px; max-width: 34em; }
.closing .cta { justify-content: center; }
.closing .big-icon { width: 120px; height: 120px; margin: 0 auto 28px; animation: float 5s ease-in-out infinite; }

footer { border-top: 1px solid var(--surface0); padding: 40px 0 56px; color: var(--subtext); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; align-items: center; }
footer .brand { font-size: 1.35rem; }
footer p { margin: 0; max-width: 40em; }

/* Let grid columns shrink below their code blocks, which scroll instead. */
.hero-grid > *, .calcwrap > *, .two > *, .step > *, .shots > *, .road > * { min-width: 0; }

/* ---------- keyframes ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(30px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes panelIn { from { opacity: 0; transform: scale(0.92) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes keyIn { from { opacity: 0; transform: translateY(-8px) scale(0.8); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
