:root {
  --purple-footer: #27003d;
  --purple-title: rgb(50, 0, 79);
  --text-dark: rgb(25, 0, 40);
  --text-mid: rgb(34, 1, 53);
  --text-violet: rgb(58, 1, 92);
  --white: #ffffff;
  --content-max: 1000px;
  --font: "Golos Text", "Golos Text Placeholder", system-ui, sans-serif;
  --section-pad-y: 100px;
  --section-pad-x: 100px;
  --section-gap: 60px;
  --header-gap: 24px;
  --panel-gap: 40px;
  --card-gap: 30px;
  --lead-max: 720px;
  --title-size: 48px;
  --lead-size: 20px;
  --body-size: 20px;
  --caption-size: 16px;
  --btn-pad: 14px 28px;
  --btn-font: 18px;
  --hero-pad-y: 100px;
  --hero-pad-x: 100px;
  --hero-min-height: 800px;
  --section-bg: #ffffff;
  --section-bg-alt: rgba(50, 0, 79, 0.04);
  --section-divider: rgba(50, 0, 79, 0.14);
  --section-head-pad: 32px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  background: var(--white);
  color: var(--text-dark);
  overflow-x: clip;
}

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

h2,
h3,
p {
  margin: 0;
}

.page {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  overflow-x: clip;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--hero-min-height);
  padding: var(--hero-pad-y) var(--hero-pad-x);
  background: var(--white);
}

.hero__image-wrap {
  flex: none;
  width: min(653px, 100%);
  aspect-ratio: 1920 / 612;
  position: relative;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Content sections — visual separation */
.section {
  width: 100%;
  max-width: 100%;
  padding: var(--section-pad-y) var(--section-pad-x);
  padding-left: max(var(--section-pad-x), env(safe-area-inset-left, 0px));
  padding-right: max(var(--section-pad-x), env(safe-area-inset-right, 0px));
  border-top: 1px solid var(--section-divider);
  overflow-x: clip;
}

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

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

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding-bottom: var(--section-head-pad);
  margin-bottom: 8px;
  border-bottom: 1px solid var(--section-divider);
}

.section-head__label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-violet);
}

.section-head .intro__about,
.section-head .gallery__lead,
.section-head .works__lead,
.section-head .nowagift__lead {
  max-width: var(--lead-max);
}

/* Intro */
.intro {
  width: 100%;
}

.intro__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--section-gap);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.intro__title,
.gallery__title,
.works__title,
.nowagift__title {
  width: 100%;
  font-size: var(--title-size);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
  text-align: left;
  color: var(--purple-title);
}

.intro__about,
.gallery__lead,
.works__lead,
.nowagift__lead,
.book-spotlight__text,
.nowagift__text {
  max-width: var(--lead-max);
  font-size: var(--lead-size);
  font-weight: 500;
  line-height: 1.5em;
  color: var(--text-mid);
}

.intro__grid {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: var(--section-gap);
  width: 100%;
}

.intro__text {
  flex: 1 1 0;
  min-width: 0;
  font-size: var(--body-size);
  font-weight: 500;
  line-height: 1.5em;
  text-align: left;
  color: var(--text-mid);
}

/* Gallery */
.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.gallery__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--section-gap);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.gallery__header {
  width: 100%;
}

.gallery__row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: var(--content-max);
}

.card {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--card-gap);
  min-width: 0;
}

.card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: visible;
}

.card__image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: multiply;
}

.card__image-wrap--shadow img {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

.card__caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  align-self: stretch;
}

.card__title {
  font-size: var(--lead-size);
  font-weight: 500;
  line-height: 1.5em;
  letter-spacing: -0.025em;
  text-align: left;
  color: var(--text-violet);
}

.card__desc {
  font-size: var(--caption-size);
  font-weight: 400;
  line-height: 1.5em;
  text-align: left;
  color: var(--text-mid);
}

.card__title--dark {
  color: var(--text-dark);
}

.card__title--violet {
  color: var(--text-violet);
}

.card__desc--muted {
  color: var(--text-mid);
}

.card__desc--dark {
  color: var(--text-dark);
}

/* Works sections — Drawing Series & Picture Books */
.works {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.works__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--section-gap);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.works__header {
  width: 100%;
}

.works__tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-violet);
}

/* Featured drawing — wide highlight */
.feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  width: 100%;
}

.feature__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: visible;
}

.feature__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(50, 0, 79, 0.06) 0%,
    rgba(58, 1, 92, 0.12) 45%,
    rgba(255, 200, 120, 0.15) 100%
  );
}

.feature__caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.feature__caption .works__tag {
  margin-top: 4px;
}

/* Card placeholders */
.card__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.card__placeholder--warm {
  background: linear-gradient(
    160deg,
    rgba(255, 220, 160, 0.35) 0%,
    rgba(50, 0, 79, 0.08) 100%
  );
}

.card__placeholder--cool {
  background: linear-gradient(
    200deg,
    rgba(120, 180, 255, 0.25) 0%,
    rgba(34, 1, 53, 0.1) 100%
  );
}

.card__placeholder--book {
  background: linear-gradient(
    180deg,
    rgba(50, 0, 79, 0.05) 0%,
    rgba(255, 240, 200, 0.3) 100%
  );
}

.card__placeholder--book-alt {
  background: linear-gradient(
    220deg,
    rgba(58, 1, 92, 0.1) 0%,
    rgba(200, 230, 255, 0.25) 100%
  );
}

/* Picture book spotlight */
.book-spotlight {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--panel-gap);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.book-spotlight__cover-wrap {
  flex: none;
  width: min(320px, 42%);
}

.book-spotlight__cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(25, 0, 40, 0.08);
}

.book-spotlight__subtitle,
.nowagift__subtitle {
  font-size: var(--lead-size);
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-mid);
}

.book-spotlight__content {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  padding-top: 8px;
}

.book-spotlight__text {
  max-width: none;
}

.book-spotlight__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.book-spotlight__meta li {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5em;
  color: var(--text-dark);
}

.book-spotlight__meta li::before {
  content: "— ";
  color: var(--text-violet);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 48px;
  padding: var(--btn-pad);
  font-family: var(--font);
  font-size: var(--btn-font);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid var(--purple-title);
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.btn--primary {
  color: var(--white);
  background: var(--purple-title);
}

.btn--primary:hover {
  color: var(--purple-title);
  background: var(--white);
}

.btn:focus-visible {
  outline: 2px solid var(--purple-title);
  outline-offset: 3px;
}

.book-spotlight__shop {
  margin-top: 20px;
}

.card__image-wrap--book {
  aspect-ratio: 4 / 3;
}

/* ifnoif in Bukchon — 5 drawings (3 + 2, equal card size) */
.bukchon-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 20px;
  row-gap: 48px;
  width: 100%;
}

.bukchon-grid .card {
  flex: none;
  min-width: 0;
  gap: var(--card-gap);
}

.bukchon-grid .card:nth-child(1) {
  grid-column: 1 / 5;
}

.bukchon-grid .card:nth-child(2) {
  grid-column: 5 / 9;
}

.bukchon-grid .card:nth-child(3) {
  grid-column: 9 / 13;
}

.bukchon-grid .card:nth-child(4) {
  grid-column: 3 / 7;
}

.bukchon-grid .card:nth-child(5) {
  grid-column: 7 / 11;
}

.bukchon-grid .card__image-wrap--lineart img {
  padding: 8px;
}

/* Line art from ifnoif in Bukchon */
.card__image-wrap--lineart img,
.feature__image-wrap--lineart img {
  mix-blend-mode: normal;
  object-fit: contain;
  padding: 12px;
  background: var(--white);
}

.feature__image-wrap--lineart {
  background: var(--white);
}

.works__lead em {
  font-style: normal;
  color: var(--purple-title);
}

/* Now, a Gift — AI film collaboration */
.nowagift {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.nowagift__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--section-gap);
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.nowagift__header {
  width: 100%;
}

.nowagift__project-link {
  color: var(--purple-title);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.nowagift__project-link:hover {
  opacity: 0.75;
}

.nowagift__panel {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  align-items: start;
  gap: var(--panel-gap);
  width: 100%;
}

.nowagift__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--purple-footer);
}

.nowagift__visual-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.nowagift__visual-wrap {
  width: 100%;
  min-width: 0;
}

.nowagift__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  padding-top: 0;
  margin-top: 0;
}

.nowagift__body .btn {
  margin-top: 8px;
}

.nowagift__text {
  max-width: none;
}

.nowagift__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nowagift__list li {
  font-size: var(--caption-size);
  font-weight: 400;
  line-height: 1.5em;
  color: var(--text-dark);
}

.nowagift__list li::before {
  content: "— ";
  color: var(--text-violet);
}

.nowagift__project-link:focus-visible {
  outline: 2px solid var(--purple-title);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .nowagift__visual-video {
    display: none;
  }

  .nowagift__visual {
    background: var(--purple-footer);
  }
}

/* Footer */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: var(--section-pad-y) var(--section-pad-x);
  background: var(--purple-footer);
  color: var(--white);
}

.footer__inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer__text p {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5em;
  color: var(--white);
}

.footer__link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.footer__link:hover {
  opacity: 0.75;
}

.footer__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: none;
  padding-top: 2px;
}

.footer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid var(--white);
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.footer__btn-icon {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
}

.footer__btn-label {
  flex: none;
}

.footer__btn--outline {
  color: var(--white);
  background: transparent;
}

.footer__btn--outline:hover {
  color: var(--purple-footer);
  background: var(--white);
}

.footer__btn--fill {
  color: var(--purple-footer);
  background: var(--white);
}

.footer__btn--fill:hover {
  color: var(--white);
  background: transparent;
}

.footer__btn:focus-visible,
.footer__link:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* Tablet: 810px – 1199px */
@media (min-width: 810px) and (max-width: 1199.98px) {
  :root {
    --section-pad-y: 56px;
    --section-pad-x: 40px;
    --section-gap: 48px;
    --header-gap: 20px;
    --panel-gap: 32px;
    --card-gap: 24px;
    --title-size: 40px;
    --lead-size: 18px;
    --body-size: 18px;
    --hero-pad-y: 48px;
    --hero-pad-x: 40px;
    --hero-min-height: 640px;
  }

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

  .bukchon-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--section-gap);
    column-gap: 20px;
  }

  .bukchon-grid .card:nth-child(n) {
    grid-column: auto;
  }

  .bukchon-grid .card:nth-child(4),
  .bukchon-grid .card:nth-child(5) {
    grid-column: auto;
  }

  .bukchon-grid .card:nth-child(5) {
    width: 100%;
    justify-self: stretch;
  }
}

/* Long text & titles — prevent horizontal overflow */
.intro__content,
.gallery__inner,
.works__inner,
.nowagift__inner,
.section-head,
.gallery__row,
.card__caption {
  max-width: 100%;
  min-width: 0;
}

.intro__title,
.gallery__title,
.works__title,
.nowagift__title,
.intro__about,
.intro__text,
.gallery__lead,
.works__lead,
.book-spotlight__text,
.nowagift__lead,
.nowagift__text,
.card__title,
.card__desc,
.book-spotlight__meta li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Mobile: max 809px */
@media (max-width: 809.98px) {
  :root {
    --section-pad-y: 48px;
    --section-pad-x: 20px;
    --section-gap: 40px;
    --header-gap: 16px;
    --panel-gap: 28px;
    --card-gap: 24px;
    --title-size: 30px;
    --lead-size: 18px;
    --body-size: 18px;
    --caption-size: 15px;
    --btn-font: 16px;
    --btn-pad: 12px 22px;
    --lead-max: 100%;
    --hero-pad-y: 32px;
    --hero-pad-x: 20px;
    --hero-min-height: min(52vh, 420px);
  }

  .section-head {
    padding-bottom: 24px;
    margin-bottom: 4px;
  }

  .section-head__label {
    font-size: 12px;
  }

  .intro__grid {
    flex-direction: column;
  }

  .gallery__row {
    flex-direction: column;
    gap: var(--section-gap);
  }

  .card {
    flex: none;
    width: 100%;
  }

  .book-spotlight {
    flex-direction: column;
    align-items: stretch;
  }

  .book-spotlight__cover-wrap {
    width: 100%;
    max-width: min(260px, 100%);
  }

  .book-spotlight__content {
    width: 100%;
  }

  .book-spotlight__shop {
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
  }

  .bukchon-grid {
    grid-template-columns: 1fr;
    row-gap: var(--section-gap);
  }

  .bukchon-grid .card:nth-child(n) {
    grid-column: 1 / -1;
  }

  .nowagift__panel {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .nowagift__visual {
    aspect-ratio: 16 / 10;
  }

  .btn,
  .book-spotlight__shop {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    text-wrap: balance;
  }

  .btn {
    justify-content: center;
  }

  .footer__inner {
    flex-direction: column;
    align-items: stretch;
    gap: var(--section-gap);
  }

  .footer__text {
    align-items: center;
    order: 2;
  }

  .footer__text p {
    text-align: center;
  }

  .footer__actions {
    flex-direction: column;
    align-items: stretch;
    order: 1;
    width: 100%;
    padding-top: 0;
    gap: 12px;
  }

  .footer__btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: var(--btn-pad);
    font-size: var(--btn-font);
    white-space: normal;
    text-wrap: balance;
    box-sizing: border-box;
  }

  .footer {
    padding-left: max(var(--section-pad-x), env(safe-area-inset-left, 0px));
    padding-right: max(var(--section-pad-x), env(safe-area-inset-right, 0px));
  }
}
