/* Termilly landing page. Same palette as the app: pure black, quiet greys, one violet accent. */

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --raised: #111111;
  --border: #1c1c1c;
  --border-strong: #2e2e2e;
  --text: #ededed;
  --muted: #8a8a8a;
  --faint: #5a5a5a;
  --accent: #8b7bff;
  --accent-2: #c3b9ff;
  --accent-fill: rgba(139, 123, 255, 0.14);
  --radius: 14px;
  --gutter: 24px;
  --max: 1208px; /* 1160px of content plus the gutters */
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 8px 14px; border-radius: 8px; background: var(--accent); color: #0b0b0b; font-weight: 600;
  transform: translateY(-150%); transition: transform 0.2s;
}
.skip:focus { transform: none; }

kbd {
  display: inline-block;
  min-width: 22px;
  margin: 0 1px;
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--raised);
  color: var(--text);
  font: 500 12px/1.5 Inter, sans-serif;
  text-align: center;
}
code { padding: 1px 5px; border-radius: 5px; background: #171717; color: var(--text); font: 13px var(--mono); }

/* Soft violet light behind the page, plus a faint grid. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 30rem at 50% -8rem, rgba(139, 123, 255, 0.22), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(to bottom, #000 0, #000 40rem, transparent 70rem);
}

/* ---- Brand and buttons ---- */

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.2px; }
.logo { width: 24px; height: 24px; }
.logo.big { width: 64px; height: 64px; }
.brand.small { color: var(--muted); font-weight: 500; }
.brand.small .logo { width: 20px; height: 20px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #0b0b0b;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
}
.button svg { width: 16px; height: 16px; stroke-width: 1.8; }
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -8px rgba(139, 123, 255, 0.7); }
.button.small { padding: 8px 14px; font-size: 14px; }
.button.ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.button.ghost:hover { background: rgba(255, 255, 255, 0.05); box-shadow: none; }
.button.disabled { background: var(--raised); border-color: var(--border-strong); color: var(--muted); cursor: default; }
.button.disabled:hover { transform: none; box-shadow: none; }

/* ---- Navigation ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  max-width: none;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
}
.nav-links { display: flex; gap: 28px; margin-left: auto; color: var(--muted); font-size: 14px; }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

/* ---- Hero ---- */

.hero { max-width: var(--max); margin: 0 auto; padding: 64px var(--gutter) 0; text-align: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.7);
  color: var(--muted);
  font-size: 13px;
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ping 2.4s infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(139, 123, 255, 0.6); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(139, 123, 255, 0); }
}

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
h1 { margin-top: 24px; font-size: clamp(40px, 7vw, 80px); font-weight: 700; letter-spacing: -0.035em; }

.gradient-text {
  background: linear-gradient(100deg, #ffffff 0%, var(--accent-2) 45%, var(--accent) 70%, #ffffff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }

.lede { max-width: 620px; margin: 22px auto 0; color: var(--muted); font-size: clamp(16px, 2vw, 19px); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

.glow {
  position: absolute;
  inset: 6% 10% auto;
  height: 70%;
  background: radial-gradient(closest-side, rgba(139, 123, 255, 0.4), transparent);
  filter: blur(40px);
  animation: breathe 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes breathe { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

/* ---- Product tour (carousel) ----
   A horizontal scroll-snap track: swipe on touch screens, arrows and chapters elsewhere. Each slide is a
   16:10 screenshot with its caption underneath. */

.tour {
  /* As wide as the content, but short enough that chapters and screenshot fit on a laptop screen together. */
  --tour-width: min(100%, calc((100svh - 200px) * 1.6));
  max-width: var(--max);
  margin: 48px auto 0;
  padding: 0 var(--gutter);
  scroll-margin-top: 64px;
}

.tour-frame { position: relative; width: var(--tour-width); margin: 0 auto; }
.tour-frame .glow { inset: -4% 6% auto; height: 60%; }

.tour-track {
  position: relative;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 16px;
}
.tour-track::-webkit-scrollbar { display: none; }
.tour-track:focus-visible { outline-offset: 6px; }

.slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; }

.slide-zoom {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 40px 120px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03);
  cursor: zoom-in;
}
.slide-zoom img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.slide-zoom { position: relative; }
/* Says the screenshot opens full size: on hover with a mouse, always on touch screens. */
.zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: rgba(10, 10, 10, 0.85);
  color: var(--text);
  opacity: 0;
  transition: opacity 0.2s;
}
.zoom-hint svg { width: 15px; height: 15px; stroke-width: 1.6; }
.slide-zoom:hover .zoom-hint, .slide-zoom:focus-visible .zoom-hint { opacity: 1; }
@media (hover: none) { .zoom-hint { opacity: 1; width: 30px; height: 30px; right: 8px; bottom: 8px; } }

.slide figcaption {
  max-width: 720px;
  margin: 26px auto 0;
  padding: 0 8px;
  text-align: center;
}
.slide h3 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 650; }
.slide figcaption p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }

.tour-arrow {
  position: absolute;
  top: calc(var(--shot-height, 400px) / 2); /* centred on the screenshot, not its caption (set by redesign.js) */
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  transform: translateY(-50%);
  transition: background 0.2s, border-color 0.2s, opacity 0.2s, transform 0.2s var(--ease);
}
.tour-arrow svg { width: 18px; height: 18px; stroke-width: 1.8; }
.tour-arrow:hover { border-color: var(--accent); background: rgba(24, 20, 44, 0.9); }
.tour-arrow:active { transform: translateY(-50%) scale(0.94); }
.tour-arrow.prev { left: -23px; }
.tour-arrow.next { right: -23px; }
.tour-arrow:disabled { opacity: 0; pointer-events: none; }

.tour-bar { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; }

.tour-chapters {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.8);
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.tour-chapters::-webkit-scrollbar { display: none; }

.chapter {
  position: relative;
  flex: none;
  overflow: hidden;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.chapter:hover { color: var(--text); }
.chapter[aria-selected="true"] { background: var(--accent-fill); color: var(--text); }
/* While the tour plays, the current chapter fills up until the next slide. */
.chapter::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.tour.playing .chapter[aria-selected="true"]::after { animation: fill var(--slide-time, 6s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

.tour-play {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.8);
  color: var(--muted);
}
.tour-play:hover { color: var(--text); border-color: var(--border-strong); }
.tour-play svg { width: 14px; height: 14px; stroke-width: 1.8; }
.tour-play .i-play { display: none; fill: currentColor; }
.tour:not(.playing) .tour-play .i-pause { display: none; }
.tour:not(.playing) .tour-play .i-play { display: block; }

.shell-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin: 56px auto 0;
  padding: 0 var(--gutter);
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.shell-strip li { display: inline-flex; align-items: center; gap: 10px; }

/* Shell badges, identical to the app's. */
.badge {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--tint) 35%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--tint) 14%, transparent);
  color: var(--tint);
  font: 600 11px var(--mono);
}
.badge[data-icon="powershell"] { --tint: #5aa9ff; }
.badge[data-icon="cmd"] { --tint: #c8c8c8; }
.badge[data-icon="bash"] { --tint: #f1724f; }
.badge[data-icon="wsl"] { --tint: #f2a33a; }

.tag-inline {
  --c: #8a8a8a;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  font-size: 13px;
  line-height: 1.6;
}
.tag-inline::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag-inline.red { --c: #ff7b72; }
.tag-inline.green { --c: #7ee787; }

/* ---- Sections ---- */

.section { max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; }
.section-head p:last-child { margin: 16px 0 0; color: var(--muted); font-size: 17px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font: 600 13px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---- Features ---- */

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #0c0c0c, var(--surface));
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(139, 123, 255, 0.3);
  border-radius: 10px;
  background: var(--accent-fill);
  color: var(--accent-2);
}
.feature-icon svg { width: 18px; height: 18px; stroke-width: 1.5; }
.feature h3 { margin-top: 18px; font-size: 19px; font-weight: 600; }
.feature p { flex: 1; margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.see { align-self: flex-start; margin-top: 16px; color: var(--accent-2); font-size: 14px; font-weight: 500; }
.see span { display: inline-block; transition: transform 0.2s var(--ease); }
.see:hover span { transform: translateX(3px); }

/* ---- Shortcuts ---- */

.shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.shortcut:nth-child(odd) { border-right: 1px solid var(--border); }
.shortcut:nth-last-child(-n + 2) { border-bottom: 0; }
.shortcut > span:last-child { flex: none; }

/* ---- Roadmap ---- */

.roadmap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.roadmap li { padding: 26px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.roadmap h3 { margin-top: 14px; font-size: 19px; font-weight: 600; }
.roadmap p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-fill);
  color: var(--accent-2);
  font: 600 11px/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status.shipped { background: rgba(126, 231, 135, 0.12); color: #7ee787; }
.status.progress { background: rgba(242, 204, 96, 0.12); color: #f2cc60; }
.roadmap li:has(.shipped) { border-style: solid; }

/* ---- Download ---- */

.download { padding-bottom: 40px; }
.download-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding: 72px var(--gutter);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: linear-gradient(180deg, #0e0c19, var(--surface));
  text-align: center;
}
.download-card .glow { inset: -40% 20% auto; height: 100%; }
.download-card h2 { position: relative; font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; }
.download-card p { position: relative; margin: 0 0 8px; color: var(--muted); }
.download-card .logo, .download-card .button { position: relative; }

/* ---- Footer ---- */

.footer {
  display: flex;
  justify-content: space-between;
  width: min(calc(100% - 2 * var(--gutter)), calc(var(--max) - 2 * var(--gutter)));
  margin: 80px auto 0;
  padding: 28px 0 max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 14px;
}

/* ---- Full-size viewer ---- */

.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.94);
  color: var(--text);
}
.viewer::backdrop { background: rgba(0, 0, 0, 0.6); }
.viewer[open] { display: grid; animation: fade-in 0.2s ease; }
@keyframes fade-in { from { opacity: 0; } }
.viewer-scroll { display: grid; place-items: center; overflow: auto; padding: 56px 24px 24px; cursor: zoom-out; }
.viewer-scroll img {
  width: min(100%, 1600px, calc((100dvh - 80px) * 1.6));
  border: 1px solid var(--border-strong);
  border-radius: 10px;
}
.viewer-close {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.9);
}
.viewer-close svg { width: 16px; height: 16px; stroke-width: 1.8; }

/* ---- Scroll reveal ---- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Tablets ---- */

@media (max-width: 1260px) {
  /* No room outside the screenshot: tuck the arrows inside it. */
  .tour-arrow.prev { left: 12px; }
  .tour-arrow.next { right: 12px; }
}

@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .shortcuts, .roadmap { grid-template-columns: minmax(0, 1fr); }
  .shortcut:nth-child(odd) { border-right: 0; }
  .shortcut:nth-last-child(2) { border-bottom: 1px solid var(--border); }
}

/* ---- Phones ---- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .nav { gap: 16px; padding-block: 10px; }
  .nav-links { display: none; }
  .nav .button { margin-left: auto; }
  .hero { padding-top: 40px; }
  .lede { font-size: 16px; }
  .cta .button { flex: 1 1 100%; justify-content: center; }

  .tour { --tour-width: 100%; margin-top: 36px; }
  .slide-zoom { border-radius: 10px; }
  .slide figcaption { margin-top: 18px; padding: 0; }
  .slide figcaption p { font-size: 15px; }
  /* Swiping replaces the arrows; the chapters show where you are. */
  .tour-arrow { display: none; }
  .tour-bar { margin-bottom: 14px; }
  .tour-chapters { border-radius: 14px; }

  .features { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: 22px; }
  .section { padding-top: 88px; }
  .section-head { margin-bottom: 32px; }
  .shortcut { padding: 14px 16px; }
  .roadmap li { padding: 22px; }
  .download-card { padding: 56px 20px; }
  .footer { flex-direction: column; gap: 8px; }
  .viewer-scroll { padding: 64px 0 24px; place-items: start; }
  /* Pan around a full-width capture on a small screen. */
  .viewer-scroll img { width: 1100px; max-width: none; border-radius: 0; border-inline: 0; }
}

@media (hover: none) {
  .feature:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
