/* ASV Electronics Trading LLC — site styles */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #1b1d20;
  --steel: #5b6167;
  --mist: #f3f4f5;
  --line: #e3e6e9;
  --graphite: #23262a;
  --on-dark: #f3f4f5;
  --on-dark-muted: #a8aeb4;
  --green: #0b452c;
  --green-lift: #74c99a;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(88px, 11vw, 160px);
  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.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;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand { display: inline-flex; flex: none; }
.brand img { height: 44px; width: auto; }

.site-nav ul { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 36px); }
.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--steel);
  text-decoration: none;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-stretch: 108%;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.site-nav .nav-cta a:hover { background: var(--ink); color: #fff; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle-bars { position: relative; width: 16px; height: 10px; }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle-bars::before { top: 1px; }
.nav-toggle-bars::after { top: 7.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 4.25px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 4.25px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .brand img { height: 38px; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    display: none;
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav li a {
    display: block;
    padding: 14px 0;
    font-size: 1.125rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav .nav-cta { margin-top: 20px; }
  .js .site-nav .nav-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0;
    border-bottom: 1.5px solid var(--ink);
  }
  html:not(.js) .site-nav ul { gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
  html:not(.js) .header-inner { height: auto; padding: 12px 0; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-size: 1rem;
  font-weight: 600;
  font-stretch: 108%;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--green); border-color: var(--green); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }

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

.hero { padding-top: clamp(48px, 7vw, 104px); }

.hero h1 {
  font-size: clamp(2.5rem, 6.6vw, 5.9rem);
  font-stretch: 122%;
  font-weight: 620;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px 48px;
  margin-top: clamp(28px, 3.5vw, 44px);
}

.lead {
  max-width: 34em;
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--steel);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.lineup {
  margin-top: clamp(48px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}
.lineup svg { width: 100%; height: auto; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 32px;
  padding-top: 22px;
  font-size: 0.95rem;
  color: var(--steel);
}

@media (prefers-reduced-motion: no-preference) {
  .lineup .dv { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .lineup .dv:nth-of-type(2) { animation-delay: 0.08s; }
  .lineup .dv:nth-of-type(3) { animation-delay: 0.16s; }
  .lineup .dv:nth-of-type(4) { animation-delay: 0.24s; }
  .lineup .dv:nth-of-type(5) { animation-delay: 0.32s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .hero-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; gap: 6px; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- Device illustrations ---------- */

.dv-b { fill: #eceef0; stroke: #d0d4d8; stroke-width: 1.5; }
.dv-band { fill: #e0e3e6; stroke: #d0d4d8; stroke-width: 1.5; }
.dv-s { fill: url(#asv-screen); }
.dv-g { fill: url(#asv-glare); }
.dv-k { fill: #c6cbd0; }
.dv-line { fill: none; stroke: #d0d4d8; stroke-width: 1.5; }

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

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

.section h2 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-stretch: 116%;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.section-intro {
  max-width: 40em;
  margin-top: 22px;
  font-size: 1.125rem;
  color: var(--steel);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
}
.about-text { display: grid; gap: 20px; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-text p { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); color: var(--steel); max-width: 36em; }
.about-text p:first-child { color: var(--ink); }

/* Products */
.products { padding-top: 0; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.tile {
  display: flex;
  flex-direction: column;
  padding: 28px 24px 30px;
  background: var(--mist);
  border-radius: 20px;
}
.tile svg { width: 100%; height: auto; margin-bottom: 26px; }
.tile h3 { font-size: 1.1875rem; font-stretch: 108%; line-height: 1.25; letter-spacing: -0.01em; }
.tile p { margin-top: 8px; font-size: 0.975rem; color: var(--steel); }

@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; gap: 12px; }
  .tile {
    display: grid;
    grid-template-columns: 112px 1fr;
    column-gap: 18px;
    align-items: center;
    padding: 18px 18px 18px 14px;
  }
  .tile svg { grid-row: span 2; margin: 0; }
  .tile p { margin-top: 4px; }
}

/* Global presence (the one dark section) */
.global { background: var(--graphite); color: var(--on-dark); }
.global .section-intro { color: var(--on-dark-muted); }

.map { position: relative; margin-top: clamp(40px, 5vw, 64px); }
.map img { width: 100%; height: auto; }
.map .routes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-label { fill: #e8eaec; font-size: 13px; font-weight: 600; font-stretch: 108%; }

.arc { fill: none; stroke: var(--green-lift); stroke-width: 1.6; stroke-linecap: round; }
.node-hq { fill: var(--green-lift); }
.node-ring { fill: none; stroke: var(--green-lift); stroke-width: 1.5; opacity: 0.6; transform-box: fill-box; transform-origin: center; }
.node-ops { fill: #ffffff; }
.node-supply { fill: var(--graphite); stroke: #ffffff; stroke-width: 2; }

@media (prefers-reduced-motion: no-preference) {
  .js .map .arc {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.6, 0, 0.2, 1);
  }
  .js .map .arc:nth-child(2) { transition-delay: 0.15s; }
  .js .map .arc:nth-child(3) { transition-delay: 0.3s; }
  .js .map .node { opacity: 0; transition: opacity 0.5s ease 1.2s; }
  .js .map .node-start { transition-delay: 0s; }
  .js .map.is-visible .arc { stroke-dashoffset: 0; }
  .js .map.is-visible .node { opacity: 1; }
  .js .map.is-visible .node-ring { animation: pulse 2.4s ease-out 1.6s 2; }
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

.legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 32px;
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.legend li { display: grid; grid-template-columns: 18px 1fr; column-gap: 12px; align-items: baseline; align-content: start; }
.legend svg { width: 14px; height: 14px; align-self: center; grid-row: span 2; }
.legend .city { font-weight: 600; font-stretch: 108%; }
.legend .role { grid-column: 2; font-size: 0.95rem; color: var(--on-dark-muted); }

@media (max-width: 860px) {
  .legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .global { overflow: hidden; }
  /* Crop the Pacific edges so the routes read larger on phones */
  .map { width: 147%; margin-left: -29.4%; }
  .map-label { display: none; }
}

/* Why ASV */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px clamp(32px, 6vw, 80px);
  margin-top: clamp(40px, 5vw, 64px);
}
.why-item { padding-top: 24px; border-top: 1.5px solid var(--ink); }
.why-item h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); font-stretch: 112%; line-height: 1.2; letter-spacing: -0.015em; }
.why-item p { margin-top: 12px; color: var(--steel); max-width: 30em; }

@media (max-width: 700px) {
  .why-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* Contact */
.contact { background: var(--mist); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(32px, 6vw, 96px);
  align-items: start;
}
.contact-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 24px;
  margin: 36px 0 0;
  font-size: 1rem;
}
.contact-details dt { color: var(--steel); }
.contact-details dd { margin: 0; }
.contact-details a { text-decoration-color: var(--line); text-underline-offset: 3px; }
.contact-details a:hover { text-decoration-color: currentColor; }

.actions { display: grid; gap: 14px; }
.action {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 176px;
  padding: 28px 30px;
  border-radius: 22px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.action-email { background: var(--ink); }
.action-email:hover { background: #000; }
.action-wa { background: var(--green); }
.action-wa:hover { background: #083a25; }
.action:hover { transform: translateY(-2px); }
.action svg { position: absolute; top: 28px; right: 30px; width: 26px; height: 26px; opacity: 0.9; }
.action-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  font-stretch: 118%;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.action-detail { font-size: 1rem; opacity: 0.82; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .contact-details { grid-template-columns: 1fr; gap: 2px; }
  .contact-details dd { margin-bottom: 12px; }
}

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

.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--steel);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}
.footer-brand img { height: 40px; width: auto; margin-bottom: 18px; }
.footer-brand strong { display: block; color: var(--ink); font-weight: 600; }
.footer-col li + li { margin-top: 6px; }
.footer-col a { text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-col button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.footer-col button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom {
  display: grid;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.footer-bottom .disclaimer { max-width: 72ch; }

@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ---------- Simple pages (privacy, 404) ---------- */

.page { padding: clamp(48px, 7vw, 96px) 0 var(--section); }
.page h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-stretch: 120%;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.page .updated { margin-top: 14px; color: var(--steel); }
.prose { max-width: 44em; margin-top: 48px; }
.prose h2 {
  margin-top: 40px;
  font-size: 1.375rem;
  font-stretch: 110%;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.prose p, .prose ul { margin-top: 12px; color: #3d4247; }
.prose ul { padding-left: 1.2em; list-style: disc; }
.prose li + li { margin-top: 6px; }
.prose a { text-underline-offset: 3px; }

.notfound { min-height: 60vh; display: grid; align-content: center; gap: 22px; }
.notfound p { color: var(--steel); font-size: 1.125rem; }
.notfound .btn { justify-self: start; }

/* ---------- Analytics consent ---------- */

.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: 440px;
  padding: 20px 22px;
  background: var(--ink);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  font-size: 0.95rem;
}
.consent[hidden] { display: none; }
.consent a { color: #fff; text-underline-offset: 3px; }
.consent-actions { display: flex; gap: 10px; margin-top: 16px; }
.consent-actions button {
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.consent-accept { background: #fff; color: var(--ink); }
.consent-decline { background: transparent; color: #fff; }
