/* ==============================================
   IAMAI — Website Stylesheet v2.1
   ============================================== */

/* Inter, zelf gehost (variabel lettertype, gewicht 100-900). Geen verbinding met Google Fonts. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  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;
}

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

/* ==============================================
   SKIP LINK (accessibility, invisible until :focus)
   ============================================== */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  font-family: var(--font);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 8px;
}

:root {
  --bg:              #0a0a0a;
  --surface:         #131313;
  --surface-hover:   #1a1a1a;
  --border:          #202020;
  --border-light:    #2e2e2e;
  --text-primary:    #e8e8e8;
  --text-muted:      #8f8f8f;   /* body-tekst      — 6,5:1 op --surface */
  --text-dim:        #7e7e7e;   /* labels, footer  — 4,6:1 op --surface, 4,9:1 op --bg */
  --silver-flat:     #a0a0a0;
  --silver-bright:   #d8d8d8;
  --font:            'Inter', system-ui, -apple-system, sans-serif;
  --section-pad:     136px;
  --container:       1200px;
  --nav-h:           64px;

  --steel-gradient:
    repeating-linear-gradient(
      180deg,
      rgba(255,255,255,0)    0px,
      rgba(255,255,255,0)    1px,
      rgba(255,255,255,0.03) 1px,
      rgba(255,255,255,0.03) 2px
    ),
    linear-gradient(
      158deg,
      #1a1a1a  0%,
      #686868 18%,
      #b8b8b8 33%,
      #ececec 46%,
      #ffffff 50%,
      #e0e0e0 54%,
      #9e9e9e 68%,
      #5e5e5e 82%,
      #1a1a1a 100%
    );
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--silver-flat); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--silver-bright); }

/* Zichtbare focus voor toetsenbordnavigatie (WCAG 2.4.7).
   :focus-visible → geen ring bij muisklik, wél bij Tab. */
:focus-visible {
  outline: 2px solid var(--silver-bright);
  outline-offset: 3px;
}
input:focus-visible, textarea:focus-visible { outline-offset: 1px; }

.silver-text {
  background: linear-gradient(135deg, #585858 0%, #b8b8b8 30%, #f0f0f0 50%, #b8b8b8 70%, #585858 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==============================================
   SCROLL REVEAL
   ============================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.cards-grid .reveal:nth-child(1) { transition-delay: 0s; }
.cards-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.cards-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ==============================================
   NAVIGATION
   ============================================== */

#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s;
}
#nav.scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 48px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  background: linear-gradient(135deg, #909090, #e0e0e0, #909090);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { list-style: none; display: flex; gap: 40px; }
.nav-links a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

/* ==============================================
   LANGUAGE SWITCHER
   ============================================== */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 20px;
  background: transparent;
  border: 1px solid var(--border-light);
  padding: 2px;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 600;
  font-family: var(--font);
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 5px 8px;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
  /* Minimale tikdoelmaat 24x24 (WCAG 2.5.8) — was 23x17 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 28px;
}
.lang-btn:hover { color: var(--text-muted); }
.lang-btn.lang-active {
  color: var(--text-primary);
  background: var(--surface-hover);
}

/* ==============================================
   BUTTON
   ============================================== */

.btn {
  display: inline-block;
  padding: 14px 44px;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-flat);
  border: 1px solid var(--silver-flat);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  text-decoration: none;
  line-height: 1;
}
.btn:hover { background: rgba(160,160,160,0.12); color: var(--silver-bright); border-color: var(--silver-bright); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn--full { width: 100%; text-align: center; }

/* ==============================================
   HERO — 500vh tall, visual content is sticky
   ============================================== */

#hero {
  height: 500vh;
  position: relative;
  padding: 0;
}

/* Sticky visual layer */
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
  will-change: transform;
}

/* Canvas fills sticky area */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Radial vignette over canvas */
.hero-sticky::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 30%, var(--bg) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Hero content */
.hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}

/* ==============================================
   HERO WORDMARK — één h1, alle fases, AI beweegt nooit
   ============================================== */

/* Eén h1 voor alle fases; --tx centreert "IAMAI" in fase 0 */
.hero-wordmark {
  display: flex;
  align-items: baseline;
  justify-content: center;
  width: 100%;
  font-size: clamp(3rem, 9vw, 10.8rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0;
  filter:
    drop-shadow(0 2px 0px rgba(0,0,0,1))
    drop-shadow(0 5px 14px rgba(0,0,0,0.9))
    drop-shadow(0 0 50px rgba(200,200,200,0.06));
  transform: translateX(var(--tx, 0px));
  will-change: transform;
}

/* Prefix-wrapper: breedte vergrendeld door JS */
.phrase-prefix-wrap {
  display: inline-block;
  text-align: right;
  overflow: visible;
  flex-shrink: 0;
}

/* Brushed steel op prefix én "AI".
   Beide spans delen één gradient-coordinatenruimte: de afbeelding wordt
   geschaald op de breedte van het hele woordmerk (--sheen-w) i.p.v. op de
   eigen elementbreedte, en elk element schuift zijn achtergrond terug met
   zijn eigen offset binnen het woordmerk (--el-x). Zonder dat rekent de
   browser dezelfde percentages om naar een andere schaal per element, en
   valt de ene helft zwart uit terwijl de andere oplicht.
   JS (initPhrases → syncSheen) vult --sheen-w, --sheen-travel en --el-x. */
#phrase-prefix, .phrase-ai {
  background-image: var(--steel-gradient);
  background-size: 100% 100%, var(--sheen-w, 300%) 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s ease-in-out infinite;
}

#phrase-prefix {
  display: inline-block;
  white-space: nowrap;
  will-change: transform, opacity;
}

/* Vaste "AI" — verplaatst nooit in fases 1-3 */
.phrase-ai {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Shimmer: één lichtband die over het hele woordmerk loopt */
@keyframes shimmer {
  0%, 100% { background-position: 0 0, calc(0px - var(--sheen-travel, 0px) - var(--el-x, 0px)) 50%; }
  50%      { background-position: 0 0, calc(0px - var(--el-x, 0px)) 50%; }
}

/* Prefix wissel-animaties: nu via Web Animations API in main.js
   → shimmer CSS-animatie wordt niet meer onderbroken door !important overrides */

/* Accent-balk: schuift in bij fase 3 ("THISISAI") als visuele afsluiting */
.hero-accent-bar {
  width: clamp(180px, 36vw, 520px);
  height: 2px;
  margin-top: 24px;
  background: linear-gradient(90deg, transparent 0%, var(--silver-flat) 15%, var(--silver-bright) 50%, var(--silver-flat) 85%, transparent 100%);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.4, 0, 1, 1);
}
.phase-final .hero-accent-bar {
  transform: scaleX(1);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  z-index: 3;
  transition: opacity 0.4s;
  animation: float 2.6s ease-in-out infinite;
}
.hero-scroll-hint.hidden { opacity: 0; pointer-events: none; }

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* ==============================================
   MARQUEE
   ============================================== */

.marquee-wrap {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  background: var(--surface);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  padding: 0 28px;
}
.marquee-track .marquee-dot { color: var(--border-light); padding: 0; letter-spacing: 0; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }

/* ==============================================
   SECTIONS — shared
   ============================================== */

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

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 48px;
}
.section-inner--narrow { max-width: 760px; }

.section-header {
  margin-bottom: 64px;
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.section-label { font-size: 0.62rem; font-weight: 500; letter-spacing: 0.22em; color: var(--text-dim); }
.section-title { font-size: clamp(1.75rem, 3.5vw, 2.6rem); font-weight: 900; letter-spacing: 0.06em; line-height: 1; }

#werkwijze, #contact { border-top: 1px solid var(--border); }

/* ==============================================
   DIENSTEN — cards with animated SVG border
   ============================================== */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.card {
  background: var(--surface);
  padding: 52px 44px;
  position: relative;
  transition: background 0.3s;
  overflow: hidden;
}
.card:hover { background: var(--surface-hover); }

.card-border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  fill: none;
  stroke: var(--silver-flat);
  stroke-width: 1;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.7;
}
.card:hover .card-border { stroke-dashoffset: 0; }

.card h3 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-primary); margin-bottom: 18px; }
.card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.85; }

/* ==============================================
   WERKWIJZE — steps
   ============================================== */

.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr 1px 1fr;
  align-items: start;
  gap: 0 56px;
}
.step-divider { background: var(--border); align-self: stretch; min-height: 160px; }
.step { padding: 8px 0; }
.step-number { display: block; font-size: 4rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; margin-bottom: 28px; }
.step h3 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-primary); margin-bottom: 14px; }
.step p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.85; }

/* ==============================================
   RESULTATEN — result numbers
   ============================================== */

.result-number {
  display: block;
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 24px;
}

/* ==============================================
   PAKKETTEN — pricing
   ============================================== */

/* ==============================================
   CONTACT — form
   ============================================== */

.contact-intro { font-size: 1rem; color: var(--text-muted); margin-bottom: 52px; line-height: 1.75; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
label { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.label-optional { font-weight: 400; letter-spacing: 0.04em; text-transform: none; }

input, textarea {
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  resize: none;
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
}
input:focus, textarea:focus { border-color: var(--silver-flat); background: var(--surface-hover); }
input::placeholder, textarea::placeholder { color: var(--text-dim); }

.form-status { margin-top: 16px; font-size: 0.78rem; letter-spacing: 0.06em; min-height: 22px; }
.form-status.success { color: var(--silver-bright); }
.form-status.error   { color: #c47070; }
.form-note { margin-top: 8px; font-size: 0.72rem; line-height: 1.6; color: var(--text-dim); }
.form-note a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.form-note a:hover { color: var(--silver-flat); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ==============================================
   FOOTER
   ============================================== */

footer { border-top: 1px solid var(--border); padding: 36px 0; }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left, .footer-right { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.06em; }
.footer-right a { color: var(--text-dim); }
.footer-right a:hover { color: var(--silver-flat); }

/* ==============================================
   RESPONSIVE
   ============================================== */

@media (max-width: 960px) {
  :root { --section-pad: 88px; }
  .nav-inner, .section-inner, .footer-inner { padding-left: 28px; padding-right: 28px; }
  .cards-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 36px 0; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: none; }
  .step-divider { display: none; }
  .step-number { font-size: 3rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* Het woordmerk groeit naar links (de "AI" staat vast), dus de langste zin
   YOUAREAI bepaalt de benodigde breedte. Onder ~405px overrulet de ondergrens
   van 3rem de vw-schaling, waardoor de letters de viewport uit liepen: op 375px
   viel de Y er 15px buiten. Laat vw daar doorschalen — dan schaalt de marge mee
   met het scherm en kapt er op geen enkele breedte iets af. */
@media (max-width: 420px) {
  .hero-wordmark { font-size: 10.5vw; }
}

/* Onder 640px passen woordmerk + drie nav-links + taalschakelaar niet naast
   elkaar: op 375px bleef er 3px tussen het logo en "DIENSTEN" over. Contact
   is de CTA en blijft staan; Diensten en Werkwijze liggen één scroll verderop. */
@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
}

@media (max-width: 540px) {
  :root { --section-pad: 72px; }
  .nav-inner { padding-left: 16px; padding-right: 16px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.62rem; letter-spacing: 0.1em; }
  .lang-switcher { margin-left: 10px; flex-shrink: 0; }
  .lang-btn { font-size: 0.6rem; }
  .footer-inner { flex-direction: column; gap: 10px; text-align: center; }
}

/* ==============================================
   REDUCED MOTION (accessibility — WCAG 2.1 AA)
   ============================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ==============================================
   PRINT (invisible to screen users)
   ============================================== */

@media print {
  body { background: #fff; color: #1a1a1a; }
  .skip-link,
  #nav, .hero-scroll-hint, .marquee-wrap, #hero-canvas, .hero-accent-bar,
  .lang-switcher,
  .card-border, .step-divider { display: none; }
  #hero { height: auto; }
  .hero-sticky { position: static; height: auto; background: #fff; }
  .hero-wordmark { font-size: 2rem; }
  #phrase-prefix, .phrase-ai {
    background: none;
    -webkit-text-fill-color: #1a1a1a;
    color: #1a1a1a;
  }
  .silver-text {
    background: none;
    -webkit-text-fill-color: #1a1a1a;
    color: #1a1a1a;
  }
  section { padding: 24px 0; }
  .cards-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .reveal { opacity: 1; transform: none; }
  a[href^="mailto:"]::after { content: " (" attr(href) ")"; }
  footer { border-top: 1px solid #ccc; }
  .footer-left, .footer-right { color: #1a1a1a; }
}
