/*
  Brand palette, locked to a single always-dark theme (matches the AG logo:
  near-black ground, green-only accent). No light/dark toggle exists or is
  offered; the previous prefers-color-scheme split has been collapsed into
  one deliberate theme.

  Contrast verified (WCAG, against --bg #0A0A0A):
  - --ink   (#F2F2F0): 17.7:1
  - --ink-soft (#A3A39C): 7.8:1
  - --accent-solid (#8FD14F) for small text/links: 10.8:1
  - --accent-to (#2F7A2F) is 3.7:1 on --bg: safe for large/bold headings
    (>=3:1 threshold) but MUST NOT be used for small body-size text.
  - Button text uses --btn-ink on a gradient capped at --btn-grad-to
    (not the full --accent-to) so contrast never drops below ~5.3:1
    across the gradient, even bold at 16px.
*/
:root {
  --bg: #0A0A0A;
  --bg-raised: #141414;
  --ink: #F2F2F0;
  --ink-soft: #A3A39C;
  --line: #262620;
  --accent-from: #8FD14F;
  --accent-to: #2F7A2F;
  --accent-solid: #8FD14F;
  --btn-grad-to: #4C9439;
  --btn-ink: #0A0A0A;
  --radius-card: 16px;
  --radius-chip: 999px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  position: relative;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark span {
  color: var(--accent-solid);
}

/* Expands the tappable area of small inline links to the 44px touch-target
   guideline without changing their visual size or surrounding layout. */
.tap-target-fix::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 44px;
  transform: translateY(-50%);
}

.nav-cta {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 11px 20px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.15s ease;
}

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

.nav-cta:active {
  transform: scale(0.98);
}

/* Hero */

.hero {
  padding: 64px 0 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 800;
  max-width: 16ch;
  background: linear-gradient(135deg, var(--ink) 35%, var(--accent-from) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent-from), var(--btn-grad-to));
  color: var(--btn-ink);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: var(--radius-chip);
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent-from) 35%, transparent);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 24px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

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

.btn-secondary:active {
  transform: scale(0.98);
}

/* Hero visual: AG monogram badge (see badge SVG in index.html for the
   "approximate recreation" placeholder note) */

.hero-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-width: 340px;
  margin: 0 auto;
}

.hero-mark svg {
  width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-mark {
    animation: mark-in 0.7s ease-out both;
  }
}

@keyframes mark-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* World-map-echo texture: faint dot grid, faded at the edges */

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10%;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--accent-from) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.08;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 0%, transparent 75%);
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

/* Legal pages (privacy policy) */

.legal-body {
  max-width: 72ch;
}

.legal-body h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 0 8px;
}

.legal-body a {
  color: var(--accent-solid);
}

/* Section shell */

section {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 56ch;
  margin: 0 0 48px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  font-weight: 800;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0;
}

/* What we do */

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

.service-row {
  display: grid;
  grid-template-columns: 0.5fr 1.5fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.service-row:first-of-type {
  border-top: 1px solid var(--line);
}

.service-row h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.service-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 52ch;
}

/* Proof */

.proof-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.browser-frame {
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: 0 24px 60px -30px rgba(20, 18, 10, 0.35);
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.browser-chrome .dots {
  display: flex;
  gap: 6px;
}

.browser-chrome .dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  display: block;
}

.browser-chrome .url {
  flex: 1;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
  padding: 6px 14px;
  text-align: center;
}

.browser-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.proof-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.proof-caption p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.proof-caption strong {
  color: var(--ink);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.contact-line:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-line span {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.contact-line a,
.contact-line strong {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.contact-line a {
  position: relative;
  display: inline-block;
}

.contact-line a:hover {
  color: var(--accent-solid);
}

/* Footer */

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-row a {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: var(--ink-soft);
}

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

/* Reveal on scroll */

/* Mobile */

@media (max-width: 768px) {
  .hero {
    padding: 40px 0 56px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-mark {
    order: -1;
    max-width: 220px;
  }

  section {
    padding: 56px 0;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Extra clearance at narrow widths so the hero CTA doesn't land under
   Netlify's fixed-position "powered by" badge in the bottom-right corner. */
@media (max-width: 400px) {
  .hero {
    padding: 24px 0 40px;
  }

  .hero-grid {
    gap: 24px;
  }

  .hero-mark {
    max-width: 150px;
  }
}
