/* ============================================================
   Mark-Anthony B.V. — "The Index"  (v3: editorial art-direction)
   Warm paper base · vertical rail nav · oversized type
   (Fraunces × Archivo × Space Mono) · colour-flood expertise index.
   ============================================================ */

:root {
  --paper:    #f1f0ee;   /* warm grey (chosen bg) */
  --paper-2:  #e8e7e3;
  --ink:      #17131b;
  --ink-2:    #46404b;
  --muted:    #8b8279;
  --line:     #d9d2c4;

  --brand:    #5b2a86;
  --brand-ink:#37163c;

  --arbo:     #2f5fd0;
  --exact:    #d23a46;
  --web:      #0f9d6b;

  --rail:     clamp(128px, 9vw, 172px);   /* vertical nav width — fluid, roomy for a big logo */
  --maxw:     1180px;

  --display:  "Fraunces", Georgia, serif;
  --grotesk:  "Archivo", system-ui, sans-serif;
  --mono:     "Space Mono", ui-monospace, monospace;

  --ease:     cubic-bezier(.16, 1, .3, 1);
  --ease-io:  cubic-bezier(.7, 0, .2, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* fluid root: 1rem scales with the viewport, so ALL rem-based text
   (body, labels, nav, descriptions) grows together on wider screens */
html { -webkit-text-size-adjust: 100%; font-size: clamp(16px, calc(0.45vw + 11.5px), 20px); }
html.lenis-ready { scroll-behavior: auto; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--grotesk);
  font-size: 1rem; line-height: 1.6;  /* follows the fluid root */
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--ink); color: var(--paper); }

.display { font-family: var(--display); font-optical-sizing: auto; font-weight: 600; line-height: .92; letter-spacing: -.015em; }
.serif-i { font-family: var(--display); font-style: italic; font-weight: 500; }
.mono { font-family: var(--mono); }
.label {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------- grain + custom cursor ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.cursor {
  position: fixed; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink); z-index: 9999; pointer-events: none;
  transform: translate(-50%, -50%); mix-blend-mode: difference;
  transition: width .25s var(--ease), height .25s var(--ease), background .25s;
}
.cursor.hot { width: 46px; height: 46px; background: #fff; }
@media (hover: none) { .cursor { display: none; } }

/* ---------- vertical rail nav ---------- */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 24px 0; border-right: 1px solid var(--line); background: var(--paper);
}
.rail .r-logo img { width: clamp(100px, 7vw, 136px); height: auto; }
.rail .r-nav { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.rail .r-nav a {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--mono); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-2); position: relative; padding: 4px 0;
  transition: color .3s var(--ease);
}
.rail .r-nav a::after {
  content: ""; position: absolute; left: -8px; top: 50%; width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); transform: translateY(-50%) scale(0); transition: transform .3s var(--ease);
}
.rail .r-nav a:hover { color: var(--ink); }
.rail .r-nav a:hover::after, .rail .r-nav a.active::after { transform: translateY(-50%) scale(1); }
.rail .r-foot { writing-mode: vertical-rl; font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }

/* ---------- main shell ---------- */
.shell { margin-left: var(--rail); }
/* fluid: content spans the full viewport (minus the rail), padding gives breathing room */
.wrap { width: 100%; margin-inline: auto; padding-inline: clamp(24px, 5vw, 96px); }
.section { position: relative; padding: clamp(80px, 12vh, 150px) 0; }

/* section eyebrow */
.eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; }
.eyebrow .n { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; color: var(--muted); }
.eyebrow .t { font-family: var(--mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.eyebrow .ln { flex: 1; height: 1px; background: var(--line); }

/* ---------- hero ---------- */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; position: relative; padding-top: 90px; }
.hero .meta-top {
  position: absolute; top: 34px; left: 0; right: 0; display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.hero h1 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: .9; font-size: clamp(3.2rem, 12vw, 11rem); }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; transform: translateY(105%); }
.hero h1 em { font-style: italic; font-weight: 500; }
.hero h1 .tint { color: var(--brand); }
.hero-bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 48px; }
.hero-bottom p { max-width: 40ch; font-size: 1.15rem; color: var(--ink-2); }
.hero-cta { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
.hero-cta .circ { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--ink); display: grid; place-items: center; transition: background .3s var(--ease), color .3s var(--ease); }
.hero-cta:hover .circ { background: var(--ink); color: var(--paper); }

/* ---------- expertise index ---------- */
.index-list { border-top: 1px solid var(--ink); }
.idx {
  position: relative; display: grid; grid-template-columns: 90px 1fr auto;
  align-items: center; gap: 28px; padding: clamp(26px, 4vw, 46px) 8px; border-bottom: 1px solid var(--line);
  color: var(--ink); overflow: hidden; isolation: isolate;
}
.idx::before { /* colour flood */
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--acc);
  transform: translateY(101%); transition: transform .55s var(--ease-io);
}
.idx:hover::before { transform: translateY(0); }
.idx .i-num { font-family: var(--mono); font-size: 1.05rem; color: var(--muted); transition: color .4s var(--ease); }
.idx .i-name { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 6.5vw, 5.2rem); line-height: .95; letter-spacing: -.02em; transition: transform .55s var(--ease-io), color .4s; }
.idx .i-name em { font-style: italic; font-weight: 500; }
.idx .i-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; transition: color .4s; }
.idx .i-desc { max-width: 30ch; text-align: right; font-size: clamp(1.05rem, 1.15vw, 1.4rem); line-height: 1.45; color: var(--ink-2); transition: color .4s; }
.idx .i-logos { display: flex; align-items: center; justify-content: flex-end; gap: 12px 16px; flex-wrap: wrap; }
/* logos are pre-matted onto --paper, so the chip = --paper: invisible on the
   resting row, a clean "punched-out" island on the hover flood, no white fringe */
.idx .i-logo { box-sizing: content-box; height: clamp(32px, 2.6vw, 46px); width: auto; padding: 9px 13px; border-radius: 9px; background: var(--paper); }
.idx .i-logo.lg-rie { height: clamp(38px, 3.1vw, 54px); } /* rieactie wordmark is airier — a touch taller */
.idx .i-go { position: absolute; right: 8px; top: 50%; transform: translate(30px, -50%); opacity: 0; font-size: 2rem; color: #fff; transition: transform .5s var(--ease-io), opacity .4s; }
/* hover state: text + logos flip to white on flood */
.idx:hover .i-num, .idx:hover .i-desc { color: rgba(255,255,255,.85); }
.idx:hover .i-name { color: #fff; transform: translateX(18px); }
.idx:hover .i-right { color: #fff; }
/* (i-logo chip colour handled above — logos are matted onto --paper) */
.idx:hover .i-go { transform: translate(0, -50%); opacity: 1; }
.idx.arbo  { --acc: var(--arbo); }
.idx.exact { --acc: var(--exact); }
.idx.web   { --acc: var(--web); }

/* ---------- about ---------- */
.about { position: relative; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.about-quote { font-family: var(--display); font-weight: 500; font-style: italic; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: -.02em; }
.about-quote b { font-style: normal; font-weight: 600; color: var(--brand); }
.about-portrait { position: relative; }
.about-portrait img { width: 100%; filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; }
.about-portrait::after { content: ""; position: absolute; inset: 0; background: var(--brand); mix-blend-mode: screen; opacity: .28; }
.about-portrait .tag { position: absolute; left: 16px; bottom: 16px; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--paper); mix-blend-mode: normal; }
.about-body { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about-body p { color: var(--ink-2); max-width: 46ch; }
.about-stats { display: flex; gap: 44px; flex-wrap: wrap; }
.about-stats .s .n { font-family: var(--display); font-weight: 600; font-size: clamp(2.4rem, 4.5vw, 5rem); line-height: 1; }
.about-stats .s .l { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* ---------- contact ---------- */
.contact { background: var(--ink); color: var(--paper); }
.contact ::selection { background: var(--paper); color: var(--ink); }
.contact .eyebrow .t { color: var(--paper); }
.contact .eyebrow .n, .contact .eyebrow .ln { opacity: .5; }
.contact .eyebrow .ln { background: var(--paper); }
.contact h2 { font-family: var(--display); font-weight: 500; font-style: italic; font-size: clamp(2.6rem, 9vw, 7rem); line-height: .95; letter-spacing: -.02em; }
.contact .big-mail { display: inline-block; font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 5vw, 3.4rem); margin-top: 36px; letter-spacing: -.01em; position: relative; }
.contact .big-mail::after { content: ""; position: absolute; left: 0; bottom: 6px; width: 100%; height: 2px; background: var(--paper); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.contact .big-mail:hover::after { transform: scaleX(1); }
.contact-row { display: flex; flex-wrap: wrap; gap: 40px 70px; margin-top: 64px; }
.contact-row .lbl { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(244,241,234,.55); }
.contact-row a, .contact-row span { display: block; font-size: 1.25rem; font-weight: 600; margin-top: 8px; }
.contact-row a:hover { color: #fff; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: rgba(244,241,234,.6); padding: 40px 0; border-top: 1px solid rgba(255,255,255,.12); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.footer .mono { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- reveal (mask + fade) ---------- */
.js .reveal-line > span { transform: translateY(105%); transition: transform 1s var(--ease); }
.js .reveal-line.in > span { transform: translateY(0); }
.js [data-fade] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-fade].in { opacity: 1; transform: none; }
.js [data-fade].d1 { transition-delay: .1s; }
.js [data-fade].d2 { transition-delay: .2s; }
.js [data-fade].d3 { transition-delay: .3s; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  :root { --rail: 0px; }
  .rail {
    inset: 0 0 auto 0; width: 100%; height: 60px; flex-direction: row;
    padding: 0 20px; border-right: none; border-bottom: 1px solid var(--line);
    background: rgba(244,241,234,.9); backdrop-filter: blur(8px);
  }
  .rail .r-nav { flex-direction: row; gap: 20px; }
  .rail .r-nav a { writing-mode: horizontal-tb; transform: none; font-size: .74rem; }
  .rail .r-nav a::after { left: 50%; top: auto; bottom: -6px; transform: translateX(-50%) scale(0); }
  .rail .r-nav a:hover::after, .rail .r-nav a.active::after { transform: translateX(-50%) scale(1); }
  .rail .r-foot { display: none; }
  .rail .r-logo img { width: 40px; } /* keep small in the mobile top bar */
  .shell { margin-left: 0; padding-top: 60px; }
  .idx { grid-template-columns: 54px 1fr; }
  .idx .i-right { grid-column: 2; align-items: flex-start; }
  .idx .i-desc { text-align: left; }
  .idx:hover .i-name { transform: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-body { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 520px) {
  .hero-bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal-line > span, .js [data-fade] { transform: none !important; opacity: 1 !important; }
  .cursor { display: none; }
}


/* ===== B (Archivo Expanded) — baked in as the definitive type system ===== */
/* ============================================================
   Kurppa-Hosk variant — overrides style.css typography only.
   Swaps the Fraunces editorial serif for a bold, wide, UPPERCASE
   grotesk (Archivo Expanded). Layout & colours stay identical.
   Loaded AFTER style.css so these rules win.
   ============================================================ */

:root { --display: "Archivo Expanded", "Archivo", system-ui, sans-serif; }

/* kill all italics + go uppercase, heavy, tight */
.display, .serif-i,
.hero h1, .hero h1 em,
.idx .i-name, .idx .i-name em,
.about-quote, .about-quote b,
.contact h2,
.marquee-track span {
  font-style: normal;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: -.01em;
}

/* hero — expanded is wide, so dial the size back a touch */
.hero h1 { font-size: clamp(2.6rem, 10vw, 13rem); line-height: .94; }
.hero h1 .tint { color: var(--brand); }

/* expertise index names */
.idx .i-name { font-size: clamp(1.6rem, 6.2vw, 7rem); line-height: 1; }

/* about pull-quote */
.about-quote { font-weight: 700; font-size: clamp(1.8rem, 4.6vw, 5.2rem); line-height: 1.04; }
.about-quote b { color: var(--brand); font-weight: 800; }
.about-stats .s .n { font-family: var(--display); font-weight: 800; }

/* contact statement */
.contact h2 { font-size: clamp(2.4rem, 9vw, 8.5rem); line-height: .98; }
.contact .big-mail { font-family: var(--display); font-weight: 800; text-transform: none; font-size: clamp(1.5rem, 5vw, 4.2rem); }



/* ============================================================
   Detail pages (arbo / exact / websites) — accent-driven
   ============================================================ */
body.arbo  { --acc: var(--arbo); }
body.exact { --acc: var(--exact); }
body.web   { --acc: var(--web); }

.d-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: clamp(28px, 5vh, 52px); }
.d-back { font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); display: inline-flex; align-items: center; gap: 10px; transition: color .3s var(--ease), gap .3s var(--ease); }
.d-back:hover { color: var(--acc); gap: 16px; }
.d-count { font-family: var(--mono); font-size: .82rem; letter-spacing: .12em; color: var(--muted); }

.d-hero { padding: clamp(38px, 8vh, 92px) 0 clamp(28px, 5vh, 56px); border-bottom: 1px solid var(--line); }
.d-hero .kicker { color: var(--acc); }
.d-hero h1 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; line-height: .94; font-size: clamp(2.6rem, 9vw, 8.5rem); color: var(--acc); margin: 20px 0 26px; }
.d-lede { font-size: clamp(1.15rem, 1.5vw, 1.9rem); line-height: 1.4; color: var(--ink); max-width: 42ch; }

.d-section h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(1.6rem, 3vw, 2.8rem); line-height: 1; margin: 0 0 14px; }
.d-section > .wrap > p { color: var(--ink-2); max-width: 60ch; font-size: 1.05rem; }

.d-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; margin-top: 40px; }
.d-card { position: relative; background: #f8f6f2; border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px; overflow: hidden; }
.d-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--acc); }
.d-card .d-eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }
.d-card h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; font-size: clamp(1.3rem, 1.9vw, 1.8rem); margin: 12px 0 10px; }
.d-card p { color: var(--ink-2); font-size: .98rem; }
.d-logo { display: inline-block; background: var(--paper); border-radius: 10px; padding: 9px 13px; margin-bottom: 16px; }
.d-logo img { display: block; height: 30px; width: auto; }
.d-list { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.d-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-2); font-size: .96rem; }
.d-list li::before { content: "✓"; flex: none; color: var(--acc); font-weight: 700; }
.d-link { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--acc); font-weight: 700; transition: gap .3s var(--ease); }
.d-link:hover { gap: 14px; }

.d-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.d-chips a, .d-chips span { border: 1px solid var(--line); border-radius: 100px; padding: 9px 16px; font-size: .92rem; color: var(--ink); background: #f8f6f2; transition: border-color .3s, color .3s; }
.d-chips a:hover { border-color: var(--acc); color: var(--acc); }

.d-cta { margin: clamp(48px, 8vh, 100px) 0 clamp(30px, 5vh, 60px); padding: clamp(38px, 5vw, 68px); border-radius: 26px; background: var(--acc); color: #fff; position: relative; overflow: hidden; }
.d-cta::after { content: ""; position: absolute; right: -8%; top: -50%; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%); }
.d-cta > * { position: relative; z-index: 1; }
.d-cta h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; line-height: 1; font-size: clamp(1.9rem, 5vw, 4rem); color: #fff; max-width: 16ch; }
.d-cta p { color: rgba(255,255,255,.82); margin-top: 14px; max-width: 48ch; }
.d-mail { display: inline-block; margin-top: 28px; font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 3vw, 2.3rem); color: #fff; border-bottom: 2px solid rgba(255,255,255,.45); }
.d-mail:hover { border-color: #fff; }
.d-cta .d-sub { margin-top: 20px; font-family: var(--mono); font-size: .82rem; letter-spacing: .06em; }
.d-cta .d-sub a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .d-hero { padding-top: 30px; }
}
