/* a7reports.com marketing website styles
 * Design tokens match apps/web/src/styles.css exactly (same brand palette).
 * No external fonts — system font stack only (NFR-4).
 */

/* ---- Tokens ---------------------------------------------------------------- */
:root {
  color-scheme: light;
  --accent: #f26b1d; /* Safety Orange */
  --accent-dark: #c8540e;
  --nav-bg: #f0f1f4;
  --nav-fg: #1a1a1a;
  --nav-muted: #7a8494;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #7a8494;
  --surface: #f5f6f8;
  --border: #b9c0cc;
  --radius: 6px;
  --ok: #1b6e20;
  --max-w: 1160px;
  --brand-check: #ffffff;

  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    'Noto Sans',
    sans-serif;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --nav-bg: #16191e;
    --nav-fg: #ffffff;
    --nav-muted: #9aa3b3;
    --bg: #1c1e24;
    --fg: #e2e6ed;
    --muted: #94a0b0;
    --surface: #252830;
    --border: #3a3e4a;
    --brand-check: #ffcc00;
  }
}

/* ---- Reset ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-dark);
}

/* ---- Layout helpers -------------------------------------------------------- */
.www-wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---- Navigation ------------------------------------------------------------ */
.www-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.www-nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 60px;
}

.www-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--nav-fg);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.www-brand__mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

.www-nav__links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.www-nav__links a {
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--nav-fg);
  text-decoration: none;
  border-radius: var(--radius);
}

.www-nav__links a:hover,
.www-nav__links a[aria-current] {
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

.www-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.www-nav__signin {
  font-size: 0.9375rem;
  color: var(--nav-fg);
  text-decoration: none;
  padding: 0.375rem 0.625rem;
}

.www-nav__signin:hover {
  color: var(--accent);
}

.www-nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--nav-fg);
  cursor: pointer;
  padding: 0.375rem;
  font-size: 1.5rem;
  line-height: 1;
  margin-left: auto;
}

@media (max-width: 680px) {
  .www-nav__links,
  .www-nav__actions {
    display: none;
  }

  .www-nav__hamburger {
    display: block;
  }

  .www-nav--open .www-nav__links,
  .www-nav--open .www-nav__actions {
    display: flex;
  }

  .www-nav--open .www-nav__inner {
    flex-wrap: wrap;
    padding-block: 0.75rem;
  }

  .www-nav--open .www-nav__links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    order: 3;
  }

  .www-nav--open .www-nav__actions {
    width: 100%;
    order: 4;
    padding-block-end: 0.75rem;
  }

  .www-nav__hamburger {
    order: 2;
  }
}

/* ---- Language and country picker ------------------------------------------ */
.www-locale {
  position: relative;
  flex-shrink: 0;
}

.www-locale > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px; /* touch target */
  padding: 0 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--nav-fg);
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.www-locale > summary::-webkit-details-marker {
  display: none;
}

.www-locale > summary:hover,
.www-locale[open] > summary {
  background: color-mix(in srgb, var(--fg) 8%, transparent);
}

.www-locale > summary:focus-visible,
.www-locale__menu a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.www-flag {
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 25%, transparent);
}

.www-flag--globe {
  box-shadow: none;
  color: var(--nav-fg);
}

.www-locale__chevron {
  font-size: 0.75rem;
  color: var(--nav-muted);
}

.www-locale__menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 0.375rem);
  z-index: 110;
  min-width: 17rem;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
}

.www-locale__heading {
  margin: 0.25rem 0.5rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.www-locale__heading + ul + .www-locale__heading {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.www-locale__menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.www-locale__menu a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  padding: 0 0.5rem;
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
}

.www-locale__menu a span {
  white-space: nowrap;
}

.www-locale__menu a:hover {
  background: var(--surface);
}

.www-locale__menu a[aria-current] {
  font-weight: 700;
  background: var(--surface);
}

/* On phones the picker stays in the bar next to the menu button, as a flag and its code. */
@media (max-width: 680px) {
  .www-locale {
    margin-left: auto;
    order: 1;
  }

  .www-locale__current {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .www-nav__hamburger {
    margin-left: 0;
  }
}

/* ---- Buttons --------------------------------------------------------------- */
.www-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1.125rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.www-btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.www-btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.www-btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.www-btn--outline:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent-dark);
}

.www-btn--lg {
  padding: 0.75rem 1.625rem;
  font-size: 1.0625rem;
}

/* ---- Hero ------------------------------------------------------------------ */
.www-hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background: var(--bg);
}

.www-hero__eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.www-hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 700px;
  margin-inline: auto;
}

.www-hero__sub {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.www-hero__ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Trust bar ------------------------------------------------------------- */
.www-trust {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.www-trust__list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.www-trust__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg);
}

.www-trust__icon {
  color: var(--ok);
  font-size: 1.1rem;
}

/* ---- Section headers ------------------------------------------------------- */
.www-section {
  padding: 4rem 0;
}

.www-section--alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.www-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.www-section-header__label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.625rem;
}

.www-section-header h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.www-section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 540px;
  margin-inline: auto;
}

/* ---- Feature cards --------------------------------------------------------- */
.www-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.www-feature {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  padding: 1.75rem;
}

.www-feature__icon {
  font-size: 2rem;
  margin-bottom: 0.875rem;
}

.www-feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
}

.www-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ---- How it works steps ---------------------------------------------------- */
.www-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.www-step {
  position: relative;
  padding-left: 1rem;
  counter-increment: step;
}

.www-step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.9375rem;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.www-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
}

.www-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ---- Blog cards ------------------------------------------------------------ */
.www-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.www-post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  padding: 1.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s;
}

.www-post-card:hover {
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.08);
  color: inherit;
}

.www-post-card__meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.www-post-card__category {
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.www-post-card h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

.www-post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  flex: 1;
}

.www-post-card__read {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---- CTA band -------------------------------------------------------------- */
.www-cta-band {
  padding: 5rem 0;
  text-align: center;
  background: var(--accent);
  color: #fff;
}

.www-cta-band h2 {
  margin: 0 0 0.875rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.www-cta-band p {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  opacity: 0.9;
}

.www-btn--white {
  background: #fff;
  color: var(--accent-dark);
  border-color: #fff;
}

.www-btn--white:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: var(--accent-dark);
}

/* ---- Article page ---------------------------------------------------------- */
.www-article-wrap {
  max-width: 740px;
  margin-inline: auto;
  padding: 3rem 1.25rem 4rem;
}

.www-article-header {
  margin-bottom: 2.5rem;
}

.www-article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.www-article-header__cat {
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.www-article-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.www-article-header__excerpt {
  margin: 0;
  font-size: 1.125rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Article body */
.www-article-body {
  font-size: 1.0625rem;
  line-height: 1.75;
}
.www-article-body h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.www-article-body h3 {
  margin: 2rem 0 0.625rem;
  font-size: 1.1875rem;
  font-weight: 700;
}
.www-article-body p {
  margin: 0 0 1.25rem;
}
.www-article-body ul,
.www-article-body ol {
  margin: 0 0 1.25rem;
  padding-left: 1.75rem;
}
.www-article-body li {
  margin-bottom: 0.375rem;
}
.www-article-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}
.www-article-body blockquote p {
  margin: 0;
}
.www-article-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 1.25rem;
}
.www-article-body code {
  font-family: ui-monospace, Menlo, Consolas, 'Courier New', monospace;
  font-size: 0.9em;
}
.www-article-body :not(pre) > code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.35em;
}

/* ---- Blog index header ----------------------------------------------------- */
.www-blog-hero {
  padding: 3.5rem 0 3rem;
}

.www-blog-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.www-blog-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* ---- Footer ---------------------------------------------------------------- */
.www-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.www-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.www-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}

.www-footer__brand svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

/* "Also available in: Español · Español (México)" — the page's other locale versions. */
.www-footer__langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.www-footer__links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.www-footer__links a {
  color: var(--muted);
  text-decoration: none;
}

.www-footer__links a:hover {
  color: var(--fg);
}

/* ---- Focus styles (accessibility) ----------------------------------------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---- First-visit cookie notice (T-181), injected by assets/beacon.js ------ */
.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  color: var(--fg);
  border-top: 1px solid var(--muted);
}
.cookie-notice p {
  flex: 1 1 auto;
  margin: 0;
  font-size: 0.9rem;
}
.cookie-notice a {
  color: var(--accent);
}
.cookie-notice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cookie-notice button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
/* "Only what's necessary" is a real, equally reachable choice (NFR-4): same size, just not the accent. */
.cookie-notice button.cookie-notice__secondary {
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--muted);
}
