@font-face { font-family: "Ubuntu"; src: url("assets/fonts/ubuntu-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("assets/fonts/ubuntu-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Ubuntu"; src: url("assets/fonts/ubuntu-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0d0d0f;
  --bg-2: #151518;
  --bg-3: #1d1d21;
  --line: #2a2a30;
  --text: #ececef;
  --muted: #8e8e98;
  --orange: #ffa91e;
  --red: #ff4a4a;
  --green: #5bd68a;
  --on-accent: #1a1204;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfaf7;
    --bg-2: #ffffff;
    --bg-3: #f2f0ea;
    --line: #e4e1d8;
    --text: #1a1a1d;
    --muted: #6b6b73;
    --orange: #e8900a;
    --red: #e23b3b;
    --green: #1f9d57;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 "Ubuntu", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.accent { color: var(--orange); }
h1 .accent { display: inline-block; margin-top: 8px; font-size: .72em; letter-spacing: -0.02em; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--text); }

/* Hero */
.hero { text-align: center; padding-top: 56px; padding-bottom: 40px; }
.hero-icon { display: block; margin: 0 auto 28px; filter: drop-shadow(0 10px 30px rgba(255, 169, 30, .25)); }
h1 { font-size: clamp(36px, 6.4vw, 64px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 20px; font-weight: 700; }
.lead { max-width: 560px; margin: 0 auto 36px; color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); }

/* Download split button */
.download { position: relative; display: inline-flex; flex-direction: column; align-items: center; max-width: 100%; }
.split { position: relative; display: inline-flex; max-width: 100%; border-radius: var(--radius); box-shadow: 0 8px 30px rgba(255, 169, 30, .22); }
.btn-main, .btn-caret {
  background: var(--orange); color: var(--on-accent); border: 0; font: 500 16px/1 "Ubuntu", sans-serif;
  cursor: pointer; transition: filter .15s;
}
.btn-main { display: inline-flex; align-items: center; gap: 10px; padding: 16px 22px; text-decoration: none; border-radius: var(--radius) 0 0 var(--radius); min-width: 0; }
.btn-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-caret { display: grid; place-items: center; width: 50px; border-left: 1px solid rgba(0,0,0,.18); border-radius: 0 var(--radius) var(--radius) 0; }
.btn-main:hover, .btn-caret:hover { filter: brightness(1.08); }
.btn-main:focus-visible, .btn-caret:focus-visible, .menu a:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.dl-icon, .btn-caret svg { width: 20px; height: 20px; flex: none; stroke-width: 2.2; }
.btn-caret[aria-expanded="true"] svg { transform: rotate(180deg); }

.menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 10;
  width: min(360px, calc(100vw - 32px)); margin-top: 8px; padding: 6px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0,0,0,.35); text-align: left;
}
.menu h4 { margin: 8px 10px 4px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.menu a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; text-decoration: none; font-size: 14px; }
.menu a:hover, .menu a:focus { background: var(--bg-3); outline: none; }
.menu a small { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.menu a[data-current] { color: var(--orange); }
.menu .all { justify-content: center; color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }

.meta { margin: 14px 0 0; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.meta a { color: var(--muted); }
.meta a:hover { color: var(--text); }

/* App mock (always dark, mirrors the real Termo window) */
.app {
  --a-bg: #1e1e1e; --a-bar: #181818; --a-line: #2d2d2d; --a-text: #d4d4d4; --a-dim: #8a8a8a;
  --a-link: #9aa5ff; --a-green: #3fb950; --a-yellow: #e3b341; --a-red: #f85149; --a-blue: #4f8cf7; --a-cyan: #39c5cf;
  margin: 64px auto 0; max-width: 1000px; text-align: left; color: var(--a-text);
  background: var(--a-bg); border: 1px solid #333; border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  font-size: 12px;
}
.app-title { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: var(--a-bar); font-weight: 700; font-size: 13px; }
.win-ctrl { margin-left: auto; display: flex; gap: 22px; color: var(--a-dim); font-style: normal; }
.win-ctrl i { font-style: normal; font-weight: 400; }
.app-status { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--a-bar); border-bottom: 1px solid var(--a-line); }
.app-status span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 0; font-size: 11.5px; }
.app-status span + span { border-left: 1px solid var(--a-line); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.blue { background: var(--a-blue); } .dot.yellow { background: var(--a-yellow); }
.dot.red { background: var(--a-red); } .dot.green { background: var(--a-green); }

.app-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
.pane { min-width: 0; display: flex; flex-direction: column; }
.pane-claude { grid-row: span 2; border-right: 3px solid var(--a-line); }
.pane-shell { border-top: 3px solid var(--a-line); }
.pane-tabs { display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; background: var(--a-bar); }
.ptab { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 4px; font-size: 11.5px; color: var(--a-dim); white-space: nowrap; }
.ptab.active { background: #264f78; color: #fff; }
.ptab em, .app-foot em { font-style: normal; }
.plus { color: var(--a-dim); padding: 0 6px; }
.pane-body { flex: 1; margin: 0; padding: 12px 16px; font: 12px/1.7 var(--mono); white-space: pre-wrap; overflow: hidden; }
.pane-body b { color: #fff; }
.pane-body .d { color: var(--a-dim); } .pane-body .l { color: var(--a-link); }
.pane-body .g { color: var(--a-green); } .pane-body .y { color: var(--a-yellow); }
.pane-body .c, .app .c { color: var(--a-cyan); } .pane-body .o, .app .o { color: var(--orange); }
.rule { display: block; border-top: 1px solid #444; margin: 6px 0 4px; }
.ask { display: block; margin-top: 10px; padding: 8px 10px; background: #262626; }
.pl { display: inline-flex; margin-right: 6px; font-size: 11px; }
.pl span { padding: 0 12px 0 8px; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%, 6px 50%); }
.pl span:first-child { clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%); border-radius: 3px 0 0 3px; }
.p1 { background: #c792ea; color: #1e1e1e; } .p2 { background: #f06292; color: #1e1e1e; } .p3 { background: #3a3a3a; color: #ddd; }
.app-foot { display: flex; gap: 18px; align-items: center; height: 26px; padding: 0 12px; background: var(--a-bar); border-top: 1px solid var(--a-line); color: var(--a-dim); font-size: 11px; white-space: nowrap; }
.app-foot span { display: inline-flex; align-items: center; gap: 6px; }
.app-foot .mem { margin-left: auto; }
.bar { display: inline-block; width: 44px; height: 8px; background: #333; border-radius: 2px; overflow: hidden; }
.bar i { display: block; width: 27%; height: 100%; background: var(--a-blue); }
.cursor { display: inline-block; width: 7px; height: 14px; vertical-align: -2px; margin-left: 2px; background: var(--a-text); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 760px) {
  .app-grid { grid-template-columns: 1fr; }
  .pane-claude { grid-row: auto; border-right: 0; }
  .pane-codex, .app-status span:nth-child(2), .app-status span:nth-child(3), .app-foot span:nth-child(3) { display: none; }
  .app-status { grid-template-columns: 1fr 1fr; }
  .app-status span:nth-child(4) { border-left: 1px solid var(--a-line); }
}

/* Features */
.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; padding-top: 72px; padding-bottom: 80px; scroll-margin-top: 20px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card { grid-column: span 2; }
.card:nth-child(n+4) { grid-column: span 3; }
@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
  .card, .card:nth-child(n+4) { grid-column: auto; }
}
.card svg { width: 26px; height: 26px; color: var(--orange); }
.card h3 { margin: 14px 0 6px; font-size: 17px; font-weight: 500; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Footer */
.footer { display: flex; justify-content: space-between; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

@media (max-width: 520px) {
  .hero { padding-top: 32px; }
  .btn-main { padding: 15px 16px; font-size: 15px; }
  .pane-body { font-size: 11px; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}
