/* RemoteFlow website — design tokens mirror the application's own palette
   (see Assets/FEATURES.md §10). Dark theme, matching the product default. */

:root {
  --surface-0: #0B0F14;
  --surface-1: #121821;
  --surface-2: #1A2330;
  --border: #344052;
  --text-primary: #F2F5F7;
  --text-secondary: #B8C2CF;
  --accent: #6CB6FF;
  --accent-ink: #0B1017;
  --success: #5DE28C;
  --warning: #FFCA58;
  --danger: #FF7B72;
  --env-prod: #5DE28C;
  --env-stage: #FFCA58;
  --env-dev: #FF7B72;
  --proto-ssh: #7EE787;
  --proto-sftp: #79C0FF;
  --proto-rdp: #D2A8FF;
  --proto-s3: #FFA657;
  --proto-azure: #56D4DD;
  --focus-ring: #F2F5F7;

  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;

  --nav-h: 64px;
  --radius: 10px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--surface-0);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 300;
  background: var(--accent); color: var(--accent-ink);
  padding: .5rem 1rem; border-radius: var(--radius); font-weight: 600;
}
.skip-link:focus { top: .5rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 15, 20, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; gap: 1rem;
  max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem;
  height: var(--nav-h);
}
.brand {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.05rem; color: var(--text-primary);
}
.brand img { width: 30px; height: 30px; }
.brand:hover { text-decoration: none; }

.nav-links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text-secondary); font-size: .93rem; font-weight: 500;
  padding: .45rem .7rem; border-radius: var(--radius);
}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--text-primary); background: var(--surface-2); }

/* Dropdown (Features) */
.dropdown { position: relative; list-style: none; }
.dropdown > button {
  background: none; border: 0; cursor: pointer;
  color: var(--text-secondary); font-size: .93rem; font-weight: 500; font-family: inherit;
  padding: .45rem .7rem; border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: .3rem;
}
.dropdown > button:hover { color: var(--text-primary); background: var(--surface-2); }
.dropdown .chev { width: 12px; height: 12px; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 210px;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .4rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  list-style: none; margin: 0;
}
.dropdown-menu li a { display: block; padding: .45rem .7rem; white-space: nowrap; }
.dropdown.open .dropdown-menu { display: block; }

.nav .download-btn { margin-left: auto; }
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 650; font-size: .93rem; padding: .5rem 1rem;
  cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost {
  background: transparent; color: var(--text-primary);
  border-color: var(--border);
}
.btn.small { padding: .35rem .8rem; font-size: .87rem; }

/* ---------- Hero ---------- */
.hero { padding: 4.5rem 1.25rem 3rem; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 480px;
  background: radial-gradient(ellipse at center, rgba(108,182,255,.16), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 900px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.12; margin: 0 0 1rem; letter-spacing: -.02em; }
.hero .subtitle { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--text-secondary); margin: 0 0 1.6rem; }
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.hero-cta .btn { padding: .75rem 1.5rem; font-size: 1rem; }
.hero .meta-note { font-size: .85rem; color: var(--text-secondary); }
.hero .badge-row { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.badge {
  font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  border: 1px solid var(--border); border-radius: 999px;
  padding: .28rem .7rem; color: var(--text-secondary);
  background: var(--surface-1);
}
.badge.ok { color: var(--success); border-color: rgba(93,226,140,.4); }

/* ---------- Value proposition cards ---------- */
.value-grid {
  display: grid; gap: 1.25rem; margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.value-card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.value-card h2, .value-card h3 { margin: 0 0 .6rem; font-size: 1.15rem; }
.value-card p { color: var(--text-secondary); margin: 0; }
.value-card p + p { margin-top: .5rem; }

/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.25rem; }
.section.narrow { max-width: 860px; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.01em; margin: 0 0 1rem; }
.section .kicker { color: var(--accent); font-weight: 650; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .4rem; }
.section > .lede, .lede { color: var(--text-secondary); font-size: 1.08rem; }

/* Inline SVG icons used in cards */
.icon { width: 20px; height: 20px; vertical-align: -3px; margin-right: .4rem; color: var(--accent); }

/* ---------- Carousel (home screenshot strip) ---------- */
.carousel { position: relative; }
.carousel-track { display: flex; overflow-x: auto; gap: 1rem; scroll-snap-type: x mandatory; padding-bottom: .6rem; }
.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.carousel-slide { flex: 0 0 min(880px, 86%); scroll-snap-align: center; }
.carousel-slide img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--border);
  cursor: zoom-in;
}
.carousel-slide figcaption {
  color: var(--text-secondary); font-size: .88rem; text-align: center; padding-top: .5rem;
}
.carousel-btn {
  position: absolute; top: 45%; transform: translateY(-50%);
  background: rgba(18,24,33,.85); border: 1px solid var(--border); color: var(--text-primary);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn.prev { left: .25rem; }
.carousel-btn.next { right: .25rem; }
@media (hover: hover) { .carousel-btn:hover { background: var(--surface-2); } }

/* Screenshot figure grids */
.shot-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .shot-grid.two { grid-template-columns: 1fr 1fr; } }
figure.shot {
  margin: 0; background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .6rem;
}
figure.shot img { border-radius: 6px; cursor: zoom-in; width: 100%; }
figure.shot figcaption { padding: .55rem .35rem .2rem; color: var(--text-secondary); font-size: .88rem; }

/* Hero screenshot under the fold on home */
.hero-shot { max-width: 1080px; margin: 2.6rem auto 0; padding: 0 1.25rem; }
.hero-shot img { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,.45); }

/* ---------- Lightbox ---------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center;
  background: rgba(4,7,10,.9); padding: 2rem;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-primary);
  border-radius: 50%; cursor: pointer; font-size: 1.2rem;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--text-primary); font-weight: 650; background: var(--surface-2); }
td { color: var(--text-secondary); }
td:first-child, td strong { color: var(--text-primary); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
table code { font-size: .85em; }

/* ---------- Chips (protocols, environments) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .03em;
  border-radius: 999px; padding: .16rem .55rem; border: 1px solid transparent;
}
.chip.ssh { color: var(--proto-ssh); border-color: var(--proto-ssh); background: rgba(126,231,135,.08); }
.chip.sftp { color: var(--proto-sftp); border-color: var(--proto-sftp); background: rgba(121,192,255,.08); }
.chip.rdp { color: var(--proto-rdp); border-color: var(--proto-rdp); background: rgba(210,168,255,.08); }
.chip.s3 { color: var(--proto-s3); border-color: var(--proto-s3); background: rgba(255,166,87,.08); }
.chip.azure { color: var(--proto-azure); border-color: var(--proto-azure); background: rgba(86,212,221,.08); }
.chip.prod { color: var(--env-prod); border-color: var(--env-prod); background: rgba(93,226,140,.08); }
.chip.stage { color: var(--env-stage); border-color: var(--env-stage); background: rgba(255,202,88,.08); }
.chip.dev { color: var(--env-dev); border-color: var(--env-dev); background: rgba(255,123,114,.08); }

/* ---------- Feature pages ---------- */
.page-hero { padding: 3rem 1.25rem 2rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.01em; margin: 0 0 .6rem; }
.page-hero .lede { max-width: 760px; }

.feature-list { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: 1rem; }
.feature-list li {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.feature-list strong { color: var(--text-primary); }
.feature-list p { margin: .25rem 0 0; color: var(--text-secondary); }

/* Breadcrumbs on inner pages */
.crumbs {
  list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0;
  margin: 0 auto; font-size: .85rem; color: var(--text-secondary);
  max-width: var(--maxw); padding: 1.25rem 1.25rem 0;
}
.crumbs li::after { content: "/"; padding-left: .4rem; color: var(--border); }
.crumbs li:last-child::after { content: none; }

/* Code blocks and inline code */
pre, code { font-family: var(--font-mono); }
code {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px;
  padding: .08rem .35rem; font-size: .88em; color: var(--text-primary);
}
pre {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; overflow-x: auto; font-size: .9rem;
}
pre code { background: none; border: 0; padding: 0; }

/* Warning/note callouts */
.note, .warn, .tip {
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  background: var(--surface-1); border-radius: var(--radius);
  padding: .9rem 1.1rem; margin: 1rem 0; font-size: .95rem;
}
.warn { border-left-color: var(--warning); }
.tip { border-left-color: var(--success); }
.note strong, .warn strong, .tip strong { color: var(--text-primary); }

/* Keyboard keys */
kbd {
  font-family: var(--font-mono); font-size: .82em;
  background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 5px; padding: .12rem .42rem; color: var(--text-primary); white-space: nowrap;
}

/* FAQ */
details.faq {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1); margin-bottom: .7rem;
}
details.faq summary {
  cursor: pointer; padding: .85rem 1.1rem; font-weight: 600; list-style: none;
}
details.faq summary::before { content: "+"; margin-right: .55rem; color: var(--accent); }
details.faq[open] summary::before { content: "\2013"; }
details.faq .answer { padding: 0 1.1rem 1rem; color: var(--text-secondary); }
details.faq summary::-webkit-details-marker { display: none; }

/* Protocol strip on home */
.proto-row { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

/* Download cards */
.dl-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-1); padding: 1.4rem; text-align: center;
}
.dl-card h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.dl-card p { color: var(--text-secondary); font-size: .92rem; margin: 0 0 1rem; }
.os-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 4rem; background: var(--surface-1); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 2.2rem 1.25rem;
  display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.footer-col h4 { margin: 0 0 .6rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: .18rem 0; }
.footer-col a { color: var(--text-secondary); font-size: .92rem; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.25rem 2rem;
  color: var(--text-secondary); font-size: .85rem;
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between;
}
.footer-bottom .dog { width: 26px; height: 26px; vertical-align: middle; margin-right: .35rem; }

/* Responsive nav */
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-primary); width: 40px; height: 40px; cursor: pointer; }
@media (max-width: 860px) {
  .nav .download-btn { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; margin-left: auto; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); right: 0; left: 0;
    flex-direction: column; align-items: stretch; background: var(--surface-1);
    border-bottom: 1px solid var(--border); padding: .6rem;
  }
  .nav-links.open { display: flex; }
  .dropdown-menu { position: static; box-shadow: none; border: 0; background: var(--surface-2); }
  .dropdown.open .dropdown-menu { display: block; }
}

/* Reduced motion / print */
@media (prefers-reduced-motion: reduce) {
  .carousel-track { scroll-behavior: auto; }
  html { scroll-behavior: auto; }
}
html { scroll-behavior: smooth; }

@media print {
  .site-header, .site-footer, .hero-cta, .carousel-btn { display: none; }
}
