/* =========================================================
   본건설 — Portfolio
   ========================================================= */

:root {
  --bg: #F4F2EE;
  --bg-2: #EBE8E2;
  --card: #FFFFFF;
  --ink: #141414;
  --ink-2: #3A3835;
  --muted: #7A766F;
  --line: rgba(20, 20, 20, 0.12);
  --accent: #0B5FA5;
  --accent-ink: #084B84;
  --dark: #121211;
  --dark-2: #1C1C1A;
  --dark-line: rgba(255, 255, 255, 0.12);

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 18px;
  --nav-h: 72px;
  --pad: clamp(20px, 5vw, 56px);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) - 1px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }

.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--pad); }

::selection { background: var(--accent); color: #fff; }
[hidden] { display: none !important; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em;
  cursor: pointer; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn .arrow { display: inline-block; transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14.5px; }
.btn-block { width: 100%; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); }

.btn-ghost-light { border-color: rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.04); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn-ghost { border-color: rgba(20,20,20,.25); color: var(--ink); background: rgba(255,255,255,.45); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  color: var(--ink);
  transition: background-color .4s var(--ease), color .4s var(--ease), height .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.is-scrolled {
  --nav-h: 62px;
  height: 62px;
  color: var(--ink);
  background: rgba(244, 242, 238, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-scrolled.is-dark {
  color: #fff;
  background: rgba(18, 18, 17, 0.78);
  box-shadow: 0 1px 0 var(--dark-line);
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 32px; }

.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.logo-mark {
  width: auto; height: 36px; object-fit: contain;
  transition: transform .5s var(--ease);
}
.nav.is-scrolled .logo-mark { height: 32px; }
.logo:hover .logo-mark { transform: translateY(-2px) scale(1.06); }
.logo-text { display: flex; flex-direction: column; font-weight: 800; font-size: 19px; line-height: 1; letter-spacing: 0.02em; }
.logo-text small { font-size: 9px; font-weight: 600; letter-spacing: 0.2em; opacity: .62; margin-top: 4px; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) {
  position: relative; font-size: 15px; font-weight: 500; opacity: .85;
  padding: 6px 0; transition: opacity .3s;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav-links a:not(.btn):hover, .nav-links a.is-active { opacity: 1; }
.nav-links a:not(.btn):hover::after, .nav-links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-cta-mobile { display: none; }

.burger {
  display: none; position: relative;
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer; margin-right: -10px;
}
.burger span {
  position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .45s var(--ease), top .45s var(--ease);
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
.nav.is-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav.is-open .burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--ink); overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 0 clamp(56px, 9vh, 96px);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; background: var(--bg); }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 45%;
  transform: scale(1.12); opacity: 0;
  animation: heroImg 2.4s var(--ease) .1s forwards;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(244,242,238,.82) 0%, rgba(244,242,238,.34) 34%, rgba(244,242,238,.88) 100%),
    linear-gradient(90deg, rgba(244,242,238,.86) 0%, rgba(244,242,238,.12) 62%);
}
@keyframes heroImg { to { transform: scale(1); opacity: 1; } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-2);
  margin-bottom: 26px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(11,95,165,.7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(11,95,165,0); } 100% { box-shadow: 0 0 0 0 rgba(11,95,165,0); } }

.hero-title {
  font-size: clamp(42px, 8.2vw, 116px);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.045em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-title .line > span {
  display: inline-block; transform: translateY(105%);
  animation: lineUp 1.1s var(--ease) forwards;
}
.hero-title .line:nth-child(1) > span { animation-delay: .35s; }
.hero-title .line:nth-child(2) > span { animation-delay: .5s; }
.hero-title em { font-style: normal; color: var(--accent); }
@keyframes lineUp { to { transform: translateY(0); } }

.hero-bottom {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  margin-top: clamp(28px, 5vh, 48px); padding-top: 28px;
  border-top: 1px solid rgba(20,20,20,.18);
}
.hero-sub { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.7; color: var(--ink-2); max-width: 34em; }
.nowrap { white-space: nowrap; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.reveal-load { opacity: 0; transform: translateY(18px); animation: fadeUp 1s var(--ease) forwards; animation-delay: calc(var(--d, 0) * .12s + .35s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.scroll-cue {
  position: absolute; right: var(--pad); bottom: clamp(56px, 9vh, 96px);
  display: none; flex-direction: column; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: .25em; font-weight: 600; opacity: .7;
  writing-mode: vertical-rl;
}
.scroll-cue i { position: relative; width: 1px; height: 64px; background: rgba(20,20,20,.2); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--ink); animation: cue 2s var(--ease) infinite; }
@keyframes cue { to { top: 100%; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; background: var(--ink); color: #fff;
  padding: 22px 0; border-block: 1px solid var(--ink);
}
.marquee-track {
  display: flex; align-items: center; gap: 28px; width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee span { font-size: clamp(20px, 2.4vw, 30px); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.marquee span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.75); }
.marquee b { color: var(--accent); font-size: 16px; font-weight: 400; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 14vw, 180px) 0; }

.sec-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 22px;
}
.sec-label span {
  display: grid; place-items: center; min-width: 34px; height: 24px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 11.5px; letter-spacing: .04em; color: var(--ink);
}
.sec-label-light { color: rgba(255,255,255,.6); }
.sec-label-light span { color: #fff; border-color: var(--dark-line); }

.sec-head { margin-bottom: clamp(48px, 7vw, 80px); }
.sec-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.sec-title { font-size: clamp(34px, 5.4vw, 68px); font-weight: 800; line-height: 1.12; letter-spacing: -0.04em; }

/* ---------- About ---------- */
.statement {
  font-size: clamp(28px, 4.6vw, 60px); font-weight: 700; line-height: 1.28; letter-spacing: -0.035em;
  max-width: 19em; margin-bottom: clamp(64px, 9vw, 120px);
}
.statement .w { color: rgba(20,20,20,.16); transition: color .5s var(--ease); }
.statement .w.is-on { color: var(--ink); }

.about-grid { display: grid; grid-template-columns: 1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }

.about-figure { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-2); }
.about-figure img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.6s var(--ease); }
.about-figure.is-in img { transform: scale(1); }
.about-figure figcaption {
  position: absolute; left: 16px; bottom: 16px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 500;
}

.about-text > p { color: var(--ink-2); font-size: 17px; max-width: 36em; }
.about-text > p + p { margin-top: 18px; }
/* 회사명 한 덩어리("BONE CONSTRUCTION입니다." ≈ 13.24em)가 가장 좁은 폰에서도 들어가도록 필요할 때만 축소 */
.about-intro { font-size: min(clamp(20px, 2vw, 24px), calc((100vw - 2 * var(--pad)) / 13.8)) !important; line-height: 1.55; color: var(--ink) !important; font-weight: 500; letter-spacing: -0.02em; }

.values { margin-top: 48px; border-top: 1px solid var(--line); }
.values li {
  display: grid; grid-template-columns: 48px 1fr; column-gap: 12px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.v-num { grid-row: span 2; font-size: 13px; font-weight: 700; color: var(--accent); padding-top: 4px; }
.values h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.values p { color: var(--muted); font-size: 15.5px; margin-top: 4px; }

/* ---------- Services ---------- */
.services { background: var(--bg-2); }
.service-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

.service {
  position: relative; overflow: hidden;
  background: var(--card); border-radius: var(--radius);
  padding: clamp(28px, 3.2vw, 44px);
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.service::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease);
}
.service:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(20,20,20,.25); }
.service:hover::before { transform: scaleX(1); }

.service-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: clamp(40px, 6vw, 72px); }
.s-num { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.s-icon { width: 64px; height: 64px; color: var(--ink); transition: color .4s, transform .6s var(--ease); }
.service:hover .s-icon { color: var(--accent); transform: rotate(-6deg) scale(1.06); }

.service h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; }
.service > p { color: var(--muted); font-size: 15.5px; margin-bottom: 24px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chips li { padding: 6px 13px; border-radius: 999px; background: var(--bg); font-size: 13.5px; font-weight: 500; color: var(--ink-2); }

/* ---------- Works ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  font-size: 14.5px; font-weight: 500; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.works-note { font-size: 13px; color: var(--muted); margin: -40px 0 28px; }

.work-grid { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 3vw, 40px) 24px; }

.js .work.is-settled { transition: opacity .35s var(--ease), transform .45s var(--ease); transition-delay: 0s; }
.work.is-leaving { opacity: 0 !important; transform: scale(.96) !important; }
.work.is-entering { opacity: 0 !important; transform: translateY(16px) !important; }

.work-img { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--bg-2); }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.work-img::after {
  content: "→"; position: absolute; right: 16px; bottom: 16px;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 20px;
  transform: scale(0) rotate(-45deg); transition: transform .5s var(--ease);
}
.work:hover .work-img img { transform: scale(1.06); }
.work:hover .work-img::after { transform: scale(1) rotate(-45deg); }

.work-cat {
  position: absolute; left: 14px; top: 14px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(8px);
  font-size: 12.5px; font-weight: 600;
}

.work-info { padding: 18px 4px 0; }
.work-info h3 { font-size: clamp(19px, 1.7vw, 22px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.35; }
.work-meta { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.tags li { font-size: 13px; color: var(--ink-2); }
.tags li::before { content: "#"; color: var(--accent); margin-right: 2px; }

/* ---------- Process ---------- */
.process { border-top: 1px solid var(--line); }
.steps { position: relative; display: grid; grid-template-columns: 1fr; gap: 0; counter-reset: s; padding-left: 36px; }
.steps::before, .steps::after {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
}
.steps::before { background: var(--line); }
.steps::after {
  background: var(--accent);
  transform-origin: top; transform: scaleY(var(--progress, 0));
  transition: transform .15s linear;
}
.step { position: relative; padding: 0 0 48px; }
.step:last-child { padding-bottom: 0; }
.step-dot {
  position: absolute; left: -36px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
  transition: background-color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}
.step.is-lit .step-dot { background: var(--accent); border-color: var(--accent); transform: scale(1.15); box-shadow: 0 0 0 6px rgba(11,95,165,.15); }
.step-num { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); transition: color .4s; }
.step.is-lit .step-num { color: var(--accent); }
.step h3 { font-size: clamp(22px, 2.3vw, 30px); font-weight: 700; letter-spacing: -0.03em; margin: 8px 0 10px; }
.step p { color: var(--muted); font-size: 15.5px; max-width: 24em; }

/* ---------- Contact ---------- */
.contact { background: var(--dark); color: #fff; padding-top: clamp(96px, 14vw, 180px); overflow: hidden; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 56px; align-items: start; }
.contact-grid > * { min-width: 0; } /* 긴 내용이 칸 폭을 밀어 화면 밖으로 넘치지 않게 */

.contact-title { font-size: clamp(36px, 4.6vw, 72px); font-weight: 800; line-height: 1.1; letter-spacing: -0.045em; }
.contact-desc { color: rgba(255,255,255,.62); font-size: 16.5px; margin-top: 22px; }

.contact-email {
  position: relative; display: inline-block;
  margin-top: 40px; padding-bottom: 6px;
  /* 한 줄 유지: 좌우 여백을 뺀 실제 폭에 맞춰 크기 조절 (주소 약 10.5em 폭 + 여유) */
  font-size: min(48px, calc((100vw - 2 * var(--pad)) / 11.5));
  font-weight: 700; letter-spacing: -0.03em;
  white-space: nowrap; max-width: 100%;
}
.contact-email::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--accent);
  transform-origin: left; transition: transform .6s var(--ease);
}
.contact-email:hover::after { transform-origin: right; transform: scaleX(0); }
.contact-email:hover { color: var(--accent); }
.contact-email { transition: color .4s var(--ease); }

.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

.contact-info { margin-top: 48px; border-top: 1px solid var(--dark-line); }
.contact-info div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--dark-line); font-size: 15px; }
.contact-info dt { color: rgba(255,255,255,.5); }

.contact-form {
  background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: 24px;
  padding: clamp(24px, 3.4vw, 40px);
  display: flex; flex-direction: column; gap: 16px;
}
.form-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 13.5px; color: rgba(255,255,255,.6); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--dark-line); color: #fff;
  font-size: 15.5px; outline: none;
  transition: border-color .3s, background-color .3s;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23fff' stroke-opacity='.6' stroke-width='1.6'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field select option { color: var(--ink); }
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: rgba(255,255,255,.07); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #FF6B6B; }
.contact-form .btn { margin-top: 8px; }
.form-hint { font-size: 13px; color: rgba(255,255,255,.45); text-align: center; }

/* 안내 문구 한 줄 유지: 폼 안쪽 폭에 맞춰 축소 (문장 폭 ≈ 33.5em + 여유) — 미지원 브라우저는 기존처럼 줄바꿈 */
@supports (width: 1cqw) {
  .contact-form { container-type: inline-size; }
  .form-hint { white-space: nowrap; font-size: min(13px, calc(100cqw / 35)); }
}

/* ---------- Footer ---------- */
.footer { margin-top: clamp(96px, 12vw, 160px); border-top: 1px solid var(--dark-line); }
.footer-mark {
  font-size: clamp(88px, 22vw, 320px); font-weight: 800; letter-spacing: -0.06em; line-height: 1;
  margin: clamp(28px, 4vw, 48px) 0 0 -0.04em;
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none;
}
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  padding: 24px 0 32px; border-top: 1px solid var(--dark-line);
  font-size: 13.5px; color: rgba(255,255,255,.5);
}
.to-top:hover { color: #fff; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100;
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 500;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.4);
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Scroll reveal (JS only) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--delay, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-stagger] > * { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease), box-shadow .5s var(--ease); }
.js [data-stagger].is-in > * { opacity: 1; transform: none; }
.js [data-stagger].is-in > .service:hover { transform: translateY(-6px); }

/* ---------- Responsive ---------- */
@media (min-width: 700px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 980px) {
  .about-grid { grid-template-columns: 5fr 6fr; }
  .about-figure { position: sticky; top: calc(var(--nav-h) + 24px); }
  .scroll-cue { display: flex; }
  .hero-content { padding-right: 80px; }

  .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; padding-left: 0; padding-top: 44px; }
  .steps::before, .steps::after { left: 8px; right: 8px; top: 7px; bottom: auto; width: auto; height: 2px; }
  .steps::after { transform-origin: left; transform: scaleX(var(--progress, 0)); }
  .step { padding: 0; }
  .step-dot { left: 0; top: -44px; }

  .contact-grid { grid-template-columns: 1.05fr 1fr; gap: clamp(56px, 7vw, 110px); }
  .contact-email { font-size: min(46px, 3.3vw); } /* 2단 레이아웃: 왼쪽 칸 폭 기준 */
}

@media (min-width: 1200px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .work:nth-child(3n + 2) { margin-top: 56px; }
  .work-grid.is-filtered .work { margin-top: 0; }
}

@media (max-width: 899px) {
  .burger { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px;
    padding: calc(var(--nav-h) + 24px) var(--pad) 40px;
    background: var(--bg); color: var(--ink);
    clip-path: inset(0 0 100% 0);
    transition: clip-path .7s var(--ease);
  }
  .nav-links a:not(.btn) { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; opacity: 1; transform: translateY(20px); transition: transform .6s var(--ease), opacity .6s; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-cta-mobile { display: inline-flex; margin-top: 24px; height: 54px; padding: 0 26px; font-size: 16px; }
  .nav.is-open, .nav.is-open.is-dark { color: var(--ink); background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav.is-open .nav-links { clip-path: inset(0 0 0 0); }
  .nav.is-open .nav-links a:not(.btn) { transform: none; }
  .nav.is-open .nav-links a:nth-child(2) { transition-delay: .04s; }
  .nav.is-open .nav-links a:nth-child(3) { transition-delay: .08s; }
  .nav.is-open .nav-links a:nth-child(4) { transition-delay: .12s; }
  .nav.is-open .nav-links a:nth-child(5) { transition-delay: .16s; }

  .works-note { margin-top: -32px; }
}

@media (max-width: 520px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .contact-actions .btn { flex: 1 1 auto; }
  .contact-info div { grid-template-columns: 72px 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .marquee-track { animation: none; }
  .hero-bg img, .hero-title .line > span, .reveal-load { opacity: 1; transform: none; }
  .js [data-reveal], .js [data-stagger] > * { opacity: 1; transform: none; }
  .statement .w { color: var(--ink); }
}
