/* site.css — brandable base theme for a zs landing/marketing/docs site.
   Override the brand tokens below per project. */

:root {
  /* Brand tokens — GoNIX: the Go blues (navy → cyan) */
  --brand: #007d9c;     /* Go dark blue */
  --brand-2: #00add8;   /* Go cyan */
  --accent: #f6c177;    /* warm penguin-belly accent */
  --ink: #042a3a;

  --bg: #ffffff;
  --bg-soft: #f3f7f9;
  --surface: #ffffff;
  --text: #16202b;
  --muted: #566069;
  --border: #e1e8ec;
  --link: var(--brand);
  --link-hover: var(--brand-2);

  --radius: 12px;
  --maxw: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  /* Tokyo Night — matches the GoNIX labwc desktop theme */
  --bg: #1a1b26;
  --bg-soft: #24283b;
  --surface: #24283b;
  --text: #c0caf5;
  --muted: #9aa5ce;
  --border: #2f334d;
  --link: #7dcfff;
  --link-hover: #7aa2f7;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container { width: 92%; max-width: var(--maxw); margin: 0 auto; }

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

h1, h2, h3 { line-height: 1.2; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-top: 2em; }

img, iframe, video, svg { max-width: 100%; height: auto; }

/* ---------- Header / nav ---------- */
header {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
}
.header-top { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-img { height: 30px; width: auto; }

nav#main-nav { margin-left: auto; }
nav#main-nav ul { list-style: none; display: flex; gap: 0.25rem; margin: 0; padding: 0; }
nav#main-nav a { color: var(--text); padding: 0.4rem 0.7rem; border-radius: 8px; }
nav#main-nav a:hover { background: var(--bg-soft); text-decoration: none; }
nav#main-nav a.active { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }

.header-actions { display: flex; align-items: center; gap: 0.25rem; }
#theme-toggle, #menu-toggle {
  background: none; border: none; cursor: pointer; color: var(--text);
  font-size: 1.25rem; padding: 0.3rem 0.4rem; border-radius: 8px;
}
#theme-toggle:hover, #menu-toggle:hover { background: var(--bg-soft); }
#menu-toggle { display: none; }

/* ---------- Main / footer ---------- */
main { flex: 1; padding: 2rem 0 3rem; }
footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 1.6rem 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer-links a { color: var(--text); }
.footer-links a:hover { color: var(--brand); text-decoration: none; }
.footer-meta { margin: 0; }

/* ---------- Buttons (use via [text](url){.btn .btn-primary}) ---------- */
.btn {
  display: inline-block; padding: 0.7rem 1.2rem; border-radius: 10px;
  font-weight: 600; border: 1px solid var(--border); color: var(--text);
  background: var(--surface);
}
.btn:hover { text-decoration: none; border-color: var(--brand); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border: none;
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }

/* ---------- Hero (:::{.hero}) ---------- */
.hero { text-align: center; padding: 3.5rem 0 2.5rem; }
.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem); margin-bottom: 0.6rem; letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; margin: 0.5rem auto 1.6rem; }
.hero-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

/* Terminal window (hero product shot) */
.terminal {
  max-width: 640px; margin: 2.6rem auto 0; text-align: left;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 18px 50px rgba(0,0,0,.22); background: #1a1b26;
}
.terminal-bar {
  display: flex; align-items: center; gap: 0.45rem; padding: 0.6rem 0.85rem;
  background: #24283b; border-bottom: 1px solid #2f334d; position: relative;
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-r { background: #f7768e; } .dot-y { background: #e0af68; } .dot-g { background: #9ece6a; }
.terminal-title { position: absolute; left: 0; right: 0; text-align: center; color: #9aa5ce; font-size: 0.8rem; font-family: var(--mono); }
.terminal-body {
  margin: 0; padding: 1.1rem 1.2rem; background: #1a1b26; color: #c0caf5;
  font-family: var(--mono); font-size: 0.86rem; line-height: 1.6; overflow-x: auto; border: 0;
}
.t-p { color: #7dcfff; user-select: none; } .t-ok { color: #9ece6a; }
.t-cursor { animation: blink 1.1s steps(1) infinite; color: #7aa2f7; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Screenshots (:::{.shot}) ---------- */
.shot { margin: 1.8rem 0; }
.shot img {
  display: block; width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: 0 14px 40px rgba(0,0,0,.20);
}
.shot figcaption { margin-top: 0.6rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* ---------- Tabs (:::{.tabs} > :::{.tab data-label="…"}) ---------- */
.tab-buttons { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--border); margin: 1.5rem 0 0; }
.tab-button {
  background: none; border: 1px solid transparent; border-bottom: none; cursor: pointer;
  color: var(--muted); font: inherit; font-weight: 600; padding: 0.55rem 1rem;
  border-radius: 8px 8px 0 0; margin-bottom: -1px;
}
.tab-button:hover { color: var(--text); background: var(--bg-soft); }
.tab-button.active {
  color: var(--brand); background: var(--surface);
  border-color: var(--border); border-bottom-color: var(--surface);
}
.tabs.js-tabs .tab { display: none; padding-top: 0.5rem; }
.tabs.js-tabs .tab.active { display: block; }
/* No-JS / pre-hydration fallback: stack panels with a labelled divider. */
.tabs:not(.js-tabs) .tab + .tab { margin-top: 1.5rem; border-top: 1px solid var(--border); }

/* ---------- Feature / card grids (:::{.features} > :::{.card}) ---------- */
.features, .cards {
  display: grid; gap: 1.25rem; margin: 1.5rem 0;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); border-color: var(--brand); }
.card h3 { margin-top: 0; }

/* Band / call-to-action section (:::{.band}) */
.band {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border-radius: var(--radius); padding: 2.5rem 1.5rem;
  text-align: center; margin: 2rem 0;
}
.band a { color: #fff; }
.band .btn { background: #fff; color: var(--ink); border: none; }

/* ---------- Code ---------- */
code { font-family: var(--mono); background: var(--bg-soft); padding: 0.15em 0.4em; border-radius: 5px; font-size: 0.9em; }
pre { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; }
pre code { background: none; padding: 0; }

blockquote { border-left: 4px solid var(--brand); margin: 1rem 0; padding: 0.4rem 1rem; color: var(--muted); background: var(--bg-soft); border-radius: 0 8px 8px 0; }

table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--border); padding: 0.5rem 0.7rem; text-align: left; }
th { background: var(--bg-soft); }

.list { list-style: none; padding-left: 0; }
.list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.list time { color: var(--muted); font-size: 0.9rem; }

/* anchor permalinks (anchor extension) */
.anchor { opacity: 0; margin-left: 0.3rem; }
h1:hover .anchor, h2:hover .anchor, h3:hover .anchor { opacity: 0.5; }

/* ---------- Mobile nav ---------- */
@media (max-width: 760px) {
  nav#main-nav { display: none; order: 3; width: 100%; margin-left: 0; }
  nav#main-nav.open { display: block; }
  nav#main-nav ul { flex-direction: column; gap: 0; }
  nav#main-nav a { padding: 0.7rem 0.5rem; border-radius: 0; }
  .header-actions { margin-left: auto; }
  #menu-toggle { display: inline-block; }
}
