:root {
  --bg-dark: #1f1b1a;
  --bg-marble: #f3efeb;
  --text-dark: #2a2624;
  --text-soft: #6d645f;
  --white: #f7f4f1;
  --gold: #c8a36a;
  --line: rgba(42, 38, 36, 0.2);
  --container: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--bg-marble);
}

body.theme-dark {
  --bg-marble: #161311;
  --text-dark: #f1ebe7;
  --text-soft: #c4b7af;
  --line: rgba(241, 235, 231, 0.24);
}

body.menu-open {
  overflow: hidden;
}

a { text-decoration: none; color: inherit; }
img { width: 100%; display: block; object-fit: cover; }

.container {
  width: min(calc(100% - 56px), var(--container));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px 34px;
  color: var(--white);
  transition: background-color 220ms ease, backdrop-filter 220ms ease;
}
.site-header.is-solid {
  background: rgba(20, 17, 16, 0.72);
  backdrop-filter: blur(8px);
}

.brand {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.site-nav {
  display: flex;
  gap: 34px;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.header-icons {
  justify-self: end;
  display: flex;
  gap: 12px;
}
.icon-btn {
  border: 1px solid rgba(247, 244, 241, 0.36);
  background: rgba(0, 0, 0, 0.24);
  color: var(--white);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1797 / 875; /* 현재 히어로 원본(ChatGPT Image ...png) 비율 유지 */
  min-height: 0;
  display: flex;
  align-items: flex-end;
}
.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}
.hero-bg {
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none;
}
.hero-overlay {
  background:
    radial-gradient(52% 62% at 86% 42%, rgba(20, 17, 16, 0.26) 0%, rgba(20, 17, 16, 0.10) 48%, rgba(20, 17, 16, 0) 100%),
    linear-gradient(90deg, rgba(20, 17, 16, 0.22) 0%, rgba(20, 17, 16, 0.05) 48%, rgba(20, 17, 16, 0.08) 100%),
    linear-gradient(180deg, rgba(20, 17, 16, 0.05) 0%, rgba(20, 17, 16, 0.20) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  margin-bottom: clamp(56px, 7vw, 110px);
  margin-left: clamp(8px, 1vw, 16px);
  margin-right: auto;
  width: fit-content;
  padding: 0;
  color: var(--white);
  max-width: min(560px, 46vw);
  background: none;
  border-radius: 0;
  backdrop-filter: none;
}
.hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(48px, 6.5vw, 86px);
  line-height: 0.95;
  font-weight: 500;
  max-width: 7.5ch;
}
.hero-sub {
  margin: 20px 0 26px;
  font-size: clamp(16px, 1.8vw, 24px);
  color: rgba(247, 244, 241, 0.88);
}
.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(19, 17, 16, 0.92);
  border: 1px solid rgba(247, 244, 241, 0.18);
  color: var(--white);
  padding: 11px 20px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Marble sections */
.section-marble {
  background: radial-gradient(circle at 15% 0%, #f8f4f0 0%, var(--bg-marble) 44%, #ece7e2 100%);
}

.center-copy {
  text-align: center;
  padding-top: 110px;
  padding-bottom: 80px;
}
.center-copy h2,
.projects-title,
.cta-content h2 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  line-height: 1.06;
}
.center-copy h2 {
  margin: 0;
  font-size: clamp(42px, 5.2vw, 72px);
}
.center-copy p {
  margin: 16px 0 42px;
  font-size: clamp(18px, 2.2vw, 28px);
  color: var(--text-soft);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  min-height: 0;
  box-shadow: 0 16px 36px rgba(22, 16, 12, 0.12);
}
.card-clickable {
  cursor: pointer;
}
.card-clickable:focus-visible {
  outline: 2px solid rgba(200, 163, 106, 0.9);
  outline-offset: 2px;
}
.card img {
  height: 100%;
  object-fit: cover;
}
.card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, rgba(20, 17, 16, 0) 0%, rgba(20, 17, 16, 0.58) 100%);
}
.card h3 {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  margin: 0;
  color: var(--white);
  font-size: 19px;
  font-weight: 500;
}

.projects {
  padding-bottom: 110px;
}
.models {
  padding-bottom: 80px;
}
.models-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.models-viewport {
  overflow: hidden;
  touch-action: pan-y;
}
.models-track {
  --visible: 4;
  --gap: 18px;
  display: flex;
  gap: var(--gap);
  transition: transform 260ms ease;
  will-change: transform;
}
.models-track .model-card {
  flex: 0 0 calc((100% - (var(--gap) * (var(--visible) - 1))) / var(--visible));
}
.models-arrow {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(42, 38, 36, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-dark);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.models-arrow:disabled {
  opacity: 0.4;
  cursor: default;
}
.model-card {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 28px rgba(20, 16, 13, 0.12);
}
.model-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.model-card p {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dark);
}
.overline-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.line {
  width: 80px;
  height: 1px;
  background: var(--line);
}
.overline {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--text-soft);
}
.projects-title {
  margin: 18px 0 36px;
  text-align: center;
  font-size: clamp(40px, 4.9vw, 66px);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  min-height: 0;
  box-shadow: 0 16px 36px rgba(22, 16, 12, 0.12);
}
.project-card img {
  height: 100%;
  object-fit: cover;
}
.project-card::after {
  content: "";
  position: absolute;
  inset: 52% 0 0;
  background: linear-gradient(180deg, rgba(20, 17, 16, 0) 0%, rgba(20, 17, 16, 0.6) 100%);
}
.project-card h3 {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  margin: 0;
  color: var(--white);
  font-size: 22px;
  z-index: 1;
  font-weight: 500;
}

/* CTA */
.cta {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  color: var(--white);
}
.cta-bg,
.cta-overlay {
  position: absolute;
  inset: 0;
}
.cta-bg { height: 100%; }
.cta-overlay {
  background: linear-gradient(180deg, rgba(17, 15, 14, 0.52) 0%, rgba(17, 15, 14, 0.78) 100%);
}
.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 0;
}
.cta-content h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 70px);
}
.cta-content p {
  margin: 14px auto 28px;
  max-width: 62ch;
  color: rgba(247, 244, 241, 0.86);
  font-size: 17px;
}
.cta-button {
  display: inline-block;
  background: var(--gold);
  color: #201c1a;
  padding: 14px 26px;
  border-radius: 6px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.contact-info {
  margin: 24px auto 0;
  width: min(92%, 740px);
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(10, 9, 9, 0.38);
  border: 1px solid rgba(247, 244, 241, 0.22);
  text-align: left;
}

.contact-info p {
  margin: 6px 0;
  color: rgba(247, 244, 241, 0.94);
  font-size: 15px;
  line-height: 1.5;
}

.contact-info strong {
  display: inline-block;
  min-width: 74px;
  color: rgba(247, 244, 241, 0.98);
}

.gallery-modal[hidden] {
  display: none;
}
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
}
.gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 10, 0.72);
}
.gallery-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 1080px);
  max-height: 90vh;
  margin: 5vh auto;
  padding: 14px;
  border-radius: 12px;
  background: #191615;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 12px;
}
.gallery-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

.gallery-close-mobile {
  display: none;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: #f7f4f1;
  padding: 12px 14px;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.gallery-main {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0f0d0d;
  position: relative;
  touch-action: pan-y;
}
.gallery-main img {
  width: 100%;
  max-height: min(66vh, 760px);
  object-fit: contain;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-nav:hover { background: rgba(0, 0, 0, 0.55); }
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.gallery-thumb {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #0f0d0d;
  aspect-ratio: 4 / 3;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumb.is-active {
  border-color: rgba(200, 163, 106, 0.95);
}

@media (max-width: 1100px) {
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .models-track { --visible: 3; }
  .project-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 18px 20px;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 20px;
    z-index: 40;
    min-width: 190px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(20, 17, 16, 0.95);
    border: 1px solid rgba(247, 244, 241, 0.22);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
    flex-direction: column;
    gap: 10px;
  }
  .site-nav.is-open { display: flex; }
  .container { width: min(calc(100% - 32px), var(--container)); }

  /* tablet typography */
  .hero h1 {
    font-size: clamp(40px, 7vw, 58px);
    line-height: 0.97;
  }
  .hero-sub {
    margin: 14px 0 18px;
    font-size: clamp(14px, 2.6vw, 20px);
  }
  .hero-button {
    font-size: 11px;
    padding: 10px 16px;
  }
  .hero-content {
    max-width: min(520px, 70vw);
    margin-bottom: clamp(40px, 8vw, 72px);
    padding-top: 46px;
  }

  .center-copy {
    padding-top: 74px;
    padding-bottom: 64px;
  }
  .center-copy h2 {
    font-size: clamp(34px, 6.2vw, 52px);
    line-height: 1.08;
  }
  .center-copy p {
    margin: 12px 0 28px;
    font-size: clamp(16px, 2.8vw, 22px);
  }

  .card h3 { font-size: 17px; }

  .models-track { --visible: 2; }
  .project-grid { grid-template-columns: 1fr; }

  .cta-content h2 {
    font-size: clamp(34px, 6.5vw, 52px);
    line-height: 1.08;
  }
  .cta-content p {
    font-size: 16px;
    margin: 12px auto 20px;
  }
  .contact-info {
    width: min(96%, 680px);
    padding: 14px 14px;
  }
  .contact-info p {
    font-size: 14px;
    line-height: 1.45;
  }

  .gallery-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  /* phone typography */
  .hero {
    min-height: 300px;
    aspect-ratio: 4 / 5;
  }
  .hero-content {
    max-width: min(320px, 84vw);
    margin-bottom: 28px;
  }
  .hero h1 {
    font-size: clamp(30px, 9.5vw, 38px);
    line-height: 1.02;
    max-width: 8.2ch;
  }
  .hero-sub {
    margin: 10px 0 14px;
    font-size: 14px;
  }
  .hero-button {
    font-size: 10px;
    padding: 9px 13px;
    letter-spacing: 0.04em;
  }

  .center-copy {
    padding-top: 52px;
    padding-bottom: 44px;
  }
  .center-copy h2 {
    font-size: clamp(28px, 8.2vw, 34px);
    line-height: 1.12;
  }
  .center-copy p {
    margin: 10px 0 18px;
    font-size: 14px;
  }

  .category-grid { grid-template-columns: 1fr; gap: 16px; }
  .card { min-height: 0; }
  .card h3 {
    left: 14px;
    right: 14px;
    bottom: 12px;
    font-size: 16px;
  }
  .project-card { min-height: 0; }

  .overline {
    font-size: 11px;
    letter-spacing: 0.14em;
  }
  .line { width: 44px; }

  .models {
    padding-bottom: 56px;
  }
  .models-carousel {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .models-track { --visible: 1; }
  .models-arrow {
    justify-self: center;
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .cta {
    min-height: 360px;
  }
  .cta-content {
    padding: 56px 0;
  }
  .cta-content h2 {
    font-size: clamp(28px, 8.2vw, 36px);
    line-height: 1.12;
  }
  .cta-content p {
    font-size: 14px;
    margin: 10px auto 14px;
    max-width: 34ch;
  }
  .contact-info {
    margin-top: 14px;
    width: 100%;
    padding: 12px;
  }
  .contact-info p {
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.4;
  }
  .contact-info strong {
    min-width: 64px;
  }

  .gallery-panel {
    width: 96vw;
    margin: 2vh auto;
    max-height: 96vh;
    padding: 10px;
  }
  .gallery-close {
    width: 40px;
    height: 40px;
    top: 8px;
    right: 8px;
  }
  .gallery-close-mobile {
    display: block;
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .gallery-main img { max-height: 62vh; }
  .gallery-nav {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
  .gallery-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
