:root {
  --ink: #141414;
  --muted: #5d5d5a;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --soft: #ece8dc;
  --line: rgba(20, 20, 20, 0.14);
  --accent: #d76c45;
  --shadow: 0 18px 50px rgba(20, 20, 20, 0.12);
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
  line-height: 1.7;
}

body.modal-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(247, 245, 239, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.brand span {
  font-size: 13px;
}

nav {
  display: flex;
  gap: clamp(12px, 2.6vw, 30px);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.section-panel,
.work-section {
  padding-right: clamp(22px, 6vw, 92px);
  padding-left: clamp(22px, 6vw, 92px);
}

.hero {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 116px;
  padding-bottom: 70px;
  background: var(--soft);
}

.hero-copy {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
}

.mail-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 0 22px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.mail-button:hover,
.mail-button:focus-visible,
.mail-button:active {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.eyebrow,
.section-number {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 26px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(64px, 9.2vw, 118px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  max-width: 920px;
  margin-bottom: 18px;
  font-size: clamp(34px, 5.2vw, 76px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  margin-bottom: 10px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 900;
  line-height: 1.35;
}

.tools {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.work-section {
  scroll-margin-top: 76px;
  position: relative;
  padding-top: clamp(76px, 10vw, 136px);
  padding-bottom: clamp(76px, 10vw, 136px);
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.78, 0.24, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#package {
  min-height: 0;
}

#package .work-copy {
  min-height: clamp(520px, 60vw, 820px);
  margin-bottom: 0;
  background:
    linear-gradient(180deg, rgba(247, 245, 239, 0.98) 0%, rgba(247, 245, 239, 0.3) 50%, rgba(247, 245, 239, 0.08) 100%),
    url("assets/nutriworks/nutriworks-package-2.webp") bottom / cover no-repeat;
}

.package-slider {
  --visible-slides: 3;
  --slide-gap: clamp(12px, 2vw, 24px);
  max-width: var(--content-width);
  margin: clamp(34px, 5vw, 64px) auto 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: clamp(10px, 1.6vw, 18px);
}

.package-slide-track {
  overflow: hidden;
}

.package-slide-strip {
  width: 100%;
  display: flex;
  gap: var(--slide-gap);
  transform: translateX(var(--slide-offset, 0));
  transition: transform 1000ms cubic-bezier(0.58, 0, 0.32, 1);
  will-change: transform;
}

.package-slide-strip.no-transition {
  transition: none;
}

.package-slide-image {
  flex: 0 0 var(--slide-width, calc((100% - var(--slide-gap) - var(--slide-gap)) / 3));
  min-width: 0;
  aspect-ratio: 1402 / 1122;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.slider-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(20, 20, 20, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  font-weight: 500;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.slider-arrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.slider-prev::before {
  transform: rotate(-45deg) translate(1px, 1px);
}

.slider-next::before {
  transform: rotate(135deg) translate(1px, 1px);
}

.slider-arrow:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

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

.work-copy {
  max-width: var(--content-width);
  margin: 0 auto clamp(34px, 5vw, 58px);
}

.work-copy p:not(.section-number):not(.tools) {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(17px, 1.55vw, 22px);
  font-weight: 650;
  word-break: keep-all;
}

.full-image,
.detail-layout,
.detail-stage,
.graphic-showcase,
.brand-gallery,
.square-grid {
  max-width: var(--content-width);
  margin: 0 auto;
}

.full-image {
  padding: clamp(10px, 1.6vw, 18px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.full-image img {
  height: auto;
  border-radius: 6px;
}

#detail {
  overflow: hidden;
  background: var(--soft);
}

#detail::before,
#detail::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#detail::before {
  background: url("assets/nutriworks/detail-page-bg.webp") calc(100% + 20px) center / auto 125% no-repeat;
  opacity: 0.55;
}

#detail::after {
  background: linear-gradient(90deg, rgba(236, 232, 220, 0.92) 0%, rgba(236, 232, 220, 0.58) 46%, rgba(236, 232, 220, 0) 100%);
}

#detail > * {
  position: relative;
  z-index: 1;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(280px, 0.48fr);
  gap: clamp(34px, 6vw, 92px);
  align-items: center;
}

.detail-layout .work-copy {
  margin-bottom: 0;
}

.detail-stage {
  justify-self: end;
  width: min(430px, 100%);
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-color-controls {
  width: 100%;
  inline-size: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  justify-self: stretch;
  margin-left: 0;
  padding: 18px 16px;
  border-radius: 0;
  background: #ececec;
}

.color-dot {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  padding: 0;
  border: 2px solid rgba(20, 20, 20, 0.16);
  border-radius: 50%;
  background: var(--dot-color);
  cursor: pointer;
  transition: flex 320ms ease, border-radius 320ms ease, border-color 200ms ease;
}

.color-dot.active {
  width: auto;
  flex: 1 1 auto;
  border-radius: 999px;
  border-color: var(--ink);
}

.detail-preview {
  height: min(72vh, 760px);
  min-height: 520px;
  margin: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.detail-preview img {
  height: auto;
  border-radius: 7px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 78px);
  align-items: start;
}

.split-section .work-copy {
  position: sticky;
  top: 104px;
  margin-bottom: 0;
}

.square-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.square-grid img {
  aspect-ratio: 1 / 1;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.brand-gallery {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}

.brand-wide {
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.brand-concept-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.brand-concept-grid img {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.graphic-showcase {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}

.graphic-showcase img {
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.graphic-reflet {
  height: auto;
}

.banner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.banner-grid img {
  aspect-ratio: 1 / 1;
  height: 100%;
  object-fit: cover;
}

.three-column,
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-tile {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.project-tile img {
  object-fit: cover;
}

.project-tile img {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-tile:hover img {
  transform: translateY(-3px);
  box-shadow: 0 24px 64px rgba(20, 20, 20, 0.18);
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 68px clamp(18px, 4vw, 54px) 28px;
  background: rgba(20, 20, 20, 0.76);
}

.image-modal[hidden] {
  display: none;
}

.modal-frame {
  position: relative;
  width: fit-content;
  max-width: min(1100px, 100%);
}

.modal-frame img {
  width: auto;
  max-width: 100%;
  max-height: 84vh;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.62);
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 28px clamp(22px, 6vw, 92px) 42px;
  border-top: 1px solid rgba(20, 20, 20, 0.28);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 960px) {
  .split-section {
    grid-template-columns: 1fr;
  }

  .split-section .work-copy {
    position: static;
  }

  .detail-layout,
  .three-column,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-stage {
    justify-self: end;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 10px;
    font-size: 11px;
  }

  .hero {
    min-height: 58vh;
    padding-top: 112px;
  }

  #package {
    min-height: 0;
  }

  #package .work-copy {
    min-height: 430px;
    background-position: center bottom;
    background-size: auto, min(520px, 100%) auto;
  }

  .package-slider {
    --visible-slides: 1;
    grid-template-columns: 36px 1fr 36px;
    gap: 8px;
  }

  .package-slide-image {
    flex-basis: 100%;
  }

  .slider-arrow {
    width: 36px;
    height: 36px;
  }

  .slider-arrow::before {
    width: 9px;
    height: 9px;
  }

  h1 {
    font-size: clamp(52px, 18vw, 78px);
  }

  h2 {
    font-size: clamp(32px, 11vw, 46px);
  }

  .lead {
    font-size: 18px;
  }

  .detail-layout,
  .brand-concept-grid,
  .three-column,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .detail-stage {
    justify-self: center;
  }

  .detail-color-controls {
    justify-self: stretch;
    margin-left: 0;
    margin-right: 0;
    justify-content: flex-end;
  }

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

  .graphic-reflet {
    height: auto;
  }

  .banner-grid img {
    aspect-ratio: unset !important;
    height: auto !important;
    object-fit: contain;
  }

  .brand-concept-grid img {
    aspect-ratio: unset;
    height: auto;
    object-fit: contain;
  }

  .detail-preview {
    height: 560px;
    min-height: 0;
  }

}
