/* =========================================================
   B.fly (비플리) 원페이지 — 커스텀 스타일시트
   폰트: Noto Sans KR (Google Fonts)
   ========================================================= */

:root {
  --gold: #f0b03e;
  --gold-dark: #c98f28;
  --ink: #14161a;
  --ink-soft: #2b2e35;
  --paper: #f7f6f3;
  --paper-dim: #efeee9;
  --muted: #6b6f76;
  --line: rgba(20, 22, 26, 0.08);
  --max: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* 구역 단위로 스크롤이 부드럽게 안착하도록 함(mandatory가 아닌 proximity라서
     길이가 긴 섹션 중간에서 억지로 튕기지 않고, 섹션 경계 근처에서만 자연스럽게 붙음) */
  scroll-snap-type: y proximity;
}

.hero,
.section,
.footer {
  scroll-snap-align: start;
  scroll-margin-top: 64px;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 상단 고정 내비 ---------- */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(20, 22, 26, 0);
  backdrop-filter: blur(0px);
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), padding .3s var(--ease);
}
.topnav.is-scrolled {
  background: rgba(20, 22, 26, 0.88);
  backdrop-filter: blur(8px);
  padding: 12px 28px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.topnav .brand {
  font-weight: 900;
  font-size: 1.4em;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.topnav .cta {
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  text-decoration: none;
  font-size: 0.85em;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  transition: background .25s, border-color .25s, color .25s;
}
.topnav .cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

/* ---------- 히어로 ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--ink);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(10,11,13,0.55) 0%, rgba(10,11,13,0.72) 55%, rgba(10,11,13,0.92) 100%), url("../../images/hero-bg.jpg");
  background-size: cover;
  background-position: center 60%;
  transform: scale(1.08);
  animation: heroZoom 16s ease-out forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.14); }
  to   { transform: scale(1.0); }
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  color: #fff;
}
.hero__logo {
  font-size: clamp(3.2em, 10vw, 6em);
  font-weight: 900;
  color: var(--gold);
  margin: 0;
  opacity: 0;
  transform: translateY(24px);
  animation: riseIn .9s var(--ease) .15s forwards;
}
.hero__rule {
  width: 140px;
  height: 1px;
  background: rgba(255,255,255,0.35);
  margin: 22px auto;
  opacity: 0;
  animation: riseIn .9s var(--ease) .4s forwards;
}
.hero__tagline {
  font-size: clamp(1em, 2.4vw, 1.3em);
  font-weight: 500;
  margin: 0 0 6px;
  opacity: 0;
  animation: riseIn .9s var(--ease) .55s forwards;
}
.hero__sub {
  max-width: 640px;
  margin: 18px auto 0;
  color: rgba(255,255,255,0.78);
  font-size: 1.02em;
  opacity: 0;
  animation: riseIn .9s var(--ease) .7s forwards;
}
@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}
.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.75em;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: riseIn .9s var(--ease) .95s forwards;
}
.hero__scroll svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- 공통 섹션 ---------- */
.section {
  padding: 6.5em 0;
}
.section--tight { padding: 5em 0; }
.section--dark {
  background: var(--ink);
  color: #f1f1ef;
}
.section--alt { background: var(--paper-dim); }

.eyebrow {
  display: inline-block;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
}
.section--dark .eyebrow { color: var(--gold); }

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3em;
}
.section__title {
  font-size: clamp(1.6em, 3.4vw, 2.3em);
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 0.5em;
}
.section__title strong { color: var(--gold-dark); }
.section--dark .section__title strong { color: var(--gold); }
.section__desc {
  color: var(--muted);
  font-size: 1.05em;
  line-height: 1.85;
}
.section--dark .section__desc { color: rgba(241,241,239,0.75); }

/* ---------- 스크롤 리빌 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 인증 섹션 ---------- */
.certify {
  text-align: center;
}

/* 인증서를 이미지 대신 실제 텍스트/도형으로 그려서 어떤 화면 크기에서도 흐려지거나 잘리지 않도록 함 */
.cert-card {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 3em;
  padding: 2.4em 1.8em;
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(20,22,26,0.08);
  box-sizing: border-box;
}
.cert-card__title {
  margin: 0 0 0.5em;
  font-size: clamp(1.1em, 4vw, 1.6em);
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.cert-card__sub {
  margin: 0 0 1.2em;
  color: var(--muted);
  font-size: 1.05em;
}
.cert-card__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.4em;
}
.cert-card__mark {
  width: 46px; height: 46px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 900;
  font-size: 1.2em;
}
.cert-card__brand {
  font-weight: 900;
  font-size: 1.5em;
  color: var(--gold);
}
.cert-card__text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98em;
  line-height: 1.8;
}

.certify__body {
  max-width: 780px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1.08em;
  line-height: 1.9;
}

/* ---------- 서비스 카드 그리드 ---------- */
.grid6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) {
  .grid6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid6 { grid-template-columns: 1fr; }
}
.card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(20,22,26,0.06);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(20,22,26,0.12);
}
.card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 1.4em 1.5em 1.7em; }
.card__title {
  margin: 0 0 0.4em;
  font-size: 1.15em;
  font-weight: 800;
  color: var(--gold-dark);
}
.card__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95em;
  line-height: 1.75;
}

/* ---------- 제품 캐러셀 ---------- */
.carousel-wrap {
  position: relative;
}
.carousel {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 28px;
  margin: 0 -4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: rgba(240,176,62,0.55); border-radius: 6px; }

.pcard {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: min(78vw, 300px);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.6em 1.5em 1.8em;
  text-align: center;
}
.pcard__media {
  position: relative;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1em;
}
/* 제품 사진 배경을 전부 투명 컷아웃으로 맞추고, 그 뒤에 은은한 스포트라이트를
   깔아 카드마다 톤이 들쭉날쭉해 보이지 않고 하나의 제품 스튜디오처럼 보이게 함 */
.pcard__media::before {
  content: "";
  position: absolute;
  width: 84%;
  height: 76%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240,176,62,0.16), rgba(240,176,62,0) 70%);
}
.pcard__media img {
  position: relative;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,0.35));
}
.pcard__title {
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 0.6em;
}
.pcard__text {
  margin: 0;
  font-size: 0.92em;
  color: rgba(241,241,239,0.72);
  line-height: 1.7;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 4px;
}
.carousel-nav button {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s, border-color .25s, transform .2s;
}
.carousel-nav button:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: translateY(-2px); }
.carousel-nav button:active { transform: translateY(0); }

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background .25s, transform .25s;
}
.dots span.is-active { background: var(--gold); transform: scale(1.3); }

/* ---------- 채용/CTA 섹션 ---------- */
.hire {
  position: relative;
  background: var(--ink);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.hire__bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(180deg, rgba(10,11,13,0.82), rgba(10,11,13,0.92)), url("../../images/company-building.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hire__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.hire p {
  color: rgba(241,241,239,0.82);
  font-size: 1.05em;
}
.btn {
  display: inline-block;
  margin-top: 1.6em;
  padding: 0.95em 2.6em;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 10px 30px rgba(240,176,62,0.25);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(240,176,62,0.35); }

/* ---------- 푸터 ---------- */
.footer {
  background: #0e0f12;
  color: rgba(241,241,239,0.85);
  padding: 4.5em 0 2em;
  text-align: center;
}
.footer h3 {
  color: var(--gold);
  font-size: 1.6em;
  margin: 0 0 1em;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
  font-size: 0.98em;
}
@media (max-width: 700px) {
  .footer__grid { grid-template-columns: 1fr; gap: 22px; }
}
.footer__grid strong {
  display: block;
  color: #fff;
  font-size: 0.82em;
  letter-spacing: 1.5px;
  margin-bottom: 0.5em;
}
.footer__grid a { text-decoration: none; }
.footer__grid a:hover { color: var(--gold); }
.footer__bottom {
  margin-top: 3.5em;
  padding-top: 1.6em;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.82em;
  color: rgba(241,241,239,0.45);
}

/* ---------- 반응형 세부 조정 ---------- */
@media (max-width: 640px) {
  .section { padding: 4.5em 0; }
  .section__head { text-align: left; margin-bottom: 2.2em; }
  .certify__body { text-align: left; }
  .topnav { padding: 14px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero__logo, .hero__rule, .hero__tagline, .hero__sub, .hero__scroll, .hero__bg {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
