/* ==========================================================================
   Agjensi SEO — main.css
   Tokens, base, typography, layout, header, footer.
   Mobile-first: breakpoints live in responsive.css.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #111111;
  --text: #171717;
  --muted: #666666;
  --bg: #ffffff;
  --bg-2: #f7f7f5;
  --line: #e6e6e6;
  --line-strong: #cfcfcb;
  --accent: #22e27a;
  --accent-ink: #0a6b3b;
  --accent-soft: #e8fbf0;
  --warn: #9a5b00;
  --warn-soft: #fff4dd;
  --bad: #b3261e;
  --bad-soft: #fdecea;
  --on-dark: #ffffff;
  --on-dark-muted: #b4b4b0;
  --line-dark: #2c2c2c;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --fs-h1: clamp(2.5rem, 1.55rem + 4.4vw, 4.75rem);
  --fs-h1-page: clamp(2.25rem, 1.6rem + 3vw, 4rem);
  --fs-h2: clamp(1.875rem, 1.4rem + 2.1vw, 3rem);
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.04);
  --shadow-md: 0 1px 2px rgba(17, 17, 17, 0.04), 0 12px 32px -12px rgba(17, 17, 17, 0.12);
  --shadow-lg: 0 2px 4px rgba(17, 17, 17, 0.04), 0 32px 64px -24px rgba(17, 17, 17, 0.18);

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1-page);
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.03em;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.section--dark :focus-visible,
.cta-band :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--accent);
}

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

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: calc(780px + var(--gutter) * 2);
}

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

.section--alt {
  background: var(--bg-2);
}

.section--line {
  border-top: 1px solid var(--line);
}

.section--dark {
  background: var(--ink);
  color: var(--on-dark);
}

.section--dark h2,
.section--dark h3 {
  color: var(--on-dark);
}

.section--tight {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4rem);
}

.section__head {
  max-width: 760px;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head h2 + p {
  margin-top: 1.125rem;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--muted);
}

.section--dark .lead {
  color: var(--on-dark-muted);
}

.muted {
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0 0 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 226, 122, 0.18);
}

.section--dark .eyebrow {
  color: var(--on-dark-muted);
}

.grid {
  display: grid;
  gap: 1rem;
}

.split {
  display: grid;
  gap: clamp(2rem, 1.5rem + 3vw, 4rem);
}

.stack > * + * {
  margin-top: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  margin: 2.5rem 0 1rem;
}

.prose h3 {
  margin: 2rem 0 0.75rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25em;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose a,
.text-link {
  color: var(--accent-ink);
  font-weight: 500;
  text-decoration: underline;
}

.prose a:hover,
.text-link:hover {
  color: var(--ink);
}

.placeholder {
  font-family: var(--mono);
  font-size: 0.875em;
  padding: 0.1em 0.4em;
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 4px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.site-header.is-scrolled,
.nav-open .site-header {
  border-bottom-color: var(--line);
}

.nav-open .site-header {
  background: var(--bg);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-right: auto;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.logo__mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.logo__seo {
  color: var(--accent-ink);
}

.site-footer .logo,
.site-footer .logo__seo {
  color: #fff;
}

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

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -0.5rem;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--ink);
}

.nav-toggle__bars {
  position: relative;
  width: 20px;
  height: 14px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), top 0.25s var(--ease), bottom 0.25s var(--ease);
}

.nav-toggle__bars::before {
  top: 2px;
}

.nav-toggle__bars::after {
  bottom: 2px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 6px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  bottom: 6px;
  transform: rotate(-45deg);
}

.nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  padding: 1rem var(--gutter) 2.5rem;
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-open .nav {
  display: block;
}

.nav-open body {
  overflow: hidden;
}

.nav__list {
  list-style: none;
}

.nav__item {
  border-bottom: 1px solid var(--line);
}

.nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.125rem 0;
  background: none;
  border: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.nav__link svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}

.nav__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav__menu {
  display: none;
  list-style: none;
  padding-bottom: 1rem;
}

.nav__toggle[aria-expanded="true"] + .nav__menu {
  display: block;
}

.nav__menu a {
  display: block;
  padding: 0.625rem 0;
  color: var(--muted);
  text-decoration: none;
}

.nav__menu a:hover,
.nav__menu a[aria-current="page"] {
  color: var(--ink);
}

.nav__cta {
  margin-top: 1.5rem;
}

.nav__cta .btn {
  width: 100%;
}

.header-cta {
  flex: none;
}

.header-cta .cta-long {
  display: none;
}

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

.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  padding-block: clamp(3rem, 2.5rem + 3vw, 5rem) 2rem;
  font-size: var(--fs-sm);
}

.site-footer__top {
  display: grid;
  gap: 2.5rem;
}

.site-footer__brand p {
  max-width: 34ch;
  margin-top: 1rem;
  color: var(--on-dark-muted);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
}

.site-footer h2 {
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8a8a86;
}

.site-footer ul {
  list-style: none;
}

.site-footer li + li {
  margin-top: 0.5rem;
}

.site-footer a {
  color: #dededb;
  text-decoration: none;
}

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

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-xs);
  color: #8a8a86;
}

/* ---------- Motion ---------- */

.reveal--pending {
  opacity: 0;
  transform: translateY(16px);
}

.reveal--in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal--pending {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .nav-toggle {
    display: none;
  }
}

/* Header item order on small screens: logo · CTA · menu button */
.header-cta {
  order: 2;
}

.nav-toggle {
  order: 3;
}

/* backdrop-filter would make the header the containing block of the fixed mobile menu */
.nav-open .site-header {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

h1 + .lead,
h2 + .lead {
  margin-top: 1.125rem;
}

.site-footer {
  border-top: 1px solid var(--line-dark);
}

.site-footer .logo__mark rect {
  fill: #242424;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-delay: 0s !important;
  }
}
