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

/* ── Custom cursor dot ── */
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  margin-left: -5px; margin-top: -5px;
  background: #1b1b1b;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

:root {
  --bg:     #cfcfcf;
  --fg:     #1b1b1b;
  --muted:  #5f5f5f;
  --dim:    #bebebe;
  --border: #a8a8a8;
  --accent: #0b63ce;
  --font:   'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }

/* ── Loader ── */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  padding: 48px;
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.loader.out {
  opacity: 0;
  transform: translateY(-10px);
}

.loader-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.loader-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: lowercase;
}

.loader-track {
  width: 100%;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: var(--fg);
  transition: width 0.7s var(--ease);
}


/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 64px 40px 26px;
  transition: transform 0.4s var(--ease), opacity 0.4s;
}

/* vertical stacked menu, top-left */
.nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.nav-link {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 3px 9px;
  line-height: 1.28;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

/* arrow hidden until hover, then slides in */
.nav-arrow {
  display: inline-block;
  width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.18s var(--ease), opacity 0.18s var(--ease);
}

/* active item: inverted bar + arrow */
.nav-link:hover {
  background: var(--fg);
  color: var(--bg);
}

.nav-link:hover .nav-arrow {
  width: 1.2em;
  opacity: 1;
}

/* pinned to the very top edge, independent of the nav's top padding
   (which sits the vertical menu lower down the page) */
.nav-socials {
  position: absolute;
  top: 18px;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-handle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-right: 2px;
}

.nav-handle-arrow {
  color: var(--fg);
  font-weight: 700;
}

.nav-social {
  color: var(--muted);
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}

.nav-social:hover { color: var(--fg); opacity: 1; }

/* ── GV Particle canvas ── */
.gv-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.gv-bg.visible { opacity: 1; }

/* z-index stack: video(0) → particles(1) → content(2) */
.hero > *:not(.gv-bg):not(.hero-video-bg):not(.hero-contact-abs):not(.hero-scroll-hint) { position: relative; z-index: 2; }

/* ── Hero ── */
.hero {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 44px;
  position: relative;
  overflow: hidden;
}

/* ── Hero background video ── */
.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

.hero-eyebrow {
  position: absolute;
  top: 120px;
  left: 44px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ── Hero role badge — 3D flip sign ── */
/* one-off hint shown just after load, then fades (stays in flow so the name
   never shifts — the 3D canvas is positioned from .hero-bottom) */
.hero-hint {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
  pointer-events: none;
}

.hero-hint.show { opacity: 1; }

/* no hold-to-interact on phones → never show the hint there */
@media (max-width: 600px) { .hero-hint { display: none; } }

.hero-role-badge {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.role-text {
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--fg);
  display: inline-block;
}

/* ── Hero bottom block (nome only, centered) ── */
.hero-bottom {
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Button + scroll hint pinned at bottom of hero */
.hero .hero-contact-abs {
  position: absolute !important;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  white-space: nowrap;
  width: auto;
}

.hero-scroll-hint {
  position: absolute !important;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.hero-scroll-hint span {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: lowercase;
  white-space: nowrap;
  animation: scrollHintFade 2.5s ease-in-out infinite;
}

.hero-scroll-hint::after {
  content: '';
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollHintFade 2.5s ease-in-out infinite;
}

@keyframes scrollHintFade {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}


/* ── Hero CTA button (magnet + slide fill, replica of reference) ── */
.btn-anim {
  --slow: cubic-bezier(.65, .05, .2, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 30px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(242, 237, 232, 0.7);
  color: var(--fg);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.4s var(--ease), color 0.4s var(--ease);
  will-change: transform;
}

/* text turns white once the blue fill covers the button */
.btn-anim:hover { color: #ffffff; }

/* accent fill that slides up from the bottom on hover */
.btn-anim::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.55s var(--slow);
  z-index: 1;
}
.btn-anim:hover::before { transform: translateY(0); }

.btn-anim__inner {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

/* rolling text (two stacked copies) */
.btn-anim__text {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.2;
}
.btn-anim__text > span {
  display: block;
  transition: transform 0.55s var(--slow);
}
.btn-anim__text > span:nth-child(2) {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(110%);
}
.btn-anim:hover .btn-anim__text > span:nth-child(1) { transform: translateY(-110%); }
.btn-anim:hover .btn-anim__text > span:nth-child(2) { transform: translateY(0); }

/* arrow in a circle, swaps on hover */
.btn-anim__arrow {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(242, 237, 232, 0.7);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.btn-anim:hover .btn-anim__arrow { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn-anim__arrow svg {
  position: absolute;
  width: 12px;
  height: 12px;
  transition: transform 0.55s var(--slow);
}
/* the arrow points down, so the swap slides vertically to match */
.btn-anim__arrow svg:nth-child(1) { transform: translate(0, 0); }
.btn-anim__arrow svg:nth-child(2) { transform: translate(0, -180%); }
.btn-anim:hover .btn-anim__arrow svg:nth-child(1) { transform: translate(0, 180%); }
.btn-anim:hover .btn-anim__arrow svg:nth-child(2) { transform: translate(0, 0); }

/* ── 3D wireframe text ── */
#hero-text3d {
  display: block;
  width: 100%;
  pointer-events: none;
}

.hero-name-img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0;
  user-select: none;
  opacity: 0;
  animation: fadeIn 0.9s var(--ease) 1.4s forwards;
}

.hero-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  margin-bottom: 24px;
}

.hero-sep { color: var(--dim); }

.hero-avail { color: var(--accent); }

.hero-cta {
  font-size: 12px;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  padding: 10px 18px;
  width: fit-content;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s;
}

.hero-cta:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Brand ticker ── */
.brands {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: relative;
  overflow: hidden;
  margin-top: 80px;
}

.brands-label {
  position: absolute;
  top: 50%;
  left: 44px;
  transform: translateY(-50%);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
  pointer-events: none;
}

/* fade edges */
.brands::before,
.brands::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 160px;
  z-index: 1;
  pointer-events: none;
}
.brands::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 60%, transparent);
}
.brands::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 30%, transparent);
}

.brands-viewport {
  overflow: hidden;
  padding: 28px 0;
}

.brands-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}

.brands-track:hover { animation-play-state: paused; }

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.brands-set {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 40px;
  height: 40px;
}

.brand img {
  width: 100px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0);
  opacity: 0.6;
  transition: opacity 0.3s;
}

.brand img[src*="fc-inter"] { width: 128px; height: 36px; }

.brand img[src*="vasco-rossi"] { width: 142px; height: 40px; }

.brand img[src*="nissan"] { width: 116px; height: 32px; }

.brand img[src*="larq"] { width: 72px; height: 20px; }

.brand:hover img { opacity: 1; }

/* show text name when logo not loaded / missing */
.brand span {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s;
}

/* hide text span when img loads successfully */
.brand img.loaded + span,
.brand:has(img.loaded) span { display: none; }

.brand:hover span { color: var(--fg); }

.brand-sep {
  font-size: 12px;
  color: var(--dim);
  flex-shrink: 0;
  user-select: none;
}

/* ── Section ── */
.section {
  padding: 80px 44px;
  border-bottom: 1px solid var(--border);
}

/* projects sit closer to the clients ticker, and no separator line after the
   last project row */
#prj {
  padding-top: 34px;
  border-bottom: none;
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 44px;
}

.sec-tag {
  font-size: 18px;
  color: var(--fg);
  letter-spacing: 0.06em;
  white-space: nowrap;
  font-weight: 700;
  text-transform: uppercase;
}

.sec-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sec-meta {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
  font-weight: 600;
  text-transform: uppercase;
}

/* ── Projects ── */
.proj-list { display: flex; flex-direction: column; }

.proj-row {
  display: grid;
  grid-template-columns: 28px 44px 1fr auto 32px;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: padding-left 0.35s var(--ease);
}

.proj-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s;
}

.proj-row:hover { padding-left: 10px; }
.proj-row:hover::before { opacity: 0.035; }
.proj-row:hover .proj-year { color: var(--accent); }
.proj-row:hover .proj-arr { color: var(--accent); transform: rotate(45deg); }

.proj-idx {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.05em;
}

.proj-year {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
  font-variant-numeric: tabular-nums;
}

.proj-body {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.proj-client {
  font-size: clamp(16px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  text-transform: uppercase;
}

.proj-name {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.proj-tags {
  display: flex;
  gap: 6px;
}

.proj-tags span {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 7px;
  white-space: nowrap;
}

.proj-arr {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s, transform 0.3s var(--ease);
}

/* ── Exhibitions ── */
.exh-list { display: flex; flex-direction: column; }

.exh-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  transition: padding-left 0.35s var(--ease);
}

.exh-row:hover { padding-left: 10px; }
.exh-row:hover .exh-year { color: var(--accent); }

.exh-year {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.exh-venue {
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.exh-city {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* ── About ── */
.who-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;   /* bio wide, tools narrow */
  gap: 72px;
}

.who-text {
  display: grid;
  grid-template-columns: auto 1fr;   /* photo left, paragraphs right */
  column-gap: 36px;
  row-gap: 18px;
  align-items: start;
}

.who-photo {
  grid-column: 1;
  grid-row: 1 / span 3;              /* spans all three paragraphs */
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%);
}

.who-text p { grid-column: 2; }

.who-text p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--muted);
}

.who-side {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.tools-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.tools-list {
  display: flex;
  flex-wrap: wrap;   /* larger chips simply wrap onto a second row */
  gap: 10px;
}

.tools-list span {
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 14px;
  transition: color 0.2s, border-color 0.2s;
}

.tools-list span:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* ── Work-in-progress notice ── */
.wip {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}

.wip.open { opacity: 1; visibility: visible; }

.wip-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.wip-panel {
  position: relative;
  max-width: 440px;
  width: 100%;
  padding: 34px 34px 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.45s var(--ease);
}

.wip.open .wip-panel { transform: translateY(0) scale(1); }

/* ── wireframe "under construction" animation ── */
.wip-art {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 2px auto 20px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--dim);
}

/* faint blueprint grid behind the cube */
.wip-grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(to right,  var(--border) 0 1px, transparent 1px 15px),
    repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px 15px);
}

.wip-art svg {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

/* every edge draws itself in, one after the other, then the cube resets */
.wip-art line {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 62;
  stroke-dashoffset: 62;
  animation: wipDraw 5s var(--ease) infinite;
}

.wip-art line:nth-of-type(1) { animation-delay: 0s;    }
.wip-art line:nth-of-type(2) { animation-delay: 0.13s; }
.wip-art line:nth-of-type(3) { animation-delay: 0.26s; }
.wip-art line:nth-of-type(4) { animation-delay: 0.39s; }
.wip-art line:nth-of-type(5) { animation-delay: 0.52s; }
.wip-art line:nth-of-type(6) { animation-delay: 0.65s; }
.wip-art line:nth-of-type(7) { animation-delay: 0.82s; }
.wip-art line:nth-of-type(8) { animation-delay: 0.95s; }
.wip-art line:nth-of-type(9) { animation-delay: 1.08s; }

@keyframes wipDraw {
  0%          { stroke-dashoffset: 62; opacity: 0; }
  8%          { opacity: 1; }
  30%, 74%    { stroke-dashoffset: 0;  opacity: 1; }
  92%         { stroke-dashoffset: 0;  opacity: 0; }
  100%        { stroke-dashoffset: 62; opacity: 0; }
}

/* scanning line sweeping over the drawing */
.wip-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 34px;
  top: -34px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.16), transparent);
  animation: wipScan 3.4s linear infinite;
}

@keyframes wipScan {
  0%   { transform: translateY(0); }
  100% { transform: translateY(184px); }
}

/* respect users who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  .wip-art line { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .wip-scan { display: none; }
}

.wip-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 50%;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}

.wip-close:hover { color: var(--fg); border-color: var(--border); }

.wip-tag {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 14px;
}

.wip-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 14px;
}

.wip-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

/* ── Contact ── */
/* big back-to-top arrow, parked on the right of the contact section */
#msg { position: relative; }

.msg-top {
  position: absolute;
  right: 14%;
  top: 50%;
  transform: translateY(-50%);
  width: 124px;
  height: 124px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--fg);
  transition: transform 0.35s var(--ease), border-color 0.25s, color 0.25s,
              background 0.25s;
}

.msg-top svg { width: 58px; height: 58px; }

.msg-top:hover {
  transform: translateY(calc(-50% - 6px));
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.msg-wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.msg-headline {
  font-size: clamp(36px, 6.5vw, 80px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.msg-email {
  font-size: clamp(15px, 2.2vw, 26px);
  font-weight: 300;
  color: var(--accent);
  letter-spacing: -0.01em;
  width: fit-content;
  transition: opacity 0.2s;
}

.msg-email:hover { opacity: 0.65; }

.msg-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 36px;
}

.msg-socials a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.msg-socials a svg { flex-shrink: 0; }

.msg-socials a:hover { color: var(--fg); }

/* ── Project hover preview ── */
.proj-preview {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  width: 440px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  opacity: 0;
  transform: translate(0, 0) scale(0);
  transform-origin: center center;
  transition: opacity 0.18s var(--ease);
  border: 1px solid var(--border);
  background: var(--dim);
  top: 0; left: 0;
  will-change: transform, opacity;
}

.proj-preview.visible {
  opacity: 1;
}

.proj-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.proj-preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.proj-preview-img[src]:not([src=""]) ~ .proj-preview-placeholder { display: none; }

/* ── Project lightbox ── */
.proj-lightbox {
  position: fixed;
  inset: 0;
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.proj-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.proj-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 11, 9, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.proj-lb-inner {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  transform: translateY(20px);
  transition: transform 0.4s var(--ease);
}

.proj-lightbox.open .proj-lb-inner {
  transform: translateY(0);
}

.proj-lb-left {
  flex: 0 0 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 32px 60px 60px;
}

.proj-lb-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.proj-lb-player video,
.proj-lb-player iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
}

.proj-lb-right {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 60px 60px 48px;
  gap: 24px;
  border-left: 1px solid var(--border);
  position: relative;
}

.proj-lb-close {
  position: absolute;
  top: 32px;
  right: 44px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.04em;
}

.proj-lb-close:hover { color: var(--fg); border-color: var(--fg); }

.proj-lb-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.proj-lb-client {
  font-size: clamp(28px, 3.5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.proj-lb-name {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.proj-lb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proj-lb-tags span {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 8px;
}

/* lightbox mobile */
@media (max-width: 768px) {
  .proj-lb-inner { flex-direction: column; }
  .proj-lb-left  { flex: none; padding: 32px 20px 16px; }
  .proj-lb-right { flex: 1; border-left: none; border-top: 1px solid var(--border); padding: 24px 20px; gap: 16px; }
  .proj-lb-close { top: 16px; right: 20px; }
}

/* ── Footer ── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 44px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Gyroscope permission button (iOS) ── */
.gyro-btn {
  margin-top: 16px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  display: block;
}

.gyro-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .proj-row { grid-template-columns: 28px 44px 1fr 28px; }
  .proj-tags { display: none; }
  .who-grid { grid-template-columns: 1fr; gap: 52px; }
  .brands-label { display: none; }
}

@media (max-width: 600px) {
  body { cursor: auto; }
  .cursor-dot { display: none; }
  /* vertical menu top-left, social icons top-right */
  .nav { padding: 18px 20px; }
  .nav-link { font-size: 12px; padding: 2px 7px; }
  .nav-socials { top: 14px; right: 20px; gap: 12px; }
  .nav-social svg { width: 16px; height: 16px; }
  /* ── clients ticker ── */
  .brands { margin-top: 52px; }
  .brands-viewport { padding: 16px 0; }
  .brand { padding: 0 14px; height: 34px; }
  .brand-sep { display: none; }

  /* logos scaled down so three or four fit across a phone */
  .brand img                     { width: 76px;  height: 22px; }
  .brand img[src*="fc-inter"]    { width: 96px;  height: 28px; }
  .brand img[src*="vasco-rossi"] { width: 106px; height: 30px; }
  .brand img[src*="nissan"]      { width: 88px;  height: 24px; }
  .brand img[src*="larq"]        { width: 56px;  height: 16px; }

  /* side fade: soft but narrow enough to leave a clear centre — at 44% per
     side the two gradients met and covered every logo */
  .brands::before, .brands::after { width: 25%; }
  .brands::before { background: linear-gradient(to right, var(--bg) 8%, transparent); }
  .brands::after  { background: linear-gradient(to left,  var(--bg) 8%, transparent); }

  /* a tap leaves :hover stuck on touch devices, which froze the ticker */
  .brands-track:hover { animation-play-state: running; }
  .brands-track { animation-duration: 38s; }
  .hero { padding: 0 20px 52px; }
  .hero-eyebrow { left: 20px; top: 100px; }
  .section { padding: 60px 20px; }
  .stat { padding: 24px 20px; }
  .footer { padding: 16px 20px; flex-direction: column; gap: 6px; text-align: center; }
  .proj-row { grid-template-columns: 1fr 28px; gap: 12px; }
  .proj-idx, .proj-year { display: none; }

  /* no cursor-following preview on touch — a tap opens the video directly */
  .proj-preview { display: none !important; }

  /* scroll-driven preview panel: animating grid-template-rows lets the panel
     slide open/closed without hard-coding a height */
  .proj-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    margin-bottom: 0;
    transition: grid-template-rows 0.5s var(--ease), opacity 0.35s var(--ease),
                margin-bottom 0.5s var(--ease);
  }

  /* padding here would survive the 0fr collapse, so spacing lives on the
     margin above instead — a closed panel must take exactly 0px */
  .proj-panel > div {
    overflow: hidden;
    min-height: 0;
  }

  .proj-panel.open {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-bottom: 14px;
  }

  .proj-panel-media {
    aspect-ratio: 2.6 / 1;        /* central band of a 16:9 still — stays slim */
    background: var(--dim);
    border: 1px solid var(--border);
    overflow: hidden;
  }

  .proj-panel-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;            /* crops the 16:9 top/bottom, keeps the middle */
    object-position: center;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
  }

  .proj-panel-media img.loaded { opacity: 1; }
  .exh-row { grid-template-columns: 52px 1fr; }
  .exh-city { display: none; }
  /* back-to-top arrow: in normal flow below the socials, pushed right, so it
     can never sit on top of them */
  .msg-top {
    position: static;
    transform: none;
    margin: 26px 0 0 auto;
    width: 68px;
    height: 68px;
  }
  .msg-top svg { width: 32px; height: 32px; }
  .msg-top:hover { transform: translateY(-6px); }

  /* about: stack photo above the bio on small screens */
  .who-text { grid-template-columns: 1fr; }
  .who-photo { grid-row: auto; grid-column: 1; width: 150px; height: 150px; }
  .who-text p { grid-column: 1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero-bar { flex-wrap: wrap; gap: 8px; }
}
