/*
 * PwrAgent marketing site (pwragent.ai) — Tangerine Terminal theme.
 *
 * Tokens + visual language lifted from docs.pwragent.ai. Same brand
 * identity, simpler layout (no nav dropdowns, no dense reference
 * tables, marketing-tighter typography rhythm).
 */

:root {
  --bg-app: #000000;
  --bg-sidebar: #050505;
  --bg-panel: #0a0a0a;
  --bg-panel-elevated: #101010;
  --bg-panel-hover: #14110d;
  --bg-input: #080808;

  --border-subtle: rgba(247, 243, 235, 0.10);
  --border-strong: rgba(247, 243, 235, 0.20);

  --text-primary: #f7f3eb;
  --text-secondary: #b8b0a5;
  --text-muted: #8c857a;

  --accent: #ff8a1f;
  --accent-strong: #ffa33d;
  --accent-bright: #ffb35c;
  --accent-soft: rgba(255, 138, 31, 0.12);
  --accent-border: rgba(255, 138, 31, 0.42);
  --accent-shadow: rgba(255, 138, 31, 0.34);

  --font-sans: "Inter", "Geist", "IBM Plex Sans", "SF Pro Text", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", SFMono-Regular, "SF Mono", Consolas, monospace;

  --content-max: 72ch;
  --shell-max: 104ch;
}

@supports (font-variation-settings: normal) {
  :root {
    --font-sans: "InterVariable", "Inter", "Geist", "IBM Plex Sans", "SF Pro Text", system-ui, sans-serif;
  }
}

* { box-sizing: border-box; }

html { background: var(--bg-app); }

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: #000;
}

/* ----- Skip-to-content link -----
 * Visually hidden until a keyboard user tabs to it as the first
 * focusable element on the page, then appears anchored to the
 * top-left so the user can skip past the header nav and land
 * directly in the main content area. The <main> carries
 * tabindex="-1" so the anchor jump actually moves focus there
 * (browsers normally only scroll, leaving focus on the link). */

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-200%);
  transition: transform 120ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* Don't paint a focus ring around <main> just because the
 * skip-link bumped focus there — the page heading already tells
 * the user where they are. */
#main:focus {
  outline: none;
}

/* ----- Site header ----- */

.site-header {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
}

.site-header__inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.015em;
}

.site-brand__logo {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.site-brand__accent {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}

.site-nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.005em;
  /* Padding lifts the tap target to a comfortable size without
     visually inflating the link. */
  padding: 8px 4px;
  border-radius: 4px;
  transition: color 120ms ease, background 120ms ease;
}

.site-nav__link:hover {
  color: var(--accent);
}

.site-nav__link:focus-visible {
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-nav__link--icon {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* ----- Main + page ----- */

.site-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 80px 24px 96px;
  contain: paint;
}

.page > *:first-child { margin-top: 0; }
.page > *:last-child  { margin-bottom: 0; }

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

.hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0 0 56px;
}

.hero__mark {
  /* margin: 0 because this is rendered as <h1> for accessibility
     (gives the page its semantic top-level heading). The typography
     section adds default heading margins; this override keeps the
     hero's visual rhythm unchanged — the `gap` on .hero handles
     spacing between the wordmark, tagline, subhead, and CTAs. */
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 88px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero__mark-accent {
  color: var(--accent);
}

.hero__tagline {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 28ch;
  letter-spacing: -0.01em;
}

.hero__subhead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 56ch;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}

.hero__caption {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  letter-spacing: 0.005em;
}

.cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.005em;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
  border: 1px solid transparent;
}

.cta--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.cta--primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

.cta--primary:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
  transform: translateY(-1px);
}

.cta--secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.cta--secondary:hover {
  color: var(--accent);
  border-color: var(--accent-border);
}

.cta--secondary:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.hero-shot {
  margin: 0 0 64px;
}

.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.55);
}

.hero-shot figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ----- Typography ----- */

h1, h2, h3 {
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 2.4em 0 0.5em;
}

h1 {
  font-size: 32px;
  margin-top: 0;
}

h2 {
  font-size: 26px;
  margin-top: 2.8em;
  padding-top: 1.6em;
  border-top: 1px solid var(--border-subtle);
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 1.8em;
}

p {
  margin: 0 0 1.1em;
}

p:last-child { margin-bottom: 0; }

strong {
  color: var(--text-primary);
  font-weight: 600;
}

em {
  color: var(--text-secondary);
  font-style: italic;
}

hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 3em 0;
}

a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: rgba(255, 138, 31, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

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

a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ----- Lists ----- */

ul, ol {
  padding-left: 1.4em;
  margin: 0 0 1.2em;
}

li {
  margin: 0.4em 0;
}

li::marker {
  color: var(--text-muted);
}

/* ----- Code ----- */

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-panel);
  color: var(--accent-bright);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

pre {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 1.4em 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ----- Feature grid ----- */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin: 1.4em 0 0;
  padding: 0;
  list-style: none;
}

.features > li {
  margin: 0;
  padding: 24px 26px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.features__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}

.features__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.features__body strong { color: var(--text-primary); }

@media (min-width: 720px) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

/* ----- Eyebrow / small label ----- */

.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

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

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 24px;
  margin-top: 80px;
  background: var(--bg-sidebar);
}

.site-footer__inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer__brand {
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 14px;
}

.site-footer__accent { color: var(--accent); }

.site-footer__meta a {
  color: var(--text-muted);
}

.site-footer__meta a:hover { color: var(--accent); }

/* ----- Sticky-header offset for anchor jumps ----- */

@media (min-width: 721px) {
  .page :is(h1, h2, h3) {
    scroll-margin-top: 80px;
  }
}

/* ----- Responsive ----- */

@media (max-width: 720px) {
  .site-header {
    position: static;
    padding: 12px 18px;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .site-nav {
    gap: 14px 18px;
    flex-wrap: wrap;
    font-size: 13.5px;
  }

  .site-main {
    padding: 36px 18px 64px;
  }

  .hero__mark      { font-size: 60px; }
  .hero__tagline   { font-size: 22px; }
  .hero__subhead   { font-size: 16px; }

  h1 { font-size: 26px; }
  h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
