/*
 * base.css — reset, header/nav, and the shared page layout for the Agile
 * Gauge marketing site (formerly the top of a single site.css, split into
 * base.css/pricing.css/components.css to stay under the repo's 600-line
 * file-size limit — all three load on every page, in that order, so the
 * cascade is unchanged). Direction 3 (Tabler + Fluent 2): white/cool-gray
 * grounds, cards with soft shadows and 12px radii, an indigo identity
 * accent, tone-coloured status, small inline icons — replacing Measured
 * Paper's paper tones, hairline-only ruled regions and serif display type.
 * See css/tokens.css for the token values (copied verbatim from the
 * product's src/hub/tokens.css) and the product repo's
 * docs/decisions/2026-09-21-design-system-direction-3.md for the decision
 * this implements.
 */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv05', 'cv11';
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
}

a:not(.brand):not(.button) {
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.wrap {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 100;
  background: var(--surface);
  color: var(--ink);
  padding: var(--space-2) var(--space-4);
  border: var(--hairline) solid var(--rule-strong);
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: var(--space-2);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: var(--hairline) solid var(--rule);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding-block: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand__mark {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--accent-fill);
  color: var(--accent-on);
}

.brand__mark svg {
  width: 18px;
  height: 18px;
}

.brand__name {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-card-title);
  letter-spacing: -0.01em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  transition:
    background-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-sunken);
}

.site-nav a[aria-current='page'] {
  color: var(--accent);
  background: var(--accent-tint);
  font-weight: var(--weight-semibold);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--surface);
  border: var(--hairline) solid var(--rule-strong);
  border-radius: var(--radius-pill);
  color: var(--ink-secondary);
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

.theme-toggle:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme='light'])) .theme-toggle .icon-sun {
    display: none;
  }

  :root:where(:not([data-theme='light'])) .theme-toggle .icon-moon {
    display: block;
  }
}

/* ---- Language switcher (generated by scripts/i18n.mjs) ---- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: var(--hairline) solid var(--rule-strong);
  border-radius: var(--radius-pill);
}

.lang-switch a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  line-height: 1;
  padding: 7px 8px;
  border-radius: var(--radius-pill);
  transition:
    background-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

.lang-switch a:hover {
  color: var(--ink);
  background: var(--surface-sunken);
}

.lang-switch a[aria-current='true'] {
  color: var(--accent);
  background: var(--accent-tint);
  font-weight: var(--weight-semibold);
}

/* Present for screen readers, invisible on screen. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Main / sections ---- */
main {
  padding-block: 0 var(--space-8);
}

.hero {
  padding-block: var(--space-8);
  border-bottom: var(--hairline) solid var(--rule);
  background: var(--surface);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

.hero__shot-frame {
  border: var(--hairline) solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  overflow: hidden;
}

.hero__shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-sunken);
  border-bottom: var(--hairline) solid var(--rule);
}

.hero__shot-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rule-strong);
}

.hero__shot-body {
  line-height: 0;
}

.hero__shot-body img,
.hero__shot-body video {
  display: block;
  width: 100%;
  height: auto;
}

h1 {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-hero);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
}

h2 {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-title);
  letter-spacing: -0.015em;
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-3);
}

h3 {
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-card-title);
  margin: 0 0 var(--space-2);
}

.lede {
  font-size: var(--text-body-lg);
  color: var(--ink-secondary);
  max-width: 52ch;
}

.section {
  padding-block: var(--space-7);
}

.section__label {
  font-size: var(--text-overline);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-overline);
  color: var(--accent);
  margin: 0 0 var(--space-2);
}

/* ---- Feature groups: cards with a small inline icon each ---- */
.view-group {
  margin-block-end: var(--space-7);
}

.view-group:last-child {
  margin-block-end: 0;
}

.view-group > h3 {
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-overline);
  color: var(--ink-muted);
  margin-block-end: var(--space-4);
}

.view-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

/* A group with a single view (Portfolio, Configuration) should not stretch
   its one card across the whole row. */
.view-grid:has(> :only-child) {
  grid-template-columns: minmax(240px, 420px);
}

.view-card {
  background: var(--surface);
  border: var(--hairline) solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  transition:
    transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.view-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.view-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  color: var(--accent);
  margin-block-end: var(--space-3);
}

.view-card__icon svg {
  width: 20px;
  height: 20px;
}

.view-card__name {
  display: block;
  font-weight: var(--weight-semibold);
  color: var(--ink);
  margin-block-end: var(--space-1);
}

.view-card__desc {
  color: var(--ink-secondary);
  margin: 0;
  font-size: var(--text-body);
}

/* ---- Buttons ---- */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  border: var(--hairline) solid var(--rule-strong);
  text-decoration: none;
  font-weight: var(--weight-semibold);
  font-size: var(--text-body);
  color: var(--ink);
  background: var(--surface);
  transition:
    transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    background-color var(--duration) var(--ease);
}

.button:hover {
  background: var(--surface-sunken);
}

.button--primary {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--accent-on);
  box-shadow: var(--shadow-sm);
}

.button--primary:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.button-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-block-start: var(--space-5);
}

