/* =========================================================
   태영설비 — one-page site
   ========================================================= */
:root {
  --ink: #0b1b2b;
  --ink-2: #26394d;
  --muted: #5d6b7a;
  --line: #e3e8ee;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --tint: #eef4f9;
  --brand: #0a6cff;
  --brand-2: #00b3c6;
  --brand-ink: #0750c2;
  --warm: #ffb547;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(11, 27, 43, .05), 0 12px 32px -12px rgba(11, 27, 43, .18);
  --shadow-lg: 0 30px 60px -20px rgba(11, 27, 43, .35);
  --container: 1200px;
  --nav-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.035em; }
p { margin: 0; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.3em; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s;
  white-space: nowrap;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn:hover { transform: translateY(-2px); }
.btn--sm { padding: .6em 1.05em; font-size: 14px; }
.btn--lg { padding: 1em 1.6em; font-size: 17px; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px rgba(10, 108, 255, .7); }
.btn--primary:hover { background: var(--brand-ink); }
.btn--ghost { background: rgba(255,255,255,.7); border-color: var(--line); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--outline-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--outline-light:hover { background: rgba(255,255,255,.1); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-scrolled {
  background: rgba(247, 248, 250, .78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner { height: var(--nav-h); width: min(100% - 32px, var(--container)); margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.brand__mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 18px -8px rgba(10,108,255,.8); }
.brand__mark svg { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text small { font-size: 9.5px; letter-spacing: .14em; font-weight: 700; color: var(--muted); margin-top: 3px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--ink-2); transition: background .2s, color .2s; }
.nav__links a:hover, .nav__links a.is-active { background: rgba(10,108,255,.08); color: var(--brand-ink); }
.nav__toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; position: relative; }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), top .3s; }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.mobile-menu { display: grid; gap: 4px; padding: 8px 16px 20px; background: rgba(247,248,250,.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 14px 12px; font-size: 18px; font-weight: 700; border-radius: 12px; }
.mobile-menu a:active { background: var(--tint); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--nav-h) + 56px) 0 80px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 85% 10%, rgba(0,179,198,.18), transparent 60%),
    radial-gradient(50% 50% at 10% 0%, rgba(10,108,255,.14), transparent 60%),
    linear-gradient(var(--bg), var(--bg));
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(11,27,43,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(11,27,43,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .14em; color: var(--brand-ink); text-transform: uppercase; }
.eyebrow--light { color: #8fd8ff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #18c37e; box-shadow: 0 0 0 4px rgba(24,195,126,.18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(24,195,126,0); } }
.hero__title { font-size: clamp(40px, 6.2vw, 76px); font-weight: 800; margin: 18px 0 22px; letter-spacing: -0.045em; line-height: 1.1; }
.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--brand) 10%, var(--brand-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero__chips li { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.75); border: 1px solid var(--line); }

.hero__visual { position: relative; aspect-ratio: 1 / 1.02; }
.hv { position: absolute; margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 6px solid #fff; background: #ddd; }
.hv img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.hv:hover img { transform: scale(1.06); }
.hv--a { left: 0; top: 6%; width: 52%; height: 62%; transform: rotate(-3deg); }
.hv--b { right: 0; top: 0; width: 46%; height: 54%; transform: rotate(2.5deg); }
.hv--c { right: 8%; bottom: 0; width: 50%; height: 42%; transform: rotate(-1.5deg); }
.hv-badge {
  position: absolute; left: 4%; bottom: 6%; padding: 14px 18px; border-radius: 16px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px); box-shadow: var(--shadow);
  display: grid; gap: 2px; animation: float 5s ease-in-out infinite;
}
.hv-badge strong { font-size: 16px; }
.hv-badge span { font-size: 13px; color: var(--muted); }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- Marquee ---------- */
.marquee { background: var(--ink); color: #fff; overflow: hidden; padding: 18px 0; transform: rotate(-1.2deg) scale(1.03); margin: 8px 0 24px; }
.marquee__track { display: flex; gap: 28px; width: max-content; animation: marquee 32s linear infinite; font-size: clamp(18px, 2.2vw, 26px); font-weight: 800; letter-spacing: -0.02em; }
.marquee__track i { font-style: normal; color: var(--brand-2); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--tint { background: var(--tint); }
.section--dark { background: radial-gradient(80% 80% at 100% 0%, #123456 0%, var(--ink) 60%); color: #fff; }
.section__head { max-width: 640px; margin-bottom: 48px; }
.section__head h2 { font-size: clamp(30px, 4.2vw, 50px); font-weight: 800; margin-top: 12px; }
.section__sub { margin-top: 16px; color: var(--muted); font-size: 17px; }
.section--dark .section__sub { color: #b7c4d3; }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; gap: 16px; }
.card { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink); color: #fff; isolation: isolate; box-shadow: var(--shadow); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease); }
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,27,43,0) 25%, rgba(11,27,43,.88) 100%); }
.card:hover img { transform: scale(1.06); }
.card__body { position: absolute; inset: auto 0 0 0; padding: 24px; }
.card__num { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); margin-bottom: 10px; }
.card h3 { font-size: 24px; font-weight: 800; }
.card p { margin-top: 8px; font-size: 15px; color: rgba(255,255,255,.85); max-width: 36em; }
.card--lg { grid-column: span 2; grid-row: span 2; }
.card--lg h3 { font-size: 32px; }
.card--tall { grid-column: span 2; grid-row: span 1; }
.card--stat { grid-column: span 2; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: flex; flex-direction: column; justify-content: space-between; padding: 28px; }
.card--stat::after { display: none; }
.card--stat .btn { align-self: flex-start; background: #fff; color: var(--brand-ink); }
.stat strong { display: block; font-size: 30px; font-weight: 800; letter-spacing: -0.04em; }
.stat span { display: block; margin-top: 8px; color: rgba(255,255,255,.9); font-size: 15px; }
.bento > .card:nth-child(3), .bento > .card:nth-child(4) { grid-column: span 1; }

/* ---------- Before / After ---------- */
.ba-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.ba-wrap .section__head { margin-bottom: 0; }
.ba-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.ba-list li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.ba-list li::before { content: "✓"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,179,198,.2); color: #6fe6f2; font-size: 13px; font-weight: 800; flex: none; }
.ba { position: relative; aspect-ratio: 3 / 4; max-height: 720px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); user-select: none; touch-action: pan-y; justify-self: center; width: 100%; max-width: 540px; }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__tag { position: absolute; top: 16px; font-size: 12px; font-weight: 800; letter-spacing: .12em; padding: 6px 12px; border-radius: 999px; background: rgba(11,27,43,.65); backdrop-filter: blur(6px); pointer-events: none; }
.ba__tag--l { left: 16px; }
.ba__tag--r { right: 16px; background: rgba(10,108,255,.85); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; transform: translateX(-50%); pointer-events: none; }
.ba__handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 22px; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.filter { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); transition: background .25s, color .25s; }
.filter:hover { color: var(--ink); }
.filter.is-active { background: var(--ink); color: #fff; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.g-item { aspect-ratio: 4 / 5; position: relative; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: #dfe5eb; display: block; width: 100%; border: 0; padding: 0; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.g-item:hover img { transform: scale(1.05); }
.g-item figcaption { position: absolute; left: 10px; bottom: 10px; right: 10px; font-size: 13px; font-weight: 700; color: #fff; padding: 6px 10px; border-radius: 10px; background: rgba(11,27,43,.6); backdrop-filter: blur(6px); opacity: 0; transform: translateY(6px); transition: .3s var(--ease); text-align: left; }
.g-item:hover figcaption, .g-item:focus-visible figcaption { opacity: 1; transform: none; }
.g-item.is-hidden, .g-item.is-more { display: none; }
.more-wrap { display: flex; justify-content: center; margin-top: 32px; }
.more-wrap[hidden] { display: none; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.g-item.pop { animation: pop .5s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.step { background: var(--surface); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); position: relative; transition: transform .3s var(--ease), box-shadow .3s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step__no { font-size: 44px; font-weight: 800; letter-spacing: -0.05em; background: linear-gradient(180deg, var(--brand), rgba(10,108,255,.15)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.step h3 { font-size: 21px; margin: 18px 0 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center;
  padding: clamp(32px, 5vw, 64px); border-radius: 32px; color: #fff; overflow: hidden; position: relative; isolation: isolate;
  background: radial-gradient(70% 90% at 0% 0%, #1a4f8a 0%, var(--ink) 65%);
}
.contact::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(0,179,198,.45), transparent 65%); z-index: -1; }
.contact h2 { font-size: clamp(28px, 3.8vw, 46px); font-weight: 800; margin: 12px 0 16px; }
.contact__copy > p { color: #c4d2e1; font-size: 17px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.contact__info { margin: 0; display: grid; gap: 2px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 10px 24px; backdrop-filter: blur(8px); }
.contact__info > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.contact__info > div:last-child { border-bottom: 0; }
.contact__info dt { color: #8ea3b9; font-size: 14px; font-weight: 600; }
.contact__info dd { margin: 0; font-weight: 700; }
.contact__map { grid-template-columns: 1fr !important; }
.contact__map .btn { width: 100%; }

/* ---------- Footer ---------- */
.footer { padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 28px; }
.footer strong { color: var(--ink); }

/* ---------- FAB (mobile) ---------- */
.fab { display: none; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.lightbox::backdrop { background: rgba(5, 12, 20, .9); backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; place-items: center; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure { margin: 0; display: grid; gap: 12px; justify-items: center; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 82vh; border-radius: 14px; object-fit: contain; }
.lightbox figcaption { color: #e7eef6; font-weight: 600; }
.lightbox__close, .lightbox__nav { position: fixed; border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 50%; width: 52px; height: 52px; font-size: 30px; line-height: 1; display: grid; place-items: center; transition: background .2s; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.24); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; }
  .card--lg { grid-column: span 2; grid-row: span 2; }
  .card--tall, .card--stat { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .hero { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 56px; }
  .hero__grid, .ba-wrap, .contact { grid-template-columns: 1fr; }
  .hero__visual { max-width: 520px; width: 100%; justify-self: center; }
  .br-pc { display: none; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: 280px; }
  .card--lg, .card--tall, .card--stat, .bento > .card:nth-child(3), .bento > .card:nth-child(4) { grid-column: span 1; grid-row: span 1; }
  .card--lg { grid-row: span 1; height: 380px; }
  .card--stat { height: auto; gap: 20px; }
  .card--lg h3 { font-size: 26px; }
  .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .filter { flex: none; }
  .hero__actions .btn { flex: 1 1 100%; }
  .contact__actions .btn { flex: 1 1 100%; }
  .contact__info > div { grid-template-columns: 80px 1fr; }
  .lightbox__nav { top: auto; bottom: 24px; transform: none; }
  .fab {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; z-index: 40;
    left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); justify-content: center;
    padding: 15px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; font-size: 17px;
    box-shadow: 0 14px 30px -10px rgba(10,108,255,.8);
    transform: translateY(140%); transition: transform .4s var(--ease);
  }
  .fab.is-visible { transform: none; }
  .fab svg { width: 20px; height: 20px; }
  .footer { padding-bottom: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
