:root {
  --paper: #f2f0eb;
  --ink: #171815;
  --muted: #6f716b;
  --line: rgba(23, 24, 21, 0.18);
  --accent: #e44b2f;
  --white: #faf9f6;
  --font-sans: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font-family: var(--font-sans); }

body.lightbox-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  align-items: center;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 82px;
  padding: 0 34px;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  justify-self: start;
}

.desktop-nav { display: flex; gap: 32px; }
.desktop-nav a {
  font-family: var(--font-display);
  font-size: 13px;
  padding: 6px 0;
  position: relative;
}
.desktop-nav a::after {
  background: var(--ink);
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
  width: 100%;
}
.desktop-nav a:hover::after, .desktop-nav a.active::after { transform: scaleX(1); transform-origin: left; }
.mobile-nav { display: none; }

.section-intro {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 7vw;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.55fr);
  margin: 0 34px;
  min-height: 0;
  padding: clamp(72px, 7vw, 116px) 0 38px;
}

.eyebrow {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 22px;
}

.section-intro h1 {
  font-family: var(--font-display), sans-serif;
  font-size: clamp(54px, 8vw, 132px);
  font-weight: 400;
  line-height: 0.95;
  margin: 0;
  max-width: 12ch;
}

.intro-aside { padding-bottom: 4px; }
.intro-aside p { font-size: 15px; line-height: 1.85; margin: 0 0 36px; max-width: 34ch; word-break: keep-all; }
.intro-aside span { color: var(--muted); font-family: var(--font-display), sans-serif; font-size: 10px; }

.project-grid {
  display: grid;
  gap: 54px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 42px 34px 130px;
}

.project-card { min-width: 0; }
.project-card a { display: block; }

.project-image-wrap {
  aspect-ratio: 4 / 3;
  background: #ddd9d1;
  overflow: hidden;
  position: relative;
}
.project-image-wrap img { height: 100%; object-fit: cover; transition: transform 700ms cubic-bezier(.18,.72,.2,1); width: 100%; }
.project-card a:hover img { transform: scale(1.025); }

.view-cue {
  align-items: center;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  font-family: var(--font-display), sans-serif;
  font-size: 10px;
  height: 78px;
  justify-content: center;
  opacity: 0;
  position: absolute;
  right: 20px;
  top: 20px;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
  width: 78px;
}
.project-card a:hover .view-cue { opacity: 1; transform: translateY(0); }

.project-meta { align-items: baseline; display: flex; gap: 24px; justify-content: space-between; padding-top: 13px; }
.project-meta h2 { font-size: 13px; font-weight: 500; margin: 0; }
.project-meta span { color: var(--muted); font-family: var(--font-display), sans-serif; font-size: 10px; }

.migration-status { min-height: 40vh; padding: 80px 34px; }
.migration-status p { color: var(--muted); }

.site-footer {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: 1.4fr 1fr auto;
  margin: 0 34px;
  padding: 52px 0 30px;
}
.site-footer p { font-family: var(--font-display), sans-serif; font-size: clamp(22px, 3vw, 44px); line-height: 1.15; margin: 0; max-width: 18ch; }
.site-footer a { font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.site-footer > span { color: var(--muted); font-size: 10px; }

.project-page { padding: 0 34px 110px; }
.project-heading {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 24px 7vw;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.5fr);
  min-height: 0;
  padding: clamp(76px, 7vw, 118px) 0 38px;
}
.project-heading .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.project-heading h1 { font-family: var(--font-display), sans-serif; font-size: clamp(48px, 7vw, 112px); font-weight: 400; line-height: 0.98; margin: 0; }
.project-heading > p:last-child { font-size: 15px; line-height: 1.8; margin: 0; max-width: 38ch; word-break: keep-all; }

.video-frame { aspect-ratio: 16 / 9; margin: 60px auto 0; max-width: 1200px; }
.video-frame iframe { border: 0; height: 100%; width: 100%; }

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 34px; }
.gallery-column { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gallery.gallery-single { grid-template-columns: minmax(0, 1fr); }
.gallery.gallery-single .gallery-column { margin: 0 auto; max-width: 1100px; width: 100%; }
.gallery-item { background: transparent; border: 0; cursor: zoom-in; margin: 0; padding: 0; width: 100%; }
.gallery-item img { height: auto; width: 100%; }

.lightbox { align-items: center; background: rgba(14, 15, 13, 0.96); color: white; display: grid; inset: 0; justify-items: center; padding: 60px 90px; position: fixed; z-index: 100; }
.lightbox img { grid-area: 1 / 1; max-height: calc(100vh - 120px); max-width: calc(100vw - 180px); object-fit: contain; }
.lightbox button { background: transparent; border: 0; color: inherit; cursor: pointer; font-family: var(--font-display), sans-serif; font-size: 11px; position: absolute; text-transform: uppercase; }
.lightbox-close { right: 28px; top: 26px; }
.lightbox-prev { left: 28px; top: 50%; }
.lightbox-next { right: 28px; top: 50%; }
.lightbox-count { bottom: 24px; font-family: var(--font-display), sans-serif; font-size: 10px; left: 50%; position: absolute; transform: translateX(-50%); }

.project-next { border-top: 1px solid var(--line); display: grid; gap: 24px; grid-template-columns: 1fr 2fr; margin-top: 100px; padding-top: 28px; }
.project-next > span { color: var(--muted); font-family: var(--font-display), sans-serif; font-size: 10px; text-transform: uppercase; }
.project-next a { font-family: var(--font-display), sans-serif; font-size: clamp(28px, 4vw, 62px); line-height: 1.08; }
.project-next a > span { color: var(--accent); }

.contact-page { padding: 0 34px 140px; }
.contact-intro { border-bottom: 1px solid var(--line); display: grid; gap: 40px; grid-template-columns: 2fr 1fr; padding: 9vw 0 70px; }
.contact-intro .eyebrow { grid-column: 1 / -1; }
.contact-intro h1 { font-family: var(--font-display), sans-serif; font-size: clamp(56px, 8vw, 128px); font-weight: 400; line-height: 0.96; margin: 0; }
.contact-intro h1 em { color: var(--accent); font-family: inherit; font-weight: 400; }
.contact-intro > div { align-self: end; }
.contact-intro > div p { font-size: 15px; line-height: 1.8; max-width: 32ch; word-break: keep-all; }
.contact-intro > div a { display: inline-block; font-size: 13px; margin-top: 24px; text-decoration: underline; text-underline-offset: 5px; }

.contact-form { display: grid; gap: 0; grid-template-columns: 1fr 1fr; margin-left: auto; padding-top: 70px; width: min(100%, 960px); }
.contact-form label { border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; padding: 22px 0; }
.contact-form label:first-child { margin-right: 30px; }
.contact-form span { color: var(--muted); font-family: var(--font-display), sans-serif; font-size: 10px; text-transform: uppercase; }
.contact-form input, .contact-form textarea { background: transparent; border: 0; color: var(--ink); font-size: 18px; outline: 0; padding: 4px 0; resize: vertical; }
.contact-form .message-field { grid-column: 1 / -1; margin-top: 24px; }
.contact-form button { background: var(--ink); border: 0; color: var(--white); cursor: pointer; grid-column: 2; justify-self: end; margin-top: 32px; padding: 18px 24px; }
.contact-form button span { color: var(--accent); margin-left: 16px; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; min-height: 68px; padding: 0 20px; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; justify-self: end; position: relative; }
  .mobile-nav summary { cursor: pointer; height: 34px; list-style: none; position: relative; width: 34px; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav summary span { background: var(--ink); height: 1px; left: 6px; position: absolute; top: 13px; width: 22px; }
  .mobile-nav summary span:last-child { top: 20px; }
  .mobile-nav[open] summary span:first-child { top: 17px; transform: rotate(45deg); }
  .mobile-nav[open] summary span:last-child { top: 17px; transform: rotate(-45deg); }
  .mobile-nav nav { background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 190px; padding: 18px; position: absolute; right: 0; top: 43px; }
  .mobile-nav nav a { font-family: var(--font-display), sans-serif; padding: 10px; }
  .mobile-nav nav a.active { color: var(--accent); }

  .section-intro, .project-heading, .contact-intro { grid-template-columns: 1fr; margin-left: 20px; margin-right: 20px; min-height: auto; padding-top: 100px; }
  .section-intro { gap: 60px; padding-bottom: 34px; }
  .section-intro h1 { font-size: clamp(54px, 15vw, 100px); }
  .intro-aside p { margin-bottom: 20px; }
  .project-grid { gap: 44px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 38px 20px 100px; }
  .site-footer { grid-template-columns: 1fr; margin: 0 20px; padding-bottom: 24px; }
  .site-footer > span { margin-top: 30px; }
  .project-page, .contact-page { padding-left: 20px; padding-right: 20px; }
  .project-heading { margin: 0; }
  .project-heading .eyebrow { grid-column: 1; }
  .project-next { grid-template-columns: 1fr; }
  .contact-intro { margin: 0; }
  .contact-intro .eyebrow { grid-column: 1; }
}

@media (max-width: 580px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-image-wrap { aspect-ratio: 4 / 3; }
  .gallery { gap: 10px; grid-template-columns: 1fr; }
  .gallery-column { display: contents; }
  .view-cue { display: none; }
  .lightbox { padding: 60px 16px; }
  .lightbox img { max-width: calc(100vw - 32px); }
  .lightbox-prev, .lightbox-next { background: rgba(0,0,0,.4) !important; bottom: 18px; padding: 10px; top: auto; }
  .lightbox-count { bottom: 28px; }
  .contact-form { display: block; }
  .contact-form label:first-child { margin-right: 0; }
  .contact-form button { display: block; margin-left: auto; }
}

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

[hidden]{display:none!important}
