/* ============================================================
   PORTFOLIO — Design System
   Inspirado na linguagem visual minimalista do Porta Template
   (recriação própria: tokens, layout e animações originais)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* color */
  --bg: #ffffff;
  --text: #171717;
  --text-dim: rgba(23, 23, 23, 0.55);
  --text-faint: rgba(23, 23, 23, 0.33);
  --line: rgba(23, 23, 23, 0.16);
  --surface: #f4f4f4;
  --surface-2: #eaeaea;
  --invert-bg: #171717;
  --invert-text: #ffffff;

  /* type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --fs-xs: 12px;
  --fs-sm: clamp(14px, 1.2vw, 16px);
  --fs-md: clamp(18px, 1.6vw, 20px);
  --fs-lg: clamp(22px, 2.2vw, 28px);
  --fs-xl: clamp(28px, 3.4vw, 42px);
  --fs-2xl: clamp(40px, 6vw, 75px);
  --fs-display: clamp(56px, 13.5vw, 208px);

  /* space */
  --sp-1: 10px;
  --sp-2: 20px;
  --sp-3: 40px;
  --sp-4: 60px;
  --sp-5: 120px;
  --sp-6: 160px;
  --gutter: clamp(16px, 3vw, 40px);

  /* motion */
  --dur-fast: 0.2s;
  --dur: 0.4s;
  --dur-slow: 0.8s;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* radius */
  --radius-sm: 2px;
  --radius: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul {
  list-style: none;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

/* Focus visible — nunca esconder */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--sp-5);
}

.section--tight {
  padding-block: var(--sp-4);
}

.tag {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.display {
  font-size: var(--fs-display);
  text-transform: none;
  letter-spacing: -0.053em;
  font-weight: 400;
}

.h-xl {
  font-size: var(--fs-2xl);
}

.h-lg {
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
}

.h-md {
  font-size: var(--fs-lg);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.body-lg {
  font-size: var(--fs-md);
  line-height: 1.45;
  color: var(--text);
}

.muted {
  color: var(--text-dim);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--gutter);
  mix-blend-mode: difference;
  transition: transform var(--dur) var(--ease);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.logo {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: var(--sp-3);
}

.nav-links a {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding-block: 4px;
}

/* underline reveal */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Mobile menu overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--gutter);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s var(--ease-expo);
  visibility: hidden;
}

.menu-overlay.is-open {
  clip-path: inset(0 0 0% 0);
  visibility: visible;
}

.menu-overlay a {
  font-size: var(--fs-2xl);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.menu-overlay.is-open a {
  opacity: 1;
  transform: none;
}

.menu-overlay.is-open a:nth-child(1) { transition-delay: 0.1s; }
.menu-overlay.is-open a:nth-child(2) { transition-delay: 0.18s; }
.menu-overlay.is-open a:nth-child(3) { transition-delay: 0.26s; }
.menu-overlay.is-open a:nth-child(4) { transition-delay: 0.34s; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Hero (compacto: nome no topo, cards à vista) ---------- */
.hero {
  padding: calc(64px + var(--sp-3)) var(--gutter) 0;
}

.hero .display {
  font-size: clamp(44px, 9.2vw, 170px);
  white-space: nowrap;
  margin-bottom: var(--sp-2);
}

/* seção de destaque logo abaixo do hero */
.section-featured {
  padding-block: var(--sp-3) var(--sp-5);
}

.hero-sub {
  max-width: 36ch;
  font-size: var(--fs-md);
  color: var(--text-dim);
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .hero .display { white-space: normal; }
}

/* ---------- Link com parênteses ( CTA ) ---------- */
.link-cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.link-cta .paren {
  color: var(--text-faint);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}

.link-cta:hover .paren { color: var(--text); }
.link-cta:hover .paren--l { transform: translateX(-4px); }
.link-cta:hover .paren--r { transform: translateX(4px); }

/* ---------- Text reveal (linha a linha) ---------- */
.reveal-line {
  display: block;
  overflow: hidden;
  /* room for descenders (j, g, y, p): real space, so nothing overlaps them */
  padding-bottom: 0.16em;
}

.reveal-line > .reveal-inner {
  display: block;
  transform: translateY(calc(115% + 0.2em));
  transition: transform var(--dur-slow) var(--ease-expo);
}

.is-inview .reveal-line > .reveal-inner {
  transform: translateY(0);
}

.is-inview .reveal-line:nth-child(2) > .reveal-inner { transition-delay: 0.08s; }
.is-inview .reveal-line:nth-child(3) > .reveal-inner { transition-delay: 0.16s; }
.is-inview .reveal-line:nth-child(4) > .reveal-inner { transition-delay: 0.24s; }

/* fade-up genérico */
[data-fade] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: var(--fade-delay, 0s);
}

[data-fade].is-inview {
  opacity: 1;
  transform: none;
}

/* ---------- Cards de projeto ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-1);
  align-items: start;
}

.card {
  display: block;
  grid-column: span 4;
}

@media (max-width: 800px) {
  .card { grid-column: span 12; }
}

.card-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 3 / 4;
  background: var(--surface);
}

.card-media--wide { aspect-ratio: 16 / 10; }

.card-media .ph,
.card-media img,
.card-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.9s var(--ease-expo), opacity var(--dur) var(--ease);
}

/* troca de projeto em destaque (rotação) */
.card-meta {
  transition: opacity var(--dur) var(--ease);
}

.card.is-swapping .card-media img,
.card.is-swapping .card-meta {
  opacity: 0;
}

.card:hover .card-media .ph,
.card:hover .card-media img,
.card:hover .card-media video,
.card:focus-visible .card-media .ph {
  transform: scale(1.06);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: var(--sp-1);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.card-title {
  color: var(--text);
  font-size: var(--fs-sm);
}

/* placeholders visuais (substituir por imagens reais) */
.ph { display: grid; place-items: center; }
.ph span {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.ph--1 { background: linear-gradient(160deg, #0e2b2b, #06090c 70%); }
.ph--2 { background: linear-gradient(160deg, #2b0e12, #0c0606 70%); }
.ph--3 { background: linear-gradient(160deg, #2b0e26, #0a060c 70%); }
.ph--4 { background: linear-gradient(160deg, #16102b, #06070c 70%); }
.ph--5 { background: linear-gradient(160deg, #1c1c1f, #050505 70%); }
.ph--6 { background: linear-gradient(160deg, #0e2b16, #060c08 70%); }
.ph--7 { background: linear-gradient(160deg, #0e1a2b, #060a0c 70%); }
.ph--8 { background: linear-gradient(160deg, #2b220e, #0c0a06 70%); }
.ph--9 { background: linear-gradient(160deg, #2b160e, #0c0806 70%); }

/* ---------- Statement / About intro ---------- */
.statement {
  max-width: 24ch;
}

.statement-wrap {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: var(--sp-3);
  align-items: start;
}

@media (max-width: 800px) {
  .statement-wrap { grid-template-columns: 1fr; }
}

/* ---------- Services (hover roll) ---------- */
.services {
  border-top: 0;
}

.svc {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  position: relative;
  cursor: default;
}

.svc-num {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  min-width: 3ch;
}

.svc-name {
  font-size: var(--fs-2xl);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1;
  overflow: hidden;
  height: 1em;
}

.svc-name .roll {
  display: block;
  transition: transform var(--dur) var(--ease-expo);
}

.svc:hover .svc-name .roll {
  transform: translateY(-100%);
}

.svc-name .roll span {
  display: block;
  height: 1em;
}

.svc-name .roll span:last-child {
  color: var(--text-dim);
}

/* ---------- Stats / contadores ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
}

.stat {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-3) var(--sp-2) var(--sp-2) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-height: 260px;
}

.stat:last-child { border-right: 0; }

.stat-value {
  font-size: var(--fs-2xl);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-top: auto;
}

.stat-label {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  max-width: 28ch;
}

/* ---------- FAQ accordion ---------- */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  text-align: left;
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease);
}

.faq-q:hover { color: var(--text-dim); }

.faq-icon {
  flex: none;
  width: 14px;
  height: 14px;
  position: relative;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur) var(--ease);
}

.faq-icon::after { transform: rotate(90deg); }

.faq-item.is-open .faq-icon::after { transform: rotate(0deg); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease);
}

.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}

.faq-a-inner {
  overflow: hidden;
  color: var(--text-dim);
  max-width: 60ch;
}

.faq-a-inner p {
  padding-bottom: var(--sp-2);
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 0;
  padding-block: var(--sp-1);
  display: flex;
}

.marquee-track {
  display: flex;
  flex: none;
  gap: var(--sp-1);
  padding-right: var(--sp-1);
  animation: marquee 30s linear infinite;
}

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

@keyframes marquee {
  to { transform: translateX(-100%); }
}

.marquee-item {
  flex: none;
  width: clamp(200px, 24vw, 340px);
}

.marquee .card-media { aspect-ratio: 4 / 5; }

/* ---------- Filtros (Projects) ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  padding-block: var(--sp-3);
}

.filter-btn {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  transition: all var(--dur-fast) var(--ease);
}

.filter-btn:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.filter-btn.is-active {
  background: var(--invert-bg);
  color: var(--invert-text);
  border-color: var(--invert-bg);
}

/* ---------- Page hero (páginas internas) ---------- */
.page-hero {
  padding: clamp(24px, 4vh, 48px) var(--gutter) var(--sp-3);
}

.page-hero .display { margin-bottom: var(--sp-2); }

.page-hero-sub {
  max-width: 44ch;
  color: var(--text-dim);
  font-size: var(--fs-md);
  margin-top: clamp(16px, 2.2vh, 32px);
}

/* ---------- Team (carrossel horizontal) ---------- */
.team-scroll {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--sp-2);
  scrollbar-width: none;
  cursor: grab;
}

.team-scroll::-webkit-scrollbar { display: none; }

.team-scroll.is-dragging { cursor: grabbing; }

.team-card {
  flex: none;
  width: clamp(240px, 28vw, 360px);
  scroll-snap-align: start;
}

.team-card .card-media { aspect-ratio: 3 / 4; }

.team-name {
  padding-top: var(--sp-1);
  font-size: var(--fs-sm);
}

.team-role {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Project detail ---------- */
.project-hero {
  padding: clamp(24px, 4vh, 48px) var(--gutter) var(--sp-3);
}

.back-link {
  display: inline-block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: var(--sp-3);
  transition: color var(--dur-fast) var(--ease);
}

.back-link:hover { color: var(--text); }

.project-cover {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
  background: var(--surface);
}

.project-cover .ph,
.project-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta-table {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-3);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
}

.meta-table dt {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: var(--sp-1);
}

.meta-table dd {
  font-size: var(--fs-md);
  font-weight: 500;
}

.prose {
  max-width: 64ch;
}

.prose h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-2);
}

.prose p {
  color: var(--text-dim);
  margin-bottom: var(--sp-3);
}

.gallery {
  columns: 4;
  column-gap: var(--sp-1);
}

.gallery > * {
  position: relative;
  margin-bottom: var(--sp-1);
  break-inside: avoid;
}

@media (max-width: 1100px) { .gallery { columns: 3; } }
@media (max-width: 760px) { .gallery { columns: 2; } }

.gallery .card-media { aspect-ratio: auto; position: static; }
.gallery .ph {
  position: static;
  width: 100%;
  border-radius: var(--radius-sm);
}
.gallery .ph--tall { aspect-ratio: 3 / 4; }
.gallery .ph--square { aspect-ratio: 1; }
.gallery .ph--wide { aspect-ratio: 16 / 10; }

/* ---------- Form (Contacts) ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--sp-5);
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
}

.field {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding-block: var(--sp-2);
  transition: border-color var(--dur) var(--ease);
}

.field:focus-within { border-color: var(--text); }

.field label {
  display: block;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: var(--sp-1);
}

.field input,
.field textarea {
  width: 100%;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-md);
  resize: vertical;
}

.field input:focus,
.field textarea:focus { outline: none; }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
  padding: 16px 32px;
  border-radius: 999px;
  background: var(--invert-bg);
  color: var(--invert-text);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(0.98); }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  font-size: var(--fs-md);
}

.contact-info .muted { font-size: var(--fs-sm); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--sp-5);
  padding: var(--sp-4) var(--gutter) var(--sp-2);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding-bottom: var(--sp-4);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.footer-col a {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  transition: color var(--dur-fast) var(--ease);
  width: fit-content;
}

.footer-col a:hover { color: var(--text); }

.footer-col .col-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: var(--sp-1);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.to-top {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  transition: color var(--dur-fast) var(--ease);
}

.to-top:hover { color: var(--text); }

.footer-brand {
  font-size: clamp(36px, 8.8vw, 150px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--text);
  user-select: none;
  padding-top: var(--sp-3);
}

/* ---------- Seletor de idioma (fixo, canto inferior esquerdo) ---------- */
.lang-switch {
  position: fixed;
  left: var(--sp-2);
  bottom: var(--sp-2);
  z-index: 110;
  display: flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  padding: 4px;
}

.lang-switch button {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-dim);
  transition: all var(--dur-fast) var(--ease);
}

.lang-switch button:hover { color: var(--text); }

.lang-switch button.is-active {
  background: var(--invert-bg);
  color: var(--invert-text);
}

/* ---------- Page transition ---------- */
.page-fade {
  animation: pageIn 0.6s var(--ease) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

body.is-leaving .page-fade {
  animation: pageOut 0.3s var(--ease) both;
}

@keyframes pageOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* gallery real images */
.gallery img { width:100%; height:auto; display:block; border-radius: var(--radius-sm); }

/* ---------- Landing pages (live previews) ---------- */
.lp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); margin-top: var(--sp-3); }
@media (max-width: 800px) { .lp-grid { grid-template-columns: 1fr; } }
.lp-card { display: block; text-decoration: none; color: inherit; }
.lp-frame { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.lp-card:hover .lp-frame { border-color: var(--text); transform: translateY(-4px); }
.lp-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.lp-url { margin-left: 8px; font-size: var(--fs-xs); color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-viewport { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.lp-viewport iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: top left; pointer-events: none; }
.lp-meta { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--sp-2); }
.lp-title { font-size: 1rem; font-weight: 500; }
.lp-open { font-size: var(--fs-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; transition: color var(--dur) var(--ease); }
.lp-card:hover .lp-open { color: var(--text); }

/* ---------- Expertise: projetos por categoria ---------- */
.svc-name a { color: inherit; text-decoration: none; }
.svc-projects { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: center; gap: 4px 14px; max-width: 48%; }
.svc-projects a { font-size: var(--fs-xs); letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); text-decoration: none; transition: color var(--dur) var(--ease); }
.svc-projects a:hover { color: var(--text); }
@media (max-width: 760px) {
  .svc { flex-wrap: wrap; }
  .svc-projects { max-width: 100%; flex-basis: 100%; margin-left: 0; justify-content: flex-start; padding-left: calc(3ch + var(--sp-3)); padding-top: var(--sp-1); }
}

/* número provisório no canto da imagem da galeria */
.gal-num { position: absolute; top: 6px; left: 6px; z-index: 2; font-size: 11px; line-height: 1; font-weight: 600; color: var(--invert-text); background: rgba(23,23,23,.7); padding: 3px 6px; border-radius: 4px; pointer-events: none; }

/* ---------- Galeria: hover + clique (lightbox) ---------- */
.gallery > div { overflow: hidden; border-radius: var(--radius-sm); cursor: zoom-in; }
.gallery img { transition: transform .55s var(--ease); }
.gallery > div:hover img { transform: scale(1.06); }

/* ---------- Lightbox / gallery view ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2); padding: var(--sp-4) var(--sp-2) var(--sp-2);
  background: rgba(244,244,244,.96);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-stage { flex: 1 1 auto; min-height: 0; width: 100%; margin: 0; display: flex; align-items: center; justify-content: center; }
.lb-img { max-width: min(1200px, 92vw); max-height: 74vh; width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm); }
.lb-close { position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; font-size: 30px; line-height: 1; color: var(--text); background: none; border: 0; cursor: pointer; opacity: .8; }
.lb-close:hover { opacity: 1; }
.lb-nav { position: absolute; top: 46%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 32px; line-height: 1; color: var(--text); background: rgba(0,0,0,.05); border: 0; border-radius: 50%; cursor: pointer; transition: background .2s; }
.lb-nav:hover { background: rgba(0,0,0,.12); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; max-width: 94vw; padding: 6px 2px; flex: 0 0 auto; }
.lb-thumb { flex: 0 0 auto; width: 74px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: none; cursor: pointer; opacity: .5; transition: opacity .2s, border-color .2s; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.is-active { opacity: 1; border-color: var(--text); }
@media (max-width: 640px) { .lb-nav { width: 40px; height: 40px; font-size: 26px; } .lb-img { max-height: 66vh; } }

/* Expertise: nomes mais longos em uma linha */
.svc-name { font-size: clamp(1.1rem, 4.2vw, 2.1rem); white-space: nowrap; }
/* Preview flutuante em hover (foto de dentro do projeto) */
.svc-preview { position: fixed; top: 0; left: 0; width: 210px; max-width: 30vw; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.92); transition: opacity .18s var(--ease), transform .18s var(--ease); z-index: 150; box-shadow: 0 12px 34px rgba(0,0,0,.4); }
.svc-preview.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (max-width: 760px) { .svc-preview { display: none; } }

/* Expertise: thumbnails dos projetos aparecem ao passar o mouse na categoria */
.svc-thumbs { display: flex; gap: 8px; align-items: center; position: absolute; font-size: var(--fs-xs); left: calc(3ch + var(--sp-3)); top: 50%; opacity: 0; transform: translateY(-50%) translateX(-10px); transition: opacity .32s var(--ease), transform .32s var(--ease); pointer-events: none; }
.svc:hover .svc-thumbs { opacity: 1; transform: translateY(-50%) translateX(0); pointer-events: auto; }
/* the name clears out so the project thumbnails take its place */
.svc-name { transition: opacity .28s var(--ease); }
.svc:hover .svc-name { opacity: 0; }
.svc:hover .svc-name .roll { transform: none; }
.svc-thumbs a { display: block; width: 92px; height: 66px; border-radius: 5px; overflow: hidden; flex: none; }
.svc-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.svc-thumbs a:hover img { transform: scale(1.08); }
@media (hover: none) { .svc-thumbs { opacity: 1; transform: none; pointer-events: auto; } }
@media (max-width: 820px) { .svc-thumbs a { width: 64px; height: 48px; } }

/* ---------- Fonte de títulos: GD Sherpa ---------- */
@font-face {
  font-family: "GD Sherpa";
  src: url("/assets/fonts/GDSherpa-Regular.woff2") format("woff2"),
       url("/assets/fonts/GDSherpa-Regular.woff") format("woff"),
       url("/assets/fonts/GDSherpa-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
:root { --font-display: "GD Sherpa", var(--font-sans); }
.display, .h-xl, .h-lg, .statement, .svc-name, .card-title, .lp-title,
.footer-brand, .logo, .prose h3 {
  font-family: var(--font-display);
}

/* Nome sempre em minúsculo (mais bonito na GD Sherpa) */
.hero .display { text-transform: none; }
.footer-brand { text-transform: none; }

/* Home featured grid: four highlighted projects, equal across */
.section-featured .work-grid .card { grid-column: span 3; }
@media (max-width: 900px) { .section-featured .work-grid .card { grid-column: span 6; } }
@media (max-width: 600px) { .section-featured .work-grid .card { grid-column: span 12; } }


/* Projects listing: four across */
.work-grid--four .card { grid-column: span 3; }
@media (max-width: 900px) { .work-grid--four .card { grid-column: span 6; } }
@media (max-width: 600px) { .work-grid--four .card { grid-column: span 12; } }

/* Rounded media site-wide */
img { border-radius: 10px; }
.card-media, .project-cover, .gallery > div, .lp-frame, .lp-viewport, .svc-thumbs a { border-radius: 10px; overflow: hidden; }


/* ===== Home intro header ===== */
.home-intro { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--gutter) 0; }
.intro-left { display: flex; align-items: center; gap: var(--sp-2); }

.intro-text { font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 18px; letter-spacing: 0.96px; color: #171717; max-width: 44ch; }
.intro-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; flex: none; }
.intro-nav a { font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 18px; letter-spacing: 0.96px; text-transform: uppercase; color: #171717; transition: color var(--dur) var(--ease); }
.intro-nav a:hover { color: var(--text-dim); }
@media (max-width: 720px) {
  .home-intro { flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-2); }
  .intro-nav { flex-direction: row; align-items: flex-start; gap: var(--sp-2); }
}

/* ===== Featured head ===== */
.featured-head { display: flex; align-items: flex-end; gap: var(--sp-2) var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.featured-head .btn-pill { margin-bottom: 1.1rem; }
.featured-title { font-family: var(--font-display); font-weight: 400; font-size: 128px; letter-spacing: -6.8px; line-height: 0.9; }
@media (max-width: 900px) { .featured-title { font-size: 84px; letter-spacing: -4.4px; } }
@media (max-width: 600px) { .featured-title { font-size: 52px; letter-spacing: -2.6px; } .featured-head .btn-pill { margin-bottom: 0.4rem; } }

/* ===== Button (new standard) ===== */
.btn-pill { display: inline-flex; align-items: center; justify-content: center; background: #dbe4f7; color: #141414; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; padding: 14px 28px; border-radius: 999px; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.btn-pill:hover { background: #c9d6f2; transform: translateY(-1px); }

/* ================= CASE EDITORIAL SYSTEM ================= */
.case-wrap { width: 100%; margin: 0 auto; padding-inline: var(--gutter); }

/* hero */
.case-hero { padding-top: clamp(24px, 4vh, 48px); }
.case-back { display: inline-block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: clamp(24px,4vh,40px); }
.case-back:hover { color: var(--text); }
.case-hero-row { display: flex; align-items: baseline; gap: clamp(12px,2vw,24px); flex-wrap: wrap; }
.case-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(64px, 10vw, 150px); line-height: .95; letter-spacing: -0.053em; color: var(--text); }
.case-year { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.case-sub { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; color: #2b2b2b; max-width: 46ch; margin-top: 18px; }
.case-cover { margin-top: clamp(48px, 6vh, 72px); }
.case-cover img { width: 100%; height: auto; display: block; }
@media (max-width: 600px){ .case-title { font-size: clamp(48px, 15vw, 64px); line-height: 1; } }

/* overview */
.case-overview-sec { margin-top: clamp(64px, 9vh, 96px); }
.case-overview { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.ficha { grid-column: span 5; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin: 0; }
.ficha > div { min-width: 0; }
.ficha .wide { grid-column: 1 / -1; }
.ficha dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.ficha dd { font-size: 15px; line-height: 1.4; color: #2b2b2b; }
.lead { grid-column: span 7; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.25; max-width: 760px; color: #222; }
@media (max-width: 820px){ .case-overview { grid-template-columns: 1fr; } .ficha, .lead { grid-column: auto; } .lead { margin-top: 8px; } }

/* chapters */
.chapter { margin-top: clamp(96px, 14vh, 144px); }
.chapter-head { max-width: 900px; margin-bottom: clamp(24px, 4vh, 32px); }
.chapter-label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; }
.chapter-title { font-family: var(--font-sans); font-weight: 600; font-size: clamp(32px, 4vw, 56px); line-height: 1.05; letter-spacing: -0.03em; max-width: 900px; color: var(--text); }
.chapter-body { max-width: 42rem; }
.chapter-body p { font-size: clamp(18px, 1.4vw, 20px); line-height: 1.55; color: #2b2b2b; margin-top: 20px; }
.chapter-body p:first-child { margin-top: 0; }
@media (max-width: 600px){ .chapter { margin-top: clamp(64px, 10vh, 80px); } .chapter-body p { font-size: 17px; } }

/* split composition (text beside image) */
.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin-top: clamp(40px,6vh,64px); }
.split .txt-4 { grid-column: span 4; } .split .txt-5 { grid-column: span 5; }
.split .img-7 { grid-column: span 7; } .split .img-8 { grid-column: span 8; }
.split .chapter-body { margin: 0; }
@media (max-width: 820px){ .split { grid-template-columns: 1fr; gap: clamp(24px,5vw,40px); } .split > * { grid-column: auto !important; } }

/* figures / image levels */
figure.fig { margin: clamp(40px, 6vh, 64px) 0 0; }
.split figure.fig { margin: 0; }
figure.fig img { width: 100%; height: auto; display: block; }
figure.fig figcaption { font-size: 12px; letter-spacing: .03em; color: var(--text-dim); margin-top: 12px; }
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.5vw, 20px); margin-top: clamp(40px, 6vh, 64px); }
.fig-pair img { width: 100%; height: auto; display: block; }
@media (max-width: 640px){ .fig-pair { grid-template-columns: 1fr; } }

/* digital chapter (dark) */
/* digital chapter stays on white for legibility; the large embed gives the visual break */
.case-embed { margin-top: clamp(32px, 5vh, 56px); overflow: hidden; background: #000; aspect-ratio: 16 / 10; border-radius: 12px; }
.case-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.btn-on-dark { background: #f0f0f0; color: #141414; }
.btn-on-dark:hover { background: #ffffff; }

/* closing + credits */
.case-close-sec { margin-top: clamp(96px, 14vh, 144px); }
.case-close { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.case-close .concl { grid-column: span 7; font-size: clamp(18px, 1.4vw, 20px); line-height: 1.55; color: #2b2b2b; max-width: 42rem; }
.case-credits { grid-column: span 5; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin: 0; }
.case-credits .cr dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.case-credits .cr dd { font-size: 15px; color: #2b2b2b; }
@media (max-width: 820px){ .case-close { grid-template-columns: 1fr; } .case-close > * { grid-column: auto; } }

.case .related-projects { margin-top: clamp(96px, 14vh, 144px); }
/* ===== end case editorial ===== */


/* chapter body uses more horizontal space (standalone chapters, two columns) */
.chapter-body:not([class*="txt-"]) { max-width: 66rem; columns: 2; column-gap: clamp(40px, 4vw, 72px); }
.chapter-body:not([class*="txt-"]) p { break-inside: avoid; margin-top: 0; margin-bottom: 22px; }
.chapter-body:not([class*="txt-"]) p:last-child { margin-bottom: 0; }
@media (max-width: 760px){ .chapter-body:not([class*="txt-"]) { columns: 1; max-width: 42rem; } }
/* chapter-body two-column */

/* ===== Project/Projects top bar (emoji + back + stacked nav) ===== */
.case-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--gutter) 0; }
.case-topbar-left { display: flex; align-items: center; gap: var(--sp-2); }
.case-back-btn { width: 44px; height: 44px; border-radius: 50%; background: #dbe4f7; color: #141414; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.case-back-btn:hover { background: #c9d6f2; transform: translateX(-2px); }

.case-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; flex: none; }
.case-nav a { font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 18px; letter-spacing: 0.96px; text-transform: uppercase; color: #171717; transition: color var(--dur) var(--ease); }
.case-nav a:hover { color: var(--text-dim); }
@media (max-width: 560px){ .case-topbar, .home-intro { gap: var(--sp-2); } }

/* ================= CASE GALLERY SYSTEM ================= */
.case-cover img { width: 100%; height: auto; max-height: min(80vh, 820px); object-fit: cover; display: block; }
.g-featured { margin-top: clamp(40px, 6vh, 64px); }
.g-featured img { width: 100%; height: auto; max-height: min(72vh, 760px); display: block; }
.g-featured.g-photo img { object-fit: cover; }
.g-featured.g-graphic { background: #f4f4f4; }
.g-featured.g-graphic img { object-fit: contain; max-height: 520px; padding: clamp(16px, 3vw, 40px); }
.g-featured figcaption { font-size: 12px; letter-spacing: .03em; color: var(--text-dim); margin-top: 12px; }

.g-pair { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: clamp(24px, 4vh, 40px); }
.g-pair .g-cell { height: clamp(280px, 38vw, 520px); }

.g-compact { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: clamp(24px, 4vh, 40px); }
.g-compact.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-compact .g-cell { height: clamp(160px, 22vw, 320px); }
.g-compact.g-2 .g-cell { height: clamp(200px, 26vw, 360px); }
@media (max-width: 900px){ .g-compact { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px){ .g-compact { gap: 8px; } .g-compact .g-cell { height: clamp(140px, 34vw, 220px); } }

.g-mixed { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; margin-top: clamp(40px, 6vh, 64px); }
.g-mixed .g-a { grid-column: span 5; } .g-mixed .g-b { grid-column: span 7; }
.g-mixed .g-cell { height: clamp(280px, 38vw, 520px); }
@media (max-width: 820px){ .g-mixed { grid-template-columns: 1fr; } .g-mixed .g-a, .g-mixed .g-b { grid-column: auto; } }

.g-cell { position: relative; overflow: hidden; background: #f4f4f4; margin: 0; border-radius: 10px; }
.g-cell img { width: 100%; height: 100%; display: block; }
.g-cell.g-photo img { object-fit: cover; }
.g-cell.g-graphic img { object-fit: contain; padding: clamp(10px, 2vw, 28px); }
.split .g-cell { height: clamp(280px, 38vw, 520px); }

.lb { cursor: zoom-in; }

/* lightbox */
.lbx { position: fixed; inset: 0; z-index: 3000; background: rgba(15,15,15,.96); display: none; align-items: center; justify-content: center; padding: clamp(16px, 4vw, 64px); }
.lbx.is-open { display: flex; }
.lbx-stage { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lbx-img { max-width: min(1400px, 92vw); max-height: 82vh; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lbx-cap { color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: .03em; text-align: center; max-width: 60ch; }
.lbx-close { position: absolute; top: 14px; right: 18px; width: 46px; height: 46px; font-size: 30px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; opacity: .85; }
.lbx-prev, .lbx-next { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 34px; line-height: 1; color: #fff; background: rgba(255,255,255,.08); border: 0; border-radius: 50%; cursor: pointer; transition: background .2s; }
.lbx-prev { left: 16px; } .lbx-next { right: 16px; }
.lbx-prev:hover, .lbx-next:hover { background: rgba(255,255,255,.2); }
.lbx-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.7); font-family: var(--mono, "Space Mono", monospace); font-size: 12px; letter-spacing: .1em; }
@media (max-width: 560px){ .lbx-prev, .lbx-next { width: 40px; height: 40px; font-size: 26px; } }

/* ===== Statement emoji (About) ===== */
.statement-body { display: flex; align-items: flex-start; justify-content: flex-start; gap: 40px; width: 100%; }
.statement-body > div { flex: 0 1 auto; min-width: 0; }
.statement-emoji { width: clamp(104px, 12vw, 190px); height: auto; flex: none; margin-top: -10px; }
@media (max-width: 800px) { .statement-body { flex-direction: row-reverse; justify-content: flex-end; gap: var(--sp-2); } .statement-emoji { width: 84px; } }

/* ===== Case gallery: justified rows (fill full width, keep aspect) ===== */
.gallery--just { columns: auto; column-gap: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.gallery--just > div { position: relative; height: var(--rh, 340px); flex-grow: var(--r, 1); flex-shrink: 1; flex-basis: calc(var(--r, 1) * var(--rh, 340px)); margin: 0; overflow: hidden; border-radius: var(--radius-sm); }
.gallery--just > div img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery--just > div.gfx { background: var(--gfxbg, #f4f4f4); }
.gallery--just > div.gfx img { object-fit: contain; padding: 5%; }
@media (max-width: 900px) { .gallery--just > div { --rh: 260px; } }
@media (max-width: 600px) { .gallery--just > div { --rh: 190px; } }

.case-credit-line { margin-top: clamp(24px,4vh,40px); font-size: var(--fs-sm); color: var(--text-dim); }

/* ===================== FOOTER v2 ===================== */
.site-footer { border-top: 0; margin-top: clamp(48px,8vh,120px); padding: 0 var(--gutter) var(--sp-2); }
.ft-panel { background: #dbe4f7; border-radius: 18px; padding: clamp(28px,4vw,56px) clamp(24px,4vw,56px) clamp(40px,6vw,72px); }
.ft-title { font-family: var(--font-display); font-weight: 400; color: #fff; font-size: clamp(64px,11vw,150px); line-height: .92; letter-spacing: -0.053em; margin: 0 0 clamp(40px,7vw,90px); }
.ft-cols { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(0,1fr); gap: clamp(20px,3vw,48px); align-items: start; }
.ft-emoji { width: clamp(88px,9vw,132px); height: auto; display: block; }
.ft-info { display: flex; flex-direction: column; gap: 18px; }
.ft-info a, .ft-info span.ft-num { color: #141414; font-size: var(--fs-sm); line-height: 1.2; text-decoration: none; display: block; transition: opacity var(--dur) var(--ease); }
.ft-info a:hover { opacity: .6; }
.ft-linkedin { margin-top: 14px; }
.ft-label { display: block; margin-top: 4px; font-size: 12px; letter-spacing: .04em; color: rgba(20,20,20,.5); }
.ft-nav { display: flex; flex-direction: column; gap: 12px; }
.ft-nav .col-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(20,20,20,.45); margin-bottom: 6px; }
.ft-nav a { font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 18px; letter-spacing: .96px; text-transform: uppercase; color: #141414; text-decoration: none; transition: opacity var(--dur) var(--ease); }
.ft-nav a:hover { opacity: .6; }
.ft-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0 0; font-size: 12px; color: var(--text-dim); }
@media (max-width: 820px) {
  .ft-cols { grid-template-columns: 1fr 1fr; }
  .ft-emoji { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ft-cols { grid-template-columns: 1fr; }
  .ft-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}
/* centered button under the marquee */
.related-cta { display: flex; justify-content: center; padding-top: clamp(56px, 7vh, 100px); }

/* section tag = nav styling */
.tag { font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 18px; letter-spacing: 0.96px; text-transform: uppercase; color: #171717; }

/* ===================== ABOUT PAGE (figma 940:2496) ===================== */
.about-page { background: #9eaafc; }
.ab-back { background: #fff; }
.ab-back:hover { background: #f0f0f0; }
.ab-nav a { color: #fff; }
.ab-nav a:hover { color: rgba(255,255,255,.7); }

.ab-grid {
  display: grid;
  grid-template-columns: 757fr 1041fr;
  gap: clamp(20px, 2.2vw, 42px);
  padding: clamp(16px, 1.5vw, 28px) var(--gutter) 0;
  align-items: stretch;
}
.ab-left { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.ab-title {
  font-family: var(--font-display); font-weight: 400; color: #fff;
  font-size: max(52px, 9.9vw);
  line-height: 0.947; letter-spacing: -0.058em; margin: 0;
}
.ab-photo { border-radius: 10px; overflow: hidden; position: relative; background: #fff; flex: 1 1 auto; min-height: min(40vw, 775px); }
.ab-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; transform: scale(1.486); border-radius: 0; }

.ab-card {
  background: #fff; border-radius: 10px; overflow: hidden; align-self: stretch;
  padding: clamp(28px, 2.6vw, 50px) clamp(20px, 2vw, 39px) 0 clamp(16px, 1.5vw, 28px);
}
.ab-statement {
  font-family: var(--font-display); font-weight: 400; color: #171717;
  font-size: max(24px, 2.5vw); line-height: 0.8925; letter-spacing: -0.0175em;
  margin: 0 0 clamp(20px, 1.6vw, 30px);
}
.ab-body {
  font-family: var(--font-sans); font-weight: 500; color: #171717;
  font-size: max(15px, 1.458vw); line-height: 1.2; letter-spacing: -0.01em;
  margin: 0 0 clamp(20px, 2.2vw, 42px);
}
.ab-body b { font-weight: 900; }
.ab-card-emoji {
  display: block; width: max(120px, 10.5vw); height: auto;
  margin: clamp(24px, 3.6vw, 70px) 0 12px calc(-1 * clamp(16px, 1.5vw, 28px));
  border-radius: 0;
}

/* footer variant used on the about page */
.ft-panel--invert { background: #fff; }
.ft-panel--invert .ft-title { color: #dbe4f7; }

@media (max-width: 1000px) {
  .ab-grid { grid-template-columns: 1fr; gap: 24px; padding-inline: var(--gutter); }
  .ab-title { font-size: clamp(52px, 13vw, 110px); }
  .ab-statement { font-size: clamp(24px, 4.4vw, 40px); }
  .ab-body { font-size: clamp(16px, 2.6vw, 22px); }
}
@media (max-width: 560px) {
  .about-page .ab-topbar { padding-inline: var(--gutter); }
  .ab-card-emoji { margin-top: 28px; }
}


/* ===================== CONTACT PAGE (figma 940:2838) ===================== */
.contact-page { background: #fd491b; }
.ct-wrap { padding-inline: var(--gutter); }
.ct-title { margin: clamp(24px, 3vw, 56px) 0 clamp(20px, 2.3vw, 44px); }

.ct-panel { background: #fff; border-radius: 18px; padding: clamp(24px, 2.9vw, 56px) clamp(20px, 2.4vw, 46px); }
.ct-grid { display: grid; grid-template-columns: repeat(3, 1fr) 1.45fr; gap: clamp(20px, 2.4vw, 46px); align-items: stretch; }
.ct-col { display: flex; flex-direction: column; justify-content: space-between; gap: clamp(28px, 5vw, 96px); min-height: clamp(220px, 19vw, 366px); }
.ct-big {
  font-family: var(--font-display); font-weight: 400; color: #dbe4f7;
  font-size: max(48px, 7.8vw); line-height: 0.92; letter-spacing: -0.053em;
  display: block;
}
.ct-line {
  font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 18px;
  letter-spacing: 0.96px; text-transform: uppercase; color: #171717; text-decoration: none;
  transition: opacity var(--dur) var(--ease);
}
.ct-line:hover { opacity: .6; }
.ct-col:first-child .ct-line::after { content: ""; display: block; margin-top: 4px; height: 14.4px; }
.ct-sub { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; letter-spacing: 0.48px; text-transform: none; color: rgba(20,20,20,.5); }

.ct-form { display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(14px, 1.2vw, 22px); }
.ct-form .field { margin: 0; padding-block: 0 0; border-bottom: 1px solid rgba(20,20,20,.25); }
.ct-form .field:focus-within { border-color: #171717; }
.ct-form .field label { font-size: 11px; letter-spacing: .06em; color: rgba(20,20,20,.45); margin-bottom: 6px; }
.ct-form .field input, .ct-form .field textarea {
  width: 100%; background: none; border: 0;
  color: #171717; font-family: var(--font-sans); font-size: 15px; padding: 0 0 10px; border-radius: 0;
}
.ct-form .field input:focus, .ct-form .field textarea:focus { outline: none; }
.ct-send {
  align-self: flex-start; margin-top: 4px; background: #141414; color: #fff; border: 0; cursor: pointer;
  font-family: var(--font-sans); font-weight: 700; font-size: 13px; letter-spacing: 0.52px; text-transform: uppercase;
  padding: 14px 24px; border-radius: 999px; transition: opacity var(--dur) var(--ease);
}
.ct-send:hover { opacity: .85; }
.ct-send:disabled { opacity: .6; cursor: default; }

.ct-more { margin-top: clamp(48px, 8vh, 120px); }
.ct-more-label {
  font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 18px;
  letter-spacing: 0.96px; text-transform: uppercase; color: #fff; margin-bottom: clamp(16px, 1.6vw, 30px);
}
.contact-page .marquee { border-block: 0; }
.btn-pill--white { background: #fff; }
.btn-pill--white:hover { background: #f0f0f0; }

.ct-footer { padding: clamp(40px, 6vh, 96px) 0 var(--sp-2); }
.ct-footer .ct-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: clamp(28px, 5vh, 72px); }
.ct-footer .ab-nav { align-items: flex-end; }
.ct-bottom { display: flex; justify-content: space-between; width: 100%; font-size: 12px; color: #fff; }

@media (max-width: 1100px) {
  .ct-grid { grid-template-columns: 1fr 1fr; }
  .ct-form { grid-column: 1 / -1; }
  .ct-col { min-height: 0; gap: 24px; }
}
@media (max-width: 640px) {
  .ct-grid { grid-template-columns: 1fr; }
  .ct-title { font-size: clamp(52px, 15vw, 110px); }
  .ct-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

.about-page .ft-title, .contact-page .ft-title { font-size: max(64px, 7.8vw); }
.about-page .ft-emoji { width: max(88px, 6.9vw); }

/* ===================== UNIFIED HEADER (identical on every page) ===================== */
:root { --hdr-emoji: max(104px, 8.6vw); }
.case-topbar, .home-intro {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); padding: var(--sp-3) var(--gutter) 0;
  min-height: calc(var(--hdr-emoji) + var(--sp-3));
}
/* the artwork is pre-trimmed, so one height means one visual size for every emoji */
.case-avatar img, .intro-avatar img {
  height: var(--hdr-emoji); width: auto; display: block; border-radius: 0;
}
.case-back-btn { flex: none; width: 44px; height: 44px; }
.case-nav, .intro-nav { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
/* keeps the home nav in the exact same place even without a Home link */
.nav-slot { visibility: hidden; font-family: var(--font-sans); font-size: 15px; font-weight: 600; line-height: 18px; letter-spacing: 0.96px; text-transform: uppercase; }
@media (max-width: 720px) {
  :root { --hdr-emoji: 84px; }
  .home-intro { flex-direction: column; align-items: flex-start; }
  .intro-nav { flex-direction: row; align-items: flex-start; gap: var(--sp-2); }
  .nav-slot { display: none; }
}

/* ===================== PROJECT CARD: gallery cycle on hover ===================== */
.card-media { position: relative; overflow: hidden; }
.card-cycle {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .22s var(--ease); pointer-events: none; border-radius: inherit;
}
.card-cycle.is-on { opacity: 1; }
