/* ATELIER VEY — Stark editorial / Swiss grid architecture */

:root {
  --paper: #f4f2ec;
  --paper-dark: #ebe8e0;
  --ink: #111110;
  --ink-soft: rgba(17, 17, 16, 0.62);
  --ink-faint: rgba(17, 17, 16, 0.38);
  --line: #d4d0c8;
  --line-dark: #b8b4ac;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "Space Mono", monospace;
  --container: 1240px;
  --nav-h: 64px;
  --grid: 12;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-slow: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* architectural grid overlay */
.grid-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  background-image:
    linear-gradient(90deg, rgba(17,17,16,0.04) 1px, transparent 1px),
    linear-gradient(rgba(17,17,16,0.04) 1px, transparent 1px);
  background-size: calc(100% / 12) 80px;
  opacity: 0.35;
  mask-image: linear-gradient(180deg, black 0%, transparent 100%);
}

.index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.body {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 480px;
}

.lead {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 24px;
}

/* nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.5s, background 0.5s;
}
.nav.scrolled {
  background: rgba(244, 242, 236, 0.92);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.nav-links { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.4s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 1px; background: var(--ink);
}
.nav-toggle::before { top: 4px; }
.nav-toggle span { top: 50%; transform: translateY(-50%); }
.nav-toggle::after { bottom: 4px; }

.nav-drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 24px clamp(20px, 4vw, 48px);
  display: flex; flex-direction: column; gap: 16px;
  transform: translateY(-8px); opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
}
.nav-drawer.open { opacity: 1; transform: translateY(0); }
.nav-drawer a { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }

/* hero */
.hero {
  min-height: 100vh; min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--gutter);
  padding: calc(var(--nav-h) + 48px) clamp(20px, 4vw, 48px) 64px;
  max-width: calc(var(--container) + 96px);
  margin: 0 auto;
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.hero-meta { padding-bottom: 48px; }
.hero-title { margin: 24px 0 32px; }
.title-line {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(64px, 10vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.title-accent { font-style: italic; margin-left: 0.12em; }

.hero-lead {
  font-size: 17px; line-height: 1.7; color: var(--ink-soft);
  max-width: 380px; font-weight: 400;
}

.hero-visual {
  position: relative;
  overflow: hidden;
}
.hero-visual img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.02);
}

.hero-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 24px;
  background: linear-gradient(transparent, rgba(244,242,236,0.95));
  display: flex; flex-direction: column; gap: 4px;
}
.hero-caption strong { font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.hero-caption span:last-child { font-size: 13px; color: var(--ink-soft); }

/* reveal mask (21st: ghost-reveal inspired) */
.reveal-mask {
  --reveal: 100%;
  clip-path: inset(var(--reveal) 0 0 0);
  transition: clip-path 0.05s linear;
}
.reveal-mask.revealed { clip-path: inset(0 0 0 0); }

.reveal, [data-fade] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.9s var(--ease-slow), transform 0.9s var(--ease-slow);
}
.reveal.visible, [data-fade].visible { opacity: 1; transform: translateY(0); }

/* drift strip */
.drift-section {
  overflow: hidden;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}
.drift-track {
  display: flex; gap: 20px;
  padding: 0 clamp(20px, 4vw, 48px);
  will-change: transform;
}
.drift-item {
  flex: 0 0 min(280px, 70vw);
}
.drift-item img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  filter: saturate(0.85);
}
.drift-item figcaption {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 10px; color: var(--ink-faint);
}

/* works */
.section { padding: 100px clamp(20px, 4vw, 48px); max-width: calc(var(--container) + 96px); margin: 0 auto; }
.section-head { margin-bottom: 56px; border-top: 1px solid var(--line); padding-top: 24px; }
.section-head .h2 { margin-top: 16px; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

.work-card { grid-column: span 4; }
.work-card-lg { grid-column: span 8; }
.work-card-wide { grid-column: span 8; }

.work-hit {
  display: block; width: 100%; border: none; background: none;
  cursor: pointer; text-align: left; padding: 0;
  position: relative; overflow: hidden;
}
.work-hit img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  transition: transform 1.2s var(--ease-slow), filter 0.6s;
  filter: saturate(0.9);
}
.work-card-lg .work-hit img { aspect-ratio: 16/10; }
.work-hit:hover img { transform: scale(1.03); filter: saturate(1); }

.work-info {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: 4px 16px;
  align-items: baseline;
}
.work-info .index { grid-row: span 2; }
.work-info h3 { font-family: var(--font-display); font-size: 24px; font-weight: 400; grid-column: 2; }
.work-info p { font-size: 13px; color: var(--ink-soft); grid-column: 2; }

/* project detail */
.project-detail {
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--nav-h);
}
.project-hero { overflow: hidden; }
.project-hero img {
  width: 100%; max-height: 85vh; object-fit: cover;
  filter: saturate(0.9);
}

.project-body {
  padding: 64px clamp(20px, 4vw, 48px) 100px;
  max-width: calc(var(--container) + 96px);
  margin: 0 auto;
}
.project-header { margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.project-header .h2 { margin: 12px 0; }
.project-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-soft); }

.project-columns {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px;
}
.project-narrative p { margin-bottom: 20px; color: var(--ink-soft); line-height: 1.8; }

.project-specs dl { display: flex; flex-direction: column; gap: 16px; }
.project-specs dl div {
  display: grid; grid-template-columns: 120px 1fr;
  gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.project-specs dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.project-specs dd { font-size: 14px; }

.project-gallery {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 32px;
}
.project-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* practice */
.practice { border-top: 1px solid var(--line); }
.practice-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  margin-bottom: 64px;
}
.practice-copy .h2 { margin: 16px 0 28px; }
.practice-copy .body + .body { margin-top: 16px; }

.pull-quote {
  border-left: 2px solid var(--ink);
  padding: 8px 0 8px 32px;
  align-self: center;
}
.pull-quote p {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-style: italic;
  line-height: 1.35;
  margin-bottom: 16px;
}
.pull-quote footer { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }

.stat-row {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-row li {
  padding: 32px 24px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.stat-row li:last-child { border-right: none; }
.stat-num { font-family: var(--font-display); font-size: 48px; line-height: 1; }
.stat-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }

/* team */
.team { border-top: 1px solid var(--line); }
.team-list { list-style: none; border-top: 1px solid var(--line); }
.team-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.team-name { font-family: var(--font-display); font-size: 28px; }
.team-role { font-size: 14px; color: var(--ink-soft); }
.team-cred { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-faint); text-align: right; }

/* contact */
.contact { border-top: 1px solid var(--line); }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-copy .h2 { margin: 16px 0 24px; }
.contact-copy .body { margin-bottom: 32px; }

.studio-address {
  font-style: normal;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.8;
}
.studio-address a { text-decoration: underline; text-underline-offset: 3px; }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; }
.contact-form label span {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 14px 0; background: transparent;
  border: none; border-bottom: 1px solid var(--line);
  transition: border-color 0.4s;
  resize: vertical;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { outline: none; border-bottom-color: var(--ink); }

.btn-submit {
  align-self: flex-start;
  margin-top: 8px;
  padding: 14px 32px;
  background: var(--ink); color: var(--paper);
  border: none; cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 0.4s, transform 0.4s var(--ease);
}
.btn-submit:hover { background: #2a2a28; transform: translateY(-2px); }

/* shared-element transition clone */
.transition-clone {
  position: fixed; z-index: 200; pointer-events: none;
  overflow: hidden; opacity: 0;
  transition: top 0.7s var(--ease-slow), left 0.7s var(--ease-slow),
              width 0.7s var(--ease-slow), height 0.7s var(--ease-slow), opacity 0.3s;
}
.transition-clone img { width: 100%; height: 100%; object-fit: cover; }

body.is-transitioning { overflow: hidden; }

/* footer */
.footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 32px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.footer nav { display: flex; gap: 24px; }
.footer nav a { text-transform: uppercase; transition: color 0.3s; }
.footer nav a:hover { color: var(--ink); }

.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--ink); color: var(--paper);
  padding: 14px 24px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  opacity: 0; z-index: 300;
  transition: transform 0.6s var(--ease), opacity 0.6s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* responsive */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .work-card, .work-card-lg, .work-card-wide { grid-column: span 12; }
  .project-columns, .practice-layout, .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-row li:nth-child(2) { border-right: none; }
  .team-row { grid-template-columns: 1fr; gap: 8px; }
  .team-cred { text-align: left; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .title-line { font-size: clamp(52px, 14vw, 80px); }
  .section { padding: 72px 20px; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-row li { border-right: none; }
  .grid-overlay { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-mask { clip-path: none !important; }
  .reveal, [data-fade] { opacity: 1; transform: none; }
}
