/* ---------- fonts: add generic fallbacks (Geist / Archivo load from Google Fonts) ---------- */
html.antialiased {
  --font-geist-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-geist-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-archivo: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Extras for the static build: things the original Next.js app handled in JS/React. */

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal, .reveal-off .reveal { opacity: 1; transform: none; transition: none; }

[data-hero-bg] { transform: scale(1.06); transition: transform 2.2s cubic-bezier(.16, 1, .3, 1); will-change: transform; }
[data-hero-bg].is-in { transform: scale(1); }

/* ---------- header ---------- */
.site-header { transition: background-color .4s ease, color .4s ease, box-shadow .4s ease, backdrop-filter .4s ease; }
.site-header.is-solid {
  color: var(--ink);
  background: rgb(255 255 255 / .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-solid a[aria-label^="WhatsApp"] { --tw-ring-color: var(--line); }
.site-header.is-solid a[aria-label^="WhatsApp"]:hover { background: var(--accent-soft); }
.site-header.is-open { color: var(--ink); background: #fff; box-shadow: 0 1px 0 var(--line); }
.site-header.is-open a[aria-label^="WhatsApp"] { --tw-ring-color: var(--line); }
.site-header svg[aria-label="NCT"] { fill: currentColor; }
[aria-expanded="true"] > svg.transition-transform { transform: rotate(180deg); }

/* ---------- mega menu ---------- */
.mega {
  position: fixed; inset: 72px 0 auto 0; z-index: 39;
  background: #fff; color: var(--ink);
  box-shadow: 0 30px 60px -30px rgb(42 14 19 / .35), 0 1px 0 var(--line);
  max-height: calc(100dvh - 72px); overflow-y: auto;
  animation: mega-in .28s cubic-bezier(.16, 1, .3, 1);
}
.mega[hidden] { display: none; }
@keyframes mega-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.mega-inner {
  max-width: 1320px; margin: 0 auto; padding: 40px 40px 48px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px;
}
.mega-kicker { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.mega-lede { margin-top: 14px; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 30ch; }
.mega-all { display: inline-flex; gap: 8px; margin-top: 22px; font-size: 15px; font-weight: 600; color: var(--accent); }
.mega-all:hover { color: var(--accent-hover); }
.mega-col h2 { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mega-col ul { margin-top: 12px; display: grid; gap: 2px; list-style: none; padding: 0; }
.mega-col a { display: block; padding: 7px 0; font-size: 15.5px; font-weight: 500; transition: color .2s, transform .2s; }
.mega-col a:hover { color: var(--accent); transform: translateX(3px); }
.mega-scrim { position: fixed; inset: 0; z-index: 38; background: rgb(17 13 14 / .35); }

/* ---------- mobile menu ---------- */
.mobile { position: fixed; inset: 72px 0 0 0; z-index: 39; background: #fff; color: var(--ink); overflow-y: auto; animation: mega-in .25s ease; }
.mobile[hidden] { display: none; }
.mobile-scroll { padding: 8px 20px 40px; }
.mobile ul { list-style: none; padding: 0; margin: 0; }
.mobile-primary a, .mobile-groups summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-size: 20px; font-weight: 700; border-bottom: 1px solid var(--line); cursor: pointer; font-family: var(--font-archivo); }
.mobile-groups summary { list-style: none; }
.mobile-groups summary::-webkit-details-marker { display: none; }
.mobile-groups summary::after { content: "+"; font-weight: 400; font-size: 24px; color: var(--muted); transition: transform .25s; }
.mobile-groups details[open] summary::after { transform: rotate(45deg); }
.mobile-groups details ul { padding: 4px 0 12px 4px; }
.mobile-groups details li a { display: block; padding: 9px 0; font-size: 16px; color: var(--muted); }
.mobile-cta { display: grid; gap: 10px; margin-top: 28px; }
.mobile-cta a { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { box-shadow: inset 0 0 0 1px var(--line); }
body.menu-open { overflow: hidden; }

@media (max-width: 1023px) { .mega { display: none !important; } }

/* ---------- forms ---------- */
.form-note { font-size: 14.5px; line-height: 1.5; padding: 12px 16px; border-radius: 10px; }
.form-note[hidden] { display: none; }
.form-note.ok { background: #ecfdf5; color: #005f46; border: 1px solid #a4f4cf; }
.form-note.err { background: #fef2f2; color: #bf000f; border: 1px solid #ffcaca; }
.field-err { font-size: 12.5px; color: var(--accent); margin-top: -2px; }
input[aria-invalid="true"] { border-color: var(--accent); }
[role="tabpanel"][hidden] { display: none; }

/* ---------- pinned scenes ---------- */
[data-panel] { will-change: clip-path; }
[data-layer], [data-plane], [data-ship], [data-crane], [data-truck], [data-scene-text], [data-scene-chip], [data-edge],
[data-kk-frame], [data-kk-zoom], [data-kk-text], [data-parallax], [data-line] { will-change: transform, opacity; }
[data-panel="sea"], [data-panel="road"] { visibility: hidden; }
[data-scene-text="1"], [data-scene-text="2"] { opacity: 0; }
[data-scene-chip] { opacity: .45; }
[data-scene-chip="0"] { opacity: 1; background: rgb(138 28 43 / .95); }
[data-edge] { opacity: 0; }
[data-line] { transform: scale(0); }
[data-kk-frame] { clip-path: inset(14% round 24px); }
[data-kk-zoom] { transform: scale(1.25); }
[data-kk-text] { opacity: 0; transform: translateY(40px); }
[data-ship], [data-crane], [data-truck] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  [data-hero-bg] { transform: none; transition: none; }
}
