/* Namexpay landing page */

:root {
  --paper: #F4F6F9;
  --ink: #121C2E;
  --muted: #576275;
  --rule: #D5DCE6;
  --accent: #0841C9;
  --accent-strong: #06309A;
  --on-accent: #FFFFFF;
  --header-bg: rgba(244, 246, 249, 0.9);
  --route-start: #0436C6;
  --route-end: #0BB4E8;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0B1322;
    --ink: #E6ECF5;
    --muted: #9AA7BA;
    --rule: #22304A;
    --accent: #5EA8FF;
    --accent-strong: #93C5FF;
    --on-accent: #0B1322;
    --header-bg: rgba(11, 19, 34, 0.9);
    --route-start: #3C86FF;
    --route-end: #2AD4F2;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.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;
  left: var(--gutter);
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  border-radius: 4px;
}
.skip-link:focus { top: 1rem; }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { width: auto; height: 2rem; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-contact {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  transition: border-color 0.2s ease;
}
.site-nav .nav-contact:hover { border-color: var(--ink); }

.nav-toggle { display: none; }

@media (max-width: 47.99rem) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-right: -0.65rem;
    padding: 0;
    color: var(--ink);
    background: none;
    border: 0;
    cursor: pointer;
  }
  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    display: block;
    width: 1.25rem;
    height: 1.5px;
    background: currentColor;
  }
  .nav-toggle-icon { position: relative; transition: background-color 0.2s ease; }
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    transition: transform 0.25s ease;
  }
  .nav-toggle-icon::before { top: -6px; }
  .nav-toggle-icon::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon { background-color: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem var(--gutter) 1rem;
  }
  .site-nav li + li { border-top: 1px solid var(--rule); }
  .site-nav a,
  .site-nav .nav-contact {
    display: block;
    padding: 0.95rem 0;
    color: var(--ink);
    font-size: 1.05rem;
    border: 0;
    border-radius: 0;
  }
}

/* Hero -------------------------------------------------------------- */

.hero { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(4rem, 8vw, 6rem); }

.hero h1 {
  max-width: 13em;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6.2vw, 4.75rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  max-width: 36rem;
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.75rem 1.6rem;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.button:hover { background: var(--accent-strong); }

.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.2s ease;
}
.text-link:hover { text-decoration-color: currentColor; }

/* Route visual: the one moving moment on the page */

.route { margin: clamp(3.5rem, 8vw, 6rem) 0 0; }
.route-map { width: 100%; height: auto; overflow: visible; }

.route-grid line {
  stroke: var(--rule);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 0 12;
}
.route-horizon { stroke: var(--rule); stroke-width: 1; }
.route-corridor {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}
.route-arc {
  fill: none;
  stroke: url(#route-gradient);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: route-draw 2.4s cubic-bezier(0.65, 0, 0.35, 1) 0.3s both;
}
.route-stop-start { stop-color: var(--route-start); }
.route-stop-end { stop-color: var(--route-end); }
.route-node { fill: var(--paper); stroke: var(--route-start); stroke-width: 2; }
.route-node-core, .route-dot { fill: var(--accent); }
.route-node.route-node-end { stroke: var(--route-end); }
.route-node-core.route-node-end { fill: var(--route-end); }

@keyframes route-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.route-cities {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1rem;
}
.city { display: flex; flex-direction: column; gap: 0.15rem; }
.city-end { align-items: flex-end; text-align: right; }
.city-name {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.2;
}
.city-meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 40rem) {
  .route-grid { display: none; }
  .route-node { r: 18px; stroke-width: 5; }
  .route-node-core { r: 7px; }
  .route-dot { r: 12px; }
}

/* Sections ---------------------------------------------------------- */

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
  border-top: 1px solid var(--rule);
}

.section-title {
  max-width: 18ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.split { display: grid; gap: 1.75rem; }
@media (min-width: 56rem) {
  .split { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; }
}

.prose p {
  max-width: 38rem;
  margin: 0 0 1.25em;
  font-size: 1.125rem;
  line-height: 1.65;
}
.prose p:last-child { margin-bottom: 0; }

.principles {
  display: grid;
  gap: 2.5rem;
  margin: clamp(3.5rem, 7vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 48rem) {
  .principles { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}
.principle {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.principle h3 {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.25;
}
.principle p {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.locations {
  display: grid;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule);
}
.location { padding: 2rem 0; }
.location + .location { border-top: 1px solid var(--rule); }
@media (min-width: 48rem) {
  .locations { grid-template-columns: 1fr 1fr; }
  .location { padding: 2.5rem 3rem 0 0; }
  .location + .location {
    padding-left: 3rem;
    padding-right: 0;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }
}
.location h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.location-region { margin: 0.5rem 0 1.25rem; color: var(--muted); }
.location p:last-child { max-width: 32rem; margin: 0; }

.contact-email {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
.contact-email:hover { color: var(--accent); text-decoration-color: currentColor; }

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

.site-footer {
  padding-block: 3rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
  border-top: 1px solid var(--rule);
}
.footer-inner { display: grid; gap: 1.25rem; }
@media (min-width: 48rem) {
  .footer-inner { grid-template-columns: 12rem 1fr; gap: 3rem; }
}
.footer-brand { margin: 0; color: var(--ink); }
.footer-legal p { max-width: 46rem; margin: 0 0 0.75rem; }
.footer-legal p:last-child { margin-bottom: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}

/* 404 page ---------------------------------------------------------- */

.not-found {
  min-height: calc(100vh - 4.5rem - 8rem);
  display: flex;
  align-items: center;
  padding-block: 5rem;
}
.not-found h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
}
.not-found p { margin: 0 0 2rem; color: var(--muted); }
