/* ==========================================================
   JM — Graphic Designer Portfolio
   Classic poster palette: orange on warm blackish.
   ========================================================== */

:root {
  --bg: #141210;            /* warm blackish (not pure black) */
  --bg-2: #1c1a17;          /* slightly lighter surface: cards, image backgrounds */
  --bg-3: #24211d;          /* lightest surface: card tops, focused fields */
  --fg: #f2ede4;            /* body text: warm off-white, like poster paper */
  --accent: #ff6a1a;        /* poster orange: name, current page, buttons, highlights */
  --accent-rgb: 255, 106, 26;
  --muted: #8f8a82;
  --dim: #3a3a3a;
  --line: rgba(242, 237, 228, 0.14);
  /* ONE font family for the whole site: Switzer (Fontshare) */
  --display: "Switzer", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "Switzer", system-ui, -apple-system, Segoe UI, sans-serif;
  --sans: "Switzer", system-ui, -apple-system, Segoe UI, sans-serif;
  --ui: "Switzer", "Inter", system-ui, sans-serif;   /* clickable text: Switzer Medium (Fontshare) */

  /* TYPE SCALE — the only text sizes used on the site */
  --fs-display: clamp(48px, 7.6vw, 136px);  /* hero title: CREATIVE DESIGNER */
  --fs-h1: clamp(44px, 6vw, 96px);          /* page & section titles: About Mark, Services, Contact, big numbers */
  --fs-h2: clamp(30px, 3.6vw, 52px);        /* call-to-action: Let's work together */
  --fs-h3: clamp(22px, 2.2vw, 30px);        /* sub-titles: service names, intro line, slogan */
  --fs-body: 16px;                          /* paragraphs, form fields */
  --fs-ui: 14px;                            /* menu, filters, links, buttons, form labels */
  --fs-micro: 12px;                         /* small labels, numbers 01–04, copyright */
  --pad: clamp(16px, 3vw, 40px);
  --max: 1440px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Static / film-grain overlay ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.9 -0.6'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .2;            /* how visible the static is (.12 faint – .3 strong) */
  animation: static .4s steps(5) infinite;
}
@keyframes static {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-7%, 4%); }
  40%  { transform: translate(5%, -6%); }
  60%  { transform: translate(-4%, -3%); }
  80%  { transform: translate(6%, 5%); }
  100% { transform: translate(0, 0); }
}

.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--accent); color: var(--bg); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ---------- Type helpers ---------- */
.label {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.mega, .big, .statement__line, .contact__title, .stat__num, .card__title, .service__name, .empty__title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .9; letter-spacing: -0.005em;
}
.big { font-size: clamp(48px, 8vw, 120px); }

/* ---------- Button (white box + black icon square) ---------- */
.btn {
  display: inline-flex; align-items: stretch;
  background: var(--accent); color: var(--bg);
  font-family: var(--display); font-size: 18px; text-transform: uppercase; letter-spacing: .01em;
  transition: background .3s, color .3s;
}
.btn__icon {
  display: grid; place-items: center; width: 46px;
  background: var(--bg); color: var(--accent); margin: 4px;
  font-family: var(--sans); font-size: 18px;
  transition: color .3s;
}
.btn__label { display: flex; align-items: center; padding: 12px 20px 12px 10px; }
.btn:hover { background: var(--fg); }          /* hover = brighten (same idea as the filters) */
.btn:hover .btn__icon { color: var(--fg); }
.btn--sm { font-size: 19px; }
.btn--sm .btn__icon { width: 42px; margin: 4px; font-size: 18px; }
.btn--sm .btn__label { padding: 10px 18px 10px 10px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  padding: 20px var(--pad);
  transition: background .35s, padding .35s;
}
.nav.is-scrolled { background: rgba(20, 18, 16, .9); backdrop-filter: blur(12px); padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
/* Name: one simple line in the same font as the category filters; on hover it brightens to white
   and a small yellow dot pops in underneath (same as a selected category) */
.logo {
  position: relative; display: flex; flex-direction: row; gap: .28em; padding: 4px 0;
  color: var(--accent); font-family: var(--sans); font-weight: 500; font-size: 16px; line-height: 1.2;
  letter-spacing: -0.01em; white-space: nowrap; transition: color .3s;
}
.logo:hover { color: var(--fg); }
/* Menu links: same look + hover as the category filters (dimmed text, brightens on hover,
   current page = yellow with a small dot underneath) */
.nav__links { display: flex; align-items: center; gap: 4px 32px; margin-left: auto; font-family: var(--sans); font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }

/* Hover animation on menu text: each letter rolls up and a copy rolls in from below (built by script.js) */
.roll { display: inline-flex; overflow: hidden; vertical-align: top; line-height: inherit; }
.roll__ch { display: inline-block; position: relative; white-space: pre; transition: transform .5s cubic-bezier(.76, 0, .24, 1); }
.roll__ch::after { content: attr(data-ch); position: absolute; left: 0; top: 100%; }
a:hover .roll__ch, a:focus-visible .roll__ch { transform: translateY(-100%); }
.logo .roll { padding-bottom: .02em; }
.nav__links a { position: relative; padding: 4px 0; color: rgba(242,237,228,.5); transition: color .3s; }
.nav__links a:hover { color: var(--fg); }
.nav__links:hover a:not(:hover):not([aria-current="page"]) { color: rgba(242,237,228,.3); }
.nav__links a[aria-current="page"], .nav__links a.is-current { color: var(--accent); }

/* ==========================================================
   ONE HOVER STYLE FOR EVERY CLICKABLE TEXT (same as the category filters):
   dimmed → turns white on hover, and the others in the same group fade back.
   Current / selected items stay yellow.
   ========================================================== */
.footer__nav a, .footer__social a, .contact-info__social a, .lightbox__close {
  color: rgba(242,237,228,.5); transition: color .3s;
}
.footer__nav a:hover, .footer__social a:hover, .contact-info__social a:hover, .lightbox__close:hover { color: var(--fg); }
.footer__nav:hover a:not(:hover), .footer__social:hover a:not(:hover), .contact-info__social:hover a:not(:hover) { color: rgba(242,237,228,.3); }

/* ONE FONT FOR EVERY CLICKABLE TEXT: Switzer Medium, small capitals-style (like niccolocampanini.it)
   (name, menu, filters, footer, social links, email, chips, buttons, "See work", Close) */
body :is(.logo, .nav__links a, .filter, .filters__label, .footer__nav a, .footer__social a, .contact-info__social a,
.lightbox__close, .chip span, .service__link, .btn .btn__label, .btn.btn--light .btn__label, .contact-info__email) {
  font-family: var(--ui); font-stretch: normal; font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: -0.01em;
}
body .btn .btn__icon { font-size: 16px; }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto;
  padding: 96px var(--pad) 32px;
  background: radial-gradient(ellipse 55% 65% at 50% 42%, #333 0%, #222 55%, var(--bg) 100%);
}
.hero__portrait {
  position: absolute; z-index: -1; left: 50%; bottom: 0; transform: translateX(-50%);
  height: 90%; width: auto; max-width: none; object-fit: contain; object-position: bottom;
  filter: grayscale(1) contrast(1.05);
  -webkit-mask-image: linear-gradient(#000 70%, transparent 100%); mask-image: linear-gradient(#000 70%, transparent 100%);
  animation: portraitIn 1.4s var(--ease) both;
}
@keyframes portraitIn { from { opacity: 0; transform: translate(-50%, 40px); } }

.hero__top, .hero__name, .hero__bottom { position: relative; z-index: 1; }
.hero__top { display: flex; justify-content: space-between; gap: 16px; }
.hero__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #d6d0c6;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }

.hero__name {
  grid-row: 3; text-align: center; white-space: nowrap;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(56px, 10.6vw, 230px); line-height: .82; letter-spacing: -0.005em;
  mix-blend-mode: difference; color: #fff;
  animation: nameIn 1.2s .15s var(--ease) both;
}
@keyframes nameIn { from { opacity: 0; transform: translateY(40px); } }

.hero__bottom {
  grid-row: 4; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line);
}
.hero__intro { max-width: 460px; font-size: 16px; color: #d6d0c6; }
.hero__intro strong { color: var(--fg); font-weight: 600; }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn--ghost .btn__label { padding: 12px 22px; }
.btn--ghost:hover { color: var(--fg); border-color: var(--fg); }

/* ---------- Statement ---------- */
/* ---------- About (statement + intro) ---------- */
.about {
  max-width: var(--max); margin: 0 auto; padding: clamp(100px, 13vw, 190px) var(--pad);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 30px;
}
.statement { font-weight: 400; }
.statement__line {
  display: block; font-size: clamp(52px, 9.5vw, 160px);
  color: var(--dim); transition: color .6s var(--ease);
}
.statement__line.is-lit { color: var(--fg); }
.about__text {
  max-width: 680px; margin-top: 10px;
  font-size: clamp(17px, 1.6vw, 21px); line-height: 1.6; color: #d6d0c6;
}
.about__text mark {
  background: var(--accent); color: var(--bg); padding: 0 .25em; font-weight: 600;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- Work ---------- */
.work { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 10vw, 150px) var(--pad) 0; }
.work__head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.work__title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(48px, 7vw, 110px); line-height: .9;
}
.work__intro { max-width: 420px; color: var(--muted); font-size: 15px; }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 32px 0 44px; }
.filter {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
  padding: 10px 16px; border: 1px solid var(--line); color: var(--muted);
  transition: background .25s, color .25s, border-color .25s;
}
.filter:hover { color: var(--accent); border-color: var(--accent); }
.filter.is-active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.filter__count { opacity: .55; margin-left: 4px; }

/* Big full-width featured images, title centered over the bottom */
/* One-image slider: slides stacked, only the active one is visible */
.grid {
  position: relative; overflow: hidden; background: var(--bg-2);
  width: 100vw; margin-left: calc(50% - 50vw);
  height: min(88svh, 52vw); min-height: 420px;
}
.card {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 1s var(--ease), visibility 0s 1s;
}
.card.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1s var(--ease), visibility 0s; }
.card[hidden] { display: none; }
.card__media {
  display: block; width: 100%; height: 100%;
  overflow: hidden; background: var(--bg-2); cursor: zoom-in; position: relative;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1); transform-origin: 50% 50%;
  transition: transform 1s var(--ease);
  will-change: transform;
}
/* Hover: image zooms in toward the cursor (origin follows the mouse, set in script.js) */

/* Round "View" cursor that follows the mouse over project images */
.view-cursor {
  position: fixed; z-index: 60; left: 0; top: 0;
  width: 92px; height: 92px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: #111;
  font-family: var(--mono); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  pointer-events: none; transform: translate(-50%, -50%) scale(0);
  transition: transform .4s var(--ease);
}
.view-cursor.is-visible { transform: translate(-50%, -50%) scale(1); }
@media (hover: none) { .view-cursor { display: none; } }

/* Transparent arrows */
.slider__arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: clamp(48px, 5vw, 68px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.45);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.slider__arrow--prev { left: var(--pad); }
.slider__arrow--next { right: var(--pad); }
.slider__arrow:hover { background: rgba(255,255,255,.16); border-color: #fff; }
.slider__arrow--prev:hover { transform: translate(-3px, -50%); }
.slider__arrow--next:hover { transform: translate(3px, -50%); }
.slider__count {
  position: absolute; z-index: 3; left: var(--pad); bottom: 22px;
  font-family: var(--mono); font-size: 13px; color: rgba(255,255,255,.85); letter-spacing: .06em;
}
.slider__current { color: var(--accent); font-weight: 700; }
.slider__progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.15); }
.slider__progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.slider__progress span.is-running { animation: progress var(--slide-time, 5s) linear forwards; }
.slider.is-paused .slider__progress span { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }
.slider.is-single .slider__arrow, .slider.is-single .slider__count, .slider.is-single .slider__progress { display: none; }
.card__media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(transparent 50%, rgba(0,0,0,.65) 100%);
}
.card__info {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(24px, 4vw, 56px);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  pointer-events: none; padding: 0 var(--pad);
}
.card__title { font-size: clamp(56px, 9vw, 150px); line-height: .85; color: #fff; }
.card__cats { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: rgba(255,255,255,.75); letter-spacing: .06em; }
.card__cats a { color: var(--fg); text-decoration: underline; pointer-events: auto; }
.card__media--empty {
  display: grid; place-items: center; text-align: center; cursor: default;
  border-block: 1px dashed var(--line); background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(242,237,228,.03) 14px 15px);
}
.card__media--empty::before, .card__media--empty::after { display: none; }
.empty__title { font-size: clamp(40px, 6vw, 100px); }

/* ---------- Section head ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 40px;
}

/* ---------- Services ---------- */
.services { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(100px, 12vw, 160px); }
.services__grid { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
.service {
  display: flex; flex-direction: column; gap: 16px; min-height: 300px;
  padding: 28px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: opacity .3s;
}
.service__num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.service__name { font-size: clamp(28px, 2.6vw, 40px); margin-top: auto; }
.service p { color: var(--muted); font-size: 15px; }
.service__link {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  border-top: 1px solid var(--line); padding-top: 14px; color: rgba(242,237,228,.5); transition: color .3s;
}
/* hover: same as the filters — the card you point at stays bright, the others fade back */
.service:hover .service__link { color: var(--fg); }
.services__grid:hover .service:not(:hover) { opacity: .35; }

/* ---------- Why me ---------- */
.why { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(100px, 12vw, 160px); }
.why__text { max-width: 380px; color: var(--muted); font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.stat { display: flex; flex-direction: column; gap: 10px; }
.stat__num { font-size: clamp(80px, 11vw, 170px); line-height: .85; }
.stat .label { color: var(--accent); }
.stat p { color: var(--muted); font-size: 14px; }

/* ==========================================================
   MULTI-PAGE: shared page header + Work / About / Contact pages
   ========================================================== */
.work__more { display: flex; justify-content: center; padding: clamp(40px, 5vw, 64px) 0 clamp(90px, 11vw, 150px); }

.page-head {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(130px, 15vw, 200px) var(--pad) clamp(40px, 5vw, 70px);
  display: flex; flex-direction: column; gap: 18px;
}
.page-title {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(96px, 19vw, 320px); line-height: .8; letter-spacing: -0.01em;
  color: var(--accent);
}
.page-title__count { font-family: var(--mono); font-size: .12em; vertical-align: top; margin-left: .2em; color: var(--muted); }
.page-intro { max-width: 520px; color: var(--muted); font-size: clamp(16px, 1.4vw, 18px); }

/* About: "Creative Designer" centered, disciplines in one row under it */
.page-head--about {
  min-height: 100svh; align-items: center; justify-content: center; text-align: center;
  padding-top: 110px; padding-bottom: 60px; gap: 26px;
}
.page-title--center { font-size: clamp(72px, 12.2vw, 220px); line-height: .84; }
/* CREATIVE + DESIGNER: side by side when they fit, stacked (centered, with space) when they don't */
.page-title--center {
  display: flex; flex-wrap: wrap; justify-content: center;
  column-gap: .35em;   /* gap between the words when side by side */
  row-gap: .1em;       /* gap between the lines when stacked */
}
.page-title--center span { display: block; }
.page-slogan { font-size: clamp(18px, 1.8vw, 26px); color: #d6d0c6; letter-spacing: -0.01em; }

/* Stats as a compact row inside the bio */
.stats.stats--inline {
  width: 100%; margin: 8px 0 6px; padding-top: 22px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.stats--inline .stat { gap: 6px; }
.stats--inline .stat__num { font-size: clamp(40px, 4.2vw, 64px); }
.stats--inline .label { color: var(--muted); }

.scatter {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 0;
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #d6d0c6;
}
.scatter li + li::before { content: "·"; margin: 0 12px; color: var(--muted); }
.about--page { padding-top: clamp(40px, 6vw, 90px); padding-bottom: clamp(60px, 8vw, 120px); }

.bio {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(90px, 11vw, 160px);
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 100px); align-items: center;
}
.bio__photo { aspect-ratio: 4 / 5; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #333, var(--bg-2)); }
.bio__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.05); }
.bio__text { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; color: #d6d0c6; font-size: 17px; }
.bio__lead { font-family: var(--display); text-transform: uppercase; color: var(--accent); font-size: clamp(30px, 3.2vw, 50px); line-height: 1.05; }
.bio__lead mark { background: var(--accent); color: var(--bg); padding: 0 .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.bio__text strong { color: var(--fg); }
.bio__text .btn { margin-top: 10px; }

.drift { overflow: hidden; padding: 0 0 clamp(90px, 11vw, 160px); display: flex; flex-direction: column; gap: .1em; }
.drift__row {
  font-family: var(--display); text-transform: uppercase; white-space: nowrap;
  font-size: clamp(64px, 11vw, 190px); line-height: .95; will-change: transform;
}
.drift__row:nth-child(2) { padding-left: 20vw; }
.drift__row span { font-family: var(--sans); font-size: .4em; vertical-align: middle; margin: 0 .3em; }
.drift__row--outline { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }

/* Work page: project grid */
.projects { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(90px, 11vw, 160px); }
.projects .filters { justify-content: flex-start; margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px); }
.tile[hidden] { display: none; }
.tile__media { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-2); position: relative; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile__info {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px;
  padding-top: 16px; border-top: 1px solid var(--line); margin-top: 16px;
}
.tile__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 3vw, 46px); line-height: .95; }
.tile__year { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tile__cats { grid-column: 1 / -1; font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.empty {
  min-height: 46vh; border: 1px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 40px 20px;
}
.empty[hidden] { display: none; }
.empty__text { color: var(--muted); }
.empty__text a { color: var(--accent); text-decoration: underline; }

/* Contact page */
.contact-page {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(90px, 11vw, 160px);
  display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(40px, 7vw, 120px); align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 32px; border-top: 1px solid var(--line); padding-top: 28px; }
.contact-info .label { margin-bottom: 8px; }
.contact-info__email { font-family: var(--display); text-transform: uppercase; font-size: clamp(20px, 2vw, 30px); overflow-wrap: anywhere; color: var(--accent); transition: color .3s; }
.contact-info__email:hover { color: var(--fg); }   /* yellow → white, like the name in the menu */
.contact-info__line { display: flex; align-items: center; gap: 10px; color: #d6d0c6; }
.contact-info__social { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--mono); font-size: 13px; text-transform: uppercase; }

.form { display: flex; flex-direction: column; gap: 26px; border-top: 1px solid var(--line); padding-top: 28px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 10px; border: 0; }
.field input, .field textarea {
  font: inherit; color: var(--fg); background: transparent;
  border: 0; border-bottom: 1px solid rgba(242,237,228,.3); padding: 10px 0; font-size: 18px;
  transition: border-color .25s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea::placeholder { color: #666; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; cursor: pointer; padding: 10px 16px; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--muted);
  transition: background .3s, color .3s, border-color .3s;
}
.chip span:hover { color: var(--fg); border-color: rgba(242,237,228,.5); }
.chips:hover .chip input:not(:checked) + span:not(:hover) { color: rgba(242,237,228,.3); }
.chip input:checked + span { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.form .btn { align-self: flex-start; }
.form__error { color: #ff8a80; font-size: 14px; }
.form__note { font-size: 13px; color: var(--muted); margin-top: -12px; }

@media (max-width: 760px) {
  .page-title--center { font-size: 19vw; }
  .page-head--about { min-height: 88svh; }
  .scatter { flex-direction: column; align-items: center; gap: 6px; }
  .scatter li + li::before { content: none; }
  .bio { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .contact-page { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}

/* ==========================================================
   WORK SHOWCASE (index.html): full screen, no scrolling
   ========================================================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.page-showcase { overflow: hidden; height: 100svh; }
.page-showcase .nav, .page-showcase .nav.is-scrolled { background: none; border-bottom: 0; backdrop-filter: none; }
.showcase {
  /* frame geometry: side margin, space above (for the menu) and below (for the bar) */
  --fx: clamp(16px, 3.4vw, 56px);
  --ft: clamp(92px, 12vh, 112px);
  --fb: clamp(70px, 10vh, 92px);
  position: fixed; inset: 0; width: 100vw; height: 100svh; margin: 0; overflow: hidden;
  background: var(--bg);
}

/* Each project = a rounded frame; next one slides up from below */
.showcase .card {
  inset: var(--ft) var(--fx) var(--fb);
  border-radius: clamp(14px, 1.6vw, 24px); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  opacity: 1; visibility: hidden;
  transform: translateY(calc(100svh - var(--ft) + 20px));
  transition: transform 1.1s cubic-bezier(.77, 0, .18, 1), visibility 0s 1.1s;
}
.showcase .card.is-above { transform: translateY(calc(-100svh + var(--fb) - 20px)) scale(.94); }
.showcase .card.is-active { transform: none; visibility: visible; transition: transform 1.1s cubic-bezier(.77, 0, .18, 1), visibility 0s; }
.showcase .card__media::before { background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 22%, transparent 50%, rgba(0,0,0,.7) 100%); }

/* Hover: image dims, a thin yellow frame draws in, and the project brief slides in (top-left) */
.showcase .card__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: inherit; background: rgba(0,0,0,0);
  box-shadow: inset 0 0 0 0 var(--accent);
  transition: background .5s var(--ease), box-shadow .5s var(--ease);
}
.showcase .card:hover .card__media::after { background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 2px var(--accent); }
.card__brief {
  position: absolute; z-index: 3; left: clamp(20px, 3vw, 44px); top: clamp(20px, 3vw, 44px);
  width: min(400px, calc(100% - 2 * clamp(20px, 3vw, 44px)));
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 22px; border-left: 2px solid var(--accent);
  background: rgba(0,0,0,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  pointer-events: none; opacity: 0; transform: translateY(-14px);
  transition: opacity .45s var(--ease), transform .6s var(--ease);
}
.card__brief dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 4px; }
.card__brief dd { font-size: 15px; line-height: 1.45; color: var(--fg); }
.card__brief > div { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .5s var(--ease); }
.showcase .card:hover .card__brief { opacity: 1; transform: none; }
.showcase .card:hover .card__brief > div { opacity: 1; transform: none; }
.showcase .card:hover .card__brief > div:nth-child(2) { transition-delay: .07s; }
.showcase .card:hover .card__brief > div:nth-child(3) { transition-delay: .14s; }
.showcase .card:hover .card__view { background: var(--accent); color: #111; border-color: var(--accent); }
@media (hover: none) { .card__brief { display: none; } }

/* Tall images (posters, portrait pieces): whole image shown uncropped, centered over a blurred copy of itself */
.card--tall .card__media { background: var(--bg); }
.card__blur {
  position: absolute; inset: -40px; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
  filter: blur(40px) brightness(.45) saturate(1.2);
  transform: scale(1.1);
}
.card--tall .card__media img { position: relative; z-index: 0; object-fit: contain; }
.card--tall .card__media::before { z-index: 1; } /* keep the dark edge gradient above the poster so the title stays readable */

/* ==========================================================
   WORK GALLERY (front page)
   Mixed wide + tall images; script.js places every tile:
   one big column + two narrow ones, the big column swaps sides each row.
   ========================================================== */
.gallery-page { --gx: clamp(10px, 1.6vw, 24px); padding: clamp(100px, 13vh, 128px) var(--gx) 0; }
.gallery-bar { display: flex; align-items: center; justify-content: center; gap: 12px 32px; padding: 0 2px 18px; }
.gallery-page .gallery-bar .filters { justify-content: safe center; max-width: 100%; }
.gallery-page .filter__count { display: none; }   /* no (5) / (soon) numbers next to the categories */
.gallery-bar__title { flex-shrink: 0; }
.gallery { --gap: 12px; position: relative; min-height: 50vh; transition: height .7s var(--ease); }
.g-item {
  position: absolute; left: 0; top: 0; overflow: hidden; border-radius: 6px; background: var(--bg-2);
  container-type: size;
  opacity: 0; transform: translateY(48px);
  transition: left .7s var(--ease), top .7s var(--ease), width .7s var(--ease), height .7s var(--ease), opacity .8s var(--ease), transform 1s var(--ease);
}
.g-item[hidden] { display: none; }
.gallery.is-ready .g-item { opacity: 1; transform: none; }
.gallery.no-anim .g-item { transition: none; }
.g-item__media { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: pointer; }
.g-item__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform 1.6s cubic-bezier(.22, 1, .36, 1); }
/* hover: a little, slow zoom into the artwork (stays inside its frame) */
@media (hover: hover) { .g-item:hover .g-item__media img { transform: scale(1.04); } }

/* Artwork only: no text or highlight on the images.
   (Title, details and brief stay in the HTML — the title is still used as the caption in the full-size view.) */
.g-item__info, .g-item .card__brief { display: none; }

.g-empty { padding: clamp(80px, 16vh, 160px) 0; text-align: center; }
.g-empty__title { font-family: var(--display); text-transform: uppercase; font-size: clamp(40px, 7vw, 96px); line-height: .95; color: var(--fg); }
.g-empty__title .empty__name { color: var(--accent); }
.g-empty__text { margin-top: 18px; color: var(--muted); }
.g-empty__text a { color: var(--accent); }
.gallery-page + .footer { margin-top: clamp(48px, 8vw, 96px); }

@media (max-width: 760px) {
  .gallery-bar { flex-direction: column; align-items: stretch; }
  .gallery-page .gallery-bar .filters { justify-content: flex-start; margin: 0 calc(var(--gx) * -1); padding: 0 var(--gx); }
  /* mobile: one column of full-width artworks, even 10px gaps, 16px side margins, soft corners */
  .gallery-page { --gx: 16px; }
  .gallery { --gap: 10px; }
  .g-item { border-radius: 8px; }
}

/* Info inside the frame: title left, details + View button right */
.showcase .card__info {
  left: 0; right: 0; bottom: 0; padding: clamp(20px, 3vw, 44px);
  flex-direction: row; justify-content: space-between; align-items: flex-end; text-align: left; gap: 24px;
}
.card__main { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.card__type { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.8); }
.showcase .card__title { font-size: clamp(56px, 8vw, 140px); line-height: .85; }
.showcase .card__cats { color: rgba(255,255,255,.75); }
.card__side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; flex-shrink: 0; }
.card__year { font-family: var(--mono); font-size: 12px; color: rgba(255,255,255,.75); }
.card__view {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #fff;
  border: 1px solid rgba(255,255,255,.6); border-radius: 100px; padding: 10px 18px;
  background: rgba(0,0,0,.2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .3s, color .3s, border-color .3s;
}

/* Up / down arrows, stacked on the right of the frame */
.showcase__arrows {
  position: absolute; z-index: 3; right: calc(var(--fx) + clamp(16px, 2vw, 28px)); top: 50%;
  transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px;
}
.showcase .slider__arrow { position: static; transform: none; width: 52px; }
.showcase .slider__arrow:hover, .showcase .slider__arrow--prev:hover, .showcase .slider__arrow--next:hover { transform: none; }

.showcase__bar {
  position: absolute; z-index: 3; left: var(--fx); right: var(--fx); bottom: calc((var(--fb) - 38px) / 2);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.showcase .slider__count { position: static; flex-shrink: 0; }
:is(.showcase, .gallery-page) .filters { margin: 0; justify-content: flex-end; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
:is(.showcase, .gallery-page) .filters::-webkit-scrollbar { display: none; }
/* Categories as plain text (supersolid style): dimmed, brighten on hover, selected = yellow with a dot */
:is(.showcase, .gallery-page) .filters { align-items: center; gap: 4px 22px; }
.filters__label { font-family: var(--sans); font-size: 16px; font-weight: 600; color: var(--fg); flex-shrink: 0; margin-right: -4px; }
:is(.showcase, .gallery-page) .filter {
  position: relative; flex-shrink: 0; white-space: nowrap;
  padding: 4px 0; border: 0; background: none;
  font-family: var(--sans); font-size: 16px; font-weight: 500; text-transform: none; letter-spacing: -0.01em;
  color: rgba(242,237,228,.5);
  transition: color .3s, opacity .3s, filter .3s;
}
:is(.showcase, .gallery-page) .filter:hover { color: var(--fg); background: none; }
:is(.showcase, .gallery-page) .filters:hover .filter:not(:hover):not(.is-active) { color: rgba(242,237,228,.3); }
:is(.showcase, .gallery-page) .filter.is-active { color: var(--accent); background: none; }
:is(.showcase, .gallery-page) .filter .filter__count { font-family: var(--mono); font-size: 10px; vertical-align: super; margin-left: 3px; opacity: .6; }

/* Switching category: the project text blurs out, then sharpens back into focus */
.showcase.is-switching .card.is-active .card__info > * { animation: blurIn .8s var(--ease) both; }
.showcase.is-switching .card.is-active .card__side { animation-delay: .08s; }
@keyframes blurIn { from { filter: blur(14px); opacity: 0; transform: translateY(8px); } to { filter: none; opacity: 1; transform: none; } }
.showcase .card--empty .card__media--empty { border: 0; }
.showcase__intro {
  position: absolute; z-index: 3; left: calc(var(--fx) + clamp(20px, 3vw, 44px)); top: calc(var(--ft) + clamp(18px, 2.4vw, 34px));
  display: flex; flex-direction: column; gap: 6px; max-width: 360px;
  text-shadow: 0 1px 12px rgba(0,0,0,.55); pointer-events: none;
  animation: introIn 1s .2s var(--ease) both;
}
@keyframes introIn { from { opacity: 0; transform: translateY(10px); } }
.showcase__name { font-family: var(--sans); font-size: 15px; font-weight: 700; color: var(--accent); line-height: 1.3; }
.showcase__name span { font-weight: 400; color: rgba(255,255,255,.8); }
.showcase__what { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.85); }
.showcase__status {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.7);
}
.showcase.is-single .slider__count { display: block; visibility: hidden; }

@media (max-width: 760px) {
  .showcase { --fx: 10px; --ft: 80px; --fb: 120px; }
  .showcase .card__info { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .showcase .card__title { font-size: 14vw; }
  .card__side { flex-direction: row; align-items: center; gap: 12px; }
  .card__view { padding: 8px 14px; font-size: 11px; }
  .showcase__arrows { right: calc(var(--fx) + 12px); }
  .showcase .slider__arrow { width: 42px; }
  .showcase__status { display: none; }
  .showcase__bar { flex-direction: column-reverse; align-items: stretch; gap: 10px; bottom: 14px; }
  .showcase .filters { justify-content: flex-start; margin: 0 calc(var(--fx) * -1); padding: 0 var(--fx); }
}

/* ==========================================================
   INTRO: Mark Magalona logo animation (index.html)
   ========================================================== */
.intro {
  position: fixed; inset: 0; z-index: 88; /* under the grain so it keeps the film texture */
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: var(--bg);
  transition: background-color .7s var(--ease);
  cursor: pointer;
}
.intro-skip .intro { display: none; }
.intro.is-leaving { background-color: transparent; pointer-events: none; }
.intro__logo {
  display: flex; flex-direction: column; align-items: flex-start;
  font-family: var(--display); text-transform: uppercase; line-height: .86; color: var(--accent);
  transform-origin: 0 0; will-change: transform;
  transition: transform 1s cubic-bezier(.77, 0, .18, 1);
}
/* same proportions as the logo in the menu (Mark 22px / Magalona 15px) */
.intro__line--1 { font-size: clamp(88px, 15vw, 230px); letter-spacing: .01em; }
.intro__line--2 { font-size: clamp(60px, 10.2vw, 157px); letter-spacing: .06em; }
.intro__line { display: block; overflow: hidden; padding-bottom: .04em; }
.intro__char { display: inline-block; transform: translateY(105%); transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
.intro.is-in .intro__char { transform: none; }
.intro__tag {
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .3em; color: var(--muted);
  opacity: 0; transform: translateY(8px); transition: opacity .6s, transform .6s var(--ease);
}
.intro.is-tag .intro__tag { opacity: 1; transform: none; }
.intro__bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 1.5s cubic-bezier(.65, 0, .35, 1);
}
.intro.is-tag .intro__bar { transform: scaleX(1); }
.intro.is-leaving .intro__tag, .intro.is-leaving .intro__bar { opacity: 0; transition: opacity .3s; }
/* hide the menu logo while the big one flies into its place */
.is-intro:not(.intro-skip) .nav .logo { opacity: 0; }

/* ==========================================================
   PAGE-LOAD ANIMATION: block wipe · liquid circle reveal · text decode
   ========================================================== */
/* Block wipe: covers the page until script.js splits it into columns that slide away */
.wipe {
  position: fixed; inset: 0; z-index: 87; display: flex; pointer-events: none;
  background: var(--bg);
  animation: wipeFailsafe 0s 3s forwards;   /* safety: never stays if scripts fail */
}
@keyframes wipeFailsafe { to { visibility: hidden; } }
.wipe.is-ready { background: transparent; }
.wipe span { flex: 1; background: var(--accent); transition: transform .8s cubic-bezier(.76, 0, .24, 1); }
.wipe span:nth-child(odd) { transform-origin: top; }
.wipe span:nth-child(even) { transform-origin: bottom; }
.wipe.is-out span { transform: scaleY(0); }
.is-intro:not(.intro-skip) .wipe { display: none; }   /* the logo intro covers the Work page instead */

/* Liquid circle reveal for a project image */
.showcase .card.is-reveal .card__media { animation: circleIn 1.6s cubic-bezier(.65, 0, .35, 1) both; }
.showcase .card.is-reveal .card__media img { animation: settleIn 1.8s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes circleIn { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(80% at 50% 50%); } }
@keyframes settleIn { from { transform: scale(1.25); } to { transform: scale(1); } }

/* ==========================================================
   GLASS-LENS HOVER on the About heading (built by script.js)
   ========================================================== */
.lens { position: relative; --lx: -9999px; --lw: 0px; cursor: default; }
/* each slice shows one narrow vertical band of warped letters (position + mask set by script.js) */
.lens__slice {
  position: absolute; inset: 0; pointer-events: none; visibility: hidden;
  color: var(--accent);
  text-shadow: -5px 0 rgba(255, 45, 85, .9), 5px 0 rgba(45, 123, 255, .9);   /* red / blue fringes */
  will-change: transform;
}
.lens.is-on .lens__slice { visibility: visible; }
/* hide the normal letters inside the lens strip so only the stretched ones show there */
.lens.is-on > .page-title:not(.lens__copy) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(var(--lx) - var(--lw)), transparent calc(var(--lx) - var(--lw)), transparent calc(var(--lx) + var(--lw)), #000 calc(var(--lx) + var(--lw)));
          mask-image: linear-gradient(to right, #000 calc(var(--lx) - var(--lw)), transparent calc(var(--lx) - var(--lw)), transparent calc(var(--lx) + var(--lw)), #000 calc(var(--lx) + var(--lw)));
}

/* ---------- Testimonials ---------- */
.testimonials { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(100px, 12vw, 160px); }
.testimonials[hidden] { display: none; }
.testimonials__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 28px; border: 1px solid var(--line); background: rgba(255,255,255,.02);
}
.quote blockquote { font-size: 18px; line-height: 1.55; color: #e6e6e3; }
.quote figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.quote figcaption span { font-family: var(--mono); font-size: 12px; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .testimonials__grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact {
  padding: clamp(100px, 13vw, 180px) var(--pad);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px;
  background: var(--accent); color: var(--bg);
}
.contact__title { font-size: clamp(56px, 10vw, 170px); }
.contact__text { font-size: 17px; color: #444; }
.btn--light { background: var(--bg); color: var(--accent); max-width: 100%; }
.btn--light .btn__label { text-transform: none; font-size: clamp(15px, 2vw, 20px); overflow-wrap: anywhere; text-align: left; }
.btn--light .btn__icon { background: var(--accent); color: var(--bg); }
.btn--light:hover { background: var(--bg); color: var(--fg); }
.btn--light:hover .btn__icon { color: var(--fg); background: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 32px var(--pad); border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
}
.footer__nav, .footer__social { display: flex; flex-wrap: wrap; gap: 20px; }
/* social icons: same dim → white hover as all other links */
.footer__social { align-items: center; gap: 18px; }
.footer__social a { display: grid; place-items: center; width: 22px; height: 22px; }
.footer__social svg { width: 20px; height: 20px; display: block; }
.footer__social .label { color: var(--muted); }
.footer__copy { justify-self: end; color: var(--muted); }

.to-top {
  position: fixed; right: var(--pad); bottom: 24px; z-index: 40;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--accent); color: var(--bg); font-size: 18px;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .3s, transform .3s var(--ease), background .3s;
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--fg); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 18, 16, .97);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 70px var(--pad) 30px;
  opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { max-width: 100%; max-height: calc(100svh - 140px); object-fit: contain; }
.lightbox__close {
  position: absolute; top: 18px; right: var(--pad);
  font-family: var(--mono); font-size: 13px; text-transform: uppercase;
  border: 1px solid var(--line); padding: 8px 14px;
}

/* ---------- Reveal on scroll ---------- */
.fade { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.fade.in-view { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .service { min-height: 240px; }
}

@media (max-width: 760px) {
  .nav { gap: 12px; padding-top: 16px; padding-bottom: 16px; }
  .logo { font-size: 15px; }
  .btn--sm { font-size: 16px; }
  .btn--sm .btn__icon { width: 36px; margin: 3px; font-size: 16px; }
  .btn--sm .btn__label { padding: 8px 14px 8px 8px; }
  .nav__toggle { margin-left: auto; }
  .nav__toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 42px; height: 42px; align-items: center; position: relative; z-index: 2;
  }
  .nav__toggle span { width: 24px; height: 2px; background: var(--accent); transition: transform .35s var(--ease); }
  .nav__links {
    position: fixed; inset: 0; z-index: 1; margin: 0;
    flex-direction: column; justify-content: center; align-items: center; gap: 22px;
    background: var(--bg);
    font-size: 34px;
    opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .nav__links a { color: var(--fg); }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; }
  body :is(.nav__links a, .x.x.x) { font-size: 48px; }   /* phone menu: same font, big */
  .nav.is-open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .logo { position: relative; z-index: 2; }

  .hero { padding-top: 88px; }
  .hero__portrait { height: 70%; bottom: 24%; }
  .hero__name { font-size: 23vw; line-height: .84; }
  .hero__name span { display: block; }
  .hero__bottom { flex-direction: column; align-items: stretch; gap: 18px; }
  .hero__top .hero__tag:last-child { display: none; }
  .hero__actions { flex-wrap: nowrap; }
  .hero__actions .btn { flex: 1; justify-content: center; font-size: 16px; white-space: nowrap; }
  .hero__actions .btn__icon { width: 38px; }
  .hero__actions .btn--ghost .btn__label { justify-content: center; width: 100%; }

  .section-head { flex-direction: column; align-items: flex-start; }
  .grid { height: 75svh; min-height: 0; }
  .slider__arrow { top: auto; bottom: 14px; transform: none; width: 44px; }
  .slider__arrow--prev { left: auto; right: calc(var(--pad) + 52px); }
  .slider__arrow--prev:hover, .slider__arrow--next:hover { transform: none; }
  .slider__count { bottom: 28px; }
  .card__info { bottom: 84px; }
  .card__title { font-size: 15vw; }
  .filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); padding: 0 var(--pad); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex-shrink: 0; white-space: nowrap; }
  .grid { grid-template-columns: 1fr; }

  .services__grid { grid-template-columns: 1fr; }
  .service { min-height: 0; }
  .service__name { margin-top: 8px; }

  .stats { grid-template-columns: 1fr; gap: 36px; }

  .footer { grid-template-columns: 1fr; }
  .footer__copy { justify-self: start; }
}

/* ==========================================================
   TYPE SYSTEM — everything in Switzer (like niccolocampanini.it)
   Headings: Switzer Medium, normal capitals, tight spacing.
   Small labels: Switzer Medium, capitals, 12px.
   ========================================================== */
.mega, .big, .statement__line, .contact__title, .stat__num, .card__title, .service__name, .empty__title,
.page-title, .bio__lead, .drift__row, .tile__title, .g-empty__title {
  font-family: var(--display); font-weight: 500; text-transform: none; letter-spacing: -0.04em; line-height: .95;
}
.page-title { font-size: clamp(64px, 11vw, 180px); line-height: .9; }
.page-title--center { font-size: clamp(48px, 7.6vw, 136px); line-height: .92; column-gap: .25em; text-transform: uppercase; letter-spacing: -0.035em; }
.big { font-size: clamp(40px, 6vw, 96px); }
.contact__title { font-size: clamp(44px, 7vw, 120px); }
.stat__num { font-size: clamp(56px, 7vw, 110px); }
.stats--inline .stat__num { font-size: clamp(34px, 3.4vw, 52px); }
.service__name { font-size: clamp(24px, 2.1vw, 32px); letter-spacing: -0.03em; line-height: 1.05; }
.bio__lead { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.1; letter-spacing: -0.03em; }
.g-empty__title { font-size: clamp(32px, 5vw, 72px); }
.label, .page-title__count { font-family: var(--sans); font-weight: 500; letter-spacing: .02em; }
@media (max-width: 760px) {
  .page-title--center { font-size: 14vw; }
  .page-title { font-size: 16vw; }
}

/* ==========================================================
   ABOUT PAGE — photo → Creative Designer → About Mark → numbers → Services
   One type system: section titles = .ab-title (same as the big titles), labels = .label
   ========================================================== */
.ab-title { font-family: var(--display); font-weight: 500; letter-spacing: -0.04em; line-height: .95; font-size: clamp(44px, 6.5vw, 104px); color: var(--fg); }

/* 1. full-page photo */
.ab-hero { position: relative; height: 100svh; min-height: 520px; overflow: hidden; background: var(--bg-2); }
.ab-hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.ab-hero__img.is-placeholder { object-fit: contain; object-position: 50% 100%; padding-top: 90px; }
.ab-hero::after {   /* soft dark edges so the menu and the next section blend in */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 22%, transparent 62%, var(--bg) 100%);
}
/* text over the photo (Sun Hung style): small capitals, tagline up top, two lists at the bottom */
.ab-hero__top, .ab-hero__bottom { position: absolute; z-index: 1; left: var(--pad); right: var(--pad); }
.ab-hero__top, .ab-hero__cols {
  font-family: var(--ui); font-weight: 500; font-size: 13px; line-height: 1.35; text-transform: uppercase; letter-spacing: -0.01em; color: var(--fg);
}
.ab-hero__top { top: clamp(84px, 11vh, 120px); display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; }
.ab-hero__top p:first-child { grid-column: 3; }
.ab-hero__top p:last-child { grid-column: 4; }
.ab-hero__bottom { bottom: clamp(28px, 5vh, 48px); display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; align-items: end; }
.ab-hero__cols { grid-column: 3 / 5; display: grid; grid-template-columns: 1fr 1fr; }
.ab-hero__head { color: var(--accent); margin-bottom: 14px; }
.ab-hero__cols li { color: rgba(242,237,228,.8); }
.ab-hero__arrow { font-size: 26px; line-height: 1; color: rgba(242,237,228,.6); transition: color .3s; justify-self: start; }
.ab-hero__arrow:hover { color: var(--fg); }

/* 2. Creative Designer */
.about-page .page-head--about { min-height: 0; padding: clamp(70px, 9vw, 130px) var(--pad) clamp(70px, 9vw, 130px); }

/* 3. About Mark — one centered reading column */
.ab-about {
  max-width: 820px; margin: 0 auto; padding: 0 var(--pad) clamp(80px, 10vw, 140px);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px;
}
.ab-about .ab-title { margin-bottom: 8px; }
.ab-lead { font-weight: 500; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.25; letter-spacing: -0.02em; color: var(--accent); max-width: 720px; }
.ab-about > p:not(.label):not(.ab-lead) { color: #d6d0c6; font-size: var(--fs-body); line-height: 1.65; max-width: 640px; }
.ab-about em { color: var(--fg); font-style: normal; }
.ab-about .btn { margin-top: 14px; }

/* Soft cards (no outlines): a dark surface with a faint light from the top, rounded corners */
.about-page { --card: linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%); --card-r: 18px; }

/* 4. numbers — three soft cards */
.ab-stats { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(90px, 11vw, 160px); }
.ab-stats .stats { grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ab-stats .stat {
  align-items: center; text-align: center; gap: 14px; padding: clamp(40px, 5vw, 70px) 16px;
  background: var(--card); border-radius: var(--card-r);
}
.ab-stats .stat__num { font-size: clamp(56px, 8vw, 128px); color: var(--accent); line-height: .9; }
.ab-stats .stat .label { color: var(--muted); }

/* 5. Services — centered title, then four soft cards */
.about-page .services .section-head { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; border-bottom: 0; padding-bottom: 0; margin-bottom: clamp(36px, 5vw, 56px); }
.about-page .services__grid { border-left: 0; gap: 14px; }
.about-page .service {
  border: 0; border-radius: var(--card-r); background: var(--card);
  padding: clamp(26px, 2.4vw, 34px); min-height: 320px;
}
.about-page .service__num { color: var(--accent); }
.about-page .service__link { border-top: 0; padding-top: 6px; }

@media (max-width: 760px) {
  .ab-stats .stats { grid-template-columns: 1fr; gap: 10px; }
  .ab-hero { height: 100svh; }
  .ab-hero__top { display: none; }
  .ab-hero__bottom { grid-template-columns: 1fr; gap: 22px; }
  .ab-hero__cols { grid-column: 1; grid-row: 1; font-size: 12px; gap: 16px; }
  .ab-hero__arrow { grid-row: 2; }
}

/* ==========================================================
   CONTACT PAGE — simple: centered title, three fields, submit
   ========================================================== */
/* (sizes come from the TYPE SCALE block at the end of this file) */
.ct-page { max-width: 560px; margin: 0 auto; padding: clamp(140px, 18vh, 190px) var(--pad) clamp(90px, 11vw, 150px); }
.ct-title {
  font-family: var(--display); font-weight: 500; letter-spacing: -0.04em; line-height: 1;
  font-size: clamp(48px, 6vw, 84px); text-align: center; color: var(--fg); margin-bottom: clamp(48px, 7vw, 80px);
}
.ct-title__slash { color: var(--accent); margin-right: .08em; }
.ct-form { display: flex; flex-direction: column; gap: 26px; }
.ct-field { display: flex; flex-direction: column; gap: 10px; }
.ct-label { font-size: 14px; font-weight: 600; color: var(--fg); }
.ct-req { color: var(--accent); }
.ct-field input, .ct-field textarea {
  font: inherit; font-size: 16px; color: var(--fg); background: var(--bg-2);
  border: 1px solid rgba(242,237,228,.16); border-radius: 6px; padding: 13px 14px;
  transition: border-color .3s, background .3s;
}
.ct-field textarea { resize: vertical; min-height: 150px; }
.ct-field input::placeholder, .ct-field textarea::placeholder { color: rgba(242,237,228,.35); }
.ct-field input:hover, .ct-field textarea:hover { border-color: rgba(242,237,228,.3); }
.ct-field input:focus, .ct-field textarea:focus { outline: none; border-color: var(--accent); background: var(--bg-3); }
.ct-form .form__error { color: var(--accent); font-size: 14px; }
.ct-submit {
  align-self: flex-start; margin-top: 4px; padding: 13px 34px; border-radius: 6px;
  border: 1px solid rgba(242,237,228,.5); color: var(--fg);
  font-family: var(--ui); font-weight: 500; font-size: 14px; text-transform: uppercase; letter-spacing: -0.01em;
  transition: background .3s, color .3s, border-color .3s;
}
.ct-submit:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }   /* brightens, like every button */

/* ==========================================================
   ABOUT (two columns): name + bio + Services/Experience on the left, straight photo on the right
   ========================================================== */
.ab2 {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(120px, 15vh, 170px) var(--pad) clamp(90px, 11vw, 150px);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(40px, 7vw, 120px); align-items: start;
}
.ab2__name { font-family: var(--display); font-weight: 500; letter-spacing: -0.04em; line-height: .95; color: var(--fg); }
.ab2__bio { margin-top: clamp(32px, 4vw, 52px); max-width: 600px; display: flex; flex-direction: column; gap: 16px; color: rgba(242,237,228,.6); }
.ab2__cols { margin-top: clamp(56px, 7vw, 96px); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 600px; }
.ab2__cols .label { margin-bottom: 22px; }
.ab2__list { display: flex; flex-direction: column; gap: 18px; }
.ab2__list strong { display: block; font-weight: 500; color: var(--fg); line-height: 1.3; }
.ab2__list span:not([data-count]) { display: block; color: rgba(242,237,228,.5); line-height: 1.4; }
/* service links: same hover as every link — the one you point at stays bright, the others fade */
.ab2__list a { display: block; transition: opacity .3s; }
.ab2__list:hover a:not(:hover) { opacity: .35; }
/* numbers: bigger, yellow */
.ab2__nums strong { color: var(--accent); letter-spacing: -0.03em; line-height: 1; margin-bottom: 4px; }
/* "Let's work together →" — yellow, turns white on hover (same as your name and the email) */
.ab2__cta {
  grid-column: 1 / -1; justify-self: center; text-align: center; margin-top: clamp(40px, 6vw, 80px);
  font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1;
  color: var(--accent); transition: color .3s;
}
.ab2__cta:hover { color: var(--fg); }
/* photo: straight, natural portrait shape */
.ab2__photo { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--bg-2); }
.ab2__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }   /* keep the top of the head in frame */

@media (max-width: 900px) {
  .ab2 { grid-template-columns: 1fr; }
  .ab2__photo { position: static; order: -1; max-width: 520px; }
}
@media (max-width: 480px) {
  .ab2__cols { grid-template-columns: 1fr; gap: 44px; }
}

/* ==========================================================
   TYPE SCALE — applied last so every page uses the same six sizes
   (values are set in :root as --fs-display / h1 / h3 / body / ui / micro)
   ========================================================== */
body .page-title--center { font-size: var(--fs-display); }
body .ab2__cta { font-size: var(--fs-h2); letter-spacing: -0.03em; line-height: 1.05; }
body :is(.ab-title, .ab2__name, .big, .ct-title, .g-empty__title, .contact__title, .ab-stats .stat__num, .stat__num) {
  font-size: var(--fs-h1); font-weight: 500; letter-spacing: -0.04em; line-height: .95;
}
body :is(.service__name, .ab-lead, .ab2__nums strong) { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
body .page-slogan { font-size: var(--fs-h3); font-weight: 400; letter-spacing: -0.02em; }
body :is(.ab-about p:not(.ab-lead), .ab-about em, .ab2__bio p, .ab2__list a strong, .service p, .g-empty__text, .page-intro, .ct-field input, .ct-field textarea) {
  font-size: var(--fs-body); line-height: 1.6;
}
body :is(.ct-label, .form__error, .ct-submit, .ab2__list span:not([data-count])) { font-size: var(--fs-ui); }
body :is(.label, .footer__copy, .service__num, .footer__social .label) {
  font-size: var(--fs-micro); font-weight: 500; letter-spacing: .02em; text-transform: uppercase;
}
body :is(.ab-hero__arrow, .to-top) { font-size: 18px; }   /* arrow icons */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
