/* ==========================================================
   MEP Works — 설비 엔지니어링 웹앱 쇼케이스
   Apple-style product site design system
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --hairline: #d2d2d7;
  --accent: #0071e3;
  --radius-lg: 28px;
  --radius-md: 18px;
  --nav-h: 48px;
  --ease: cubic-bezier(0.25, 0.6, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- Typography ---------- */
.display {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.07;
}
.headline {
  font-size: clamp(1.9rem, 4.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.title {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.lead {
  font-size: clamp(1.125rem, 1.9vw, 1.4rem);
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.45;
}
.eyebrow {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
  text-transform: none;
}
.muted { color: var(--ink-3); }

/* ---------- Global nav ---------- */
.gnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(251, 251, 253, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.gnav__inner {
  max-width: 1024px;
  margin: 0 auto;
  height: 100%;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gnav__brand {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.gnav__brand span { color: var(--ink-3); font-weight: 500; }
.gnav__title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gnav__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.gnav__link {
  font-size: 0.88rem;
  color: var(--ink-2);
  transition: color 0.2s;
}
.gnav__link:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 980px;
  transition: transform 0.25s var(--ease), filter 0.25s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); transform: scale(1.02); }
.btn--sm { font-size: 0.82rem; padding: 6px 14px; }
.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn--ghost:hover { background: var(--accent); color: #fff; filter: none; }
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 1.02rem;
  font-weight: 500;
}
.link-more::after { content: "›"; font-size: 1.1em; transition: transform 0.2s; }
.link-more:hover::after { transform: translateX(3px); }

/* ---------- Sections ---------- */
.section {
  padding: clamp(80px, 12vw, 140px) 22px;
}
.section--alt { background: var(--bg-alt); }
.section--dark {
  background: #000;
  color: #f5f5f7;
}
.section--dark .lead { color: #a1a1a6; }
.section--dark .muted { color: #86868b; }
.wrap { max-width: 1024px; margin: 0 auto; }
.wrap--narrow { max-width: 780px; margin: 0 auto; }
.center { text-align: center; }
.stack > * + * { margin-top: 20px; }

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--nav-h) + clamp(64px, 10vw, 120px)) 22px clamp(70px, 10vw, 120px);
  text-align: center;
}
.hero .lead { max-width: 640px; margin: 22px auto 0; }
.hero__cta {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Home: product tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 0 14px 14px;
  max-width: 1440px;
  margin: 0 auto;
}
.tile {
  border-radius: var(--radius-md);
  padding: clamp(44px, 6vw, 72px) 30px clamp(46px, 6vw, 76px);
  text-align: center;
  overflow: hidden;
  position: relative;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tile--wide { grid-column: 1 / -1; }
.tile--dark { background: #000; color: #f5f5f7; }
.tile--dark .tile__desc { color: #a1a1a6; }
.tile__eyebrow {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tile-accent, var(--accent));
  margin-bottom: 10px;
}
.tile__name {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}
.tile--wide .tile__name { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
.tile__desc {
  margin-top: 12px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--ink-2);
  max-width: 560px;
}
.tile__links {
  margin-top: 20px;
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
.tile__links .link-more { color: var(--tile-accent, var(--accent)); }
.tile__art {
  margin-top: 36px;
  width: min(100%, 560px);
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, var(--tile-art-from, #dfe9f5), var(--tile-art-to, #c3d6ee));
  padding: 22px 22px 0;
  box-shadow: 0 -1px 0 rgba(0,0,0,0.04) inset;
}
.tile--dark .tile__art { box-shadow: none; }

/* mini mock window inside tiles */
.mock {
  background: #fff;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  text-align: left;
  font-size: 11px;
  color: #333;
}
.mock__bar {
  height: 22px;
  background: #ececf0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
}
.mock__bar i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d4d4d9; display: block;
}
.mock__bar i:nth-child(1) { background: #ff5f57; }
.mock__bar i:nth-child(2) { background: #febc2e; }
.mock__bar i:nth-child(3) { background: #28c840; }
.mock__body { padding: 12px 14px 0; }
.mock__row {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 5px;
  margin-bottom: 4px;
  background: #f6f6f8;
}
.mock__row b { color: var(--tile-accent, var(--accent)); font-weight: 700; }
.mock__chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tile-accent, var(--accent)) 12%, #fff);
  color: var(--tile-accent, var(--accent));
  font-weight: 600;
  margin: 0 4px 8px 0;
}

/* ---------- Feature bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.bento__card {
  grid-column: span 2;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  text-align: left;
}
.section--dark .bento__card { background: #161617; box-shadow: none; }
.bento__card--w3 { grid-column: span 3; }
.bento__card--w6 { grid-column: span 6; }
.bento__icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
  display: block;
}
.bento__card h3 {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.bento__card p {
  font-size: 0.98rem;
  color: var(--ink-2);
  line-height: 1.55;
}
.section--dark .bento__card p { color: #a1a1a6; }
.bento__stat {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 6px;
}

/* ---------- Pain section ---------- */
.pain-list {
  margin-top: 44px;
  display: grid;
  gap: 14px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.pain-list li {
  background: #161617;
  border-radius: var(--radius-md);
  padding: 22px 26px;
  font-size: 1.05rem;
  color: #d2d2d7;
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.pain-list li::before {
  content: "—";
  color: #6e6e73;
  flex-shrink: 0;
}
.pain-answer {
  margin-top: 44px;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pain-answer em {
  font-style: normal;
  color: var(--accent);
}

/* ---------- Live demo frame ---------- */
.demo {
  margin-top: 52px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  background: #fff;
}
.demo__bar {
  height: 40px;
  background: #f1f1f4;
  border-bottom: 1px solid #e3e3e8;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
}
.demo__bar i {
  width: 11px; height: 11px; border-radius: 50%; display: block;
}
.demo__bar i:nth-child(1) { background: #ff5f57; }
.demo__bar i:nth-child(2) { background: #febc2e; }
.demo__bar i:nth-child(3) { background: #28c840; }
.demo__url {
  margin-left: 12px;
  background: #fff;
  border-radius: 7px;
  font-size: 0.78rem;
  color: var(--ink-3);
  padding: 4px 14px;
  flex: 1;
  max-width: 460px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.demo iframe {
  width: 100%;
  height: min(72vh, 680px);
  border: 0;
  display: block;
  background: #fff;
}
.demo-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--ink-3);
  text-align: center;
}

/* ---------- Animated demo scenes ---------- */
.demo__stage {
  padding: clamp(28px, 5vw, 56px);
  background: #fbfbfd;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scene {
  width: 100%;
  max-width: 620px;
  display: grid;
  gap: 14px;
}
.scene [data-step] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.scene [data-step].on { opacity: 1; transform: none; }

.sc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 0.95rem;
}
.sc-row b {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sc-chip {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
.sc-arrow {
  text-align: center;
  color: var(--ink-3);
  font-size: 1.1rem;
  line-height: 1;
}
.sc-result { text-align: center; padding: 8px 0 2px; }
.sc-result__num {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sc-result__label { margin-top: 8px; color: var(--ink-2); font-size: 0.95rem; }

/* 진행 바 (부하·용수량 등) */
.sc-bar {
  position: relative;
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: #eef0f4;
  overflow: hidden;
  min-width: 80px;
}
.sc-bar i {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--accent);
  border-radius: inherit;
  transition: width 1.1s var(--ease) 0.15s;
}
.scene [data-step].on .sc-bar i { width: var(--w, 60%); }

/* 관경/덕트 성장 표현 */
.sc-pipe-row { display: flex; align-items: center; gap: 14px; }
.sc-pipe-row .sc-size {
  font-weight: 700;
  color: var(--accent);
  min-width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sc-pipe {
  height: var(--h, 14px);
  width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent));
  transition: width 1s var(--ease) 0.1s;
}
.scene [data-step].on .sc-pipe { width: var(--w, 50%); }

/* 체크리스트 (법규검토·시방서) */
.sc-check { display: flex; align-items: center; gap: 12px; }
.sc-row.sc-check { justify-content: flex-start; }
.sc-check i {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-style: normal;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s;
  flex-shrink: 0;
}
.scene [data-step].on .sc-check i { transform: scale(1); }

/* 스프링클러 헤드 그리드 */
.sc-ceiling {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 14px;
  padding: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  justify-items: center;
}
.sc-head { position: relative; width: 14px; height: 14px; }
.sc-head::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sc-head::before { transition-delay: var(--d, 0s); }
.scene [data-step].on .sc-head::before { transform: scale(1); }
.scene [data-step].on .sc-head::after {
  content: "";
  position: absolute; inset: -16px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  animation: sc-ripple 2.2s var(--ease) infinite;
  animation-delay: calc(0.35s + var(--d, 0s));
}
@keyframes sc-ripple {
  0% { transform: scale(0.4); opacity: 1; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}

/* SVG 계통도 라인 드로잉 */
.sc-svg { width: 100%; height: auto; display: block; }
.sc-svg .draw,
.scene-svg .draw {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.4s var(--ease) 0.1s;
}
.scene [data-step].on .draw { stroke-dashoffset: 0; }

/* 문서 채워지기 (시방서) */
.sc-doc {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 12px;
  padding: 22px 24px;
  display: grid;
  gap: 10px;
}
.sc-doc i {
  display: block;
  height: 9px;
  border-radius: 4px;
  background: #e9e9ee;
  width: 0;
  transition: width 0.7s var(--ease) 0.1s;
}
.sc-doc i.hl { background: color-mix(in srgb, var(--accent) 30%, #fff); }
.scene [data-step].on .sc-doc i { width: var(--w, 100%); }

/* ---------- Dark demo (3D scene) ---------- */
.demo--dark { background: #0d0d0f; }
.demo--dark .demo__bar { background: #1b1b1f; border-bottom-color: #2a2a2e; }
.demo--dark .demo__bar i:nth-child(1) { background: #4a4a4f; }
.demo--dark .demo__bar i:nth-child(2) { background: #4a4a4f; }
.demo--dark .demo__bar i:nth-child(3) { background: #4a4a4f; }
.demo--dark .demo__url { background: #0d0d0f; color: #86868b; }
.demo--dark .demo__stage {
  background: radial-gradient(65% 85% at 50% 32%, #1b1b21, #0d0d0f 78%);
  padding: clamp(10px, 2vw, 26px);
  min-height: 0;
}
.demo--dark .scene { max-width: 100%; }
.scene-svg { width: 100%; height: auto; display: block; }
.scene-svg text { font-family: inherit; }

/* ---------- Feature blocks (Apple-style: dark, centered, full-width media) ---------- */
.featx {
  padding: clamp(70px, 9vw, 130px) 0;
  border-top: 1px solid #1d1d1f;
  text-align: center;
}
.featx--first { border-top: 0; padding-top: clamp(40px, 6vw, 70px); }
.featx .eyebrow { display: block; margin-bottom: 14px; }
.featx__head {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
  color: #f5f5f7;
}
.featx__lead {
  max-width: 780px;
  margin: 24px auto 0;
  font-size: clamp(1.02rem, 1.6vw, 1.25rem);
  color: #a1a1a6;
  line-height: 1.65;
}
.featx__lead b { color: #f5f5f7; font-weight: 600; }
.featx__media { margin-top: clamp(36px, 5vw, 64px); }
.featx__media img {
  width: 100%;
  max-width: 1100px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  cursor: zoom-in;
  transition: transform 0.35s var(--ease);
}
.featx__media img:hover { transform: scale(1.015); }
.featx__media--narrow img { max-width: 340px; }
.featx__hint {
  margin-top: 14px;
  font-size: 0.82rem;
  color: #6e6e73;
}
.featx__stats {
  display: flex;
  gap: clamp(40px, 7vw, 100px);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: clamp(36px, 5vw, 56px);
}
.stat { text-align: center; }
.stat__pre { font-size: 0.95rem; color: #a1a1a6; }
.stat__num {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--accent-bright, #2997ff);
}
.stat__post { font-size: 0.95rem; color: #a1a1a6; }

/* ---------- Lightbox (click-to-zoom) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 96vw;
  max-height: 90vh;
  border-radius: 10px;
  cursor: zoom-in;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}
.lightbox.zoomed {
  display: block;
  padding: 0;
  overflow: auto;
}
.lightbox.zoomed img {
  max-width: none;
  max-height: none;
  border-radius: 0;
  cursor: zoom-out;
  box-shadow: none;
}
.lightbox__close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  z-index: 301;
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__cap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  text-align: center;
  color: #86868b;
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 301;
}

/* ---------- Demo tag (예시 표기) ---------- */
.demo__tag {
  margin-left: auto;
  font-size: 0.72rem;
  color: #86868b;
  background: rgba(120, 120, 128, 0.16);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Values strip (home) ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 52px;
}
.value {
  text-align: center;
  padding: 30px 18px;
}
.value__icon { font-size: 2rem; }
.value h3 {
  margin-top: 14px;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.value p {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* ---------- Closing CTA ---------- */
.closing {
  text-align: center;
}
.closing .hero__cta { margin-top: 30px; }

/* ---------- Other products rail ---------- */
.rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 40px;
}
.rail__card {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  display: block;
}
.rail__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.10);
}
.rail__card .eyebrow { font-size: 0.8rem; }
.rail__card h3 {
  margin-top: 6px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.rail__card p {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline);
  padding: 40px 22px 48px;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.footer__inner { max-width: 1024px; margin: 0 auto; }
.footer__apps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 20px;
}
.footer__apps a:hover { text-decoration: underline; }
.footer__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--ink-3); }
.footer__meta a:hover { text-decoration: underline; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bento__card, .bento__card--w3 { grid-column: span 3; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .rail { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .bento__card, .bento__card--w3, .bento__card--w6 { grid-column: 1 / -1; }
  .rail { grid-template-columns: 1fr; }
  .gnav__title { display: none; }
  .demo iframe { height: 65vh; }
}

/* ── 가격 카드 ─────────────────────────────────────── */
.hero__note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-3);
}

.price-card {
  max-width: 460px;
  margin: 40px auto 0;
  padding: 40px 34px 34px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .06);
}
.price-card__label {
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: -.01em;
}
.price-card__num {
  margin-top: 10px;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--ink);
}
.price-card__num span {
  font-size: 24px;
  font-weight: 600;
  margin-left: 4px;
}
.price-card__sub {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-2);
}
.price-card__list {
  margin: 26px 0 28px;
  padding: 22px 0 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
  text-align: left;
}
.price-card__list li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}
.price-card__list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 6px;
  height: 10px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.price-card__note {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}
.price-fine {
  max-width: 560px;
  margin: 28px auto 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-3);
}
.price-fine b { color: var(--ink-2); font-weight: 600; }

@media (max-width: 640px) {
  .price-card { padding: 32px 22px 28px; margin-top: 32px; }
  .price-card__num { font-size: 46px; }
}

/* ── 무료 / 유료 배지 ─────────────────────────────── */
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: 2px;
  white-space: nowrap;
}
.tag--free {
  background: rgba(0, 0, 0, .06);
  color: var(--ink-2);
}
.tag--paid {
  background: var(--tile-accent, var(--accent));
  color: #fff;
}
/* 다크 타일 위에서는 무료 배지가 묻히지 않게 */
.tile--dark .tag--free {
  background: rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .8);
}

/* ── 니즈 ↔ 기능 대조 ─────────────────────────────── */
.swap {
  max-width: 900px;
  margin: 48px auto 0;
  border-top: 1px solid var(--hairline);
}
.swap__head {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 28px;
  padding: 14px 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--hairline);
}
.swap__row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 28px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}
.swap__before {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-3);
}
.swap__before::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 11px;
  height: 2px;
  background: var(--ink-3);
  opacity: .55;
}
.swap__after {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.swap__after::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 6px;
  height: 11px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.swap__after b {
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 720px) {
  .swap { margin-top: 34px; }
  .swap__head { display: none; }
  .swap__row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 0;
  }
  .swap__before { font-size: 14px; }
  .swap__after { font-size: 14.5px; }
}

/* ── 제품 아이콘 ───────────────────────────────────── */
.picon-box {
  display: block;
  margin-bottom: 16px;
  color: var(--tile-accent, var(--accent));
  line-height: 0;
}
.picon {
  width: 40px;
  height: 40px;
}
.rail__card .picon-box { margin-bottom: 12px; }
.rail__card .picon { width: 34px; height: 34px; }

@media (max-width: 640px) {
  .picon { width: 34px; height: 34px; }
}

/* ── 만든 사람 ─────────────────────────────────────── */
.maker { max-width: 720px; margin: 0 auto; }
.maker__role {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 113, 227, .09);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.maker__body { margin-top: 30px; text-align: left; }
.maker__body p {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  letter-spacing: -.01em;
}
.maker__body p:first-child { margin-top: 0; }
.maker__body b { color: var(--ink); font-weight: 600; }
.maker__quote {
  margin: 32px 0;
  padding: 22px 26px;
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  letter-spacing: -.015em;
}
.maker__gains {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.maker__gains li {
  padding: 16px 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.maker__gains b { display: block; margin-bottom: 3px; color: var(--ink); }
.maker__sign {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.7;
}

@media (max-width: 640px) {
  .maker__body p { font-size: 16px; }
  .maker__quote { font-size: 16.5px; padding: 18px 20px; }
}

/* ── 한글 줄바꿈 ───────────────────────────────────── */
/* 한글은 단어(어절) 중간에서 끊기면 눈에 걸린다. keep-all 로 공백에서만 끊고,
   끊을 데 없는 긴 영문·URL 은 overflow-wrap 으로 예외 처리한다. */
body {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* 제목은 줄 길이를 고르게 나눈다 — 둘째 줄에 한 단어만 남는 것을 막는다.
   본문은 pretty 로 마지막 줄 외톨이 단어("함께.", "없습니다.")를 줄인다.
   지원하지 않는 브라우저에서는 기존 줄바꿈으로 자연스럽게 되돌아간다. */
h1, h2, h3,
.display, .headline, .title,
.tile__name, .featx__head, .rail__card h3 {
  text-wrap: balance;
}

/* 두세 줄짜리 짧은 문장은 balance 가 낫다 — 줄 길이를 고르게 나눠서
   마지막 줄에 "함께." 같은 꼬리만 남는 것을 없앤다. */
.lead, .tile__desc, .rail__card p, .value p,
.hero__note, .price-card__sub, .price-card__note, .maker__quote,
.pain-list li, .price-card__list li {
  text-wrap: balance;
}

/* 여러 줄 이어지는 본문은 pretty — balance 는 긴 글에서는 효과가 없다. */
.featx__lead, .maker__body p, .swap__before, .swap__after, .price-fine {
  text-wrap: pretty;
}

/* ── 블로그 ────────────────────────────────────────── */
.hero--blog { padding-bottom: 40px; }

.postlist { display: grid; gap: 20px; }
.postlist__empty { color: var(--ink-3); text-align: center; padding: 60px 0; }

.pcard {
  display: block;
  padding: 28px 30px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.pcard:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}
.pcard--first { background: var(--bg-alt); }
.pcard__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.pcard__tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 113, 227, .1);
  color: var(--accent);
  font-weight: 600;
}
.pcard__title {
  margin: 12px 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.4;
  color: var(--ink);
  text-wrap: balance;
}
.pcard__summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 14px;
  text-wrap: pretty;
}

/* ── 글 본문 ───────────────────────────────────────── */
.post { max-width: 720px; margin: 0 auto; }
.post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.post__body { margin-top: 44px; }
.post__body h2 {
  margin: 56px 0 16px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--ink);
  text-wrap: balance;
}
.post__body h3 {
  margin: 36px 0 12px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--ink);
}
.post__body p {
  margin-bottom: 20px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-2);
  letter-spacing: -.01em;
  text-wrap: pretty;
}
.post__body b, .post__body strong { color: var(--ink); font-weight: 600; }
.post__body ul, .post__body ol { margin: 0 0 22px 0; padding-left: 22px; }
.post__body li {
  margin-bottom: 9px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
}
.post__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 26px;
  font-size: 15px;
}
.post__body th, .post__body td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  color: var(--ink-2);
}
.post__body th {
  font-weight: 600;
  color: var(--ink);
  border-bottom-width: 2px;
  white-space: nowrap;
}
.post__body td b { color: var(--ink); }
.post-table-wrap { overflow-x: auto; }

.post__note {
  margin: 30px 0;
  padding: 20px 24px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.post__note p { margin: 0; font-size: 16px; }
.post__note p + p { margin-top: 12px; }

/* 글 안에서 앱으로 넘기는 자리 — 본문 중간과 끝에 둔다 */
.post__cta {
  margin: 40px 0;
  padding: 26px 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
}
.post__cta p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}
.post__cta .btn { margin-right: 8px; }
.post__cta .post__cta-fine {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-3);
}

@media (max-width: 640px) {
  .pcard { padding: 22px 20px; }
  .pcard__title { font-size: 19px; }
  .post__body p, .post__body li { font-size: 16px; }
  .post__body h2 { font-size: 22px; margin-top: 42px; }
  .post__cta { padding: 22px 20px; }
}

/* ── 타일 구분 강화 ────────────────────────────────
   문제: 7개 타일이 같은 회색이라 "긴 글 하나"처럼 읽히고,
   화면을 통째로 축소해 넣으니 무슨 그림인지 안 보였다.
   해결: ① 제품 색을 확실히 깔고 ② 화면은 확대해서 잘라 넣는다. */

.tile {
  background: color-mix(in srgb, var(--tile-accent, var(--accent)) 15%, #fff);
  border: 1px solid color-mix(in srgb, var(--tile-accent, var(--accent)) 30%, #fff);
  padding-bottom: 0;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.tile:hover {
  border-color: var(--tile-accent, var(--accent));
  box-shadow: 0 14px 44px color-mix(in srgb, var(--tile-accent, var(--accent)) 22%, transparent);
}
.tile--dark { background: #000; border-color: rgba(255,255,255,.16); }

/* 제품 색 띠 — 어느 제품인지 먼저 알린다 */
.tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--tile-accent, var(--accent));
}

/* 아이콘을 색 배지 안에 */
.picon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 21px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--tile-accent, var(--accent)) 34%, #fff);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--tile-accent, var(--accent)) 16%, transparent);
}
.tile--dark .picon-box {
  background: rgba(41,151,255,.14);
  border-color: rgba(41,151,255,.4);
  box-shadow: none;
}
.rail__card .picon-box { width: 54px; height: 54px; border-radius: 17px; }

/* 실제 앱 화면 — 통째로 줄이면 안 보인다. 확대해서 위쪽 일부만 보여준다. */
.tile__shot {
  margin-top: 30px;
  width: 100%;
  max-width: 660px;
  height: 250px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  border: 1px solid color-mix(in srgb, var(--tile-accent, var(--accent)) 30%, #fff);
  border-bottom: 0;
  box-shadow: 0 -3px 34px rgba(0,0,0,.12);
  background: #fff;
}
.tile__shot img {
  display: block;
  width: 172%;              /* 확대해서 잘라 보여준다 — 글자가 읽힐 정도로 */
  height: auto;
  margin-left: -6%;
  transform-origin: top left;
}

@media (max-width: 900px) {
  .tile { padding-left: 22px; padding-right: 22px; }
  .picon-box { width: 56px; height: 56px; border-radius: 18px; }
  .tile__shot { margin-top: 24px; height: 190px; }
  .tile__shot img { width: 210%; margin-left: -8%; }
}
