/*
 * YantraSSH site — shares the Yantratmika palette (yantratmika.com):
 * navy #0a1d38, royal #1f63b4, sky #4fb3ea. Light content, dark "bands".
 * Fonts are self-hosted (no third-party requests).
 */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/Inter-400.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/Inter-500.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/Inter-600.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("fonts/Inter-700.ttf") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("fonts/JetBrainsMono-400.ttf") format("truetype"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; src: url("fonts/JetBrainsMono-700.ttf") format("truetype"); }

:root {
  --ink: 15 23 42;
  --body: 51 65 85;
  --muted: 71 85 105;
  --subtle: 100 116 139;
  --accent: 30 87 170;
  --accent-strong: 20 62 128;
  --surface: 255 255 255;
  --surface-alt: 245 247 250;
  --line: 226 232 240;
  --navy: 10 29 56;
  --ok: 74 222 128;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.band-dark {
  --ink: 255 255 255;
  --body: 214 223 235;
  --muted: 170 184 205;
  --subtle: 140 158 186;
  --accent: 126 186 240;
  --accent-strong: 176 212 248;
  --surface: 20 42 76;
  --surface-alt: 14 35 66;
  --line: 40 64 102;
  background-color: rgb(var(--navy));
  color: rgb(var(--body));
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: rgb(var(--surface));
  color: rgb(var(--body));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: rgb(var(--ink)); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: rgb(var(--accent)); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
.alt { background: rgb(var(--surface-alt)); }

.eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgb(var(--accent)); margin-bottom: 14px;
}
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; }
.section-head p { margin-top: 14px; color: rgb(var(--muted)); font-size: 1.05rem; }

/* ---------- nav ---------- */
nav.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 72px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgb(226 232 240);
}
nav.top .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; color: #0f172a; font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand small { display: block; font-weight: 500; font-size: 0.68rem; color: #64748b; letter-spacing: 0.02em; line-height: 1.1; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a.link { color: #334155; font-size: 0.92rem; font-weight: 500; }
.nav-links a.link:hover { color: #1e57aa; text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px;
  border-radius: 8px; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
  cursor: pointer; transition: background-color .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: rgb(30 87 170); color: #fff; }
.btn-primary:hover { background: rgb(20 62 128); box-shadow: 0 6px 16px -6px rgba(30,87,170,.6); }
.band-dark .btn-primary { background: #fff; color: rgb(var(--navy)); }
.band-dark .btn-primary:hover { background: #e6effa; }
.btn-secondary { border-color: rgb(var(--accent) / .5); color: rgb(var(--accent)); }
.btn-secondary:hover { background: rgb(var(--accent) / .08); border-color: rgb(var(--accent)); }
.band-dark .btn-secondary { border-color: rgba(255,255,255,.35); color: #fff; }
.band-dark .btn-secondary:hover { background: rgba(255,255,255,.08); border-color: #fff; }
.btn[aria-disabled="true"] { opacity: .85; cursor: default; }
.btn-sm { padding: 8px 16px; font-size: 0.88rem; }

/* ---------- hero ---------- */
.hero {
  padding: 150px 0 96px;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px),
    radial-gradient(ellipse 80% 60% at 85% 0%, rgba(31,99,180,.35), transparent 70%),
    linear-gradient(180deg, #0a1d38 0%, #0d2546 100%);
  background-size: 28px 28px, auto, auto;
}
.hero .grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
.hero h1 em { font-style: normal; color: rgb(var(--accent)); }
.hero .lead { margin-top: 22px; font-size: 1.15rem; color: rgb(var(--body)); max-width: 540px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip {
  font-family: var(--mono); font-size: 0.76rem; padding: 5px 12px; border-radius: 999px;
  background: rgb(var(--accent) / .1); border: 1px solid rgb(var(--accent) / .25); color: rgb(var(--accent));
}

/* terminal mockup */
.term {
  min-width: 0;
  background: #06142a; border: 1px solid rgb(40 64 102); border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); overflow: hidden; font-family: var(--mono);
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #0e2342; border-bottom: 1px solid rgb(40 64 102); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #284066; }
.dot:nth-child(1) { background: #ff6b6b; } .dot:nth-child(2) { background: #ffb454; } .dot:nth-child(3) { background: #4ade80; }
.term-bar span { margin-left: 10px; font-size: 0.75rem; color: #8c9eba; }
.term-body { padding: 18px 20px 22px; font-size: 0.82rem; line-height: 1.75; color: #d6dfeb; min-height: 270px; overflow-wrap: anywhere; }
.term-body .p { color: #7ebaf0; } .term-body .g { color: #5fd38d; } .term-body .d { color: #8c9eba; } .term-body .y { color: #ffb454; }
.cursor { display: inline-block; width: 8px; height: 1em; vertical-align: -2px; background: #7ebaf0; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 72px; padding-top: 36px; border-top: 1px solid rgb(var(--line)); }
.stat b { display: block; font-size: 1.7rem; color: #fff; font-weight: 700; letter-spacing: -0.02em; }
.stat span { font-size: 0.85rem; color: rgb(var(--muted)); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 14px;
  padding: 28px; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover { border-color: rgb(var(--accent) / .35); box-shadow: 0 10px 30px -12px rgba(15,23,42,.18); transform: translateY(-2px); }
.card .ic {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgb(var(--accent) / .1); color: rgb(var(--accent)); font-size: 1.2rem;
}
.card h3 { font-size: 1.12rem; font-weight: 600; margin-bottom: 8px; }
.card p { color: rgb(var(--muted)); font-size: 0.95rem; }
.card code, .inline-code { font-family: var(--mono); font-size: 0.85em; background: rgb(var(--accent) / .08); padding: 1px 6px; border-radius: 5px; color: rgb(var(--accent)); }

/* ---------- security band ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.ticks li { display: flex; gap: 14px; }
.ticks li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; background: rgb(var(--accent) / .15); color: rgb(var(--accent)); margin-top: 2px; }
.ticks b { color: rgb(var(--ink)); font-weight: 600; }
.keybox { font-family: var(--mono); font-size: 0.78rem; line-height: 1.7; background: #06142a; border: 1px solid rgb(var(--line)); border-radius: 12px; padding: 20px; color: #7ebaf0; word-break: break-all; }
.keybox .d { color: #8c9eba; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; padding: 28px; border: 1px solid rgb(var(--line)); border-radius: 14px; background: rgb(var(--surface)); }
.step::before { counter-increment: s; content: "0" counter(s); font-family: var(--mono); font-weight: 700; color: rgb(var(--accent)); font-size: .95rem; }
.step h3 { margin: 10px 0 8px; font-size: 1.12rem; }
.step p { color: rgb(var(--muted)); font-size: .95rem; }

/* ---------- faq ---------- */
.faq { max-width: 780px; }
details { border-bottom: 1px solid rgb(var(--line)); padding: 20px 0; }
summary { cursor: pointer; font-weight: 600; color: rgb(var(--ink)); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: rgb(var(--accent)); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin-top: 12px; color: rgb(var(--muted)); }

/* ---------- cta + footer ---------- */
.cta { text-align: center; }
.cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; }
.cta p { margin: 16px auto 0; max-width: 560px; color: rgb(var(--muted)); }
.cta .cta-row { justify-content: center; }

.maker { display: flex; align-items: center; gap: 22px; padding: 28px; border: 1px solid rgb(var(--line)); border-radius: 14px; background: rgb(var(--surface-alt)); }
.maker img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.maker h3 { font-size: 1.1rem; margin-bottom: 4px; }
.maker p { color: rgb(var(--muted)); font-size: .95rem; }

footer { padding: 56px 0 32px; }
footer .cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
footer .brand { color: #fff; }
footer .brand small { color: rgb(var(--muted)); }
footer p.small { max-width: 340px; margin-top: 14px; font-size: .9rem; color: rgb(var(--muted)); }
footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: rgb(var(--subtle)); margin-bottom: 14px; font-weight: 600; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .92rem; }
footer ul a { color: rgb(var(--body)); }
footer ul a:hover { color: #fff; text-decoration: none; }
.legal-line { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgb(var(--line)); font-size: .82rem; color: rgb(var(--subtle)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- legal pages ---------- */
.doc { padding: 130px 0 72px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.doc .updated { margin: 10px 0 36px; color: rgb(var(--subtle)); font-size: .9rem; }
.doc h2 { font-size: 1.15rem; font-weight: 600; margin: 34px 0 10px; color: rgb(30 87 170); }
.doc p { margin-bottom: 10px; color: rgb(var(--body)); }
.doc .callout { border-left: 3px solid rgb(30 87 170); background: rgb(var(--surface-alt)); padding: 16px 20px; border-radius: 0 10px 10px 0; margin-bottom: 8px; }
.doc ul { padding-left: 22px; margin: 0 0 10px; }
.doc li { margin-bottom: 6px; }
.doc .switch { display: flex; gap: 14px; margin-top: 28px; font-size: .92rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  section { padding: 64px 0; }
  .hero { padding: 120px 0 64px; }
  .hero .grid, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cards, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav-links a.link { display: none; }
}
@media (max-width: 600px) {
  .cards, .steps { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 24px 12px; }
  .maker { flex-direction: column; text-align: center; }
  .term-body { font-size: .74rem; }
}
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } .card { transition: none; } html { scroll-behavior: auto; } }
