:root {
  --apt-ink: #302d32;
  --apt-muted: #777078;
  --apt-cream: #fffaf6;
  --apt-blush: #f8e8e7;
  --apt-lilac: #f2ebf7;
  --apt-accent: #cc748a;
  --apt-border: #efe8e6;
  --apt-radius: 22px;
  --apt-container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--apt-cream);
  color: var(--apt-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans KR",
    "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { max-width: 100%; height: auto; display: block; }

.apt-container {
  width: min(calc(100% - 40px), var(--apt-container));
  margin-inline: auto;
}

.apt-header {
  background: rgba(255,250,246,.96);
  border-bottom: 1px solid var(--apt-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.apt-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}
.apt-logo {
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -.055em;
}
.apt-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 14px;
  font-weight: 600;
}
.apt-nav a:hover { color: var(--apt-accent); }

.apt-hero {
  padding: 76px 0;
  background: linear-gradient(120deg, #fff5f0, #faedf1 55%, #f2ebf7);
}
.apt-hero h1 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.17;
  letter-spacing: -.055em;
  margin: 0 0 20px;
}
.apt-hero p {
  max-width: 620px;
  color: var(--apt-muted);
  font-size: 17px;
}
.apt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--apt-ink);
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.apt-button:hover { background: var(--apt-accent); }

.apt-section { padding: 75px 0; }
.apt-section-title {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.25;
  letter-spacing: -.04em;
  margin: 0 0 10px;
}
.apt-section-subtitle {
  color: var(--apt-muted);
  margin: 0 0 30px;
}
.apt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.apt-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--apt-border);
  border-radius: var(--apt-radius);
}
.apt-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .35s ease;
}
.apt-card:hover img { transform: scale(1.045); }
.apt-card-content { padding: 17px 20px; }
.apt-card-title { margin: 0; font-size: 17px; }
.apt-card-meta { color: var(--apt-muted); font-size: 13px; }

/* AIPETIA Visual Gallery */
.apt-gallery {
  columns: 4;
  column-gap: 18px;
}
.apt-gallery-item {
  position: relative;
  display: block;
  break-inside: avoid;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 18px;
  background: #f3eeee;
  cursor: zoom-in;
}
.apt-gallery-item img {
  width: 100%;
  height: auto;
  transition: transform .4s ease;
}
.apt-gallery-item:hover img { transform: scale(1.035); }
.apt-gallery-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 32px 14px 14px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(transparent, rgba(0,0,0,.48));
  opacity: 0;
  transition: opacity .2s ease;
}
.apt-gallery-item:hover .apt-gallery-caption,
.apt-gallery-item:focus-visible .apt-gallery-caption { opacity: 1; }

.apt-footer {
  padding: 45px 0;
  border-top: 1px solid var(--apt-border);
  color: var(--apt-muted);
  background: #fff;
}

@media (max-width: 1000px) {
  .apt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apt-gallery { columns: 3; }
}
@media (max-width: 700px) {
  .apt-header-inner { min-height: 66px; flex-wrap: wrap; padding: 12px 0; }
  .apt-nav { gap: 14px; overflow-x: auto; max-width: 100%; }
  .apt-hero { padding: 50px 0; }
  .apt-section { padding: 48px 0; }
  .apt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .apt-gallery { columns: 2; column-gap: 10px; }
  .apt-gallery-item { margin-bottom: 10px; border-radius: 12px; }
}
@media (max-width: 380px) {
  .apt-grid { grid-template-columns: 1fr; }
  .apt-gallery { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* AIPETIA Lightbox v1 */
body.apt-lightbox-open {
  overflow: hidden;
}

.apt-lightbox[hidden] {
  display: none !important;
}

.apt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 17, 24, .96);
  color: #fff;
  padding: 50px 70px;
}

.apt-lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.apt-lightbox-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 145px);
  object-fit: contain;
  border-radius: 12px;
}

.apt-lightbox-caption {
  font-size: 14px;
  text-align: center;
  color: rgba(255,255,255,.85);
}

.apt-lightbox button {
  position: absolute;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.13);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease;
}

.apt-lightbox button:hover {
  background: rgba(255,255,255,.27);
}

.apt-lightbox button:focus-visible {
  outline: 3px solid #f5a9c3;
  outline-offset: 3px;
}

.apt-lightbox-close {
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 30px;
}

.apt-lightbox-prev,
.apt-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 38px;
}

.apt-lightbox-prev { left: 15px; }
.apt-lightbox-next { right: 15px; }

@media (max-width: 700px) {
  .apt-lightbox {
    padding: 65px 12px;
  }

  .apt-lightbox-image {
    max-height: calc(100dvh - 160px);
    border-radius: 8px;
  }

  .apt-lightbox-prev,
  .apt-lightbox-next {
    width: 36px;
    height: 36px;
    font-size: 27px;
    background: rgba(0,0,0,.3);
  }

  .apt-lightbox-prev { left: 6px; }
  .apt-lightbox-next { right: 6px; }
}

/* AIPETIA Gallery Filters v1 */
.apt-gallery-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 30px;
}

.apt-filter {
  appearance: none;
  border: 1px solid #eadce6;
  border-radius: 999px;
  background: #fff;
  color: #695c69;
  padding: 10px 19px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background .2s ease, color .2s ease,
              border-color .2s ease, transform .2s ease;
}

.apt-filter:hover {
  background: #fff0f6;
  border-color: #edb5cf;
  transform: translateY(-1px);
}

.apt-filter.is-active {
  background: #f7c9de;
  color: #493344;
  border-color: #f7c9de;
}

.apt-filter:focus-visible {
  outline: 3px solid #d88caf;
  outline-offset: 3px;
}

.apt-gallery-item[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .apt-gallery-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 2px 12px;
    scrollbar-width: thin;
  }

  .apt-filter {
    flex: 0 0 auto;
    padding: 9px 15px;
    font-size: 13px;
  }
}
