/* Altaris Global Trading LLC — design tokens v3 (UI oscura, sin modo claro)
   Marca: la misma (logo, paja, petróleo, Archivo). Cambia la capa de interfaz: fondo petróleo profundo,
   bordes de 1px translúcidos, halos de luz suaves. Contrastes verificados sobre --ag-bg, --ag-bg-1 y --ag-bg-2.
*/
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;

  /* superficies */
  --ag-bg:     #07161A;  /* fondo de página */
  --ag-bg-1:   #0B1F24;  /* tarjetas, mapa */
  --ag-bg-2:   #0F2A31;  /* elevación extra */
  --ag-line:   rgba(234, 241, 238, .08);  /* divisores entre secciones y filas */
  --ag-line-2: rgba(234, 241, 238, .15);  /* bordes de tarjetas, paneles y botón secundario (decorativo) */
  --ag-control: #5E7975;                   /* borde de inputs, selects, radios y checkboxes (3.4:1 sobre el panel del form) */

  /* texto (contraste sobre --ag-bg) */
  --ag-text:   #EDF3F0;  /* 16.4:1 */
  --ag-text-2: #A7BDB9;  /* 9.3:1, cuerpo y descripciones */
  --ag-text-3: #86A09C;  /* 6.6:1, notas, metadatos, ayuda */

  /* marca */
  --ag-straw:    #F0C15A;  /* único acento: CTA, foco, pico del isotipo, nodos activos, puertos, brillos */
  --ag-straw-hi: #FFE3A1;  /* centro caliente de brillos (luz de borde, chispa del footer, cabeza del haz). Nunca texto */
  --ag-on-straw: #07161A;  /* texto sobre paja (11:1) */
  --ag-sea:      #8CC0E6;  /* ruta marítima, inicio del degradé del riel */
  --ag-ok:       #6CC79A;
  --ag-error:    #F28B82;

  /* halos (solo en hero, mapa, formulario y spotlight de tarjetas) */
  --ag-glow-straw: rgba(240, 193, 90, .13);
  --ag-glow-sea:   rgba(140, 192, 230, .10);

  /* tipografía */
  --ag-font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ag-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace; /* solo códigos reales y datos de la tarjeta */
  --ag-h1: clamp(42px, 6.2vw, 84px);   /* peso 640, font-stretch 104%, tracking -0.042em, degradé vertical #F7FAF9 → #97AFAB */
  --ag-h2: clamp(32px, 3.6vw, 48px);   /* peso 620, font-stretch 104%, tracking -0.035em */
  --ag-h3: 21px;                       /* peso 600, tracking -0.015em */
  --ag-lead: 19px;                     /* 17px en celular */
  --ag-body: 16.5px;

  /* espacio y forma */
  --ag-section: 128px;   /* 88px en celular */
  --ag-container: 1168px;
  --ag-radius-chip: 6px;
  --ag-radius-control: 10px;
  --ag-radius-card: 16px;   /* tarjetas de servicios; 18px en condiciones comerciales */
  --ag-radius-panel: 20px;  /* mapa y formulario */
  --ag-ease: cubic-bezier(.2, .7, .2, 1);

  /* sombras y brillos */
  --ag-glow-button: 0 10px 40px -8px rgba(240, 193, 90, .6);
  --ag-glow-button-hover: 0 12px 56px -6px rgba(240, 193, 90, .85);
  --ag-glow-panel: 0 50px 140px -60px rgba(240, 193, 90, .45);
  --ag-glow-map: 0 50px 140px -50px rgba(140, 192, 230, .30);
  --ag-lift: 0 40px 80px -40px rgba(0, 0, 0, .8);
}


/* Altaris Global Trading LLC — site styles (UI v3, dark only). Values come from tokens.css and the
   approved mock-up (design/ui-v3-reference.dc.html). Effects only animate transform, opacity and
   stroke-dashoffset, and switch off with prefers-reduced-motion. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--ag-bg); color: var(--ag-text);
  font-family: var(--ag-font); font-size: var(--ag-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
abbr[title] { text-decoration: none; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ag-text); }
a:hover { color: var(--ag-straw); }
:focus-visible { outline: 2px solid var(--ag-straw); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: 8px; z-index: 50; padding: 10px 16px;
  background: var(--ag-straw); color: var(--ag-on-straw); border-radius: var(--ag-radius-control);
  font-weight: 600; text-decoration: none; transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--ag-on-straw); }

.wrap {
  max-width: var(--ag-container); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

code {
  font-family: var(--ag-mono); font-size: 12px; padding: 2px 6px; border-radius: 5px;
  background: rgba(234, 241, 238, .06); border: 1px solid var(--ag-line-2); color: var(--ag-text); white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--ag-radius-control);
  font: 600 15px/1 var(--ag-font); text-decoration: none; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; transition: background .2s, border-color .2s, box-shadow .25s;
}
.btn-primary {
  background: var(--ag-straw); color: var(--ag-on-straw);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 0 1px rgba(240, 193, 90, .5), var(--ag-glow-button);
}
.btn-primary:hover {
  color: var(--ag-on-straw); background: #F6CF77;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 1px rgba(255, 227, 161, .7), var(--ag-glow-button-hover);
}
.btn-ghost { color: var(--ag-text); border-color: var(--ag-line-2); background: rgba(234, 241, 238, .03); }
.btn-ghost:hover { color: var(--ag-text); background: rgba(234, 241, 238, .08); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { cursor: progress; opacity: .7; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7, 22, 26, .72);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--ag-line);
}
.nav-in { position: relative; display: flex; align-items: center; gap: 12px; height: 64px; }
.nav-logo { display: flex; align-items: center; margin-right: auto; }
.nav-logo img { height: 32px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 36px;
  font-size: 14px; color: var(--ag-text-2); text-decoration: none; padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { color: var(--ag-text); background: rgba(234, 241, 238, .05); }
.nav-links a.lang { font-family: var(--ag-mono); font-size: 13px; }
.nav-links .nav-login-m { display: none; }
.nav .menu-btn { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 120px 0 40px; text-align: center; overflow-x: clip; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--ag-line) 1px, transparent 1px), linear-gradient(90deg, var(--ag-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 15%, transparent 72%);
}
.hero::after {
  content: ""; position: absolute; left: 50%; top: -260px; width: 1200px; height: 700px; pointer-events: none;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(240, 193, 90, .16), var(--ag-glow-sea) 55%, transparent);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-t {
  margin: 0 auto; font-size: clamp(42px, 6.4vw, 88px); line-height: 1; font-weight: 640;
  font-stretch: 104%; letter-spacing: -.042em; text-wrap: balance;
  background: linear-gradient(180deg, #F7FAF9 30%, #97AFAB 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 26px auto 0; max-width: 660px; font-size: var(--ag-lead); line-height: 1.55; color: var(--ag-text-2); text-wrap: pretty; }
.ctas { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- map ---------- */
.map {
  position: relative; margin: 72px auto 0; text-align: left; overflow: hidden;
  border: 1px solid var(--ag-line-2); border-radius: var(--ag-radius-panel);
  background: radial-gradient(55% 65% at 62% 78%, var(--ag-glow-sea), transparent 70%), linear-gradient(180deg, var(--ag-bg-1), #08181C);
  box-shadow: var(--ag-glow-map);
}
.map::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; z-index: 2;
  background: linear-gradient(90deg, transparent, rgba(240, 193, 90, .85), transparent);
}
.map-canvas { position: relative; aspect-ratio: 1200 / 691; }
.map-canvas img, .map-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.r-base { fill: none; stroke: rgba(140, 192, 230, .35); stroke-width: 1.5; stroke-dasharray: 2 7; stroke-linecap: round; }
.r-glow { fill: none; stroke: url(#routeGrad); stroke-width: 12; stroke-linecap: round; opacity: .18; }
.r-main { fill: none; stroke: url(#routeGrad); stroke-width: 2.6; stroke-linecap: round; }
.st-sea { stop-color: var(--ag-sea); }
.st-straw { stop-color: var(--ag-straw); }
.port { fill: var(--ag-straw); }
.port-ring { fill: none; stroke: rgba(240, 193, 90, .45); stroke-width: 1.5; }
.mk-box { fill: var(--ag-straw); stroke: var(--ag-bg); stroke-width: 1.5; }
.mk-rib { stroke: var(--ag-bg); stroke-width: 1; }
.port-lab {
  position: absolute; z-index: 2; display: grid; gap: 2px; padding: 6px 9px;
  border: 1px solid var(--ag-line-2); border-radius: 8px; background: rgba(7, 22, 26, .78);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--ag-mono); font-size: 12px; line-height: 1.2; color: var(--ag-text); white-space: nowrap;
}
.port-lab span { color: var(--ag-text-2); }
.port-ngb { right: calc(6.95% + 18px); top: 14.2%; transform: translateY(-50%); }
.port-bue { left: calc(12.2% - 28px); top: calc(85.3% + 14px); }

.qcard {
  position: absolute; z-index: 3; left: 3%; top: 7%; width: 340px; padding: 18px;
  border: 1px solid var(--ag-line-2); border-radius: 14px; background: rgba(11, 31, 36, .84);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .7);
}
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag {
  font-family: var(--ag-mono); font-size: 11.5px; padding: 3px 8px; border-radius: 6px;
  background: rgba(240, 193, 90, .12); color: var(--ag-straw); border: 1px solid rgba(240, 193, 90, .32);
}
.qnote { font-size: 12px; color: var(--ag-text-3); }
.qtitle { margin: 14px 0 2px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.qsub { color: var(--ag-text-2); font-size: 14px; }
.qrows { margin-top: 14px; }
.qrows div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--ag-line); font-size: 13.5px; }
.qrows dt { color: var(--ag-text-2); }
.qrows dd { text-align: right; font-variant-numeric: tabular-nums; }
.qstatus { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; color: var(--ag-text-2); }
.qstatus strong { color: var(--ag-text); font-weight: 600; }
.qbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.qbar span { height: 4px; border-radius: 2px; background: rgba(234, 241, 238, .12); }
.qbar span.f { background: var(--ag-straw); box-shadow: 0 0 12px rgba(240, 193, 90, .6); }
.cap { margin-top: 14px; font-size: 13px; color: var(--ag-text-3); text-align: left; }

/* ---------- sections ---------- */
.sec { position: relative; padding: var(--ag-section) 0; border-top: 1px solid var(--ag-line); }
.t {
  font-size: var(--ag-h2); line-height: 1.05; font-weight: 620; font-stretch: 104%;
  letter-spacing: -.035em; color: var(--ag-text); text-wrap: balance;
}
.sec-lead { margin-top: 16px; font-size: 18px; line-height: 1.55; color: var(--ag-text-2); max-width: 52ch; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.split-head { position: sticky; top: 120px; }

/* glow surfaces: spotlight + border light that follow the pointer (services only) */
.glow { position: relative; overflow: hidden; border: 1px solid var(--ag-line-2); background: linear-gradient(180deg, rgba(15, 42, 49, .6), rgba(11, 31, 36, .35)); }
.glow::before, .glow::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none; }
.glow::before { background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), rgba(240, 193, 90, .22), rgba(240, 193, 90, .06) 35%, transparent 62%); }
.glow::after {
  border-radius: inherit; padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 227, 161, .95), rgba(240, 193, 90, .4) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .glow:hover::before, .glow:hover::after { opacity: 1; }
}

/* ---------- services ---------- */
.svc { margin-top: 56px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.svc .card { grid-column: span 2; padding: 28px; border-radius: var(--ag-radius-card); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.svc .card.wide { grid-column: span 3; }
.ic-wrap {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--ag-line-2); background: rgba(234, 241, 238, .03); color: var(--ag-straw);
  box-shadow: 0 0 24px -6px rgba(240, 193, 90, .35);
}
.card h3 { margin-top: 10px; font-size: 20px; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.card h3 .svc-sub { display: block; margin-top: 4px; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ag-text-3); }
.card p { color: var(--ag-text-2); font-size: 16px; line-height: 1.6; }

/* ---------- timeline ---------- */
.steps-wrap { position: relative; padding-left: 44px; }
.rail { position: absolute; left: 11px; top: 11px; bottom: 40px; width: 2px; border-radius: 2px; background: var(--ag-line-2); overflow: hidden; }
.rail i {
  position: absolute; inset: 0; transform-origin: top; transform: scaleY(1);
  background: linear-gradient(180deg, var(--ag-sea), var(--ag-straw)); box-shadow: 0 0 12px rgba(240, 193, 90, .6);
}
.step { position: relative; padding: 0 0 44px; }
.step:last-child { padding-bottom: 0; }
.node {
  position: absolute; left: -40px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ag-bg); border: 2px solid var(--ag-straw);
  box-shadow: 0 0 0 4px rgba(240, 193, 90, .14), 0 0 18px rgba(240, 193, 90, .45);
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.step.last .node { width: 20px; height: 20px; left: -42px; top: 1px; background: var(--ag-straw); }
.snum { font-family: var(--ag-mono); font-size: 12.5px; color: var(--ag-text-3); }
.step h3 { margin: 6px 0 8px; font-size: var(--ag-h3); font-weight: 600; letter-spacing: -.015em; }
.step p { color: var(--ag-text-2); font-size: 16px; line-height: 1.6; max-width: 56ch; }
.step p.pay {
  margin-top: 12px; display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid rgba(240, 193, 90, .26); border-radius: 10px; background: rgba(240, 193, 90, .07);
  color: var(--ag-text); font-size: 15px;
}
.pay b { font-family: var(--ag-mono); font-size: 11.5px; font-weight: 500; color: var(--ag-straw); padding-top: 3px; white-space: nowrap; }

/* ---------- commercial terms: panels that tilt toward the viewer (reveal on .term, tilt on .term-in) ---------- */
.terms { margin-top: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; perspective: 1100px; }
.term-in {
  position: relative; height: 100%; padding: 32px; border-radius: 18px;
  border: 1px solid var(--ag-line-2); background: linear-gradient(180deg, rgba(15, 42, 49, .6), rgba(11, 31, 36, .35));
  transition: transform .35s var(--ag-ease), box-shadow .35s; will-change: transform;
}
.term-in h3 { margin-bottom: 10px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.term-in p { color: var(--ag-text-2); font-size: 18px; line-height: 1.6; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .term-in:hover { box-shadow: var(--ag-lift), 0 0 60px -20px rgba(240, 193, 90, .35); }
}

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--ag-line); }
.faq details { border-bottom: 1px solid var(--ag-line); transition: background .3s; }
.faq details[open] { background: linear-gradient(90deg, rgba(240, 193, 90, .09), rgba(240, 193, 90, .02) 55%, transparent); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 44px; padding: 22px 16px 22px 0; font-size: 18px; font-weight: 550; line-height: 1.35;
  transition: color .25s, text-shadow .25s, padding .3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: #FFF; }
.faq details[open] summary { color: var(--ag-straw); text-shadow: 0 0 28px rgba(240, 193, 90, .45); padding-left: 16px; }
.faq summary .ic { flex: none; width: 20px; height: 20px; color: var(--ag-text-3); transition: transform .25s, color .25s; }
.faq details[open] summary .ic { transform: rotate(45deg); color: var(--ag-straw); }
.faq details p { padding: 0 16px 24px; color: var(--ag-text-2); font-size: 16px; line-height: 1.6; max-width: 70ch; }

/* ---------- quote form: a light travels around the border ---------- */
.contact { margin-top: 28px; display: grid; gap: 10px; font-size: 15px; color: var(--ag-text-2); }
.contact strong { color: var(--ag-text); font-weight: 600; }
.contact a { color: var(--ag-text-2); }
.beam-shell {
  position: relative; border-radius: var(--ag-radius-panel); padding: 1.5px; overflow: hidden; isolation: isolate;
  background: var(--ag-line-2); box-shadow: var(--ag-glow-panel);
}
.beam {
  position: absolute; left: 50%; top: 50%; width: 230%; aspect-ratio: 1; z-index: 0;
  transform: translate(-50%, -50%) rotate(0deg);
  background: conic-gradient(from 0deg, transparent 0deg, transparent 262deg, rgba(240, 193, 90, .12) 300deg, rgba(240, 193, 90, .75) 340deg, #FFE7B0 354deg, transparent 360deg);
  animation: beam 7s linear infinite; animation-play-state: paused;
}
.beam.run { animation-play-state: running; }
@keyframes beam { to { transform: translate(-50%, -50%) rotate(360deg); } }
.form { position: relative; z-index: 1; padding: 32px; border-radius: 18.5px; background: linear-gradient(180deg, #0E262C, #0A1D22); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.f { display: grid; gap: 8px; min-width: 0; align-content: start; }
.f.full, .full { grid-column: 1 / -1; }
.f label, .f legend { font-size: 14px; font-weight: 600; color: var(--ag-text); }
.opt { color: var(--ag-text-3); font-weight: 400; }
.f input:not([type="radio"]):not([type="checkbox"]), .f select, .f textarea {
  width: 100%; min-height: 46px; font: 400 16px/1.4 var(--ag-font); color: var(--ag-text);
  background: rgba(7, 22, 26, .7); border: 1px solid var(--ag-control); border-radius: var(--ag-radius-control);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.f select {
  appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ag-text-2) 50%), linear-gradient(135deg, var(--ag-text-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.f select option { background: var(--ag-bg-1); color: var(--ag-text); }
.f textarea { min-height: 120px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus {
  outline: none; border-color: rgba(240, 193, 90, .75);
  box-shadow: 0 0 0 3px rgba(240, 193, 90, .18), 0 0 24px -4px rgba(240, 193, 90, .35);
}
.f [aria-invalid="true"]:not(fieldset) { border-color: var(--ag-error); }
.help { font-size: 13px; color: var(--ag-text-3); }
/* the error line always keeps its space, so a message never moves the controls below */
.field-error { min-height: 18px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ag-error); }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radio {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--ag-line-2); border-radius: var(--ag-radius-control); font-size: 14.5px; font-weight: 400; cursor: pointer;
}
.radio input, .check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ag-straw); }
fieldset[aria-invalid="true"] .radio { border-color: var(--ag-error); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ag-text-2); cursor: pointer; }
.check input { margin-top: 2px; }
.check a { color: var(--ag-text); }
.check input[aria-invalid="true"] { outline: 2px solid var(--ag-error); outline-offset: 1px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.cf-turnstile { min-height: 65px; }
.form-status { flex: 1 1 100%; font-size: 14px; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.ok { color: var(--ag-ok); }
.form-status.error { color: var(--ag-error); }
.noscript-note { grid-column: 1 / -1; margin-bottom: 8px; font-weight: 600; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer: the horizon line grows from a glint to full width at the end of the page ---------- */
.foot { position: relative; border-top: 1px solid var(--ag-line); padding: 64px 0 48px; }
.foot-line { position: absolute; left: 50%; top: -1px; width: min(980px, 90%); height: 1px; transform: translateX(-50%); pointer-events: none; }
.foot-line .bar {
  position: absolute; inset: 0; transform: scaleX(var(--fp, 1));
  background: linear-gradient(90deg, transparent, var(--ag-straw) 30%, var(--ag-straw-hi) 50%, var(--ag-straw) 70%, transparent);
  box-shadow: 0 0 14px rgba(240, 193, 90, .7);
}
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.foot-brand img { height: 36px; width: auto; }
.foot-brand p { margin-top: 18px; font-size: 14px; line-height: 1.6; color: var(--ag-text-3); max-width: 34ch; }
.foot-h { margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ag-text); }
.foot-list { display: grid; gap: 10px; font-size: 14px; color: var(--ag-text-2); line-height: 1.5; }
.foot-list a { color: var(--ag-text-2); text-decoration: none; }
.foot-list a:hover { color: var(--ag-straw); text-decoration: underline; }
.legal-line { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ag-line); text-align: center; font-size: 13px; color: var(--ag-text-3); }

/* ---------- legal pages (no effects) ---------- */
.doc { padding: 72px 0 var(--ag-section); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.doc-back { display: inline-block; margin-bottom: 24px; font-size: 14px; color: var(--ag-text-2); }
.doc h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.05; font-weight: 620; font-stretch: 104%; letter-spacing: -.035em; }
.doc-date { margin-top: 12px; font-size: 14px; color: var(--ag-text-3); }
.doc-body { max-width: 72ch; }
.doc-date + * { margin-top: 32px; }
.doc-body h2 { margin: 48px 0 12px; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.015em; scroll-margin-top: 88px; }
.doc-body p, .doc-body li { color: var(--ag-text-2); font-size: 16.5px; line-height: 1.7; }
.doc-body p + p { margin-top: 12px; }
.doc-body ul { margin-top: 12px; display: grid; gap: 8px; padding-left: 20px; list-style: disc; }
.doc-body li::marker { color: var(--ag-text-3); }
.doc-body em { color: var(--ag-text); font-style: normal; font-weight: 600; }
.doc-body strong { color: var(--ag-text); font-weight: 600; }
.doc-body a { color: var(--ag-text); }
.toc { display: none; }
.toc-h { margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--ag-text); }
.toc ol { display: grid; gap: 4px; border-left: 1px solid var(--ag-line-2); }
.toc a { display: block; padding: 4px 0 4px 14px; font-size: 13.5px; line-height: 1.4; color: var(--ag-text-3); text-decoration: none; }
.toc a:hover { color: var(--ag-text); }
@media (min-width: 1024px) {
  .doc-grid { grid-template-columns: minmax(0, 72ch) 240px; justify-content: space-between; }
  .toc { display: block; position: sticky; top: 104px; }
}

/* ---------- 404 ---------- */
.nf { padding: 120px 0 var(--ag-section); }
.nf h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; font-weight: 620; font-stretch: 104%; letter-spacing: -.035em; }
.nf h2 { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--ag-line); font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.nf p { margin-top: 14px; color: var(--ag-text-2); }

/* ---------- client portal ---------- */
.portal { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.portal::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--ag-line) 1px, transparent 1px), linear-gradient(90deg, var(--ag-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 10%, transparent 70%);
}
.portal::after {
  content: ""; position: absolute; left: 50%; top: -220px; width: 1000px; height: 640px; pointer-events: none;
  transform: translateX(-50%); background: radial-gradient(closest-side, rgba(240, 193, 90, .14), rgba(140, 192, 230, .05) 55%, transparent);
}
.portal-top { position: relative; z-index: 1; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.portal-top img { height: 32px; width: auto; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--ag-text-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.back:hover { background: rgba(234, 241, 238, .05); color: var(--ag-text); }
.portal-main { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; padding: 48px 20px 80px; }
.panel {
  position: relative; width: 100%; max-width: 440px; padding: 32px;
  border: 1px solid var(--ag-line-2); border-radius: var(--ag-radius-panel);
  background: linear-gradient(180deg, #0E262C, #0A1D22); box-shadow: var(--ag-glow-panel);
}
.panel::before {
  content: ""; position: absolute; left: 14%; right: 14%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ag-straw) 30%, var(--ag-straw-hi) 50%, var(--ag-straw) 70%, transparent);
}
.panel h1 { font-size: 30px; line-height: 1.1; font-weight: 620; font-stretch: 104%; letter-spacing: -.03em; }
.panel .sub { margin-top: 8px; font-size: 15px; color: var(--ag-text-2); }
.tabs {
  margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; padding: 4px;
  border: 1px solid var(--ag-line-2); border-radius: 12px; background: rgba(7, 22, 26, .6);
}
.tab {
  min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ag-text-2);
  font: 600 14px/1 var(--ag-font); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s;
}
.tab[aria-selected="true"] { background: var(--ag-bg-2); color: var(--ag-text); box-shadow: 0 0 0 1px rgba(240, 193, 90, .35), 0 0 24px -8px rgba(240, 193, 90, .5); }
.pform { margin-top: 22px; display: grid; gap: 8px; }
.pform[hidden] { display: none; }
.pform .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pform .row a { font-size: 13px; color: var(--ag-text-2); }
.pform .btn { width: 100%; min-height: 46px; margin-top: 8px; }
.notice { padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.5; border: 1px solid rgba(240, 193, 90, .3); background: rgba(240, 193, 90, .08); color: var(--ag-text); }
.notice.ok { border-color: rgba(108, 199, 154, .35); background: rgba(108, 199, 154, .08); }
.notice.error { border-color: rgba(242, 139, 130, .4); background: rgba(242, 139, 130, .08); }
.notice strong { color: var(--ag-straw); font-weight: 600; }
.notice.ok strong { color: var(--ag-ok); }
.notice[hidden] { display: none; }
.notice:empty { display: none; }
.fine { margin-top: 22px; font-size: 13px; line-height: 1.5; color: var(--ag-text-3); text-align: center; }
.fine a { color: var(--ag-text-2); }
.portal-foot { position: relative; z-index: 1; padding: 24px 20px; text-align: center; font-size: 13px; color: var(--ag-text-3); border-top: 1px solid var(--ag-line); }

/* ---------- motion (only with scripting, never with reduced motion) ---------- */
/* Reveal: hidden from the first paint, so nothing flashes before site.js runs. If site.js never runs,
   the fallback animation shows everything after 2.5 s. */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ag-ease), transform .7s var(--ag-ease); animation: rv-fallback 0s 2.5s forwards; }
  .terms .rv { transform: perspective(1100px) translateZ(-90px) rotateX(10deg); }
  .rv.in { opacity: 1; transform: none; animation: none; }
  .d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; } .d3 { transition-delay: .24s; } .d4 { transition-delay: .34s; }
  .rail i { transform: scaleY(var(--p, 0)); transition: transform .2s linear; }
  .step:not(.on) .node { border-color: var(--ag-line-2); box-shadow: none; }
  .step.last:not(.on) .node { background: var(--ag-bg); }
}
@keyframes rv-fallback { to { opacity: 1; transform: none; } }
/* The hero does not wait for site.js: it plays as a CSS animation from the first paint, so the map
   image (the LCP element) is never held back by script loading. */
@media (prefers-reduced-motion: no-preference) {
  .hero .rv, .hero .rv.in { opacity: 1; transform: none; transition: none; animation: rv-in .7s var(--ag-ease) both; }
  .hero .d1 { animation-delay: .08s; } .hero .d2 { animation-delay: .16s; } .hero .d3 { animation-delay: .24s; }
}
@keyframes rv-in { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) {
  .beam { display: none; }
  .beam-shell { background: linear-gradient(180deg, rgba(240, 193, 90, .7), var(--ag-line-2) 30%); }
  .term-in, .faq summary, .faq details, .faq summary .ic, .btn, .node { transition: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 960px) {
  .qcard { position: relative; left: auto; top: auto; width: auto; margin: 0 16px 16px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .split-head { position: static; }
  .svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc .card, .svc .card.wide { grid-column: span 1; }
  .svc .card:last-child { grid-column: 1 / -1; }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .nav .menu-btn { display: inline-flex; }
  .nav .btn-login { display: none; }
  .nav-logo img { height: 28px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    padding: 8px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px));
    background: var(--ag-bg); border-bottom: 1px solid var(--ag-line);
  }
  .nav-links.open a { min-height: 48px; padding: 14px 4px; font-size: 16px; }
  .nav-links.open .nav-login-m { display: flex; }
  .hero { padding: 80px 0 24px; }
  .lead { font-size: 17px; }
  .ctas .btn { flex: 1 1 100%; }
  .map { margin-top: 48px; border-radius: 16px; }
  .port-lab { display: none; }
  .sec { padding: 88px 0; }
  .svc, .terms, .fgrid, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .svc .card:last-child { grid-column: auto; }
  .term-in { padding: 24px; }
  .term-in h3 { font-size: 21px; }
  .term-in p { font-size: 17px; }
  .form { padding: 22px; }
  .beam { display: none; }
  .beam-shell { background: linear-gradient(180deg, rgba(240, 193, 90, .7), var(--ag-line-2) 30%); }
  .form-actions .btn { flex: 1 1 100%; }
  .doc { padding-top: 48px; }
  .nf { padding-top: 80px; }
}
@media (max-width: 520px) {
  .panel { padding: 22px; }
  .panel h1 { font-size: 26px; }
}
/* Without scripting the phone menu cannot open: show the links as a row under the logo instead. */
@media (max-width: 720px) and (scripting: none) {
  .nav .menu-btn { display: none; }
  .nav-in { flex-wrap: wrap; height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 6px; }
  .nav-links { display: flex; flex-wrap: wrap; order: 3; width: 100%; }
  .nav-links .nav-login-m { display: inline-flex; }
}
