/* 한성디자인 · Hansungworks
   Premium apartment interior construction. */

:root {
  --bg: #f6f3ee;
  --bg-soft: #efeae3;
  --paper: #faf8f5;
  --ink: #1a1916;
  --ink-soft: #5c574f;
  --ink-faint: #8a8378;
  --charcoal: #1e1c1a;
  --charcoal-mid: #2c2926;
  --line: #ddd6cc;
  --bronze: #8d7355;
  --header-h: 4.25rem;
  --measure: 38rem;
  --page: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard Variable", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: #e8dcc8;
  color: var(--ink);
}

h1, h2, h3 {
  font-family: "Noto Serif KR", "Source Han Serif K", "Apple SD Gothic Neo", serif;
  font-weight: 500;
}

.wrap {
  width: min(100% - 2.5rem, var(--page));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 2.5rem, 38rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
}

.skip:focus {
  top: 1rem;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--charcoal);
  color: #f4f0ea;
  height: var(--header-h);
}

.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  height: 2.5rem;
  width: auto;
  border-radius: 0.2rem;
  background: #f4f0ea;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  line-height: 1.1;
  flex-shrink: 0;
}

.brand-ko {
  font-family: "Noto Serif KR", serif;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-en {
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b7aea3;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: -0.5rem;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 1.2rem;
  height: 1px;
  background: #f4f0ea;
  position: relative;
  transition: transform 0.25s var(--ease);
}

.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-label span::before { top: -6px; }
.nav-toggle-label span::after { top: 6px; }

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  color: #d8d1c7;
  position: relative;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: #f6f3ee;
}

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.45rem;
  height: 1px;
  background: var(--bronze);
}

/* ---------- photo slots ---------- */

.photo-slot {
  background-color: #2a2724;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.photo-slot--hero { background-image: url('images/hero.jpg'); }
.photo-slot--case-1 { background-image: url('images/case-apgujeong.jpg'); }
.photo-slot--case-2 { background-image: url('images/case-samsung.jpg'); }
.photo-slot--case-3 { background-image: url('images/case-seongdong.jpg'); }

/* ---------- hero ---------- */

.hero {
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-end;
  position: relative;
  color: #f6f3ee;
  overflow: hidden;
  background: #2a2724;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 35%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 18, 16, 0.18) 0%, rgba(20, 18, 16, 0.22) 42%, rgba(20, 18, 16, 0.62) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--page));
  margin-inline: auto;
  padding: 5rem 0 4.5rem;
}

.eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c4b8a8;
  margin: 0 0 1.25rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.6vw, 3.2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.03em;
  max-width: 16em;
}

.hero-actions {
  margin-top: 2.25rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.6rem;
  background: var(--charcoal);
  color: #f6f3ee;
  border: 1px solid var(--charcoal);
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  background: #2f2c28;
}

.btn--ghost {
  background: transparent;
  color: #f6f3ee;
  border-color: rgba(246, 243, 238, 0.45);
}

.btn--ghost:hover {
  background: rgba(246, 243, 238, 0.08);
  border-color: #f6f3ee;
}

.btn--block {
  width: 100%;
}

.text-link {
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong, var(--line));
  padding-bottom: 0.1rem;
}

.text-link:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- sections ---------- */

.section {
  padding: 6.5rem 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section--dark {
  background: var(--charcoal);
  color: #f4f0ea;
}

.section--form {
  padding-top: 2.5rem;
}

.kicker {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 0.85rem;
}

.section h2,
.page-head h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.section-head h2 {
  margin: 0;
}

/* ---------- intro ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 5rem;
  align-items: center;
}

.intro-copy p {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.intro-copy h2 {
  margin-bottom: 1.25rem;
}

.intro-photo {
  margin: 0;
  overflow: hidden;
  background: #2a2724;
}

.intro-photo img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center 30%;
}

/* ---------- process ---------- */

.process {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.process li {
  padding: 1.6rem 1.1rem 0 0;
  position: relative;
}

.process li + li {
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}

.process-num {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--bronze);
  margin-bottom: 0.55rem;
}

.process-name {
  display: block;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.45;
}

/* ---------- home case cards ---------- */

.case-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.case-card {
  display: block;
  color: inherit;
}

.case-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 30%;
  background: #2a2724;
  transition: transform 0.6s var(--ease);
}

.case-card {
  overflow: hidden;
}

.case-card img {
  transform: scale(1);
}

.case-card:hover img {
  transform: scale(1.03);
}

.case-card-body {
  padding: 1.15rem 0 0;
}

.case-card-body h3 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.case-card-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- cases page ---------- */

.case-list {
  display: flex;
  flex-direction: column;
  gap: 5.5rem;
}

.case {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.case-head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
}

.case-scope {
  margin: 0 0 1rem;
  color: var(--bronze);
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.case-concept {
  margin: 0 0 0.75rem;
  max-width: 38rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.case-concept:last-child {
  margin-bottom: 0;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.case-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: #2a2724;
}

.case-gallery img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.page-head {
  padding: 5.5rem 0 0.15rem;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}

.page-head p {
  margin: 1rem 0 0;
  max-width: var(--measure);
  color: var(--ink-soft);
}

/* ---------- form ---------- */

.form {
  margin-top: 0.5rem;
  display: grid;
  gap: 1.45rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label,
.field .label {
  font-size: 0.86rem;
  letter-spacing: -0.01em;
  margin: 0;
}

.req {
  color: var(--bronze);
  margin-left: 0.15rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.8rem 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.choices {
  display: flex;
  gap: 0.6rem;
}

.choice {
  flex: 1;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
}

.choice input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.choice input:checked + span {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: #f6f3ee;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

/* ---------- footer / cta ---------- */

.cta-band {
  padding: 5rem 0;
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.cta-band p {
  margin: 0 0 1.75rem;
  color: #c9c2b8;
  max-width: 30rem;
}

.site-footer {
  background: var(--charcoal);
  color: #a39b91;
  padding: 1.6rem 0;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
  border-top: 1px solid #2e2b28;
}

.site-footer p {
  margin: 0;
}

.site-footer strong {
  color: #e8e2da;
  font-weight: 500;
}

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- mobile ---------- */

@media (max-width: 960px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .case-cards {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .case-card img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 860px) {
  :root { --header-h: 3.85rem; }

  .wrap,
  .wrap--narrow,
  .hero-inner {
    width: min(100% - 1.75rem, var(--page));
  }

  .nav-toggle-label {
    display: flex;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--charcoal-mid);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid #3a3632;
  }

  .nav a {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
  }

  .nav a[aria-current="page"]::after {
    display: none;
  }

  .nav-toggle:checked ~ .nav {
    display: flex;
  }

  .nav-toggle:checked + .nav-toggle-label span {
    background: transparent;
  }

  .nav-toggle:checked + .nav-toggle-label span::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle:checked + .nav-toggle-label span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .hero-inner {
    padding: 4rem 0 3.25rem;
  }

  .section {
    padding: 4.25rem 0;
  }

  .page-head {
    padding-top: 3.5rem;
  }

  .process {
    grid-template-columns: 1fr 1fr;
    border-top: 0;
    gap: 0;
  }

  .process li {
    padding: 1.2rem 1rem 1.2rem 0;
    border-top: 1px solid var(--line);
  }

  .process li + li {
    padding-left: 1rem;
  }

  .process li:nth-child(odd) {
    padding-right: 1rem;
  }

  .process li:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .case-list {
    gap: 3.5rem;
  }

  .case-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.9rem;
    gap: 0.55rem;
    margin-inline: -0.9rem;
    padding: 0 0.9rem 0.35rem;
    -webkit-overflow-scrolling: touch;
    grid-template-columns: none;
  }

  .case-gallery img,
  .case-gallery img:first-child {
    flex: 0 0 86%;
    width: 86%;
    aspect-ratio: 4 / 3;
    grid-column: auto;
    scroll-snap-align: center;
    border-radius: 2px;
  }

  .cta-band {
    padding: 3.75rem 0;
  }
}

@media (max-width: 480px) {
  body { font-size: 16px; }

  .process {
    grid-template-columns: 1fr;
  }

  .process li,
  .process li + li,
  .process li:nth-child(even) {
    padding: 1.15rem 0;
    border-left: 0;
  }
}

.gallery-hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.case-gallery img {
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(14, 13, 12, 0.94);
  color: #f4efe8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-stage {
  margin: 0;
  width: min(100vw, 1100px);
  height: min(78vh, 780px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.lightbox-stage img {
  max-width: 92vw;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-stage figcaption {
  margin-top: 0.7rem;
  font-size: 0.86rem;
  color: #c9c2b8;
  text-align: center;
  padding: 0 1.5rem;
}

.lightbox-count {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #b7aea4;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: transparent;
  border: 0;
  color: #f4efe8;
  cursor: pointer;
  font-family: inherit;
}

.lightbox-close {
  top: 0.85rem;
  right: 1rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
  line-height: 1;
  padding: 0.4rem 0.7rem;
}

.lightbox-prev { left: 0.2rem; }
.lightbox-next { right: 0.2rem; }
