/* ==========================================================================
   VC DREAMS — Site Styles
   Swiss Grid × Editorial Typography
   Refactored: 2026-11-25
   Main adjustments: full-width gallery, captions and three-photo grouping.
   ========================================================================== */

:root {
  --paper: #f4f2ee;
  --ink: #181917;
  --muted: #787872;
  --line: #bdbdb7;
  --red: #cf332c;
  --gutter: clamp(20px,4.45vw,86px);
  --content-max: 1780px;
  --ease: cubic-bezier(0.19,1,0.22,1);
  --sans: Arial,"Helvetica Neue","Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--red);
  color: white;
}

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

button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}

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

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 16px;
}

.page-gutter {
  padding-inline: var(--gutter);
  max-width: var(--content-max);
  margin-inline: auto;
}

.scroll-progress {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--red);
  pointer-events: none;
}

.stop {
  color: var(--red);
}

.eyebrow,
.micro-heading,
.section-rail,
.hero-top-right,
.header-descriptor,
.nav-num,
.project-meta,
.results,
.filters,
.fineprint,
.service-list,
.site-footer,
.prototype-flag,
.back-link {
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.065em;
  font-weight: 700;
}

/* 01. Header and navigation */

.site-header {
  position: relative;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(210px,1fr) minmax(175px,0.7fr) auto;
  align-items: center;
  gap: 25px;
  min-height: 86px;
  border-bottom: 1px solid var(--ink);
  padding: 0 var(--gutter);
  max-width: var(--content-max);
  margin: 0 auto;
  background: var(--paper);
}

.wordmark,
.footer-wordmark {
  font-family: Arial,"Helvetica Neue",sans-serif;
  font-size: clamp(25px,2.65vw,40px);
  letter-spacing: -0.11em;
  font-weight: 900;
  font-style: italic;
  white-space: nowrap;
  line-height: 1;
  transform: skew(-6deg);
  display: inline-block;
  width: max-content;
}

.logo-accent,
.footer-wordmark span {
  color: var(--red);
}

.wordmark-mark {
  display: inline-block;
  font-size: 10px;
  color: var(--red);
  vertical-align: top;
  letter-spacing: 0;
  font-weight: 700;
  font-style: normal;
  margin-left: 10px;
  transform: skew(6deg);
}

.header-descriptor {
  justify-self: start;
  line-height: 1.45;
  font-size: 10px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px,2.5vw,46px);
}

.desktop-nav a {
  font-size: 12px;
  letter-spacing: 0.01em;
  font-weight: 800;
  white-space: nowrap;
  transition: color 0.2s;
}

.desktop-nav a:hover {
  color: var(--red);
}

.nav-num {
  color: var(--red);
  font-size: 9px;
  vertical-align: top;
  margin-right: 5px;
}

.menu-toggle,
.mobile-nav {
  display: none;
}

/* 02. Hero */

.hero {
  padding-top: 26px;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tiny-cross {
  color: var(--red);
  font-size: 16px;
  margin-right: 6px;
}

.hero-top-right {
  color: var(--muted);
}

.hero-main {
  display: block;
  position: relative;
}

.hero-copy {
  padding-block: clamp(30px,3.3vw,56px) clamp(28px,3vw,46px);
  position: relative;
  z-index: 3;
}

.hero-copy .micro-heading {
  color: var(--muted);
  font-size: 10px;
}

.hero-copy h1 {
  font-size: clamp(72px,9.5vw,158px);
  line-height: 0.88;
  font-weight: 900;
  letter-spacing: -0.103em;
  position: relative;
  white-space: nowrap;
  margin-left: -0.065em;
  margin-top: 20px;
  margin-bottom: 30px;
}

.hero-copy h1 em {
  font-style: normal;
  letter-spacing: -0.113em;
}

.hero-copy-bottom {
  display: flex;
  justify-content: space-between;
  gap: clamp(28px,6vw,120px);
  align-items: end;
  padding-bottom: 0;
}

.hero-jp {
  font-size: clamp(18px,1.7vw,27px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.65;
}

.hero-aside {
  font-size: 11px;
  line-height: 1.65;
  font-weight: 700;
  letter-spacing: 0.04em;
  max-width: 170px;
}

/* 03. Home: portfolio listing */

.section-pad {
  padding-top: clamp(105px,12vw,180px);
  padding-bottom: clamp(120px,13vw,210px);
}

.works.section-pad {
  padding-top: 0;
  padding-bottom: clamp(75px,7.5vw,130px);
}

.works::before {
  content: "";
  display: block;
  border-top: 1px solid var(--ink);
}

.section-rail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
}

.section-rail span:last-child {
  color: var(--muted);
}

.works-toolbar {
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  padding: 9px 13px;
  background: transparent;
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.045em;
  transition: background 0.25s,color 0.25s,border-color 0.25s;
}

.filter[aria-pressed="true"],
.filter:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.filter-count {
  font-size: 9px;
  opacity: 0.65;
  margin-left: 5px;
  font-weight: 700;
}

.results {
  white-space: nowrap;
  color: var(--muted);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  column-gap: clamp(15px,2.3vw,36px);
  row-gap: clamp(54px,7vw,114px);
  align-items: stretch;
}

.work-card {
  grid-column: auto;
  min-width: 0;
  padding-top: 0;
  display: flex;
  animation: cardAppear 0.5s var(--ease) both;
}

.work-card a {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.work-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1.45;
  overflow: hidden;
  background: #e3dfd7;
  flex-shrink: 0;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease),filter 0.5s ease;
}

.work-card:hover .work-image img,
.work-card a:focus-visible .work-image img {
  transform: scale(1.055);
  filter: saturate(1.04);
}

.work-open {
  position: absolute;
  right: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  background: var(--paper);
  width: 44px;
  height: 44px;
  font-size: 25px;
  line-height: 1;
  transform: translateY(-14px);
  opacity: 0;
  transition: transform 0.3s,opacity 0.3s;
}

.work-card:hover .work-open,
.work-card a:focus-visible .work-open {
  opacity: 1;
  transform: translateY(0);
}

.sample-chip {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.08em;
  font-weight: 800;
  padding: 8px 10px;
}

.work-info {
  border-top: 1px solid var(--ink);
  padding-top: 15px;
  margin-top: 15px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: start;
  gap: 15px;
  flex: 1;
}

.work-info h3 {
  font-weight: 800;
  font-size: clamp(19px,1.65vw,27px);
  line-height: 1.3;
  letter-spacing: -0.055em;
  min-height: 2.6em;
}

.project-subtitle {
  font-size: clamp(12px,0.98vw,15px);
  font-weight: 600;
  line-height: 1.6;
  margin-top: 5px;
  color: #4c4f4a;
}

.project-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
}

.work-number {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  margin-top: 6px;
}

/* 04. Studio */

.studio-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(50px,8vw,140px);
  padding-top: 90px;
}

.studio-intro h2 {
  font-size: clamp(64px,7.4vw,128px);
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 0.94;
}

.studio-intro em {
  font-style: normal;
  color: var(--red);
}

.studio-intro>p {
  font-size: clamp(16px,1.8vw,23px);
  font-weight: 700;
  margin-top: 46px;
}

.studio-content {
  max-width: 480px;
  align-self: end;
}

.studio-content>.micro-heading {
  color: var(--muted);
}

.studio-content>p:not(.fineprint) {
  margin-top: 25px;
  font-size: 16px;
  line-height: 2.05;
  font-weight: 500;
}

.studio-content .fineprint {
  font-weight: 400;
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
}

.service-list {
  margin-top: 40px;
  border-top: 1px solid var(--ink);
}

.service-list>div {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.service-list span {
  font-size: 10px;
  color: var(--red);
  min-width: 18px;
}

/* 05. Footer and contact */

.site-footer {
  display: grid;
  grid-template-columns: minmax(170px,1.15fr) minmax(230px,1.55fr) auto auto;
  align-items: end;
  gap: 18px 28px;
  min-height: 128px;
  padding-top: 30px;
  padding-bottom: 34px;
  border-top: 1px solid var(--ink);
}

.footer-wordmark {
  font-size: 27px;
  align-self: center;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.footer-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-weight: 800;
}

.footer-email {
  font-size: clamp(13px,1.2vw,17px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.footer-email a {
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  transition: color 0.2s,border-color 0.2s;
}

.footer-email a:hover {
  color: var(--red);
  border-color: var(--red);
}

.footer-email-placeholder {
  color: #6a6a64;
}

.footer-email-placeholder small {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.footer-credit {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.footer-back {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  align-self: end;
}

.footer-back:hover {
  color: var(--red);
}

.prototype-flag {
  position: fixed;
  z-index: 79;
  bottom: 14px;
  right: 14px;
  color: var(--paper);
  background: var(--red);
  padding: 7px 11px;
  pointer-events: none;
  font-size: 9px;
}

/* 06. Legacy not-found and project shell */

.project-main {
  padding-top: 32px;
  padding-bottom: 130px;
}

.back-link {
  display: inline-block;
  padding: 12px 0 16px;
  transition: color 0.25s;
}

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

.detail-title {
  font-size: clamp(50px,8vw,145px);
  line-height: 0.95;
  letter-spacing: -0.095em;
  font-weight: 900;
  margin: 65px 0 25px;
  overflow-wrap: anywhere;
}

/* 07. Motion and reveal */

.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s var(--ease),transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 08. Project: layout and information */

body[data-page="project"] .project-main {
  padding-top: clamp(22px,2.5vw,44px);
  padding-bottom: clamp(70px,8vw,135px);
}

.case-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 800;
  padding: 8px 0 27px;
  transition: color 0.2s;
}

.case-back-link span {
  font-size: 17px;
  line-height: 0.6;
  transition: transform 0.25s var(--ease);
}

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

.case-back-link:hover span {
  transform: translateX(-4px);
}

.case-header {
  border-top: 1px solid var(--ink);
  padding: 17px 0 clamp(26px,3.4vw,54px);
}

.case-upperline,
.case-figure-caption,
.case-section-rail {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.065em;
  font-weight: 800;
}

.case-index-accent {
  color: var(--red);
}

.case-head-category {
  color: var(--muted);
}

.case-title {
  font-size: clamp(42px,5.85vw,104px);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 1.13;
  max-width: 1480px;
  margin-top: clamp(29px,4.6vw,76px);
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.case-client-line {
  font-size: clamp(13px,1.25vw,19px);
  font-weight: 700;
  line-height: 1.55;
  color: #62645d;
  letter-spacing: -0.02em;
  margin-top: clamp(20px,2.5vw,36px);
}

.case-sample-mark {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 800;
  padding: 10px 12px;
  margin-top: 19px;
}

.case-hero-figure {
  margin: 0;
}

.case-hero-sample {
  background: #deddd6;
}

.case-figure-caption {
  color: var(--muted);
  margin-top: 12px;
  font-size: 10px;
}

.case-about {
  margin-top: clamp(92px,11vw,180px);
}

.case-section-rail {
  border-top: 1px solid var(--ink);
  padding-top: 15px;
}

.case-section-rail span:last-child {
  color: var(--muted);
}

.case-about-layout {
  display: grid;
  grid-template-columns: minmax(240px,0.9fr) minmax(0,1.3fr);
  gap: clamp(40px,8vw,150px);
  padding-top: clamp(48px,6vw,90px);
}

.case-small-label {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--muted);
  font-weight: 800;
}

.case-about-intro>p {
  font-size: clamp(22px,2.45vw,38px);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -0.05em;
  margin-top: 24px;
}

.case-description {
  font-size: clamp(19px,2.0vw,30px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.85;
  max-width: 770px;
}

.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 34px;
  margin: clamp(48px,6vw,90px) 0 0;
}

.case-meta-grid>div {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 11px;
  padding: 14px 0 21px;
  min-width: 0;
}

.case-meta-grid dt {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.case-meta-grid dd {
  margin: 0;
  font-size: clamp(13px,1.15vw,17px);
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* 09. Project: gallery and image captions */

.case-gallery {
  margin-top: clamp(105px,12vw,185px);
}

.case-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(18px,2.5vw,38px);
  padding-top: clamp(35px,4.5vw,68px);
}

.case-gallery-item {
  min-width: 0;
  margin: 0;
  width: 100%;
  grid-column: 1 / -1;
}

.case-hero-media {
  display: block;
  min-height: 0;
  aspect-ratio: auto;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.case-hero-media img,
.case-hero-sample img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  box-shadow: none;
}

.case-gallery-image {
  display: block;
  min-height: 0;
  aspect-ratio: auto;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.case-gallery-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  filter: none;
}

.case-artwork-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: clamp(38px,5vw,72px);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.case-end-nav {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: clamp(80px,9vw,140px);
}

.case-end-link {
  display: flex;
  flex-direction: column;
  min-width: 0;
  justify-content: space-between;
  gap: clamp(23px,3.3vw,50px);
  padding: clamp(21px,2.5vw,36px) 24px clamp(28px,3vw,44px) 0;
  transition: background 0.25s,color 0.25s;
}

.case-end-link+.case-end-link {
  border-left: 1px solid var(--line);
  padding-left: clamp(24px,3vw,50px);
  padding-right: 0;
}

.case-end-link:hover .case-link-title {
  color: var(--red);
}

.case-link-label {
  font-size: 10px;
  letter-spacing: 0.07em;
  font-weight: 800;
  color: var(--muted);
}

.case-link-title {
  font-size: clamp(20px,2.25vw,36px);
  line-height: 1.45;
  letter-spacing: -0.055em;
  font-weight: 800;
  transition: color 0.2s;
}

.case-all-link-wrap {
  text-align: center;
  padding-top: 40px;
}

.case-all-link {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink);
  transition: color 0.2s;
}

.case-all-link:hover {
  color: var(--red);
  border-color: var(--red);
}

.detail-not-found {
  border-top: 1px solid var(--ink);
  padding-top: 30px;
  min-height: 50vh;
}

.detail-not-found .detail-title {
  max-width: 900px;
}

.detail-not-found>p:not(.case-kicker) {
  margin: 34px 0;
}

.case-gallery-caption {
  display: block;
  margin-top: 12px;
  width: 100%;
}

.case-gallery-caption .case-figure-caption {
  margin-top: 0;
}

.case-gallery-description {
  margin: 10px 0 0;
  max-width: none;
  color: var(--ink);
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 0.012em;
  white-space: pre-line;
  overflow-wrap: anywhere;
  width: 100%;
}

.gallery-caption-title {
  margin: 32px 0 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #c8c8c3;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.gallery-caption-section {
  margin-bottom: 32px;
}

.gallery-caption-subtitle {
  margin: 0 0 12px;
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 700;
  line-height: 1.6;
}

.gallery-caption-section .case-gallery-description {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.95;
  letter-spacing: 0.025em;
  white-space: normal;
  max-width: none;
}

.case-gallery-item.is-group {
  grid-column: 1 / -1;
}

/* Grouped images: 3 columns by default; 2 columns when there are exactly 2 images. */
.case-photo-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* Keep this inside min-width so it never overrides the mobile 1-column rule. */
@media (min-width: 521px) {
  .case-photo-group:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-photo-group:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
  }
}

.case-photo-group img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Per-image captions in grouped galleries. */
.case-photo-group-item {
  min-width: 0;
  margin: 0;
}

.case-photo-caption {
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

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

/* 10. Responsive rules (descending breakpoints) */

@media (max-width:1100px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-descriptor {
    display: none;
  }

  .studio-layout {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

}

@media (max-width:760px) {
  html {
    scroll-padding-top: 75px;
  }

  .site-header {
    min-height: 70px;
    grid-template-columns: 1fr auto;
    position: relative;
    padding-inline: var(--gutter);
  }

  .wordmark {
    font-size: 27px;
  }

  .wordmark-mark {
    font-size: 8px;
    margin-left: 6px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 0 14px 14px;
    border: 0;
    background: transparent;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
  }

  .menu-lines {
    display: grid;
    gap: 5px;
    width: 24px;
  }

  .menu-lines i {
    width: 24px;
    height: 2px;
    background: var(--ink);
    display: block;
    transition: transform 0.25s;
  }

  .menu-toggle[aria-expanded="true"] .menu-lines i:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-lines i:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .mobile-nav {
    position: absolute;
    display: flex;
    flex-direction: column;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 75;
    background: var(--paper);
    padding: 22px var(--gutter) 38px;
    border-bottom: 1px solid var(--ink);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(-10px);
    transition: transform 0.3s,opacity 0.3s,visibility 0.3s;
  }

  .mobile-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-nav a {
    border-bottom: 1px solid var(--line);
    padding: 17px 0;
    font-size: clamp(27px,7vw,41px);
    font-weight: 900;
    letter-spacing: -0.06em;
    display: flex;
    align-items: baseline;
    gap: 15px;
  }

  .mobile-nav small {
    font-size: 10px;
    letter-spacing: normal;
    color: var(--red);
  }

  .mobile-nav a>span {
    margin-left: auto;
  }

  .hero {
    padding-top: 18px;
  }

  .hero-top-right {
    display: none;
  }

  .hero-main {
    display: block;
    min-height: 0;
  }

  .hero-copy {
    padding: 30px 0 28px;
    display: block;
  }

  .hero-copy h1 {
    font-size: clamp(45px,12.1vw,91px);
    margin: 22px 0 25px;
    line-height: 0.88;
  }

  .hero-copy .micro-heading {
    font-size: 9px;
  }

  .hero-copy-bottom {
    padding-bottom: 0;
    gap: 20px;
  }

  .hero-jp {
    font-size: 17px;
  }

  .hero-aside {
    font-size: 10px;
  }

  .section-pad {
    padding-top: 90px;
    padding-bottom: 110px;
  }

  .section-rail {
    font-size: 9px;
  }

  .section-rail span:last-child {
    display: none;
  }

  .works-toolbar {
    align-items: start;
    flex-direction: column-reverse;
    gap: 14px;
    padding: 17px 0;
  }

  .filters {
    gap: 6px;
  }

  .filter {
    font-size: 10px;
    padding: 8px 10px;
  }

  .results {
    align-self: flex-end;
  }

  .work-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 42px 12px;
  }

  .work-card {
    grid-column: auto;
    padding-top: 0;
  }

  .work-image {
    aspect-ratio: 1.08;
  }

  .work-open {
    opacity: 1;
    transform: none;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .sample-chip {
    font-size: 7px;
    padding: 6px;
    left: 7px;
    bottom: 8px;
  }

  .work-info {
    padding-top: 9px;
    margin-top: 10px;
    gap: 4px;
  }

  .work-info h3 {
    font-size: clamp(14px,3.5vw,22px);
    letter-spacing: -0.045em;
    min-height: 2.6em;
  }

  .project-subtitle {
    font-size: 10px;
    line-height: 1.4;
  }

  .project-meta {
    font-size: 8px;
  }

  .work-number {
    font-size: 9px;
  }

  .studio-layout {
    display: block;
    padding-top: 65px;
  }

  .studio-intro h2 {
    font-size: clamp(64px,11.8vw,100px);
  }

  .studio-intro>p {
    margin-top: 25px;
    font-size: 17px;
  }

  .studio-content {
    margin-top: 65px;
  }

  .studio-content>p:not(.fineprint) {
    font-size: 15px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    min-height: 0;
    gap: 18px 14px;
    padding-top: 28px;
    padding-bottom: 34px;
    align-items: center;
  }

  .footer-wordmark {
    font-size: 23px;
    grid-column: 1 / -1;
  }

  .footer-contact {
    grid-column: 1 / -1;
    padding-bottom: 8px;
  }

  .footer-email {
    font-size: 17px;
  }

  .footer-credit {
    font-size: 10px;
  }

  .footer-back {
    align-self: center;
  }

  .prototype-flag {
    display: none;
  }

  .project-main {
    padding-top: 17px;
    padding-bottom: 80px;
  }

  .detail-title {
    font-size: clamp(52px,10vw,95px);
    margin-top: 40px;
  }

  body[data-page="project"] .project-main {
    padding-top: 18px;
    padding-bottom: 78px;
  }

  .case-back-link {
    padding-bottom: 22px;
    font-size: 10px;
  }

  .case-header {
    padding-top: 12px;
    padding-bottom: 28px;
  }

  .case-upperline,
.case-figure-caption,
.case-section-rail {
    font-size: 9px;
  }

  .case-title {
    font-size: clamp(37px,8.3vw,67px);
    letter-spacing: -0.07em;
    line-height: 1.24;
    margin-top: 31px;
  }

  .case-client-line {
    margin-top: 17px;
    font-size: 13px;
  }

  .case-about {
    margin-top: 83px;
  }

  .case-about-layout {
    grid-template-columns: 1fr;
    gap: 29px;
    padding-top: 36px;
  }

  .case-about-intro>p {
    font-size: 24px;
    margin-top: 12px;
  }

  .case-description {
    font-size: 19px;
    line-height: 1.85;
  }

  .case-meta-grid {
    margin-top: 45px;
    gap: 0 17px;
  }

  .case-meta-grid dd {
    font-size: 12px;
  }

  .case-gallery {
    margin-top: 94px;
  }

  .case-gallery-grid {
    gap: 15px;
    padding-top: 34px;
  }

  .case-gallery-item .case-figure-caption {
    font-size: 8px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .case-section-rail span:last-child {
    display: none;
  }

  .case-end-nav {
    margin-top: 88px;
  }

  .case-end-link {
    padding: 20px 12px 25px 0;
    gap: 25px;
  }

  .case-end-link+.case-end-link {
    padding-left: 16px;
  }

  .case-link-label {
    font-size: 9px;
  }

  .case-link-title {
    font-size: 19px;
    line-height: 1.45;
  }

  .case-gallery-description {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.8;
  }

  .gallery-caption-title {
    margin: 26px 0 24px;
  }

  .gallery-caption-subtitle {
    font-size: clamp(16px, 1.3vw, 19px);
  }

  .gallery-caption-section {
    margin-bottom: 32px;
  }

  .gallery-caption-section .case-gallery-description {
    font-size: 14px;
    line-height: 1.9;
  }

  .case-photo-group {
    gap: 24px;
  }

}

@media (max-width:520px) {
  .case-photo-group {
    grid-template-columns: 1fr;
    gap: 24px;
  }

}

@media (max-width:420px) {
  .case-title {
    font-size: clamp(33px,8.5vw,43px);
  }

  .case-meta-grid {
    grid-template-columns: 1fr;
  }

  .case-gallery-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .case-end-nav {
    grid-template-columns: 1fr;
  }

  .case-end-link+.case-end-link {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
  }

}

@media (max-width:390px) {
  .hero-aside {
    display: none;
  }

  .hero-copy h1 {
    font-size: 12.1vw;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 37px;
  }

  .work-image {
    aspect-ratio: 1.35;
  }

  .work-info h3 {
    font-size: 22px;
    min-height: 0;
  }

  .project-subtitle {
    font-size: 12px;
  }

  .work-number {
    font-size: 11px;
  }

}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

}

/* 11. Text links in gallery captions */
.case-gallery-description a,
.case-photo-caption a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.case-gallery-description a:hover,
.case-photo-caption a:hover {
  opacity: 0.7;
}

/* 12. Google Maps embed in project descriptions */
.case-map-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 24px;
}

.case-map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 760px) {
  .case-map-embed {
    aspect-ratio: 4 / 3;
    margin-top: 18px;
  }
}
