/* nearfinder.com - one stylesheet, no framework.
   Tokens: one accent (the brand blue), cool neutrals, light and dark from prefers-color-scheme.
   Radius rule: buttons and pills are full-pill, cards 20px (CTA 28px), country rows and inputs 12-16px. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  /* optional: the font is preloaded; a late font is not swapped in mid-page (no layout shift) */
  font-display: optional;
}

:root {
  color-scheme: light dark;
  --bg: #fbfcfd;
  --surface: #fdfeff;
  --surface-2: #f2f6f9;
  --text: #0e1a23;
  --muted: #4b5b67;
  --line: rgb(14 26 35 / 0.1);
  --line-strong: rgb(14 26 35 / 0.22);
  /* the NearFinder blue of the logo and of every NearFinder site; buttons and links use it one step darker so white
     text keeps 4.5:1 */
  --brand: #1e87e4;
  --accent: #1670c4;
  --accent-hover: #125ea6;
  --accent-soft: #e8f2fc;
  --on-accent: #fdfeff;
  --feature-from: #1a78cf;
  --feature-to: #135a9e;
  --on-feature: #f4fbff;
  --success-bg: #e9f7ef;
  --success-text: #13603a;
  --error-bg: #fdeeec;
  --error-text: #a3261a;
  --shadow: 0 1px 2px rgb(11 40 60 / 0.06), 0 10px 30px rgb(11 40 60 / 0.07);
  --img-outline: rgb(0 0 0 / 0.1);
  --gutter: 20px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1218;
    --surface: #101b24;
    --surface-2: #15232e;
    --text: #e7eef3;
    --muted: #9db0bd;
    --line: rgb(231 238 243 / 0.1);
    --line-strong: rgb(231 238 243 / 0.24);
    --accent: #5aaef0;
    --accent-hover: #86c4f5;
    --accent-soft: rgb(30 135 228 / 0.16);
    --on-accent: #06131c;
    --feature-from: #1a6fbd;
    --feature-to: #11497f;
    --success-bg: rgb(60 190 120 / 0.14);
    --success-text: #8be0b0;
    --error-bg: rgb(255 110 90 / 0.14);
    --error-text: #ffa597;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.25);
    --img-outline: rgb(255 255 255 / 0.1);
  }
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
ul { margin: 0; padding: 0; }

/* the gutter grows with the safe areas (notch in landscape) */
.container {
  width: min(1200px, 100% - max(var(--gutter), env(safe-area-inset-left)) - max(var(--gutter), env(safe-area-inset-right)));
  margin-inline: auto;
}
.icon { width: 1.15em; height: 1.15em; flex: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 30;
  padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition-property: background-color, border-color, color, scale;
  transition-duration: 150ms;
  transition-timing-function: var(--ease);
}
.btn:active { scale: 0.96; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 0.95rem; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); color: var(--text); }
.btn .icon { transition: translate 150ms var(--ease); }
.btn:hover .icon { translate: 3px 0; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.text-link .icon { transition: translate 150ms var(--ease); }
.text-link:hover .icon { translate: 3px 0; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--bg); }
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: block; flex: none; }
.brand picture { display: block; }
.brand img { width: 160px; height: 36px; }
.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a:not(.btn) {
  display: block; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  color: var(--text); text-decoration: none; font-weight: 500;
  transition: background-color 150ms var(--ease);
}
.nav-links a:not(.btn):hover { background: var(--accent-soft); }
.nav-links a[aria-current="page"]:not(.btn) { color: var(--accent); font-weight: 600; }
.nav-cta { margin-left: 8px; }
.lang-menu { display: flex; gap: 2px; list-style: none; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-menu a {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 500; color: var(--muted); text-decoration: none;
}
.lang-menu a[aria-current="true"] { background: var(--surface-2); color: var(--text); }
.lang-menu a:hover { color: var(--text); }
.lang-menu img { width: 16px; height: 16px; border-radius: 50%; flex: none; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle-close { display: none; }

/* the header needs ~1060px with the flags and the longest labels (Spanish): below that, the menu button */
@media (max-width: 1079px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    display: none; flex-direction: column; align-items: stretch; gap: 24px;
    padding: 24px var(--gutter) 40px; margin: 0;
    background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  }
  /* a backdrop-filter makes the header the containing block of position: fixed; off while the menu is open */
  .js .site-header.is-open { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
  .js .site-header.is-open .site-nav { display: flex; }
  .js .site-header.is-open .nav-toggle-open { display: none; }
  .js .site-header.is-open .nav-toggle-close { display: block; }
  .js .nav-links { flex-direction: column; align-items: stretch; gap: 4px; }
  .js .nav-links a:not(.btn) { padding: 14px 4px; font-size: 1.25rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .js .nav-links a:not(.btn):hover { background: none; }
  .js .nav-cta { margin: 16px 0 0; }
  .js .nav-cta .btn { width: 100%; height: 52px; font-size: 1.05rem; }
  .js .lang-menu { align-self: flex-start; }
  .no-js .header-inner { height: auto; flex-wrap: wrap; padding-block: 12px; }
  .no-js .site-nav { flex-wrap: wrap; margin-left: 0; }
}

/* sections */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-title { font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.75rem); font-weight: 650; letter-spacing: -0.025em; }
.section-lead { margin-top: 14px; max-width: 60ch; color: var(--muted); font-size: 1.125rem; }
.lead { color: var(--muted); font-size: clamp(1.1rem, 1rem + 0.35vw, 1.25rem); max-width: 48ch; }

/* home: hero */
.hero {
  padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 80px);
  background: radial-gradient(60% 70% at 85% 10%, var(--accent-soft), transparent 70%);
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.25rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; max-width: 14ch; }
.hero .lead { margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-map { margin: 0; }
.hero-map img { width: 100%; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 56px; }
}

/* home: regions, one row per region with its directories as pills */
.region-rows { margin-top: 40px; }
.region-row { display: grid; gap: 16px; padding-block: 28px; }
.region-row + .region-row { border-top: 1px solid var(--line); }
.region-row:first-child { padding-top: 0; }
.region-head h3 { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.015em; }
.region-head p { margin-top: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  min-height: 40px; padding: 0 14px 0 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  transition-property: background-color, border-color, scale;
  transition-duration: 150ms;
  transition-timing-function: var(--ease);
}
.chip:hover { color: var(--text); background: var(--accent-soft); border-color: transparent; }
.chip:active { scale: 0.96; }
.chip img { width: 24px; height: 24px; border-radius: 50%; }
.regions-more { margin-top: 32px; }
@media (min-width: 900px) {
  .region-row { grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
  .region-head { padding-top: 6px; }
}

/* home: why */
.why { background: var(--surface-2); }
.why-grid { display: grid; gap: 40px; }
.why-list { list-style: none; }
.why-list li { display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding-block: 24px; }
.why-list li + li { border-top: 1px solid var(--line); }
.why-list li:first-child { padding-top: 0; }
.why-list h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.why-list p { margin-top: 6px; color: var(--muted); }
.why-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.why-icon .icon { width: 24px; height: 24px; }
@media (min-width: 900px) {
  .why-grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .why-intro { position: sticky; top: calc(var(--header-h) + 40px); }
}

/* videos (home, about) */
.video {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 20px; background: #0b1218;
  outline: 1px solid var(--img-outline); outline-offset: -1px;
}
.video img { width: 100%; height: 100%; object-fit: cover; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  border: 0; padding: 0; background: linear-gradient(transparent 40%, rgb(6 19 28 / 0.35)); cursor: pointer; color: #fdfeff;
}
.video-play .icon {
  width: 72px; height: 72px; padding: 22px 20px 22px 24px; border-radius: 50%;
  background: rgb(6 19 28 / 0.72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: scale 200ms var(--ease);
}
.video-play:hover .icon { scale: 1.06; }
.video-play:focus-visible { outline-offset: -4px; border-radius: 20px; }

/* home: stories */
.stories-grid { display: grid; gap: 32px; align-items: center; }
.stories-copy .text-link { margin-top: 24px; }
@media (min-width: 900px) {
  .stories-grid { grid-template-columns: 7fr 5fr; gap: 64px; }
  .stories-media { grid-column: 1; grid-row: 1; }
}

/* home: contact call */
.cta-band { padding-top: 0; }
.cta-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 24px;
  padding: clamp(28px, 5vw, 56px); border-radius: 28px;
  background: var(--accent-soft);
}
.cta-card h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.2rem); font-weight: 650; letter-spacing: -0.02em; }
.cta-card p { margin-top: 10px; color: var(--muted); }
.cta-card p a { font-weight: 600; }
@media (min-width: 768px) {
  .cta-card { flex-direction: row; align-items: center; justify-content: space-between; }
}

button.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }

/* inner pages */
.page-hero { padding-block: clamp(40px, 7vw, 88px) clamp(8px, 2vw, 24px); }
.page-hero h1 { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em; max-width: 20ch; }
.page-hero .lead { margin-top: 18px; }
.page-hero + .section { padding-top: clamp(40px, 6vw, 72px); }
.page-hero-grid { display: grid; gap: 32px; align-items: end; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; gap: 4px; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.stats dd { margin: 0; font-size: clamp(2rem, 1.5rem + 1.6vw, 3rem); font-weight: 650; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats dt { color: var(--muted); font-size: 0.95rem; }
@media (min-width: 900px) {
  .page-hero-grid { grid-template-columns: 7fr 5fr; gap: 64px; }
}

/* about */
.about-map { padding-top: 0; }
.map-figure { margin: 0; }
.map-figure img { width: 100%; }
.map-figure figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.map-figure figcaption a, .region-jump a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--text); text-decoration: none; font-weight: 500;
  transition: background-color 150ms var(--ease);
}
.map-figure figcaption a:hover, .region-jump a:hover { background: var(--accent-soft); }
.map-figure figcaption span { color: var(--muted); font-variant-numeric: tabular-nums; }
.video-grid { display: grid; gap: 20px; margin-top: 40px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* countries */
.region-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.region { padding-block: clamp(32px, 5vw, 56px); }
.page-hero + .region { padding-top: clamp(32px, 5vw, 56px); }
.region:last-of-type { padding-bottom: clamp(64px, 9vw, 112px); }
.region-title { display: flex; align-items: center; gap: 12px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 650; letter-spacing: -0.02em; }
.region-title span {
  padding: 2px 12px; border-radius: 999px; background: var(--surface-2);
  color: var(--muted); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.country-grid { display: grid; gap: 12px; margin-top: 24px; list-style: none; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.country {
  display: flex; align-items: center; gap: 14px; height: 100%;
  padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none;
  transition-property: background-color, border-color;
  transition-duration: 150ms;
  transition-timing-function: var(--ease);
}
.country:hover { color: var(--text); background: var(--accent-soft); border-color: transparent; }
.country img { width: 40px; height: 40px; border-radius: 50%; }
.country-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.country-name { font-weight: 600; }
.country-host { color: var(--muted); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country > .icon { margin-left: auto; color: var(--muted); }
.country:hover > .icon { color: var(--accent); }

/* contact */
.contact-grid { display: grid; gap: 48px; }
.contact-form { display: grid; gap: 20px; }
.field-row { display: grid; gap: 20px; }
.field label { display: block; margin-bottom: 8px; font-weight: 500; }
.optional { color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 1rem; line-height: 1.5;
  transition-property: border-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: var(--ease);
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.has-error input, .field.has-error textarea { border-color: var(--error-text); }
.field-error { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--error-text); font-size: 0.925rem; }
.contact-form .btn { justify-self: start; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-radius: 16px; margin-bottom: 24px; }
.notice > .icon { width: 24px; height: 24px; margin-top: 1px; }
.notice h2 { font-size: 1.15rem; font-weight: 600; }
.notice p { margin-top: 2px; }
.notice-success { background: var(--success-bg); color: var(--success-text); }
.notice-error { background: var(--error-bg); color: var(--error-text); }
.contact-aside { display: grid; gap: 28px; align-content: start; }
.aside-item { display: grid; grid-template-columns: 48px 1fr; gap: 16px; }
.aside-item h2 { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.aside-item p { margin-top: 4px; color: var(--muted); }
.aside-item a { font-weight: 600; }
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 7fr 4fr; gap: 80px; }
  .contact-aside { padding-top: 8px; }
}

/* legal */
.prose { max-width: 72ch; line-height: 1.75; }
.prose h2 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; margin: 2em 0 0.6em; }
.prose p { margin-bottom: 1em; }
.prose ul { padding-left: 1.2em; margin-bottom: 1em; }
.prose li + li { margin-top: 0.4em; }

/* 404 */
.notfound { padding-bottom: clamp(64px, 9vw, 112px); }
.notfound-code { font-size: clamp(5rem, 3rem + 9vw, 10rem); font-weight: 700; letter-spacing: -0.06em; line-height: 0.9; color: var(--accent); opacity: 0.25; }
.notfound h1 { margin-top: 16px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 32px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { margin-top: 16px; max-width: 34ch; color: var(--muted); }
.social { display: flex; gap: 8px; margin-top: 20px; list-style: none; }
.social a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--text);
  transition: background-color 150ms var(--ease);
}
.social a:hover { background: var(--accent-soft); color: var(--text); }
.social .icon { width: 20px; height: 20px; }
.footer-col h2 { font-size: 0.95rem; font-weight: 600; }
.footer-col ul { list-style: none; margin-top: 14px; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem;
}
.lang-footer { display: flex; gap: 16px; list-style: none; }
.lang-footer a { color: var(--muted); text-decoration: none; }
.lang-footer a:hover, .lang-footer a[aria-current="true"] { color: var(--text); }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

/* motion: headings slide in on load (transform only: the LCP element is painted at once), the rest fades in when
   scrolled into view (assets/js/site.js); nothing moves with prefers-reduced-motion */
@keyframes rise { from { transform: translateY(14px); } }
.hero .reveal, .page-hero .reveal { animation: rise 700ms var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.js main > section:not(.hero):not(.page-hero) .reveal {
  opacity: 0; transform: translateY(16px);
  transition-property: opacity, transform;
  transition-duration: 600ms;
  transition-timing-function: var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js main > section:not(.hero):not(.page-hero) .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js main > section:not(.hero):not(.page-hero) .reveal { opacity: 1; transform: none; }
}
