/* ==========================================================
   SLS — Smart Logistics Service / Homepage
   The page is a multiplane camera move: depth planes slide at
   different speeds as the visitor scrolls from the exterior of
   the automated center into its aisle and storage hall, then the
   camera sinks into mist that becomes the ground of the page.
   ========================================================== */

:root {
  --ground: #1b2622;      /* deep plane behind everything */
  --near: 20, 28, 25;     /* rgb of the dark near planes */
  --mid: #5f7a86;         /* mid-plane blue-grey */
  --mist: #c9d3d6;
  --mist-pale: #eef1f0;   /* page ground after the tour */
  --ink: #1b2622;
  --ink-2: #3d4a46;       /* 8.3:1 on mist-pale */
  --ink-3: #55625e;       /* 5.6:1 on mist-pale */
  --rule: #c2cbc8;
  --on-dark: #ffffff;
  --on-dark-2: rgba(255, 255, 255, 0.8);
  --gold: #f3bd48;        /* the one lamp: fills only */
  --gold-press: #e2a92c;
  --stop: #b3261e;

  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;

  --bar: 76px;
  --pad-x: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--mid) var(--mist-pale);
}

body {
  background: var(--mist-pale);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ol, ul { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; }

::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
input, textarea { caret-color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--ink);
  padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--on-dark); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-block { width: 100%; min-height: 56px; }
.btn .arw { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 200ms var(--ease); }
@media (hover: hover) {
  .btn-gold:hover { background: var(--gold-press); }
  .btn-gold:hover .arw { transform: translateX(4px); }
  .btn-ink:hover { background: #0d1311; }
  .btn-line:hover { background: var(--ink); color: var(--on-dark); }
}
.btn:active { transform: translateY(1px); }

.link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* ---------- header ---------- */
.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: var(--bar);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 var(--pad-x);
  color: var(--on-dark);
  transition: background-color 240ms var(--ease), color 240ms var(--ease);
}
.bar.is-solid { background: var(--mist-pale); color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
.bar-logo { position: relative; display: block; }
.bar-logo img { height: 40px; width: auto; transition: opacity 240ms var(--ease); }
.logo-on-light { position: absolute; inset: 0; opacity: 0; }
.bar.is-solid .logo-on-dark { opacity: 0; }
.bar.is-solid .logo-on-light { opacity: 1; }

.nav { display: flex; gap: clamp(20px, 2.6vw, 40px); margin-left: auto; }
.nav a { font-size: 15px; font-weight: 600; text-decoration: none; padding: 8px 0; }
@media (hover: hover) { .nav a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; } }
.bar-cta { min-height: 44px; padding: 0 20px; font-size: 15px; }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  margin-left: auto;
  border: 0; background: none; cursor: pointer;
  place-items: center;
  color: inherit;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 22px; height: 2px; background: currentColor;
  transition: transform 220ms var(--ease);
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================
   The tour
   ========================================================== */
.tour { position: relative; background: var(--ground); color: var(--on-dark); }
.tour-anchor { position: absolute; left: 0; width: 1px; height: 1px; }

/* --- static sequence (no JS or reduced motion): scenes stacked, words between --- */
.stage { display: flex; flex-direction: column; }
.planes { display: contents; }
.plane.facade, .plane.haze, .plane.near, .plane.mist, .track, .scroll-cue { display: none; }
.scene img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.beat[data-beat="0"] { order: 0; padding-top: calc(var(--bar) + 40px); }
.scene[data-scene="0"] { order: 1; }
.beat[data-beat="1"] { order: 2; }
.scene[data-scene="1"] { order: 3; }
.beat[data-beat="2"] { order: 4; }
.scene[data-scene="2"] { order: 5; }
.beat[data-beat="3"] { order: 6; }
.beat[data-beat="4"] { order: 7; }
.concept-tag { order: 2; }
.scene { position: relative; }
.scene::after {
  content: "컨셉 이미지 · AI 생성";
  position: absolute; left: var(--pad-x); bottom: 12px;
  padding: 4px 8px;
  background: rgba(var(--near), 0.8);
  font-size: 12px; font-weight: 600; color: var(--on-dark);
}
.tour-live .scene::after { content: none; }
.beat { padding: clamp(40px, 6vw, 72px) var(--pad-x); }

/* --- live camera --- */
.tour-live .tour { height: 620vh; }
.tour-live .stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  display: block;
  overflow: hidden;
}
.tour-live .planes { display: block; position: absolute; inset: 0; }
.tour-live .plane { position: absolute; inset: 0; }
.tour-live .plane.facade, .tour-live .plane.haze, .tour-live .plane.near, .tour-live .plane.mist { display: block; }
.tour-live .scene {
  padding: 0;
  overflow: hidden;
  opacity: var(--o, 0);
  filter: blur(var(--b, 0px));
}
.tour-live .scene[data-scene="0"] { --o: 1; }
.tour-live .scene img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transform: translate3d(var(--x, 0), 0, 0) scale(var(--s, 1));
  transform-origin: var(--focus, 50% 50%);
  will-change: transform;
}
.tour-live .scene[data-scene="0"] { --focus: 58% 62%; }
.tour-live .scene[data-scene="1"] { --focus: 62% 58%; }
.tour-live .scene[data-scene="2"] { --focus: 50% 55%; }

/* the glass facade: a rectilinear mullion grid the camera passes through */
.facade {
  opacity: var(--o, 0);
  transform: scale(var(--s, 1));
  transform-origin: 58% 62%;
  will-change: transform, opacity;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(16.66% - 6px), rgba(var(--near), 0.95) calc(16.66% - 6px) 16.66%),
    linear-gradient(180deg, transparent 0 34%, rgba(var(--near), 0.95) 34% calc(34% + 10px), transparent calc(34% + 10px) 72%, rgba(var(--near), 0.95) 72% calc(72% + 10px), transparent calc(72% + 10px)),
    rgba(201, 211, 214, 0.06);
}

/* near planes: dark soft-edged slabs nearest the lens */
.near-l, .near-r { width: 30vw; will-change: transform; }
.near-l {
  right: auto !important;
  background: linear-gradient(90deg, rgba(var(--near), 0.94) 0 30%, rgba(var(--near), 0));
  transform: translate3d(calc(var(--open, 0) * -100%), 0, 0);
}
.near-r {
  left: auto !important;
  background: linear-gradient(270deg, rgba(var(--near), 0.94) 0 30%, rgba(var(--near), 0));
  transform: translate3d(calc(var(--open, 0) * 100%), 0, 0);
}
.near-b {
  top: auto !important;
  height: 58vh;
  background: linear-gradient(0deg, rgba(var(--near), 0.95) 0 34%, rgba(var(--near), 0.6) 62%, rgba(var(--near), 0));
}
.mist { background: var(--mist-pale); opacity: var(--o, 0); }

/* aerial haze between the far scene and the near planes */
.haze {
  opacity: var(--o, 0.28);
  background: linear-gradient(180deg, rgba(201, 211, 214, 0) 8%, rgba(201, 211, 214, 0.5) 46%, rgba(201, 211, 214, 0.12) 72%, rgba(201, 211, 214, 0));
}
/* top near plane keeps the header and the concept label legible on bright plates */
.near-t {
  bottom: auto !important;
  height: 30vh;
  background: linear-gradient(180deg, rgba(var(--near), 0.88) 0, rgba(var(--near), 0.55) 45%, rgba(var(--near), 0));
}

/* words on the nearest plane */
.concept-tag {
  padding: 16px var(--pad-x) 40px;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-dark-2);
}
.tour-live .concept-tag {
  position: absolute;
  left: var(--pad-x);
  top: calc(var(--bar) + 8px);
  max-width: 34em;
  padding: 0;
  z-index: 3;
  opacity: var(--o, 1);
}

.tour-live .beat {
  position: absolute;
  z-index: 3;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: clamp(40px, 8vh, 80px);
  max-width: 760px;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 200ms var(--ease), opacity 200ms var(--ease), visibility 0s 200ms;
}
.tour-live .beat.is-on {
  visibility: visible;
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transition-delay: 0s;
}

.beat-title {
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.beat-text { margin-top: 16px; max-width: 32em; font-size: clamp(16px, 1.3vw, 19px); color: var(--on-dark-2); }

.svc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; margin-top: 28px; }
.svc div { padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.32); }
.svc dt { font-size: 19px; font-weight: 700; }
.svc dd { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--on-dark-2); }

/* beat 4: the last words, set in ink on the risen mist */
.tour-live .beat--mist { top: calc(var(--bar) + 12vh); bottom: auto; color: var(--ink); }
.beat--mist .svc div { border-top-color: var(--rule); }
.tour-live .beat--mist .svc dd { color: var(--ink-2); }

/* beat 0: the door, centred on the nearest plane */
.tour-live .beat--door {
  left: 50%;
  right: auto;
  top: calc(var(--bar) + 48px);
  bottom: clamp(28px, 5vh, 48px);
  width: min(1040px, calc(100% - 2 * var(--pad-x)));
  max-width: none;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.tour-live .beat--door h1 { margin-top: auto; }
.tour-live .beat--door .quick,
.tour-live .beat--door .quick-mobile { margin-top: auto; }
.beat--door h1 {
  font-size: clamp(40px, 6.2vw, 96px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 24px rgba(var(--near), 0.5);
}
.proof { margin-top: clamp(16px, 2vw, 24px); font-size: clamp(16px, 1.4vw, 19px); font-weight: 600; }
.proof b { font-weight: 800; color: var(--gold); }

.quick {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: clamp(28px, 5vh, 56px);
}
.tour-live .quick { justify-content: center; }
.field--inline { width: 240px; margin: 0; text-align: left; }
.quick input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 16px;
}
.quick input:focus-visible { outline: 3px solid var(--gold); outline-offset: 0; }
.quick .err { color: #ffd9d4; }
.quick-mobile { display: none; margin-top: 28px; }
.scroll-cue { margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--on-dark-2); }
.tour-live .scroll-cue { display: block; }

/* track: where the camera is */
.tour-live .track {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  z-index: 3;
  right: var(--pad-x);
  bottom: clamp(40px, 8vh, 80px);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  opacity: var(--o, 1);
}
.track li { display: flex; align-items: center; gap: 10px; justify-content: flex-end; transition: color 200ms var(--ease); }
.track li::after { content: ""; width: 18px; height: 2px; background: currentColor; transition: width 200ms var(--ease), background-color 200ms var(--ease); }
.track li.is-on { color: var(--on-dark); }
.track li.is-on::after { width: 36px; background: var(--gold); }

/* ==========================================================
   After the mist
   ========================================================== */
/* the next section slides up over the settled mist */
.tour-live #centers { position: relative; z-index: 2; margin-top: -60vh; }
.sec { padding: clamp(80px, 11vw, 150px) var(--pad-x); }
.sec > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.sec-head { margin-bottom: clamp(32px, 4vw, 56px); }
.sec-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.sec h2 {
  font-size: clamp(32px, 4.4vw, 60px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.sec-sub { margin-top: 18px; max-width: 36em; font-size: 18px; color: var(--ink-2); }

.register { width: 100%; border-top: 2px solid var(--ink); }
.register th, .register td { padding: 22px 16px; text-align: left; border-bottom: 1px solid var(--rule); }
.register th:first-child, .register td:first-child { padding-left: 0; }
.register thead th { font-size: 14px; font-weight: 600; color: var(--ink-3); padding-top: 14px; padding-bottom: 14px; }
.register tbody th { font-size: 19px; font-weight: 700; }
.register .qty { font-size: 32px; font-weight: 800; width: 1%; padding-right: 40px; }
.register .is-plan th, .register .is-plan td { color: var(--ink-3); }

.sample-note { font-size: 14px; color: var(--ink-3); margin-top: -24px; margin-bottom: 20px; }
.posts { border-top: 2px solid var(--ink); }
.posts a {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
}
.posts time { color: var(--ink-3); font-weight: 600; }
@media (hover: hover) { .posts a:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; } }

.sec--contact { background: var(--mist); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.form { background: var(--mist-pale); padding: clamp(24px, 3.4vw, 44px); }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.form input[type="text"], .form input[type="tel"], .form input[type="email"], .form textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid #7d8a86;
  border-radius: 0;
  font-size: 16px;
  transition: border-color 160ms var(--ease);
}
.form textarea { resize: vertical; line-height: 1.6; }
.form input:focus-visible, .form textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
::placeholder { color: #66716d; opacity: 1; }
.field [aria-invalid="true"] { border-color: var(--stop) !important; }
.err { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--stop); }
.req { margin-left: 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.form-note { margin-top: 16px; font-size: 14px; color: var(--ink-2); }

.kakao h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.kakao p { margin: 8px 0 20px; color: var(--ink-2); }
.info { margin-top: 14px !important; font-size: 14px; font-weight: 600; color: var(--ink) !important; }

.foot {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 48px;
  align-items: center;
  padding: 48px var(--pad-x) 56px;
  background: var(--mist-pale);
}
.foot-logo { height: 44px; width: auto; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-self: end; }
.foot-links a { font-size: 15px; font-weight: 600; text-decoration: none; }
.foot-note { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); }

.toast {
  position: fixed;
  left: 50%; bottom: 32px;
  transform: translate(-50%, 16px);
  z-index: 120;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 15px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 960px) {
  :root { --bar: 64px; }
  .bar-logo img { height: 34px; }
  .bar-cta { display: none; }
  .menu-btn { display: grid; }
  .nav {
    position: fixed;
    top: var(--bar); left: 0; right: 0; bottom: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--pad-x) 32px;
    background: var(--mist-pale);
    color: var(--ink);
    visibility: hidden;
    opacity: 0;
    transition: opacity 200ms var(--ease), visibility 0s 200ms;
  }
  .nav.is-open { visibility: visible; opacity: 1; transition-delay: 0s; }
  .nav a { padding: 18px 0; font-size: 20px; font-weight: 700; border-bottom: 1px solid var(--rule); }
  .bar.is-menu { background: var(--mist-pale); color: var(--ink); }
  .bar.is-menu .logo-on-dark { opacity: 0; }
  .bar.is-menu .logo-on-light { opacity: 1; }

  .tour-live .tour { height: 480vh; }
  .tour-live #centers { margin-top: -40vh; }
  .tour-live .quick { display: none; }
  .tour-live .quick-mobile { display: inline-flex; }
  .tour-live .track { display: none; }
  .svc { grid-template-columns: 1fr; gap: 14px; margin-top: 20px; }
  .svc dt { font-size: 17px; }
  .svc dd { font-size: 14px; }
  .near-b { height: 72vh; }
  .near-l, .near-r { width: 18vw; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .beat-title { font-size: 26px; }
  .beat-text { font-size: 15px; }
  .tour-live .beat { bottom: 32px; }
  .field--inline { width: 100%; }
  .register th, .register td { padding: 18px 10px; }
  .register tbody th { font-size: 16px; }
  .register .qty { font-size: 24px; padding-right: 16px; }
  .posts a { grid-template-columns: 1fr; gap: 4px; font-size: 17px; }
  .field-pair { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; }
  .foot-links { justify-self: start; }
}
