/* VANA Management
   Layout: one continuous scroll. The roof of the logo splits into two beams that travel with
   the page: side columns, a frame, floor/ceiling tracks, rails, and finally the roof again. */

@font-face { font-family: "Jost"; src: url("../fonts/jost.woff2") format("woff2"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #17202e; --bg: #f6f5f2; --field: #ffffff; --muted: #6b6f78; --body: #3b4352; --line: #d9d6cf;
  --ok: #2f6b4f; --err: #a23b2c;
  --f-display: "Jost", "Futura", "Century Gothic", sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(40px, 10vw, 160px);
  --header-h: 68px;
  color-scheme: light; /* always light, also when the device is in dark mode */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 300; text-wrap: balance; letter-spacing: -.005em; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.08; }
h2 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.1; }
h3 { font-size: clamp(21px, 2.4vw, 28px); line-height: 1.2; font-weight: 400; }
p { color: var(--body); max-width: 60ch; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.spec { font-family: var(--f-mono); font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Skip link ---------- */
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; font-size: 14px; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom-color: var(--line); }
/* Menu always centred; the small logo sits on the left without pushing it aside */
.header-inner { position: relative; height: var(--header-h); display: flex; align-items: center; justify-content: center; gap: 24px; padding-inline: clamp(56px, 6vw, 88px); }
.brand { position: absolute; left: clamp(56px, 6vw, 88px); top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 12px; text-decoration: none; transition: opacity .5s ease; }
.brand svg { height: 30px; width: auto; display: block; }
.brand svg path { fill: none; stroke: var(--ink); stroke-width: 18; stroke-linejoin: miter; }
.brand svg .brand-roof { stroke-width: 10; }
.brand-sub { font-family: var(--f-mono); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.home .brand { opacity: 0; pointer-events: none; }
.home .brand.visible { opacity: 1; pointer-events: auto; }

.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.nav a { position: relative; font-family: var(--f-display); font-size: 16px; text-decoration: none; letter-spacing: .02em; padding-block: 6px; border-bottom: 1px solid var(--ink); }
.nav a::after { content: ""; position: absolute; inset: -10px -8px; } /* 44px tap area */
.nav a:hover, .nav a[aria-current] { padding-bottom: 5px; border-bottom-width: 2px; }
.home .nav { opacity: 0; animation: fadeIn .8s ease 2.2s forwards; }

/* Home: transparent over the hero, fades away when scrolling down, returns when scrolling up */
.home .site-header { transition: opacity .45s ease, transform .45s ease, background-color .3s ease, border-color .3s ease; }
.home .site-header.away { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.home .site-header.away:focus-within { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 960px) { .brand { display: none; } }
@media (max-width: 760px) {
  .header-inner { padding-inline: 24px; }
  .nav { gap: 18px; }
  .nav a { font-size: 14px; }
}
@media (max-width: 360px) { .nav { gap: 12px; } .nav a { font-size: 13px; } }

/* ---------- Hero ---------- */
.hero { height: 210vh; position: relative; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-content: center; justify-items: center; gap: clamp(18px, 3vh, 32px); overflow: hidden; }
.hero-logo { width: min(78vw, 860px, 120vh); max-width: 100%; aspect-ratio: 860 / 330; display: block; overflow: visible; }
.hero-logo #word path { fill: none; stroke: var(--ink); stroke-width: 9; stroke-linejoin: miter; stroke-miterlimit: 10; }

.letter { opacity: 0; transform-box: fill-box; transform-origin: center; animation: letterIn 1.5s cubic-bezier(.16, .8, .12, 1) forwards; }
.from-left  { --dx: -140px; }
.from-right { --dx: 140px; }
.l1, .l4 { animation-delay: .95s; }
.l2, .l3 { animation-delay: 1.15s; }
@keyframes letterIn {
  from { opacity: 0; transform: translateX(var(--dx)); filter: blur(6px); }
  to   { opacity: 1; transform: translateX(0); filter: blur(0); }
}

.tagline { font-family: var(--f-mono); font-size: clamp(11px, 1.1vw, 13px); letter-spacing: .32em; text-transform: uppercase; color: var(--muted); text-align: center; filter: opacity(0); animation: filterIn 1s ease 1.9s forwards; }
/* Intro uses filter so the scroll fade (inline opacity) is not overridden by the animation */
@keyframes filterIn { to { filter: opacity(1); } }
@media (max-width: 400px) { .tagline { letter-spacing: .18em; padding-inline: 16px; } }

/* Roof drawn inside the SVG works without JS; with JS the moving beams take over */
.roof path { fill: var(--ink); transform-box: fill-box; opacity: 0; animation: roofSvg 1.6s cubic-bezier(.22, .9, .2, 1) .2s forwards; }
.roof .rl { transform-origin: 100% 0; }
.roof .rr { transform-origin: 0 0; }
@keyframes roofSvg { from { opacity: 0; transform: scaleX(0); filter: blur(8px); } to { opacity: 1; transform: scaleX(1); filter: blur(0); } }

.beams { display: none; position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.js .roof { display: none; }
.js .beams { display: block; }
.beam { position: absolute; left: 0; top: 0; will-change: transform, width, height; }
.beam-inner {
  display: block; width: 100%; height: 100%; background: var(--ink);
  opacity: 0; filter: blur(8px); transform: scaleX(0); transform-origin: 100% 50%;
  animation: roofIn 1.6s cubic-bezier(.22, .9, .2, 1) .2s forwards;
}
@keyframes roofIn {
  0%   { opacity: 0; filter: blur(8px); transform: scaleX(0); }
  40%  { opacity: .5; }
  100% { opacity: 1; filter: blur(0); transform: scaleX(1); }
}

/* Scroll cue: three chevrons in the roof's angle, pulsing downward like a wave */
.scroll-cue { position: absolute; bottom: calc(5vh + env(safe-area-inset-bottom, 0px)); left: 50%; width: 40px; margin-left: -20px; opacity: 0; animation: fadeIn 1s ease 2.6s forwards; }
.scroll-cue svg { display: block; width: 40px; height: auto; overflow: visible; }
.scroll-cue path { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .12; animation: wave 2.4s ease-in-out infinite; }
.scroll-cue path:nth-child(2) { animation-delay: .25s; }
.scroll-cue path:nth-child(3) { animation-delay: .5s; }
@keyframes wave {
  0%, 100% { opacity: .12; transform: translateY(-3px); }
  35%      { opacity: 1;   transform: translateY(2px); }
  70%      { opacity: .12; transform: translateY(5px); }
}
@keyframes fadeIn { to { opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding-inline: var(--gutter); padding-block: 26vh; max-width: 1280px; margin-inline: auto; }

.intro { display: grid; gap: 28px; }
.intro h2 { max-width: 14ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px 40px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.facts div { display: grid; gap: 6px; min-width: 0; }
.facts strong { font-family: var(--f-display); font-weight: 400; font-size: 19px; }

.frame { max-width: 760px; margin-inline: auto; padding: clamp(36px, 6vw, 72px) clamp(28px, 6vw, 72px); text-align: center; display: grid; gap: 22px; justify-items: center; }
.frame h2 { font-size: clamp(28px, 4vw, 46px); }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 56px clamp(40px, 6vw, 96px); padding-block: 64px; }
.services header { grid-column: 1 / -1; display: grid; gap: 14px; }
.svc { display: grid; gap: 18px; align-content: start; min-width: 0; }
.svc ul { list-style: none; display: grid; }
.svc li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.svc li:first-child { border-top: 1px solid var(--line); }
.svc li span:first-child { min-width: 0; }
.svc li .spec { white-space: nowrap; }

.process { display: grid; gap: 40px; }
.process header { display: grid; gap: 14px; }
.steps { list-style: none; display: grid; gap: 44px; padding-left: 64px; padding-block: 8px; }
.steps li { display: grid; gap: 8px; }
.steps .spec { color: var(--ink); }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 8px; }
.text-link { font-family: var(--f-display); font-size: 17px; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.text-link:hover { border-bottom-width: 2px; padding-bottom: 1px; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 56px; padding-bottom: 18vh; }
.contact-head { display: grid; justify-items: center; text-align: center; gap: 22px; }
.roof-anchor { width: min(100%, 520px); height: 120px; }
.contact-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px clamp(40px, 6vw, 96px); align-items: start; }
.contact-info { display: grid; gap: 28px; }
.contact-info div { display: grid; gap: 6px; min-width: 0; }
.contact-info strong { font-weight: 500; overflow-wrap: anywhere; }
.contact-info a { text-underline-offset: 3px; }
.form-note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .contact-body { grid-template-columns: 1fr; } }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field legend { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field label .req { color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; font: 16px/1.5 var(--f-body); color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 0; padding: 12px 14px; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field [aria-invalid="true"] { border-color: var(--err); }
.field .error { font-size: 13px; color: var(--err); min-height: 0; }
.consent { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--body); }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.btn { display: inline-block; text-decoration: none; font: 500 15px var(--f-display); letter-spacing: .06em; color: var(--bg); background: var(--ink); border: 1px solid var(--ink); padding: 14px 30px; cursor: pointer; }
.btn:hover { background: transparent; color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: progress; }
.form-status { font-size: 14px; min-width: 0; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.form-done { grid-column: 1 / -1; display: grid; gap: 12px; padding: 32px; border: 1px solid var(--line); }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { padding-inline: var(--gutter); padding-block: 48px 64px; border-top: 1px solid var(--line); max-width: 1280px; margin-inline: auto; display: grid; gap: 28px; }
.site-footer dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 40px; }
.site-footer dl div { display: grid; gap: 4px; }
.site-footer dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.site-footer dd { font-size: 14px; color: var(--body); font-variant-numeric: tabular-nums; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 13px; color: var(--muted); }
.footer-bottom nav { display: flex; gap: 20px; }

/* ---------- Legal pages ---------- */
.legal { padding-inline: var(--gutter); padding-block: calc(var(--header-h) + 12vh) 14vh; max-width: 920px; margin-inline: auto; display: grid; gap: 40px; }
.legal header { display: grid; gap: 16px; }
.legal section { display: grid; gap: 12px; }
.legal h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 400; }
.legal h3 { font-size: 18px; font-weight: 500; font-family: var(--f-body); }
.legal ul { padding-left: 20px; color: var(--body); display: grid; gap: 6px; }
.legal address { font-style: normal; color: var(--body); }

@media (min-width: 1800px) {
  body { font-size: 17px; }
  .section, .site-footer { max-width: 1440px; }
}
@media (max-width: 640px) {
  :root { --gutter: 36px; --header-h: 60px; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .svc li { flex-wrap: wrap; row-gap: 2px; }
  .section { padding-block: 20vh; }
  .steps { padding-left: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .letter, .beam-inner, .roof path, .home .nav { animation: none; opacity: 1; filter: none; transform: none; }
  .scroll-cue { animation: none; opacity: 1; }
  .tagline { animation: none; filter: none; }
  .hero { height: auto; }
  .scroll-cue path { animation: none; opacity: .6; }
}

.turnstile { grid-column: 1 / -1; }

/* ---------- Cookie / consent banner ---------- */
.consent-banner {
  position: fixed; z-index: 40; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 640px; margin-inline: auto;
  background: var(--bg); color: var(--ink); border: 1px solid var(--ink);
  box-shadow: 0 18px 50px -20px rgba(10, 14, 22, .35);
  max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain;
}
.consent-inner { display: grid; gap: 18px; padding: clamp(20px, 3vw, 28px); }
.consent-head { display: grid; gap: 10px; }
.consent-head p:not(.eyebrow) { font-size: 14px; }
.consent-panel { display: grid; gap: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.consent-cat { display: grid; gap: 4px; padding-top: 12px; }
.consent-cat p { font-size: 13px; color: var(--muted); }
.consent-cat label { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; min-height: 32px; }
.consent-cat input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent-switch { width: 40px; height: 22px; border: 1px solid var(--ink); border-radius: 11px; position: relative; flex: none; transition: background-color .2s ease; }
.consent-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform .2s ease, background-color .2s ease; }
.consent-cat input:checked + .consent-switch { background: var(--ink); }
.consent-cat input:checked + .consent-switch::after { transform: translateX(18px); background: var(--bg); }
.consent-cat input:disabled + .consent-switch { opacity: .55; }
.consent-cat input:focus-visible + .consent-switch { outline: 2px solid var(--ink); outline-offset: 3px; }
.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* Buttons stay visible even when the banner has to scroll on small screens */
.consent-actions { position: sticky; bottom: 0; background: var(--bg); margin-inline: calc(-1 * clamp(20px, 3vw, 28px)); margin-bottom: calc(-1 * clamp(20px, 3vw, 28px)); padding: 12px clamp(20px, 3vw, 28px) clamp(20px, 3vw, 28px); }
.consent-actions .btn { padding: 12px 22px; font-size: 14px; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--bg); }
.consent-link { background: none; border: 0; color: var(--ink); font: 400 14px var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 12px 4px; }
.footer-bottom nav button { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
@media (max-width: 480px) {
  .consent-banner { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .consent-inner { gap: 12px; }
  .consent-head p:not(.eyebrow) { font-size: 13px; line-height: 1.55; }
  .consent-actions .btn { flex: 1 1 140px; }
}
.consent-actions .btn { white-space: nowrap; }
@media (max-width: 374px) { .consent-actions .btn { flex-basis: 100%; } }
@media (prefers-reduced-motion: reduce) { .consent-switch, .consent-switch::after { transition: none; } }
