﻿:root {
  --bg: #e9e6df;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --line: rgba(40, 33, 24, 0.14);
  --text: #1f1a15;
  --muted: #665f55;
  --accent: #8b6a3e;
  --shadow: 0 24px 80px rgba(30, 22, 14, 0.12);
}

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

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: "Cormorant Garamond", "Noto Serif KR", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.55), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(233, 230, 223, 0.96)),
    url("/assets/noise-paper.png") center / 360px repeat,
    var(--bg);
}

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

.wrap {
  width: min(1160px, calc(100vw - 48px));
  margin: 0 auto;
}

.clearancePage,
.clearancePanel,
.clearanceMain,
.afterGate,
.clearanceEntry {
  min-height: 100vh;
}

.clearancePanel {
  position: relative;
}

.doorOverlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.doorOverlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.doorSet {
  position: absolute;
  inset: 0;
}

.doorSetMobile {
  display: none;
}

.doorPanel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  background: #17120d;
}

.doorPanel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doorLeft {
  left: 0;
  transform-origin: left center;
}

.doorRight {
  right: 0;
  transform-origin: right center;
}

.doorOverlay.is-open .doorLeft {
  transform: translateX(-102%);
}

.doorOverlay.is-open .doorRight {
  transform: translateX(102%);
}

.doorOverlay.is-closing .doorLeft,
.doorOverlay.is-closing .doorRight,
.doorOverlay .doorLeft,
.doorOverlay .doorRight {
  transition: transform 1.2s cubic-bezier(.2, .8, .18, 1);
}

.doorOverlay.is-shaking .doorLeft {
  animation: doorShakeLeft .2s linear 2;
}

.doorOverlay.is-shaking .doorRight {
  animation: doorShakeRight .2s linear 2;
}

@keyframes doorShakeLeft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-10px); }
}

@keyframes doorShakeRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

.clearanceEntry {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}

.clearanceEntryInner {
  width: min(560px, 100%);
  padding: 44px 40px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  text-align: center;
}

.entryEyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--accent);
}

.entryTitle {
  margin: 0;
  display: grid;
  gap: 2px;
  font-size: clamp(44px, 9vw, 76px);
  line-height: .92;
  letter-spacing: .02em;
}

.entryLead {
  margin: 20px auto 0;
  max-width: 32rem;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.entryForm {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 28px;
}

.entryInput,
.entryBtn,
.archiveLink {
  font: inherit;
}

.entryInput {
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(52, 42, 30, 0.18);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  letter-spacing: .08em;
}

.entryInput:focus {
  outline: none;
  border-color: rgba(139, 106, 62, 0.5);
  box-shadow: 0 0 0 4px rgba(198, 169, 106, 0.14);
}

.entryBtn,
.archiveLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border: 1px solid rgba(52, 42, 30, 0.22);
  background: #241b13;
  color: #f2ece1;
  letter-spacing: .18em;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.entryBtn:hover,
.archiveLink:hover {
  transform: translateY(-1px);
  background: #34271a;
}

.archiveLinkGhost {
  background: transparent;
  color: var(--text);
}

.gateMessage {
  min-height: 1.5em;
  margin: 16px 0 0;
  font-size: 16px;
  letter-spacing: .03em;
}

.gateMessage.isError { color: #8d2f2f; }
.gateMessage.isSuccess { color: #53663f; }
.gateMessage.isNeutral { color: var(--accent); }

.afterGate {
  opacity: 0;
  transition: opacity .6s ease;
}

.afterGate.is-visible {
  opacity: 1;
}

.clearanceMain {
  display: flex;
  align-items: center;
  padding: 88px 0;
}

.clearanceCard {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 36px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.clearanceMedia {
  min-height: 520px;
  overflow: hidden;
  background: #d8d0c2;
}

.clearanceMedia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clearanceBody {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 4px;
}

.clearanceTitle {
  margin: 4px 0 0;
  font-size: clamp(44px, 8vw, 72px);
  line-height: .92;
}

.clearanceType {
  margin: 12px 0 0;
  font-size: 28px;
  letter-spacing: .06em;
}

.clearanceDesc {
  margin: 22px 0 0;
  max-width: 34rem;
  font-size: 19px;
  line-height: 1.8;
  color: var(--muted);
}

.clearancePriceWrap {
  display: grid;
  gap: 6px;
  margin-top: 28px;
}

.priceLabel {
  font-size: 14px;
  letter-spacing: .08em;
  color: var(--muted);
}

.priceValue {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 600;
}

.clearanceLinkWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.gateInfo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.gateInfoCard {
  padding: 18px 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.gateInfoLabel {
  margin: 0;
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--accent);
}

.gateInfoValue {
  margin: 8px 0 0;
  font-size: 22px;
}

@media (max-width: 900px) {
  .clearanceCard {
    grid-template-columns: 1fr;
  }

  .clearanceMedia {
    min-height: 420px;
  }

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

@media (max-width: 768px) {
  .doorSetPc {
    display: none;
  }

  .doorSetMobile {
    display: block;
  }

  .wrap {
    width: min(100vw - 28px, 720px);
  }

  .clearanceEntryInner {
    padding: 34px 24px;
  }

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

  .entryBtn,
  .archiveLink {
    width: 100%;
  }

  .clearanceMain {
    padding: 56px 0;
  }

  .clearanceCard {
    padding: 18px;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .clearanceMedia {
    min-height: 320px;
  }

  .clearanceType {
    font-size: 22px;
  }

  .clearanceDesc {
    font-size: 17px;
  }

  .priceValue {
    font-size: 36px;
  }
}
