/* ============================================================
   DESIGN TOKENS — 1:1 from the VICAR Figma brand guide
   ============================================================ */
:root {
  --color-wit: #ffffff;
  --color-zwart: #000000;
  --color-grijs-50: #808080;
  --color-grijs-75: #444444;
  --color-brand-orange: #ff6000;

  --font-sans: 'General Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'PP Supply Mono', ui-monospace, SFMono-Regular, monospace;

  /* glass CTA tokens — 1:1 from vicaragency.com tokens.css */
  --glass-bg: linear-gradient(0deg, rgba(49, 49, 49, 0.6) 0%, rgba(70, 70, 70, 0.6) 100%);
  --glass-blur: blur(8px);

  --site-pad: 40px;
  --col-max: 600px;
  --ease-vicar: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 700px) {
  :root { --site-pad: 22px; }
}

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

html { height: 100%; }
body {
  min-height: 100%;
  background-color: var(--color-zwart);
  color: var(--color-wit);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ============================================================
   HALFTONE BACKGROUND — orange dot matrix bleeding in from
   the right (signature VICAR look, recreated as a canvas).
   ============================================================ */
.halftone {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: var(--color-zwart);
  opacity: 0;
  transition: opacity 1400ms ease;
}
.ready .halftone { opacity: 1; }

/* Soft brand glow layered over the dots for depth. */
.glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(85% 70% at 92% 52%, rgba(255, 96, 0, 0.18) 0%, rgba(0, 0, 0, 0) 60%);
}

/* ============================================================
   LAYOUT FRAME
   ============================================================ */
.frame {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 34px var(--site-pad);
  padding-bottom: max(28px, env(safe-area-inset-bottom, 28px));
}

/* ---------- Top bar: centered wordmark + email pill ---------- */
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}
.wordmark img { display: block; height: 30px; width: auto; }

/* positioning wrapper only — the scale/animation lives on the inner
   .primary-btn so it never fights this vertical-centering transform */
.mailpill {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.mailpill .primary-btn { height: 46px; font-size: 15px; }

/* ============================================================
   VIEWS — home <-> contact, cross-faded ("hetzelfde effect")
   ============================================================ */
.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.view {
  width: 100%;
  transition: opacity 560ms var(--ease-vicar), transform 560ms var(--ease-vicar);
}
/* hidden view: faded + nudged, and pulled out of flow so the grid
   row sizes to the active view only */
.view[hidden] {
  display: block;
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}

/* ---------- HOME ---------- */
.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 30px;
  padding: 40px 0;
}
.home h1 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(33px, 3.15vw, 45px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}
.home h1 .muted { color: var(--color-grijs-50); display: block; }

/* ============================================================
   PRIMARY BUTTON — 1:1 port of vicaragency.com's PrimaryButton:
   glass bg, mouse-tracking gradient border (::before), bg fade
   (::after), scale 1.02, and a stacked text-reveal on hover.
   ============================================================ */
.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 51px;
  padding: 6px 16px;
  border-radius: 5px;
  background: var(--glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  will-change: backdrop-filter;
  color: var(--color-wit);
  font: 500 16px/1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.5s ease;
  isolation: isolate;
}
.primary-btn:hover { transform: scale(1.02); }
.primary-btn--block { display: flex; width: 100%; justify-content: center; }

.primary-btn::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}
.primary-btn:hover::after { opacity: 1; }

.primary-btn::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 6px;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.35) 0%,
    transparent 65%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}
.primary-btn:hover::before { opacity: 1; }

.primary-btn > * { position: relative; z-index: 1; }

.primary-btn__dot {
  width: 5px; height: 5px;
  border-radius: 1px;
  background-color: var(--color-brand-orange);
  flex-shrink: 0;
}
.primary-btn__label {
  display: inline-flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  height: 1.2em;
  line-height: 1.2em;
  white-space: nowrap;
}
.primary-btn__label-a,
.primary-btn__label-b {
  display: block;
  line-height: 1.2em;
  transition: transform 0.38s cubic-bezier(0.76, 0, 0.24, 1);
}
.primary-btn__label-b {
  position: absolute;
  top: 0; left: 0;
  transform: translateY(105%);
}

/* ---------- CONTACT ---------- */
.contact {
  width: 100%;
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 18px 0 8px;
}
.form { display: flex; flex-direction: column; }
.field { position: relative; padding-top: 32px; }
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.22);
  color: var(--color-wit);
  font: 400 17px/1.4 var(--font-sans);
  letter-spacing: -0.01em;
  padding: 0 0 13px;
  resize: none;
  transition: border-color 260ms var(--ease-vicar);
}
.field textarea { min-height: 28px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--color-grijs-50); opacity: 1; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--color-brand-orange); }

/* extra breathing room between Phone and Motivation, as in the design */
.field--motivation { padding-top: 84px; }

.send { margin-top: 26px; height: 56px; }

/* location photo card (styled as a Google Maps preview) */
.map {
  position: relative;
  display: block;
  margin-top: 22px;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}
.map img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.map__tag {
  position: absolute;
  left: 14px; bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: 5px;
  /* stronger frosted glass: more transparent tint + heavier blur so the
     photo reads through it, with a subtle top sheen */
  background: linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.04) 100%);
  border: 1px solid rgba(255,255,255,0.30);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 4px 18px rgba(0,0,0,0.25);
  font: 500 13px/1 var(--font-sans);
  color: var(--color-wit);
}
.map__tag svg { width: 15px; height: 15px; display: block; flex-shrink: 0; }

/* ============================================================
   LEGAL PAGES — terms / privacy / cookies
   ============================================================ */
.legal {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 0 16px;
}
.legal__title {
  font: 500 clamp(30px, 4vw, 42px)/1.1 var(--font-sans);
  letter-spacing: -0.02em;
}
.legal__meta {
  margin-top: 14px;
  font: 200 11px/1.6 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-grijs-50);
}
.legal__intro { margin-top: 26px; display: flex; flex-direction: column; gap: 14px; }
.legal__intro p { font: 400 16px/1.7 var(--font-sans); color: rgba(255,255,255,0.80); }

.legal__toc {
  margin-top: 34px;
  padding: 24px 26px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}
.legal__toc-label {
  font: 200 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-grijs-50);
}
.legal__toc ol {
  margin-top: 16px;
  list-style: none;
  columns: 2;
  column-gap: 28px;
}
@media (max-width: 600px) { .legal__toc ol { columns: 1; } }
.legal__toc li { margin-bottom: 9px; break-inside: avoid; }
.legal__toc a {
  font: 400 14px/1.4 var(--font-sans);
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  transition: color 180ms ease;
}
.legal__toc a:hover { color: var(--color-wit); }

.legal__section { margin-top: 42px; scroll-margin-top: 28px; }
.legal__section h2 {
  font: 500 21px/1.3 var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--color-wit);
}
.legal__section p {
  margin-top: 13px;
  font: 400 15px/1.75 var(--font-sans);
  color: rgba(255,255,255,0.74);
}
.legal__section ul {
  margin-top: 13px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.legal__section li {
  font: 400 15px/1.65 var(--font-sans);
  color: rgba(255,255,255,0.74);
}
.legal__section a { color: var(--color-wit); text-decoration: underline; text-underline-offset: 2px; }
.legal__section strong { color: var(--color-wit); font-weight: 500; }

/* ============================================================
   FOOTER — brand glyph row + legal links + copyright
   ============================================================ */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-top: 26px;
}
.glyphs { display: inline-flex; gap: 9px; }
.glyph {
  width: 27px; height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 0;
  color: rgba(255,255,255,0.85);
  transition: border-color 240ms var(--ease-vicar), color 240ms var(--ease-vicar);
}
.glyph:hover { border-color: #fff; color: #fff; }
.glyph svg { width: 25px; height: 25px; display: block; }

/* bottom row: legal links pinned far-left, copyright centred */
.footer__bottom {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
}
.footer__links {
  position: absolute;
  left: 0;
  display: inline-flex;
  gap: 20px;
}
.footer__links a {
  font: 200 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-grijs-50);
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms ease;
}
.footer__links a:hover { color: var(--color-wit); }

.copyright {
  font: 200 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-grijs-50);
  white-space: nowrap;
}

/* ============================================================
   ENTRANCE ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);   filter: blur(0); }
}
/* only hide pre-animation when JS is present (.js on <html>); without
   JS everything stays visible so content is never blank */
.js .topbar, .js .stage, .js .footer, .js .legal { opacity: 0; }
.ready .topbar { animation: fadeUp 800ms var(--ease-vicar) 120ms both; }
.ready .stage  { animation: fadeUp 900ms var(--ease-vicar) 320ms both; }
.ready .footer { animation: fadeUp 900ms var(--ease-vicar) 520ms both; }
.ready .legal  { animation: fadeUp 800ms var(--ease-vicar) 220ms both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
  .frame { padding-top: 28px; }
  .mailpill { display: none; }            /* email lives in the footer flow on mobile */
  .home { gap: 28px; padding: 0; }
  .home h1 { font-size: clamp(32px, 9vw, 40px); line-height: 1.12; }
  .contact { padding-top: 8px; }
  .field--motivation { padding-top: 64px; }
  .map { aspect-ratio: 1 / 1; margin-top: 22px; object-position: center 42%; }
  .footer { gap: 18px; }
  .glyph { width: 26px; height: 26px; }
  .glyph svg { width: 24px; height: 24px; }

  /* mobile (GSM): copyright stays centred, legal links drop below it,
     centred and allowed to wrap — visually neater on a narrow screen */
  .footer__bottom { flex-direction: column-reverse; gap: 14px; }
  .footer__links { position: static; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
  .copyright { font-size: 9.5px; letter-spacing: 0.1em; }
  .footer__links a { font-size: 9.5px; letter-spacing: 0.06em; }
}
@media (max-width: 360px) {
  .copyright { font-size: 8.5px; letter-spacing: 0.06em; }
}

@media (prefers-reduced-motion: reduce) {
  .halftone { transition: none; }
  .view, .topbar, .stage, .footer, .legal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}
