/* ============================================================================
   Bubo · Apple 스타일 빌드
   apple.com 제품 페이지의 문법: 2단 내비(글로벌 + 스티키 로컬), 대형 제품 히어로,
   스크롤에 따라 줄 단위로 채워지는 스테이트먼트, 반경 28px 타일, 가로 갤러리.
   색·서체 값은 Bubo 디자인 시스템 토큰을 그대로 씁니다.
   ========================================================================== */

:root {
  --white: #ffffff;
  --paper: #f5f5f7;          /* Apple 밴드 회색 */
  --black: #000000;
  --tile-dark: #161617;      /* 검은 밴드 위 타일 */
  --ink: #15181d;            /* text/primary */
  --ink-2: #4c525c;          /* text/secondary (가독성 위해 한 단계 진하게) */
  --ink-3: #6e6e73;          /* 캡션·비활성 (흰 바탕 4.9:1) */
  --on-dark: #f5f5f7;
  --on-dark-2: #c2c2c7;
  --accent: #0b6bff;         /* accent/base */
  --accent-press: #0958d6;
  --line: #d2d2d7;
  --line-dark: #424245;

  --content: 980px;
  --wide: 1180px;
  --gutter: 22px;
  --nav: 52px;
  --r-tile: 28px;
  --r-pill: 980px;

  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);   /* apple.com 기본 이징 */
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav) + 8px);
  overflow-x: clip;          /* hidden은 sticky 로컬 내비를 깨뜨립니다 */
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p, h1, h2, h3, h4, figure, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: #fff; padding: 12px 16px; }
.skip:focus { left: 12px; top: 12px; }

.ko-break { word-break: keep-all; overflow-wrap: break-word; }
/* 줄바꿈: 제목은 줄 길이를 고르게, 본문은 끝줄 한 단어를 피함 */
h1, h2, h3, .statement, .hero-title, .tile-title, .tile-big { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
.br-d { display: none; }
@media (min-width: 734px) { .br-d { display: inline; } }

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: calc(var(--content) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--wide { max-width: calc(var(--wide) + var(--gutter) * 2); }

.band { padding: 100px 0; }
.band--paper { background: var(--paper); }
.band--black { background: var(--black); color: var(--on-dark); }

/* ------------------------------------------------------------ typography */
.eyebrow {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin-bottom: 14px;
}
.band--black .eyebrow { color: var(--on-dark-2); }

.statement {
  font-size: clamp(26px, 3.3vw, 42px);
  line-height: 1.24;
  font-weight: 600;
  letter-spacing: -0.022em;
  max-width: 880px;
}
.tech .statement { max-width: 660px; }
.contact .statement { max-width: 900px; }
.tile-title {
  font-size: clamp(20px, 1.9vw, 24px);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.tile-big {
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.intro {
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink-2);
  max-width: 720px;
}
.band--black .intro { color: var(--on-dark-2); }
.small { font-size: 17px; line-height: 1.5; color: var(--ink-2); letter-spacing: -0.008em; }
.caption { font-size: 13px; line-height: 1.4; color: var(--ink-3); letter-spacing: 0; }
.band--black .caption { color: #8e8e93; }

.fill { display: inline; }

/* ---------------------------------------------------------- buttons/links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 22px;
  border-radius: var(--r-pill);
  background: var(--accent); color: #fff;
  font-size: 17px; font-weight: 500; line-height: 1.18; letter-spacing: -0.01em;
  transition: background-color 0.24s var(--ease);
}
.btn:hover { background: var(--accent-press); color: #fff; text-decoration: none; }
.btn--sm { min-height: 32px; padding: 6px 14px; font-size: 14px; font-weight: 500; }
.more { font-size: 17px; font-weight: 400; display: inline-flex; align-items: center; gap: 2px; }
.more::after { content: "›"; font-size: 1.2em; line-height: 1; margin-left: 2px; transform: translateY(-1px); }
.band--black .more { color: #2997ff; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; }

/* ------------------------------------------------------------- header
   한 줄 고정 헤더: 로고 · 섹션 메뉴(가운데) · 언어 + 문의 버튼 */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.is-stuck { border-bottom-color: rgba(0, 0, 0, 0.12); }
.nav__inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav__brand { justify-self: start; display: inline-flex; align-items: center; }
.nav__brand img { height: 19px; width: auto; }
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; gap: 36px; }
.nav__links a { font-size: 14px; font-weight: 500; color: rgba(21, 24, 29, 0.78); letter-spacing: -0.005em; }
.nav__links a:hover { color: var(--ink); text-decoration: none; }
.nav__actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.nav__lang { display: flex; gap: 5px; font-size: 13px; color: var(--ink-3); }
.nav__lang a { color: var(--ink-3); }
.nav__lang a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav__lang a:hover { color: var(--ink); text-decoration: none; }
.nav__menu { display: none; width: 40px; height: 40px; margin-right: -10px; border: 0; background: none; padding: 0; cursor: pointer; }
.nav__menu span { display: block; width: 17px; height: 1.2px; margin: 5px auto; background: var(--ink); transition: transform 0.3s var(--ease); }
.is-open .nav__menu span:nth-child(1) { transform: translateY(3.1px) rotate(45deg); }
.is-open .nav__menu span:nth-child(2) { transform: translateY(-3.1px) rotate(-45deg); }
.nav__drawer { display: none; }

/* ---------------------------------------------------------------- hero
   흰 바탕 깃털 이미지가 화면 전체에 깔리고, 비어 있는 왼쪽에 문구를 둡니다.
   모바일은 문구 → 깃털(정사각 크롭) 순서로 쌓습니다. */
.hero { position: relative; overflow: hidden; padding: 48px 0 0; }
.hero__inner { position: relative; z-index: 1; }
.hero__copy { max-width: 620px; }
.hero__status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  margin-bottom: 22px;
}
.hero__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero__product {
  font-size: clamp(18px, 1.7vw, 22px); font-weight: 500; letter-spacing: -0.015em;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero-title {
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero__desc { margin-top: 24px; max-width: 600px; }
.hero .cta-row { margin-top: 32px; justify-content: flex-start; }
.hero__art { display: block; margin-top: 28px; }
.hero__art img {
  width: 100%;
  transform: translateY(calc(var(--hp, 0) * 36px)) scale(calc(1 + var(--hp, 0) * 0.04));
  transform-origin: 70% 50%;
  will-change: transform;
}
.hero__note { text-align: right; padding: 0 var(--gutter) 20px; }

/* 태블릿·가로 폰(600–899px)은 정사각 크롭 대신 가로 원본(16:9)을 씁니다.
   정사각은 이 폭에서 이미지 높이가 화면을 넘겨 깃털만 보이게 됩니다. (source 분기는 HTML의 599px) */

@media (min-width: 900px) {
  .hero {
    min-height: min(calc(100svh - var(--nav)), 860px);
    display: flex; align-items: center;
    padding: 72px 0 96px;
  }
  .hero__art { position: absolute; inset: 0; margin: 0; z-index: 0; }
  .hero__art img { height: 100%; object-fit: cover; object-position: 82% 50%; }
  .hero__note { position: absolute; right: 0; bottom: 0; z-index: 1; padding: 0 max(var(--gutter), calc((100vw - var(--wide)) / 2)) 24px; }
}

/* ------------------------------------------------------ section heads */
.head { margin-bottom: 48px; }
@media (min-width: 734px) { .head { margin-bottom: 72px; } }
.head .intro { margin-top: 24px; }
.head--center { text-align: center; }
.head--center .statement, .head--center .intro { margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------- tech (black) */
.tech { position: relative; overflow: hidden; }
.tech__body { position: relative; }

.tiles { display: grid; gap: 20px; }
.tile {
  border-radius: var(--r-tile);
  padding: 40px 36px;
  background: var(--paper);
  overflow: hidden;
}
.band--paper .tile { background: var(--white); }
.band--black .tile { background: var(--tile-dark); color: var(--on-dark); }
.tile .small { margin-top: 12px; }
.band--black .tile .small { color: var(--on-dark-2); }
.tile__icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: 22px; }
.band--black .tile__icon { color: #2997ff; }

.concept-tile { padding: 40px 36px 32px; }
.flows { display: grid; gap: 28px; margin-top: 8px; }
.flow__label { font-size: 15px; font-weight: 500; color: var(--on-dark-2); margin-bottom: 14px; }
.flow__stage { position: relative; height: 190px; }
/* 연기 캔버스가 준비되면 정적 SVG 흐름선은 숨김(스크립트 없을 때의 대체 화면) */
.flow__stage canvas.smoke { position: absolute; inset: 0 0 14px 0; width: 100%; height: calc(100% - 14px); display: block; }
.smoke-ready .flow__stage picture { display: none; }
/* 모형 표면: 선 대신 은은하게 빛을 받는 판 */
.flow__stage::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: 0; height: 14px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(to bottom, #3a3a3d 0%, #232326 45%, #161618 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 -6px 18px rgba(0, 0, 0, 0.35);
}
.flow__stage picture, .flow__stage img { position: absolute; inset: 0 0 6px 0; width: 100%; height: calc(100% - 6px); }
.concept-tile .caption { margin-top: 20px; }

/* ------------------------------------------------------ validation */
.axis-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 220px; }
.axis-tile__pair { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 600; color: var(--ink-2); }
.axis-tile__pair span[aria-hidden] { color: var(--accent); font-weight: 400; }
.axis-tile__out { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); font-weight: 400; letter-spacing: -0.01em; }
.axis-tile__out::before { content: "→ "; color: var(--accent); }
.metrics { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }
.metric {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 16px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.axes-note { text-align: center; margin-top: 18px; }

/* --------------------------------------------------- applications */
.apps { display: grid; gap: 20px; }
.app { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 150px; }
.app__label { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.app--focus .app__label { color: var(--accent); }
.app--focus .tile-title { font-size: clamp(22px, 2.2vw, 28px); }
@media (min-width: 734px) {
  .apps { grid-template-columns: repeat(6, 1fr); }
  .app--focus { grid-column: span 3; min-height: 200px; }
  .app:not(.app--focus) { grid-column: span 2; }
}

/* ---------------------------------------------------------- company */
.history-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 200px; }
.history-tile__year { font-size: clamp(30px, 3vw, 38px); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.history-tile--next .history-tile__year { color: var(--accent); }
.history-tile p:last-child { font-size: 17px; line-height: 1.5; font-weight: 400; color: var(--ink-2); letter-spacing: -0.008em; }
.facts { margin-top: 48px; display: grid; }
.fact { display: flex; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 17px; }
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact dt { flex: 0 0 120px; color: var(--ink-3); }
.company-note { margin-top: 20px; }

/* ---------------------------------------------------------- contact */
.contact { text-align: center; }
.contact .cta-row { margin-top: 34px; }
.inquiry { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.inquiry a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 16px;
  border-radius: var(--r-pill); background: var(--paper); color: var(--ink);
  font-size: 14px; font-weight: 500;
  transition: background-color 0.2s var(--ease);
}
.inquiry a:hover { background: #e8e8ed; text-decoration: none; }
.contact-tiles { margin-top: 72px; text-align: left; }
.contact-tiles dt { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-bottom: 10px; }
.contact-tiles dd { font-size: clamp(17px, 1.6vw, 20px); font-weight: 500; letter-spacing: -0.01em; }
.contact-tiles dd a { color: var(--ink); }
.contact-tiles dd a:hover { color: var(--accent); text-decoration: none; }

/* ----------------------------------------------------------- footer */
.footer { background: var(--paper); color: var(--ink-3); font-size: 13px; line-height: 1.5; padding: 30px 0 34px; }
.footer a { color: var(--ink-2); }
.footer__notes { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.footer__notes p + p { margin-top: 8px; }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.lockup { display: flex; align-items: center; gap: 14px; }
.lockup .bubo { height: 20px; width: auto; }
.lockup .steamlab { height: 14px; width: auto; }
.lockup .divider { width: 1px; height: 16px; background: rgba(0, 0, 0, 0.2); }
.footer__lang { display: flex; gap: 6px; }
.footer__lang a[aria-current="page"] { color: var(--ink); }
.footer__meta { padding-top: 16px; display: grid; gap: 6px; }
.footer__meta p { color: var(--ink-3); }

/* ----------------------------------------------------------- reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ----------------------------------------------------------- desktop */
@media (min-width: 734px) {
  .band { padding: 150px 0; }
  .tiles--3 { grid-template-columns: repeat(3, 1fr); }
  .tiles--2 { grid-template-columns: repeat(2, 1fr); }
  .flows { grid-template-columns: 1fr 1fr; gap: 36px; }
  .tile { padding: 48px 44px; }
  .contact-tiles { grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------------------ mobile */
@media (max-width: 833px) {
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__links, .nav__actions > .nav__lang { display: none; }
  .nav__actions { gap: 10px; }
  .nav__menu { display: block; }
  .nav__drawer {
    display: grid; gap: 2px;
    position: fixed; inset: var(--nav) 0 auto 0; z-index: 70;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 14px var(--gutter) 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }
  .nav__drawer a { font-size: 24px; font-weight: 600; color: var(--ink); padding: 8px 0; letter-spacing: -0.02em; }
  .nav__drawer a:hover { text-decoration: none; }
  .nav__drawer .nav__lang { margin-top: 18px; font-size: 15px; }
  .is-open .nav__drawer { opacity: 1; transform: none; pointer-events: auto; }
}
@media (max-width: 420px) {
  .nav .btn--sm { padding: 4px 10px; }
}
@media (max-width: 359px) {
  :root { --gutter: 18px; }
  .tile { padding: 28px 22px; }
  .nav__brand img { height: 17px; max-width: none; }
  .nav .btn--sm { font-size: 13px; }
  /* 영문 버튼 문구는 이 폭에 로고와 함께 들어가지 않습니다. 문의는 메뉴의 Contact로 갑니다. */
  html[lang="en"] .nav .btn--sm { display: none; }
}

@media (max-width: 733px) {
  /* 폰 타이포: px 하한 대신 폭 비례로 줄여, 좁은 폰·글자 확대(실제 폭이 좁아짐)에서도
     히어로 제목이 두 줄, 섹션 제목이 과하게 꺾이지 않게 합니다. 430px 이상은 기존 크기. */
  .band { padding: 80px 0; }
  .hero { padding-top: 36px; }
  .hero__status { font-size: 14px; margin-bottom: 18px; }
  .hero__product { font-size: clamp(16px, 4.6vw, 18px); margin-bottom: 8px; }
  .hero-title { font-size: clamp(24px, 8.6vw, 40px); }
  .hero__desc { margin-top: 18px; }
  .hero .cta-row { margin-top: 26px; gap: 14px 22px; }
  .intro { font-size: clamp(16px, 4.6vw, 18px); }
  .statement { font-size: clamp(21px, 6.4vw, 28px); line-height: 1.28; }
  .tile-big { font-size: clamp(26px, 7.8vw, 32px); }
  .tile-title { font-size: clamp(18px, 5.2vw, 21px); }
  .app--focus .tile-title { font-size: clamp(20px, 5.8vw, 23px); }
  .history-tile__year { font-size: clamp(26px, 7.4vw, 32px); }
  .small, .history-tile p:last-child, .fact { font-size: clamp(15px, 4.2vw, 17px); }
  .head { margin-bottom: 36px; }
  .contact-tiles { margin-top: 48px; }
  .tile { padding: 32px 26px; }
  .axis-tile { min-height: 0; }
  .history-tile { min-height: 0; }
  .contact-tiles { gap: 12px; }
  .fact dt { flex-basis: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__art img { transform: none; }
  .gallery__track { scroll-behavior: auto; }
}
