/* ========================================================
   dearnode — shared site stylesheet
   Used by every page so header, footer, container, and
   common typography are identical across the site.
   ======================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --ink: #161616;
  --ink-soft: #525252;
  --ink-faint: #8d8d8d;
  --line: #e0e0e0;
  --accent: #0066ff;
}

/* ── Reset & base ─────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── Container (shared width on every page) ──────────── */
.container {
  max-width: 82.5rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Header ─────────────────────────────────────────── */
.header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.logo {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-dot { color: inherit; }
.nav-links {
  display: flex;
  gap: 1.75rem;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
  border-radius: 0.25rem;
  transition: all 0.15s;
}
.nav-links a:hover { background: var(--bg-alt); color: var(--ink); }
.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
}
.nav-cta:hover { background: #0050cc; }

/* Hamburger button — hidden on desktop */
.nav-burger {
  display: none;
  background: transparent;
  border: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.3125rem;
  margin-left: 0.5rem;
}
.nav-burger span {
  display: block;
  width: 1.25rem;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(0.40625rem) rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-0.40625rem) rotate(-45deg);
}

/* Mobile fullscreen menu */
.mobile-menu {
  position: fixed;
  inset: 4rem 0 0 0;
  background: var(--bg);
  z-index: 99;
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-inner {
  max-width: 82.5rem;
  margin: 0 auto;
  padding: 2rem;
}
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.mobile-menu-links li {
  border-bottom: 1px solid var(--line);
}
.mobile-menu-links a {
  display: block;
  padding: 1.5rem 0;
  font-family: 'Funnel Display', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.mobile-menu-links a:hover { color: var(--accent); }
.mobile-menu-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 2rem;
  padding: 0.875rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 500;
}
.mobile-menu-cta:hover { background: #0050cc; }
body.menu-open { overflow: hidden; }

/* ── Footer (full dark) ─────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
}
.footer .logo { color: #fff; }
.footer .logo-dot { color: inherit; }
.footer-body { padding: 4rem 0 3rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 1.25rem; }
.footer-tagline {
  font-family: 'Funnel Display', sans-serif;
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.4;
  color: #fff;
  max-width: 18rem;
}
.footer-col-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.125rem;
}
.footer-col li { margin-bottom: 0.625rem; font-size: 0.875rem; color: rgba(255,255,255,0.85); }
.footer-col a:hover { color: var(--accent); }
.footer-partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.footer-partner-row img {
  height: 2rem;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.15s;
}
.footer-partner-row img:hover { opacity: 1; }
.footer-compliance {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}
.footer-compliance-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}
.footer-compliance-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-compliance-item img {
  width: 1.125rem;
  height: 0.75rem;
  border-radius: 0.125rem;
  object-fit: cover;
}
.footer-compliance-item svg {
  color: rgba(255,255,255,0.55);
  flex-shrink: 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
}
.footer-row {
  padding: 1.25rem 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-col-contact {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.footer-partners-corner {
  margin-top: auto;
  padding-top: 1.5rem;
  text-align: right;
}
.footer-partners-corner .footer-col-title {
  margin-bottom: 0.75rem;
}
.footer-partners-corner .footer-partner-row {
  justify-content: flex-end;
}
.footer-partners-corner img {
  height: 1.5rem;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

/* ── Reveal-on-scroll animation ─────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity 1.1s cubic-bezier(0.2, 0.6, 0.2, 1),
                transform 1.1s cubic-bezier(0.2, 0.6, 0.2, 1);
    will-change: opacity, transform;
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  /* Hero text fade up on first paint */
  .hero h1,
  .hero p.lede,
  .hero-actions,
  .project-hero h1,
  .project-hero .lede,
  .service-hero h1,
  .service-hero .lede,
  .contact-hero h1,
  .contact-hero .lede {
    animation: fade-up 1.2s cubic-bezier(0.2, 0.6, 0.2, 1) both;
  }
  .hero p.lede,
  .project-hero .lede,
  .service-hero .lede,
  .contact-hero .lede { animation-delay: 0.2s; }
  .hero-actions { animation-delay: 0.4s; }

  @keyframes fade-up {
    from { opacity: 0; transform: translateY(1.5rem); }
    to   { opacity: 1; transform: none; }
  }
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 56.25rem) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
}
