:root {
  --ink: #363629;
  --muted: #747266;
  --line: rgba(103, 103, 83, 0.16);
  --paper: #fbf8f0;
  --sage: #7c8a66;
  --sage-dark: #596448;
  --olive-soft: #edf0e5;
  --shadow: 0 22px 60px rgba(66, 58, 42, 0.14);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--ink);
  background: #f5f0e7;
  font-family:
    "Pretendard",
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

.site-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.92), rgba(251, 248, 240, 0.88) 46%, rgba(245, 240, 231, 0.96) 100%),
    linear-gradient(180deg, #fffdf8 0%, #f7f2e9 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding: 0 clamp(28px, 5vw, 84px);
  background: rgba(255, 253, 248, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 210px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.brand-logo {
  display: block;
  width: 202px;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(89, 100, 72, 0.35);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 46%, rgba(89, 100, 72, 0.38) 47% 53%, transparent 54%),
    radial-gradient(circle at 50% 50%, rgba(124, 138, 102, 0.12), rgba(124, 138, 102, 0.02));
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px 19px;
  border-radius: 999px 999px 4px 4px;
  background: rgba(89, 100, 72, 0.72);
  transform-origin: bottom center;
}

.brand-mark::before {
  transform: rotate(-34deg);
}

.brand-mark::after {
  transform: rotate(34deg);
}

.brand strong {
  display: block;
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1.9vw, 30px);
  min-width: 0;
}

.top-nav button {
  position: relative;
  min-height: 38px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #424338;
  white-space: nowrap;
  cursor: pointer;
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.submenu {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  z-index: 30;
  min-width: 150px;
  padding: 10px 0;
  border: 1px solid rgba(103, 103, 83, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 16px 34px rgba(66, 58, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition:
    opacity 160ms ease 500ms,
    visibility 0s linear 660ms,
    transform 160ms ease 500ms;
}

.nav-dropdown:hover .submenu,
.nav-dropdown:focus-within .submenu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

.submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 16px;
}

.submenu button,
.submenu a {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: #424338;
  font: inherit;
  line-height: 34px;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.submenu button::after,
.submenu a::after {
  display: none;
}

.submenu button:hover,
.submenu button:focus-visible,
.submenu a:hover,
.submenu a:focus-visible {
  background: rgba(124, 138, 102, 0.1);
}

.top-nav button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.top-nav [aria-current="page"] {
  color: var(--sage-dark);
  font-weight: 700;
}

.top-nav button[aria-current="page"]::after {
  transform: scaleX(1);
}

.top-nav button:hover::after,
.top-nav button:focus-visible::after {
  transform: scaleX(1);
}

.page-frame {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  overflow: hidden;
}

.hero-shell {
  position: relative;
  min-height: clamp(500px, calc(100svh - 270px), 720px);
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(520px, 1.22fr);
  align-items: center;
  gap: clamp(22px, 3vw, 54px);
  padding:
    clamp(38px, 6vw, 86px)
    clamp(120px, 11vw, 190px)
    clamp(34px, 5vw, 76px)
    clamp(34px, 7vw, 112px);
  overflow: hidden;
}

.hero-shell[data-page]:not([data-page="main"]) {
  min-height: clamp(530px, calc(100svh - 250px), 760px);
}

.hero-copy {
  max-width: 560px;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--sage-dark);
  font-size: 15px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 5.4vw, 82px);
  line-height: 1.1;
  letter-spacing: 0;
  word-break: keep-all;
}

.lead {
  max-width: 480px;
  margin: 24px 0 0;
  color: #5f5e52;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.8;
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.hero-actions button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(89, 100, 72, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #48483d;
  cursor: pointer;
}

.hero-visual {
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: 360px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  transition: opacity 180ms ease, transform 240ms ease;
}

.hero-shell.is-switching .hero-visual,
.hero-shell.is-switching .hero-copy {
  opacity: 0.2;
  transform: translateY(4px);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: rgba(255, 255, 255, 0.28);
}

.hero-shell[data-page="spine"] .hero-visual img {
  transform: scale(1.12);
}

.right-rail {
  position: absolute;
  z-index: 5;
  right: clamp(22px, 4.2vw, 74px);
  top: 50%;
  width: 132px;
  aspect-ratio: 210 / 760;
  transform: translateY(-50%);
}

.right-rail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.quick-hit {
  position: absolute;
  left: 25%;
  right: 25%;
  height: 9.4%;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  transform: translateY(-50%);
}

.quick-hit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(112%, 62px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.quick-hit:focus-visible {
  outline: 2px solid rgba(95, 116, 74, 0.7);
  outline-offset: 2px;
}

.quick-hit:hover {
  background: transparent;
  box-shadow: none;
}

.quick-hit:hover::after,
.quick-hit:focus-visible::after {
  background: rgba(124, 138, 102, 0.13);
  box-shadow: inset 0 0 0 1px rgba(124, 138, 102, 0.28);
}

.quick-hit-spine {
  top: 12%;
}

.quick-hit-panic {
  top: 31.7%;
}

.quick-hit-insomnia {
  top: 50.8%;
}

.quick-hit-menopause {
  top: 69.9%;
}

.quick-hit-location {
  top: 88.6%;
}

.content-panel {
  padding: 0 clamp(28px, 6vw, 104px) clamp(10px, 1.5vw, 22px);
}

.main-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  transform: translateY(-70px);
}

.main-cards button {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(103, 103, 83, 0.13);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(66, 58, 42, 0.1);
}

.main-cards button::after {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 4;
  border: 1px solid transparent;
  border-radius: 10px;
  pointer-events: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.main-cards button:hover::after,
.main-cards button:focus-visible::after {
  border-color: rgba(89, 100, 72, 0.42);
  box-shadow: inset 0 -3px 0 rgba(124, 138, 102, 0.7);
}

.card-photo {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 100%;
  height: 58%;
  object-fit: cover;
  object-position: center;
  background: #f7f4ef;
  border-radius: 10px 10px 0 0;
}

.card-frame {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.main-cards strong,
.main-cards span {
  display: block;
  position: relative;
  z-index: 3;
  padding-inline: 18px;
  word-break: keep-all;
}

.main-cards strong {
  padding-top: 64%;
  font-size: 20px;
}

.main-cards span {
  padding-block: 8px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.detail-board {
  width: min(100%, 1120px);
  margin: -72px auto 6px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(220px, 0.9fr));
  gap: 14px;
  align-items: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.detail-board[data-variant="simple"] {
  grid-template-columns: 1fr;
}

.detail-board[data-variant="simple"] .detail-intro-card {
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
}

.detail-board[data-variant="simple"] .detail-image-slot {
  min-height: 188px;
}

.detail-board[data-variant="simple"] .detail-cross-section img {
  width: 100%;
  max-height: 196px;
}

.detail-card,
.detail-mini-card {
  min-width: 0;
  border: 1px solid rgba(103, 103, 83, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 28px rgba(66, 58, 42, 0.07);
}

.detail-card {
  padding: 22px;
  align-self: start;
}

.detail-intro-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.72fr);
  gap: 20px;
  align-items: center;
}

.detail-copy {
  min-width: 0;
  align-self: center;
}

.detail-card h2,
.detail-mini-card h2 {
  margin: 0 0 11px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0;
  word-break: keep-all;
}

.detail-card p,
.detail-mini-card p,
.detail-card li,
.detail-mini-card li {
  color: #5f5e52;
  font-size: 14px;
  line-height: 1.66;
  word-break: keep-all;
}

.detail-image-slot {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 160px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 246, 239, 0.92));
  overflow: hidden;
}

.detail-image-slot img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.detail-cross-section img {
  width: min(100%, 230px);
}

.detail-chart-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  align-content: start;
}

.detail-chart-slot {
  min-height: 182px;
  padding: 4px 6px 0;
}

.detail-stack {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-board[data-variant="simple"] .detail-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-mini-card {
  padding: 15px 18px;
}

.detail-mini-card ul {
  margin: 0;
  padding-left: 18px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1.1fr 1.25fr 1.25fr 1.4fr;
  gap: 26px;
  margin-top: 0;
  padding: 28px clamp(28px, 6vw, 104px);
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
}

.site-footer section {
  min-width: 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0;
}

.footer-brand-logo {
  display: block;
  width: min(230px, 100%);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.site-footer h2,
.site-footer strong {
  margin: 0 0 8px;
  font-size: 17px;
}

.site-footer p {
  margin: 4px 0;
  color: #666456;
  font-size: 13px;
  line-height: 1.55;
  word-break: keep-all;
}

@media (max-width: 1100px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-block: 18px;
  }

  .top-nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    padding-right: clamp(34px, 7vw, 112px);
  }

  .right-rail {
    display: none;
  }

  .main-cards,
  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: -38px;
  }

  .detail-intro-card,
  .detail-stack {
    grid-column: span 2;
  }

  .detail-board[data-variant="simple"] .detail-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: auto;
    padding-inline: 18px;
  }

  .brand strong {
    font-size: 20px;
  }

  .brand-logo {
    width: 176px;
  }

  .hero-shell {
    min-height: auto;
    padding: 34px 18px 42px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-visual {
    min-height: 220px;
  }

  .content-panel {
    padding-inline: 18px;
  }

  .main-cards,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .detail-board {
    grid-template-columns: 1fr;
    margin-top: 18px;
    padding: 12px;
  }

  .detail-intro-card,
  .detail-stack {
    grid-column: auto;
  }

  .detail-intro-card {
    grid-template-columns: 1fr;
  }

  .main-cards {
    transform: none;
    padding-top: 18px;
  }
}
