/* =========================================
RESET
========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand-line-color: #242f64;
  --brand-line-height: 4px;
  --content-width: 1300px;
  --text-width: 900px;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family:
    "Pretendard Variable",
    "Pretendard",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Noto Sans KR",
    Arial,
    sans-serif;

  background: #ffffff;
  color: #111;
  overflow-x: hidden;
}

img {
  vertical-align: top;
}


/* =========================================
SPLASH PAGE
========================================= */

.splash {
  position: relative;

  width: 100vw;
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  background: #ffffff;
  overflow: hidden;
}

.splash::before {
  content: "";

  position: absolute;
  top: 50%;
  left: 0;

  width: 100vw;
  height: var(--brand-line-height);

  background-color: var(--brand-line-color);
  transform: translateY(-50%);
  z-index: 0;
}

.splash a {
  position: relative;
  z-index: 1;

  display: flex;
  justify-content: center;
  align-items: center;
}

.splash img {
  display: block;
  width: min(800px, 92vw);
  height: auto;
  max-height: 55px;
  object-fit: contain;
}


/* =========================================
MAIN HEADER
========================================= */

.main-header {
  position: relative;

  width: 100%;
  padding: 40px 0;

  display: flex;
  justify-content: center;
  align-items: center;

  background: transparent;
  line-height: 0;
}

.logo-wrap {
  position: relative;
  isolation: isolate;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(800px, 92vw);

  line-height: 0;
}

.logo-wrap::before {
  content: "";

  position: absolute;
  top: 50%;
  left: 50%;

  width: 100vw;
  height: var(--brand-line-height);

  background-color: var(--brand-line-color);
  transform: translate(-50%, -50%);
  z-index: 0;
}

.logo-wrap img {
  position: relative;
  z-index: 1;

  display: block;
  width: 100%;
  height: auto;
  max-height: 55px;
  object-fit: contain;
}


/* =========================================
NAVIGATION
========================================= */

.main-nav {
  width: 100%;

  display: flex;
  justify-content: center;

  margin-top: 20px;
  margin-bottom: 40px;
}

.main-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;

  gap: 60px;
  list-style: none;
}

.main-nav a {
  color: #555;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;

  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: #2a3b80;
}

.main-nav a.active,
.main-nav a[aria-current="page"] {
  color: #111;
}


/* =========================================
PAGE CONTAINER
========================================= */

.page-container {
  width: 100%;
  max-width: var(--content-width);

  margin: 0 auto;
  padding: 40px;

  text-align: center;
}

.page-container h1 {
  margin-bottom: 20px;

  font-size: 36px;
  font-weight: 600;
}


/* =========================================
INTRODUCE PAGE
========================================= */

.prose {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.prose p {
  margin: 0 0 16px;

  color: #444;
  font-size: 18px;
  line-height: 1.8;
}

.prose-title {
  font-weight: 600;
}

.prose-en {
  margin-top: 90px;
}


/* =========================================
COMMON IMAGE LIST
========================================= */

.image-list {
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 5px;
  padding-bottom: 80px;
}

.image-list a {
  width: 100%;

  display: flex;
  justify-content: center;
}

.image-list img,
.auto-image {
  display: block;

  width: min(100%, var(--content-width));
  aspect-ratio: 16 / 9;

  object-fit: cover;
  border-radius: 0;

  filter: grayscale(100%);
  transform: scale(1);

  transition:
    filter 0.4s ease,
    transform 0.4s ease;
}

.image-list img:hover,
.auto-image:hover {
  filter: grayscale(0%);
}


/* =========================================
PROJECT DETAIL
프로젝트 상세 페이지 공통 적용
========================================= */

.project-detail .page-container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
}

.project-detail .page-container > .image-list {
  gap: 0;
  margin-bottom: 1px;
  padding-bottom: 0;
}

.project-detail .page-container > .image-list img {
  width: 100%;
  max-width: var(--content-width);
}


/* =========================================
PROJECT DETAIL – TWO IMAGE ROW
========================================= */

.image-row-2 {
  width: 100%;
  max-width: var(--content-width);

  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;

  gap: 1px;
}

.image-row-2 img {
  display: block;

  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;

  object-fit: cover;

  filter: grayscale(100%);
  transform: scale(1);

  transition:
    filter 0.4s ease,
    transform 0.4s ease;
}

.image-row-2 img:hover {
  filter: grayscale(0%);
}


/* =========================================
PROJECT DETAIL – TEXT
========================================= */

.project-copy {
  width: 100%;
  max-width: var(--text-width);

  margin: 50px auto 0;

  color: #222;
  font-size: 16px;
  line-height: 1.9;
  text-align: left;
}

.project-copy h2 {
  margin: 30px 0 10px;

  font-size: 20px;
  font-weight: 600;
}

.project-copy h2:first-child {
  margin-top: 0;
}

.project-copy p {
  color: #444;
}

.project-copy ul {
  padding-left: 0;

  color: #555;
  list-style: none;
}


/* =========================================
PROJECT DETAIL – FLOOR PLAN
모든 프로젝트 상세 페이지 공통 적용
========================================= */

.floor-plan-section {
  width: 100%;
  margin: 60px auto;
}

.floor-plan-heading {
  width: 100%;
  max-width: var(--text-width);

  margin: 0 auto 20px;

  text-align: left;
}

.floor-plan-heading h2 {
  margin: 0;

  font-size: 20px;
  font-weight: 600;
}

.floor-plan-image {
  width: 100%;
  max-width: var(--content-width);

  margin: 0 auto;
  padding: 0;
}

.floor-plan-image img {
  display: block;

  width: 100%;
  max-width: 100%;
  height: auto;

  margin: 0 auto;

  aspect-ratio: auto;
  object-fit: contain;

  filter: none;
  transform: none;
}


/* =========================================
PROJECT LIST CARD
메인 및 프로젝트 목록 공통
========================================= */

.image-list .project-card {
  position: relative;

  display: block;
  width: min(100%, var(--content-width));

  overflow: hidden;

  color: #ffffff;
  text-decoration: none;
}

.image-list .project-card img {
  display: block;

  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;

  object-fit: cover;

  filter: grayscale(100%);
  transform: scale(1);

  transition:
    filter 0.4s ease,
    transform 0.4s ease;
}


/* =========================================
PROJECT INFORMATION OVERLAY
========================================= */

.project-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  padding: 30px;

  color: #ffffff;
  text-align: center;
  text-transform: uppercase;

  background: rgba(0, 0, 0, 0.2);

  text-shadow:
    0 1px 4px rgba(0, 0, 0, 0.6),
    0 3px 14px rgba(0, 0, 0, 0.45);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.4s ease;
}

.project-name {
  margin-bottom: 2.4em;

  font-size: clamp(13px, 1.35vw, 23px);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.project-year {
  margin-bottom: 2.4em;

  font-size: clamp(10px, 0.75vw, 14px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.project-type {
  margin-bottom: 1em;

  font-size: clamp(10px, 0.75vw, 14px);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.project-service {
  margin-bottom: 1em;

  font-size: clamp(10px, 0.75vw, 14px);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

.project-location {
  font-size: clamp(10px, 0.75vw, 14px);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.4;
}


/* =========================================
PROJECT CARD HOVER
========================================= */

.project-card:hover img,
.project-card:focus-visible img {
  filter: grayscale(0%);
  transform: scale(1.01);
}

.project-card:hover .project-overlay,
.project-card:focus-visible .project-overlay {
  opacity: 1;
}

.project-card:focus-visible {
  outline: 2px solid var(--brand-line-color);
  outline-offset: 3px;
}


/* =========================================
MOBILE 381px – 768px
========================================= */

@media (min-width: 381px) and (max-width: 768px) {
  .main-header {
    padding: 20px 4px;
  }

  .logo-wrap img {
    width: 100%;
    height: auto;
    max-width: none;
  }

  .main-nav {
    margin-top: 10px;
    margin-bottom: 18px;
  }

  .main-nav ul {
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 12px;
  }

  .main-nav a {
    font-size: 13px;
    letter-spacing: 0.02em;
  }

  .image-list {
    gap: 22px;
    padding-bottom: 56px;
  }

  .image-list img,
  .auto-image,
  .image-list .project-card img {
    aspect-ratio: 4 / 3;
  }

  .page-container {
    padding: 40px 24px;
  }

  .page-container h1 {
    font-size: 30px;
  }

  .prose p {
    font-size: 18px;
    line-height: 1.8;
  }

  .image-row-2 {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .project-copy {
    margin-top: 40px;
  }
}


/* =========================================
MOBILE ≤ 380px
========================================= */

@media (max-width: 380px) {
  .main-header {
    padding: 18px 2px;
  }

  .logo-wrap img {
    width: 100%;
    height: auto;
    max-width: none;
  }

  .main-nav {
    margin-top: 10px;
    margin-bottom: 18px;
  }

  .main-nav ul {
    gap: 10px;
    padding: 0 10px;
  }

  .main-nav a {
    font-size: 12px;
  }

  .image-list {
    gap: 16px;
  }

  .page-container {
    padding: 34px 18px;
  }

  .page-container h1 {
    font-size: 26px;
  }

  .image-row-2 {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .project-copy {
    font-size: 14px;
  }
}


/* =========================================
MOBILE PROJECT INFORMATION
========================================= */

@media (max-width: 768px) {
  .project-overlay {
    padding: 16px;
    background: rgba(0, 0, 0, 0.18);
    opacity: 1;
  }

  .project-name {
    margin-bottom: 1.5em;
    font-size: 15px;
  }

  .project-year {
    margin-bottom: 1.5em;
    font-size: 10px;
  }

  .project-type,
  .project-service {
    margin-bottom: 0.6em;
    font-size: 10px;
  }

  .project-location {
    margin-bottom: 0;
    font-size: 10px;
  }

  .splash img {
    width: 92vw;
    height: auto;
  }

  .floor-plan-section {
    margin: 40px auto;
  }

  .floor-plan-heading {
    margin-bottom: 16px;
  }

  .floor-plan-heading h2 {
    font-size: 18px;
  }

  .floor-plan-image {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    transform: translateX(-50%);
  }

  .floor-plan-image img {
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }
}


/* =========================================
PHONE LANDSCAPE
========================================= */

@media (max-width: 768px) and (orientation: landscape) {
  .main-header {
    padding: 12px 4px;
  }

  .logo-wrap img {
    max-height: 64px;
  }

  .main-nav {
    margin-top: 6px;
    margin-bottom: 10px;
  }

  .main-nav ul {
    gap: 10px;
    padding: 0 10px;
  }

  .main-nav a {
    font-size: 12px;
  }

  .image-list {
    gap: 14px;
    padding-bottom: 36px;
  }

  .page-container {
    padding: 24px 18px;
  }

  .page-container h1 {
    font-size: 24px;
  }

  .prose p {
    font-size: 16px;
    line-height: 1.7;
  }

  .project-name {
    margin-bottom: 1em;
    font-size: 13px;
  }

  .project-year {
    margin-bottom: 1em;
  }

  .project-type,
  .project-service,
  .project-location {
    font-size: 9px;
  }
}/* 프로젝트 상세 페이지 사진은 항상 컬러 */
.project-detail .image-list img,
.project-detail .image-row-2 img,
.project-detail .auto-image {
  filter: none;
  transform: none;
}
/* 프로젝트 상세 페이지의 2장 이미지 간격 */
body.project-detail .image-row-2 {
  gap: 1.4px;
}
/* 프로젝트 상세 사진 사이 간격 통일 */
body.project-detail .image-row-2 {
  gap: 2x;
}

/* 두 장짜리 이미지 묶음이 연속될 때 위아래 간격 */
body.project-detail .image-row-2 + .image-row-2 {
  margin-top: 2px;
}

.contact-form { width: 100%; max-width: 760px; margin: 48px auto 0; text-align: left; }
.contact-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
.contact-form label { display: grid; gap: 10px; }
.contact-form label span { font-size: 11px; letter-spacing: .12em; color: #777; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; border: 0; border-bottom: 1px solid #bdbdbd; border-radius: 0; background: transparent; padding: 10px 0; color: inherit; font: inherit; outline: none; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--brand-line-color); }
.contact-form-message { margin-top: 32px; }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-submit { margin-top: 28px; padding: 12px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; font: inherit; letter-spacing: .12em; cursor: pointer; }
.contact-note { min-height: 1.4em; margin-top: 16px; color: #777; font-size: 12px; }
.contact-honey { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
@media (max-width: 640px) { .contact-form-grid { grid-template-columns: 1fr; gap: 22px; } }
/* STUDIO LOG */
.studio-log { max-width: var(--content-width); margin: 0 auto; padding: 0 40px 100px; }
.studio-intro { text-align: center; color: #666; line-height: 1.7; }
.studio-filters { display: flex; justify-content: center; gap: 24px; margin: 36px 0; }
.studio-filters button { font: inherit; color: #777; border: 0; border-bottom: 1px solid transparent; background: transparent; padding: 8px 2px; cursor: pointer; }
.studio-filters button[aria-pressed="true"] { color: var(--brand-line-color); border-color: var(--brand-line-color); }
.studio-filters button:focus-visible { outline: 2px solid var(--brand-line-color); outline-offset: 4px; }
#studioStatus { color: #777; font-size: 13px; margin-bottom: 24px; }
.studio-entry { padding: 0 0 48px; }
.studio-entry-link { display: block; color: inherit; text-decoration: none; }
#studioGallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
.studio-meta { display: flex; gap: 18px; color: #777; font-size: 13px; margin-bottom: 14px; }
.studio-entry h2 { font-size: 24px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.studio-text { margin-top: 16px; color: #555; font-size: 16px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.studio-photos { display: grid; gap: 20px; margin-bottom: 22px; overflow: hidden; background: #f2f2f2; }
.studio-photos:empty { display: none; }
.studio-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(100%); transition: filter 0.4s ease, transform 0.4s ease; }
.studio-entry-link:hover .studio-photo img,
.studio-entry-link:focus-visible .studio-photo img { filter: grayscale(0%); transform: scale(1.01); }
.studio-entry-link:focus-visible { outline: 2px solid var(--brand-line-color); outline-offset: 5px; }
.studio-entry-cta { display: inline-block; margin-top: 18px; color: var(--brand-line-color); font-size: 12px; letter-spacing: 0.12em; }
.studio-credit { margin-top: 14px; color: #888; font-size: 12px; letter-spacing: 0.08em; }
.studio-photo img[hidden] { display: none; }
.studio-photo figcaption { padding-top: 10px; color: #777; font-size: 13px; line-height: 1.6; }
.studio-photo-missing { min-height: 220px; display: grid; place-items: center; background: #f4f4f2; color: #888; font-size: 14px; }
@media (max-width: 768px) {
  .studio-log { padding: 0 22px 60px; }
  #studioGallery { grid-template-columns: 1fr; gap: 8px; }
  .studio-entry { padding: 26px 0 40px; }
  .studio-entry h2 { font-size: 21px; }
  .studio-text { font-size: 15px; }
}
