@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root{
  --bg: #000000;
  --bg-card: #4A1F1F;
  --text: #D1C0A6;
  --text-dim: #a89985;
  --text-dimmer: #6b5d4d;
  --accent: #B81D23;
  --border: rgba(0, 0, 0, 0);
  --border-strong: rgba(0, 0, 0, 0);
  --max: min(96vw, 2200px);

  /* ---- Custom cursors ----
     Drop your own images into img/ using these exact filenames
     (or edit the paths below). Keep each image small (ideally
     ≤32x32–48x48px, PNG with transparency) — most browsers ignore
     or badly scale cursor images that are much larger than that.
     The two numbers after the url are the "hotspot" — the pixel
     inside the image that acts as the actual click point (default
     here: dead center of a 32x32 image). Adjust to match your
     image size, then the safe keyword at the end (auto / pointer /
     grab / grabbing) is the browser fallback while your image loads
     or if it fails. */
  --cursor-default: url('img/cursor-default.png') 16 16, auto;
  --cursor-hover:   url('img/cursor-hover.png') 16 16, pointer;
  --cursor-grab:    url('img/cursor-grab.png') 16 16, grab;
  --cursor-grabbing:url('img/cursor-grab.png') 16 16, grabbing;

  /* Same three images, as plain backgrounds for the smooth JS
     cursor further down — same files, just no hotspot/fallback
     syntax since this version isn't fed to the `cursor` property. */
  --cursor-img-default: url('img/cursor-default.png');
  --cursor-img-hover:   url('img/cursor-hover.png');
  --cursor-img-grab:    url('img/cursor-grab.png');
}

*{ box-sizing: border-box; }

html{ overflow-x: hidden; }

/* ================= PRELOADER =================
   A solid-color curtain with just a big centered "NN%" counter,
   tracking real asset-loading progress. At 100% the whole curtain
   slides straight up and off-screen (not a fade), uncovering the
   real homepage underneath — reveal starts from the bottom of the
   viewport upward as it slides. */
html.preload-lock,
html.preload-lock body{
  overflow: hidden;
  height: 100%;
}

.preloader{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .8s cubic-bezier(.76,0,.24,1);
  will-change: transform;
}
.preloader.preloader-done{
  transform: translateY(-100%);
  pointer-events: none;
}

.preloader-percent{
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: clamp(64px, 14vw, 180px);
  line-height: 1;
  color: var(--text);
  letter-spacing: 0.01em;
}

@media (prefers-reduced-motion: reduce){
  .preloader{ transition: none !important; }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size:18.5px;
  line-height: 1.5;
  cursor: var(--cursor-default);
}

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

/* ---- Custom cursor states ----
   Hover cursor: any clickable element. Add more selectors here as
   the site grows (e.g. new buttons/components) — anything that
   should visually invite a click belongs in this list. */
a,
button,
.nav-menu,
.menu-close,
.card,
.expertise-card,
.about-pill,
.footer-social a,
[role="button"]{
  cursor: var(--cursor-hover);
}

/* Grab cursor: the draggable tag pills. This comes after the hover
   rule above and wins on elements matched by both (a .drag-tag is
   also an <a> in about.html), since equal-specificity rules cascade
   by source order. */
.drag-tag{ cursor: var(--cursor-grab); }
.drag-tag.dragging{ cursor: var(--cursor-grabbing); }

/* ---- Smooth JS cursor ----
   The rules above are the no-JS / touch fallback (an instant,
   browser-drawn image cursor). cursor.js adds html.cursor-fine only
   on real mouse/trackpad devices once it's running, and only then
   do we hide the native cursor and hand off to #customCursor, a
   fixed element cursor.js drags toward the pointer every frame with
   easing for the "follows smoothly" feel. Touch devices, and any
   browser with JS disabled, never see this — they keep the plain
   image cursor above, which is exactly what a touch device needs
   anyway (there's no real cursor to hide). */
html.cursor-fine,
html.cursor-fine *{
  cursor: none !important;
}

.custom-cursor{
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  background-image: var(--cursor-img-default);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity .2s ease, width .15s ease, height .15s ease;
  will-change: transform;
}
.custom-cursor.is-visible{ opacity: 1; }
.custom-cursor.state-hover{
  width: 44px;
  height: 44px;
  background-image: var(--cursor-img-hover);
}
.custom-cursor.state-grab,
.custom-cursor.state-grabbing{
  background-image: var(--cursor-img-grab);
}
@media (prefers-reduced-motion: reduce){
  .custom-cursor{ transition: opacity .2s ease; }
}
/* Custom cursor is a real-mouse-only enhancement; never render it,
   and never hide the native cursor, on touch. */
@media (pointer: coarse){
  html.cursor-fine,
  html.cursor-fine *{ cursor: auto !important; }
  .custom-cursor{ display: none; }
}

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3{
  font-family: 'Space Grotesk', sans-serif;
  margin: 0;
}

h1{ text-transform: uppercase; }

/* ---------- Nav ---------- */
body{ padding-top: 120px; }

.nav{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px max(20px, calc((100% - var(--max)) / 2 + 20px));
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-mark{
  display: flex;
  align-items: center;
}
.nav-mark img{
  height: 30px;
  max-height: 30px;
  width: auto;
  display: block;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.nav-mark:hover img{
  transform: scale(1.1) rotate(-6deg);
}

.nav-loc{
  font-size:15px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.nav-menu{
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
  padding: 8px 0;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-menu span{
  width: 100%; height: 1px; background: var(--text-dim); display:block;
  transition: background .2s ease;
}
.nav-menu:hover span{ background: var(--text); }

body.no-scroll{ overflow: hidden; }

/* ---------- Menu overlay ---------- */
.menu-overlay{
  position: fixed;
  inset: 0;
  background: linear-gradient(155deg, #B81D23 0%, #B81D23 45%, #4A1F1F 100%);
  color: #000000;
  z-index: 200;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.menu-overlay.open{
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease;
}

.menu-topbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 20px;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  text-transform: uppercase;
}
.menu-mark{
  display: inline-flex;
  align-items: center;
}
.menu-mark img{
  height: 30px;
  width: auto;
  display: block;
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.menu-mark:hover img{
  transform: scale(1.1) rotate(-6deg);
}

.menu-close{
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(26,11,4,0.3);
  background: none;
  color: #000000;
  font-size:16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .2s ease, transform .35s cubic-bezier(.16,1,.3,1);
}
.menu-close:hover{ border-color: #000000; transform: rotate(90deg); }

.menu-links{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.menu-link-mask{ overflow: hidden; }

.menu-link{
  display: block;
  overflow: hidden;
  height: 1.1em;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size:clamp(55px, 12.4vw, 121px);
  line-height: 1.1;
  text-align: center;
  color: #000000;
  transform: translateY(115%);
}

/* text rolling hover: two stacked copies of the label, the whole
   pair slides up by one line-height on hover to reveal the twin line */
.roll-inner{
  display: block;
  transition: transform .5s cubic-bezier(.65,0,.35,1);
}
.roll-line{
  display: block;
  line-height: 1.1;
}
.menu-link:hover .roll-inner{
  transform: translateY(-50%);
}

.menu-overlay.open .menu-link{
  animation: linkUp .8s cubic-bezier(.19,1,.22,1) forwards;
}
.menu-overlay.open .menu-link-mask:nth-child(1) .menu-link{ animation-delay: .08s; }
.menu-overlay.open .menu-link-mask:nth-child(2) .menu-link{ animation-delay: .16s; }
.menu-overlay.open .menu-link-mask:nth-child(3) .menu-link{ animation-delay: .24s; }
.menu-overlay.open .menu-link-mask:nth-child(4) .menu-link{ animation-delay: .32s; }

@keyframes linkUp{
  0%{ transform: translateY(115%); }
  100%{ transform: translateY(0%); }
}

@media (prefers-reduced-motion: reduce){
  .menu-link{ transform: none; }
  .menu-overlay.open .menu-link{ animation: none; }
  .roll-inner{ transition: none; }
}

/* ---------- Hero (home) ---------- */
.hero{
  position: relative;
  min-height: calc(100svh - 120px);
  display: flex;
  flex-direction: column;
  padding: 12px 0 40px;
  box-sizing: border-box;
}
.hero h1{
  font-size:clamp(46px, 8.5vw, 140px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: none;
}
@media (min-width: 700px){
  .hero h1{ white-space: nowrap; }
}

/* ---- New logo-centric hero (index) ---- */
.hero-top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: -24px;
}
.hero-top-left{
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  margin: 0;
}
.hero-top-right{
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 320px;
  text-align: left;
  margin: 0;
}
@media (max-width: 700px){
  .hero-top-right{ text-align: left; max-width: 100%; }
}

.hero-mark-wrap{
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}
.hero-mark-trigger{ cursor: pointer; margin-top: -90px; }
.hero-mark-trigger .hero-float-card{
  width: min(50vw, 460px);
  aspect-ratio: 4 / 5;
  transform: translate(-50%, -50%) rotate(6deg) scale(0.85);
}
.hero-mark-trigger.hero-hover-trigger:hover .hero-float-card{
  transform: translate(-50%, -50%) rotate(6deg) scale(1);
}
@media (max-width: 900px){
  .hero-mark-trigger .hero-float-card{
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(65vw, 300px);
    opacity: 1;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(6deg) scale(0.85) !important;
  }
}
.hero-mark-logo{
  width: 60vw;
  max-width: 97%;
  height: auto;
  display: block;
  transform: rotate(-3deg);
  overflow: visible;
}

/* Stroke-draw animation removed — the preloader now owns the reveal
   moment (the wing morphs into this exact mark once loading hits
   100%), so the logo itself just sits in its finished, filled state. */
.hero-mark-logo .sig-path{
  fill: #d0bfa6;
  stroke: none;
}
.hero-mark-logo .sig-pen-tip{ display: none; }

.hero-contact-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  font-size: 15px;
  color: var(--text-dim);
}
.hero-contact-row a{ opacity: 1; transition: opacity .2s ease; }
.hero-contact-row a:hover{ color:#B81D23; opacity: 1; }
.hero-contact-social{ display: flex; gap: 22px; }

.hero-star-section{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 100px;
  padding-left: 40px;
  box-sizing: border-box;
}

.hero-star-wrap{
  position: relative;
  width: min(46vw, 360px);
  aspect-ratio: 1 / 1;
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(5%);
}
.hero-star{
  width: 100%;
  height: 80%;
  object-fit: contain;
  display: block;
}

/* Draggable tag pills */
.drag-tag{
  position: absolute;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(9px, 0.95vw, 22px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
  touch-action: none;
  white-space: nowrap;
  z-index: 6;
}
.drag-tag-dot{
  position: absolute;
  top: 0;
  left: 0;
  width: 0.85em;
  height: 0.85em;
  background: var(--accent);
  transform: translate(-38%, -38%);
  z-index: 2;
}
.drag-tag-label{
  position: relative;
  z-index: 1;
  display: block;
  background: var(--text);
  color: #000000;
  padding: 0.65em 1em;
  transition: box-shadow .15s ease;
}
.drag-tag.dragging .drag-tag-label{
  box-shadow: 0 14px 34px -10px rgba(0,0,0,.55);
}
.drag-tag.dragging{
  cursor: grabbing;
  z-index: 40;
}
.drag-tag--quote{
  font-size: clamp(7px, 0.65vw, 9px);
}
@media (max-width: 640px){
  .drag-tag{ font-size: 8px; }
  .drag-tag-label{ padding: 0.55em 0.85em; }
  .drag-tag--quote{ font-size: 7px; }
}

/* Highlighted headline word + cursor-following photo card */
.hero-hover-trigger{
  position: relative;
  display: inline-block;
}
.hero-highlight{
  display: inline-block;
  background: var(--accent);
  color: #000000;
  padding: 0 18px 6px;
  border-radius: 0;
  border: 3px solid #000000;
  transition: background .3s ease;
}
.hero-hover-trigger:hover .hero-highlight{ background: #B81D23; }

.hero-float-card{
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 220px;
  aspect-ratio: 4 / 5;
  border-radius: 0;
  overflow: hidden;
  background: var(--bg-card);
  border: 3px solid #000000;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -60px) rotate(5deg) scale(0.85);
  transition: opacity .3s ease, transform .12s linear;
  z-index: 250;
}
.hero-hover-trigger:hover .hero-float-card{
  opacity: 1;
  transform: translate(-50%, -60px) rotate(5deg) scale(1);
}
.hero-float-inner{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #4A1F1F, #000000 70%);
  text-align: center;
 
}


.hero-float-label{
  font-family: 'Inter', sans-serif;
  font-size:12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

@media (max-width: 900px){
  .hero-float-card{ display: none; }
}
@media (prefers-reduced-motion: reduce){
  .hero-float-card{ transition: opacity .2s ease; }
}

.hero-meta{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 48px;
  gap: 40px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.hero-name{
  font-size:15px;
  color: var(--text-dim);
  white-space: nowrap;
}
.hero-desc{
  font-size:17px;
  color: var(--text-dim);
  max-width: 380px;
  line-height: 1.55;
}

/* ---------- Section label ---------- */

.section-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0 10px;
  margin-bottom: 10px;
  
}
.section-head h2{
  font-size:15px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.section-head-right{
  display: flex;
  align-items: baseline;
  gap: 24px;
}
.view-all{
  font-size:15px;
  color: var(--text-dim);
  transition: color .2s ease;
  white-space: nowrap;
}
.view-all:hover{ color: var(--accent); }
@media (max-width: 560px){
  .section-head{ align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .section-head-right{ flex-direction: column; align-items: flex-start; gap: 6px; }
}
.section-head .range{
  font-size:15px;
  color: var(--text-dim);
  transition: color .2s ease;
}
.section-head .range:hover{ color: var(--accent); }

#work{
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

/* ---------- Work grid ---------- */
.work-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 10px;
  padding-bottom: 90px;
}

.card{
  display: block;
  group: card;
}

.card-frame{
  aspect-ratio: 4 / 3.1;
  
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
  transition: border-color .25s ease;
}
.card:hover .card-frame{ border-color: var(--accent); }

.card-info{
  display: flex;
  flex-direction: column;
  padding: 6px 2px 0;
}
.card-info .name{
  color: var(--text);
  font-size:26px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.card-info .type{
  color: var(--text-dim);
  font-size:17px;
  text-transform: none;
  margin-top: -4px;
}

/* mockup art inside cards */
.mock{
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform .45s cubic-bezier(.16,1,.3,1);
}
.card:hover .mock{ transform: scale(1.1); }
@media (prefers-reduced-motion: reduce){
  .mock{ transition: none; }
}

/* Real project cover photos (used by the work-grid cards once a
   real image replaces the CSS mock placeholder) */
.card-photo{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.16,1,.3,1);
}
.card:hover .card-photo{ transform: scale(1.1); }
@media (prefers-reduced-motion: reduce){
  .card-photo{ transition: none; }
}
.mock-plate{
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.05), transparent 60%),
    linear-gradient(155deg, #4A1F1F, #000000 70%);
}
.mock-screen{
  width: 58%;
  aspect-ratio: 16/10.2;
  background: var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #000000;
  box-shadow: 0 24px 50px -12px rgba(184,29,35,0.35);
  transform: perspective(600px) rotateX(4deg);
}
.mock-screen.dark{
  background: #000000;
  color: var(--accent);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.mock-screen .glyph{ font-size:15cqw; line-height: 1; }
.mock-card{
  width: 46%;
  aspect-ratio: 1.55/1;
  background: var(--accent);
  border-radius: 5px;
  transform: rotate(-8deg);
  box-shadow: 0 20px 44px -14px rgba(184,29,35,0.4);
}
.mock-tag{
  width: 30%;
  aspect-ratio: 2.6/1;
  background: var(--accent);
  border-radius: 3px;
  transform: rotate(-6deg) translateY(6%);
  display:flex; align-items:center; justify-content:center;
  font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:12.5px; color:#000000;
  letter-spacing: 0.05em;
}

/* ---------- Footer ---------- */
.footer{
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  margin-top: 40px;
  box-sizing: border-box;
  background: linear-gradient(155deg, #B81D23 0%, #B81D23 45%, #4A1F1F 100%);
  color: #000000;
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1s cubic-bezier(.16,1,.3,1);
}
.footer.in-view{
  opacity: 1;
  transform: translateY(0);
}
.footer::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 32%);
  pointer-events: none;
}
.footer-inner{
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* không cho cột giãn theo độ rộng chữ */
  grid-template-rows: 1.6fr auto auto 1fr auto; /* top spacer / contact / social / bottom spacer / bottom row */
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: none;
  /* Lề trái/phải giống hệt .nav → khung nội dung footer rộng bằng nav-bar */
  padding: 130px max(20px, calc((100% - var(--max)) / 2 + 20px)) 50px;
  text-align: center;
  box-sizing: border-box;
}
@media (max-width: 560px){
  .footer-inner{ padding: 160px 16px 50px; }
}

.footer-contact{
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 44px;
  /* Phải chiếm đủ 100% khung. Trước đây margin auto khiến khung co lại
     bằng đúng chiều rộng chữ, nên JS đo sai và không fit được. */
  width: 100%;
  min-width: 0;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.footer-contact-item{
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(12px, 5vw, 120px); /* giá trị ban đầu, JS sẽ fit lại chính xác */

  line-height: 1.2;
  text-transform: uppercase;
  color: #000000;
  white-space: nowrap;
}

.footer-social{
  grid-row: 3;
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 0;
}
.footer-social a{
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: clamp(16px, 1.4vw, 24px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #000000;
  opacity: 0.5;
  transition: opacity .2s ease;
}
.footer-social a:hover{ opacity: 1; }

.footer-bottom{
  grid-row: 5;
  position: relative;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.15);
  padding-top: 24px;
  font-size:15px;
  color: rgba(0,0,0,0.62);
}

@media (prefers-reduced-motion: reduce){
  .footer{ opacity: 1; transform: none; }
}

/* ---------- Project page ---------- */
.proj-hero{ 
  position: relative;
  min-height: calc(50svh - 120px);
  display: flex;
  flex-direction: column;
  padding: 12px 0 40px;
  box-sizing: border-box;
}
.proj-hero h1{
  padding-top: 8svh;
  font-size:clamp(64px, 12vw, 320px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: none;
  text-align: center;
}


.proj-meta{
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
  padding: 28px 0 60px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.proj-meta .label{
  font-size:14px;
  color: var(--text-dimmer);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.proj-meta .val{
  font-size:16px;
  color: var(--text-dim);
  line-height: 1.6;
}
.proj-meta .val.strong{ color: var(--text); }

.proj-meta-facts{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Editorial variant: narrow facts column on the LEFT, wide
   description on the RIGHT — opt in with class="proj-meta editorial"
   on the <section>. Leaves the default .proj-meta layout (used by
   every other project page) untouched. */
.proj-meta.editorial{
  grid-template-columns: 1fr 2.4fr;
  gap: 64px;
}
.proj-meta.editorial .proj-meta-facts{
  gap: 28px;
}
.proj-meta.editorial .proj-meta-row{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.proj-meta.editorial .proj-meta-row .label{
  display: block;
  margin-bottom: 0;
  font-size:15px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
.proj-meta.editorial .proj-meta-row .val{
  font-size:15px;
  line-height: 1.4;
  color: var(--text-dim);
}
.proj-meta.editorial .proj-meta-desc .val{
  font-size:17px;
  line-height: 1.85;
}
.proj-meta.editorial .proj-meta-desc{
  max-width: min(60vw, 780px);
  margin-left: auto;
}
@media (max-width: 900px){
  .proj-meta.editorial .proj-meta-desc{ max-width: 100%; margin-left: 0; }
}
@media (max-width: 720px){
  .proj-meta.editorial{ grid-template-columns: 1fr; gap: 28px; }
}

.proj-images{
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 100px;
}

/* Photos: full width, height follows the image's own proportions —
   no cropping, no fixed aspect-ratio. Add as many .proj-photo blocks
   as you like (5-10 is a good range for one project). */
.proj-photo{
  display: block;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.proj-photo img{
  display: block;
  width: 100%;
  height: auto;
}

/* Videos: Google Drive (or any) embeds, in two grid variants —
   use whichever matches your footage:
   - .proj-videos-grid.portrait  → 9:16 vertical clips, up to 3 per row
   - .proj-videos-grid.landscape → 16:9 horizontal clips, up to 2 per row
   Each wraps onto additional rows automatically as you add more. */
.proj-videos-grid{
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}
/* PORTRAIT grid (9:16 clips): columns size themselves to the video
   (max 358px each, up to 3 per row) instead of always stretching to
   fill the row. With fewer than 3 videos, auto-fit collapses the
   unused tracks and justify-content centers what's left — so 1 video
   sits centered on its own, 2 sit centered as a pair with space on
   both sides, and 3 fill the row edge to edge as before. */
.proj-videos-grid.portrait{
  grid-template-columns: repeat(auto-fit, minmax(220px, 358px));
  justify-content: center;
}
.proj-videos-grid.landscape{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px){
  .proj-videos-grid.portrait{ grid-template-columns: repeat(auto-fit, minmax(160px, 260px)); }
}
@media (max-width: 560px){
  .proj-videos-grid.portrait{ grid-template-columns: minmax(0, 320px); }
  .proj-videos-grid.landscape{ grid-template-columns: 1fr; }
}
.proj-video{
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.proj-videos-grid.portrait .proj-video{ aspect-ratio: 9 / 16; }
.proj-videos-grid.landscape .proj-video{ aspect-ratio: 16 / 9; }

/* Full-width video: spans the entire row instead of sitting in one
   grid column. Mostly useful for a single LANDSCAPE video (portrait
   rows already self-center above without needing this). Add
   class="proj-video full-row" in the HTML. */
.proj-video.full-row{
  grid-column: 1 / -1;
}
/* A full-row PORTRAIT (9:16) video would otherwise stretch to the
   container's full width and become extremely tall — cap it by
   height instead, centered, so it reads at roughly one screen tall. */
.proj-videos-grid.portrait .proj-video.full-row{
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  margin: 0 auto;
}
.proj-video iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.proj-video-placeholder{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-dimmer);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.proj-video-placeholder .play-dot{
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-dim);
  padding-left: 3px;
}

.proj-next{
  border-top: 1px solid var(--border);
  padding: 40px 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.proj-next .tag{ font-size:14px; color: var(--text-dimmer); letter-spacing: 0.06em; margin-bottom: 8px; }
.proj-next a{
  display: flex;
  flex-direction: column;
  transition: color .2s ease;
}
.proj-next-link{
  font-family: 'Space Grotesk', sans-serif;
  font-size:clamp(27.5px,4.6vw,46px);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
}
.proj-next a:hover{ color: var(--accent); }
.proj-next-prev{ align-items: flex-start; text-align: left; }
.proj-next-next{ align-items: flex-end; text-align: right; }
.proj-next-next .proj-next-link{ justify-content: flex-end; }

@media (max-width: 640px){
  .proj-next{ flex-direction: column; }
  .proj-next-next{ align-items: flex-start; text-align: left; }
  .proj-next-next .proj-next-link{ justify-content: flex-start; }
}

/* ---------- About page ---------- */
.about-hero{ padding: 20px 0 32px; }
.about-hero h1{
  font-size:clamp(48.5px, 9.2vw, 110.5px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.about-pill{
  display: inline-flex;
  align-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
  z-index: 1000;
  border-radius: 0;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.about-pill:hover{
  background: var(--accent);
  border-color: var(--accent);
  color: #000000;
}

.about-image{
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/8.5;
  position: relative;
  justify-content: center;  
  display: flex;
  margin-bottom: 56px;
}

.about-bio{
  max-width: 720px;
  margin: 0 auto 90px;
  text-align: center;
}
.about-bio > p{
  font-size:18.5px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 32px;
}
.about-quote{
  font-family: 'Space Grotesk', sans-serif;
  font-style: italic;
  font-weight: 500;
  font-size:17px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0 0 20px;
}

.expertise{ padding-bottom: 90px; }

/* Shared label-left / content-right row, used by My expertise,
   Experience and Client */
.info-row{
  display: grid;
  grid-template-columns: minmax(160px, 300px) 1fr;
  gap: 20svh;
  align-items: start;
}
.expertise-head{
  font-size:clamp(34.5px, 5.75vw, 53px);
  font-weight: 600;
  line-height: 1.06;
  margin: 0;
}
.expertise-grid{
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(209,192,166,0.15);
}
.expertise-card{
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 60px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(209,192,166,0.15);
  overflow: visible;
  transition: opacity .2s ease;
}
.expertise-card:hover{ z-index: 50; }
.expertise-card:hover h3{ color: var(--accent); }
.expertise-card h3{
  font-size:18.5px;
  font-weight: 600;
  margin: 0;
  flex: 0 0 auto;
  min-width: 180px;
  transition: color .2s ease;
}
.expertise-card p{
  font-size:15.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  flex: 1 1 320px;
}

/* Cursor-following photo preview, same visual language as the
   hero "Visual teller" hover card */
.expertise-float-card{
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 170px;
  aspect-ratio: 4 / 5;
  border-radius: 0;
  overflow: hidden;
  background: var(--bg-card);
  border: 3px solid #000000;
  box-shadow: 0 24px 54px -18px rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(5deg) scale(0.85);
  transition: opacity .3s ease, transform .12s linear;
  z-index: 40;
}
.expertise-card:hover .expertise-float-card{
  opacity: 1;
  transform: translate(-50%, -50%) rotate(5deg) scale(1);
}
.expertise-float-inner{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, #4A1F1F, #000000 70%);
  text-align: center;
  padding: 14px;
}
.expertise-float-label{
  font-family: 'Inter', sans-serif;
  font-size:11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}
@media (max-width: 860px){
  .expertise-float-card{ display: none; }
}
@media (prefers-reduced-motion: reduce){
  .expertise-float-card{ transition: opacity .2s ease; }
}

/* ---- Experience / Client (about page) ---- */
.exp-clients{
  padding-bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.exp-list{
  columns: 1;
}
.exp-row{
  break-inside: avoid;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  padding: 12px 0;
  font-size:16px;
}
.exp-org{
  font-weight: 600;
  color: var(--text);
  text-underline-offset: 3px;
  text-decoration-color: var(--text-dimmer);
  transition: color .2s ease, text-decoration-color .2s ease;
}
.exp-org:hover{ color: var(--accent); text-decoration-color: var(--accent); }
.exp-role{ color: var(--text-dim); }

.client-cols{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 40px;
}
.client-col{
  display: flex;
  flex-direction: column;

}
.client-col span{
  display: block;
  padding: 9px 0;
  font-size:16px;
  color: var(--text-dim);
}

@media (max-width: 860px){
  .client-cols{ grid-template-columns: repeat(2, 1fr); gap: 20px 32px; }
}
@media (max-width: 700px){
  /* Below this, .info-row drops to one column, so its single "gap"
     becomes a row-gap instead of a column-gap — 20svh there would
     leave a huge blank strip between the heading and its content,
     so it's overridden down to a normal spacing value here. */
  .info-row{ grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px){
  .client-cols{ grid-template-columns: 1fr; }
}

@media (max-width: 560px){
  .about-bio{ text-align: left; }
  .expertise-card h3{ min-width: 100%; }
}

/* ---------- Gallery page ---------- */
.gallery-sub{
  margin-top: 16px;
  font-size:17px;
  color: var(--text-dim);
  max-width: 420px;
  line-height: 1.55;
}

.gallery-grid{
  column-count: 3;
  column-gap: 30px;
  padding: 48px 0 90px;
}

.gallery-item{
  display: block;
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color .25s ease;
}
.gallery-item:hover{ border-color: var(--border-strong); }

/* Full-width item: breaks out of the masonry columns to span the
   entire row — use for a single video (or any item) that shouldn't
   sit at 1/3 width. Add class="gallery-item full-row" in the HTML. */
.gallery-item.full-row{
  column-span: all;
  width: 100%;
}

/* Photos: no forced ratio — height follows the image's own
   proportions, exactly like the project-page photos. */
.gallery-media{ display: block; line-height: 0; }
.gallery-media img{ display: block; width: 100%; height: auto; }

/* Videos: embeds (e.g. Google Drive) have no intrinsic size, so give
   this wrapper an aspect-ratio matching the actual video — set it
   inline per item, e.g. style="aspect-ratio: 16 / 9" or "9 / 16". */
.gallery-media.gallery-video{ position: relative; width: 100%; }
.gallery-media.gallery-video iframe{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.gallery-play{
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(209,192,166,0.28);
  color: var(--text);
  font-size:11.5px;
  display: flex; align-items: center; justify-content: center;
  padding-left: 2px;
  z-index: 5;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.gallery-play:hover{
  background: var(--accent);
  color: #000000;
  transform: scale(1.1);
}

.gallery-overlay{
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.32) 48%, transparent 78%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.gallery-item:hover .gallery-overlay,
.gallery-item:focus-within .gallery-overlay{
  opacity: 1;
  transform: translateY(0);
}

.gallery-overlay .g-title{
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size:17px;
  margin-bottom: 3px;
}
.gallery-overlay .g-meta{
  font-size:14px;
  color: var(--text-dim);
}

@media (max-width: 900px){
  .gallery-grid{ column-count: 2; }
}
@media (max-width: 500px){
  .gallery-grid{ column-count: 1; }
}

@media (max-width: 860px){
  .work-grid{ grid-template-columns: repeat(2,1fr); }
  .hero-meta{ flex-direction: column; align-items: flex-start; gap: 16px; }
}
@media (max-width: 560px){
  .work-grid{ grid-template-columns: 1fr; }
  .proj-meta{ grid-template-columns: 1fr; }
  .nav{ padding: 22px 16px; }
  .menu-topbar{ padding: 22px 16px; }
  .wrap{ padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}

/* ---------- Scroll reveal (progressive enhancement) ---------- */
/* Default: fully visible, so content never depends on JS running */
.reveal{ opacity: 1; transform: none; }

/* H1 word-by-word reveal: default visible so content never
   depends on JS; when JS runs, each .word span is hidden then
   revealed with a stagger as the heading scrolls into view. */
.h1-reveal .word{ display: inline-block; opacity: 1; transform: none; }
html.js .h1-reveal .word{
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity .55s cubic-bezier(.16,1,.3,1), transform .55s cubic-bezier(.16,1,.3,1);
}
html.js .h1-reveal.words-in .word{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  html.js .h1-reveal .word{ opacity: 1; transform: none; transition: none; }
}

html.js .reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
html.js .reveal.in-view{
  opacity: 1;
  transform: translateY(0);
}

/* Multi-line text reveal: JS wraps the text into per-line masks so
   each line slides up into view one after another, instead of the
   whole paragraph appearing as a single block. Fully visible by
   default — a progressive enhancement that never depends on JS. */
.line-reveal .line-mask{ display: block; overflow: hidden; }
.line-reveal .line-inner{ display: block; opacity: 1; transform: none; }
html.js .line-reveal .line-inner{
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
html.js .line-reveal.in-view .line-inner{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  html.js .line-reveal .line-inner{ opacity: 1; transform: none; transition: none; }
}

/* stagger for grid items — nth-child of their row/grid container */
.reveal.stagger:nth-child(1){ transition-delay: .03s; }
.reveal.stagger:nth-child(2){ transition-delay: .09s; }
.reveal.stagger:nth-child(3){ transition-delay: .15s; }
.reveal.stagger:nth-child(4){ transition-delay: .21s; }
.reveal.stagger:nth-child(5){ transition-delay: .27s; }
.reveal.stagger:nth-child(6){ transition-delay: .33s; }
.reveal.stagger:nth-child(7){ transition-delay: .39s; }
.reveal.stagger:nth-child(8){ transition-delay: .45s; }

@media (prefers-reduced-motion: reduce){
  html.js .reveal{ opacity: 1; transform: none; transition: none; }
}
