/* 페이즈웰 데모 사이트. 색상/글꼴/간격은 아래 :root 한 곳에서 바꾼다.
   모서리 규칙: 버튼·칩은 pill, 카드·패널은 16px, 입력창은 12px. */
@font-face {
  font-family: 'Pretendard';
  src: url('../fonts/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 45 920;
  font-display: swap;
}

:root {
  --bg: #0b0e0d;
  --bg-alt: #101412;
  --surface: #141917;
  --line: rgb(233 238 235 / 0.12);
  --line-strong: rgb(233 238 235 / 0.28);
  --text: #e9eeeb;
  --muted: #9aa6a0;
  --accent: #c8f542;
  --accent-ink: #0b0e0d;
  --accent-text: #c8f542;
  --danger: #ff9b8c;
  --nav-h: 64px;
  --r-card: 16px;
  --r-input: 12px;
  --font: 'Pretendard', system-ui, -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #f3f5f2;
  --bg-alt: #eaeee9;
  --surface: #fafbf9;
  --line: rgb(15 19 17 / 0.12);
  --line-strong: rgb(15 19 17 / 0.3);
  --text: #0f1311;
  --muted: #55615a;
  --accent-text: #3b5f00;
  --danger: #b3261e;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img, canvas, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic {
  display: inline-block; width: 1.15em; height: 1.15em; flex: none;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.ic-flip { transform: scaleX(-1); }

.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.display { font-size: clamp(2.3rem, 5vw, 4.4rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.16; white-space: pre-line; }
.h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.22; white-space: pre-line; }
.h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.35; }
.lead { color: var(--muted); font-size: 1.0625rem; max-width: 60ch; }
.muted { color: var(--muted); }
.accent { color: var(--accent-text); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.4rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: 0.95rem; white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, white); }
.btn-ghost { border-color: var(--line-strong); background: transparent; color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-ghost-light { border-color: rgb(244 246 242 / 0.55); background: rgb(8 10 9 / 0.25); color: #f4f6f3; }
.btn-ghost-light:hover { border-color: #f4f6f3; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: 0.85rem; }

.chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 0.85rem; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 0.8rem; color: var(--muted); background: transparent;
}
.chip[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 650; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-weight: 750; letter-spacing: -0.02em; font-size: 1.1rem; }
.brand svg { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a { padding: 0.5rem 0.9rem; border-radius: 999px; font-size: 0.93rem; color: var(--muted); transition: color 0.2s, background-color 0.2s; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--text); background: var(--line); }
.nav-tools { display: flex; align-items: center; gap: 0.4rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 0.7rem; gap: 0.4rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-size: 0.82rem; font-weight: 650;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn:active { transform: scale(0.96); }
.menu-btn { display: none; }

/* photo hero (메인, 회사 소개 상단). 사진 위 글자는 화면 모드와 관계없이 밝은 색 */
.hero, .page-hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; overflow: hidden; color: #f4f6f3; }
.hero { min-height: min(calc(100dvh - var(--nav-h)), 860px); padding-block: clamp(3rem, 7vw, 6rem); }
.page-hero { min-height: clamp(340px, 48vh, 480px); padding-block: clamp(2.5rem, 5vw, 4rem); }
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::after, .page-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(8 10 9 / 0.74) 0%, rgb(8 10 9 / 0.4) 52%, rgb(8 10 9 / 0.08) 100%),
    linear-gradient(180deg, rgb(8 10 9 / 0.12) 35%, rgb(8 10 9 / 0.55) 100%);
}
.page-hero .hero-img { object-position: 50% 22%; }
.hero-copy { display: grid; gap: 1.5rem; justify-items: start; }
.hero-copy .lead { max-width: 46ch; color: rgb(244 246 242 / 0.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

/* facts strip */
.facts { border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { display: grid; gap: 0.2rem; padding: 1.6rem 1.5rem; border-left: 1px solid var(--line); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact dt { font-size: 0.8rem; color: var(--muted); }
.fact dd { font-weight: 650; font-size: 1.1rem; letter-spacing: -0.01em; }

/* bento (capabilities) */
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head-row { grid-template-columns: 1fr auto; align-items: end; }
.bento { display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; gap: 1rem; }
.cell { position: relative; overflow: hidden; border-radius: var(--r-card); padding: clamp(1.4rem, 2.5vw, 2.2rem); display: flex; flex-direction: column; justify-content: flex-end; gap: 0.6rem; min-height: 230px; }
.cell p { color: inherit; opacity: 0.78; max-width: 40ch; font-size: 0.97rem; }
.cell > * { position: relative; z-index: 1; }
.cell-a { grid-row: span 2; min-height: 480px; }
.cell-b { background: var(--accent); color: var(--accent-ink); }
.has-img { color: #f4f6f3; }
.has-img p { opacity: 0.9; }
.cell > .cell-img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.has-img::after { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgb(8 10 9 / 0.05) 30%, rgb(8 10 9 / 0.8) 100%); }
.has-img:hover .cell-img { transform: scale(1.03); }

/* project cards */
.showcase { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 1rem; }
.pcard { display: flex; flex-direction: column; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: transform 0.35s var(--ease), border-color 0.25s; }
.pcard:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.thumb { position: relative; flex: 1; min-height: 180px; overflow: hidden; background: var(--bg-alt); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.pcard:hover .thumb img { transform: scale(1.04); }
.pcard-body { padding: 1.25rem 1.4rem 1.5rem; display: grid; gap: 0.5rem; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.8rem; color: var(--muted); }
.showcase .pcard:first-child { grid-row: span 2; }
.showcase .pcard:first-child .thumb { min-height: 300px; }
.showcase .pcard:not(:first-child) { flex-direction: row; }
.showcase .pcard:not(:first-child) .thumb { flex: 0 0 38%; min-height: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 650; color: var(--accent-text); }
.link-arrow .ic { transition: transform 0.25s var(--ease); }
.link-arrow:hover .ic { transform: translate(3px, -3px); }

/* culture band */
.band { background: var(--accent); color: var(--accent-ink); }
.band-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.band .display { max-width: 16ch; }
.band p { margin-top: 1.5rem; max-width: 46ch; font-size: 1.08rem; opacity: 0.85; }
.band-photo { aspect-ratio: 4 / 3; border-radius: var(--r-card); overflow: hidden; }
.band-photo img { width: 100%; height: 100%; object-fit: cover; }

/* rows (roles, careers) */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 1.35rem 0.25rem; border-bottom: 1px solid var(--line); transition: padding 0.3s var(--ease), background-color 0.2s; }
.row:hover { padding-inline: 1rem; background: var(--bg-alt); }
.row-main { display: grid; gap: 0.35rem; }
.row-sub { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.85rem; color: var(--muted); }
.row-end { display: flex; align-items: center; gap: 0.85rem; font-size: 0.85rem; color: var(--muted); }
.row.is-closed { opacity: 0.6; }

/* page heads */
.page-head { padding-block: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1.1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.grid-12 > .pcard { grid-column: span 6; }
.grid-12 > .pcard:nth-child(4n + 1), .grid-12 > .pcard:nth-child(4n + 4) { grid-column: span 7; }
.grid-12 > .pcard:nth-child(4n + 2), .grid-12 > .pcard:nth-child(4n + 3) { grid-column: span 5; }
.grid-12 > .pcard:nth-child(4n + 1):last-child { grid-column: span 12; }
.grid-12 > .pcard .thumb { flex: none; aspect-ratio: 3 / 2; min-height: 0; }
.grid-12 > .pcard:last-child:nth-child(4n + 1) .thumb { aspect-ratio: 21 / 8; }

/* about */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tile { display: grid; gap: 0.4rem; padding: 1.6rem 1.5rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.tile span { font-size: 0.85rem; color: var(--muted); }
.tile strong { font-size: 1.3rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.35; }
.prose { display: grid; gap: 1rem; max-width: 64ch; color: var(--muted); }
.prose ul { display: grid; gap: 0.4rem; padding-left: 1.1rem; list-style: disc; }
.prose h3 { color: var(--text); font-size: 1.05rem; margin-top: 0.75rem; }
.vm { background: var(--bg-alt); }
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); }
.vm p { margin-top: 1.1rem; color: var(--muted); font-size: 1.1rem; max-width: 40ch; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.values li { display: grid; gap: 0.6rem; align-content: start; padding-top: 1.2rem; border-top: 2px solid var(--text); }
.biz { display: grid; border-top: 1px solid var(--line); }
.biz-item { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 2rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.timeline { display: grid; gap: 1.6rem; margin-left: 0.5rem; padding-left: 1.75rem; border-left: 2px solid var(--line-strong); }
.timeline li { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 1rem; align-items: baseline; }
.timeline li::before { content: ''; position: absolute; left: calc(-1.75rem - 6px); top: 0.55em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.timeline time { font-family: var(--mono); font-size: 0.9rem; color: var(--accent-text); }
.loc-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.loc-photo { aspect-ratio: 16 / 10; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); }
.loc-photo img { width: 100%; height: 100%; object-fit: cover; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.9rem 2.5rem; max-width: 640px; }
.kv dt { color: var(--muted); font-size: 0.92rem; }
.kv dd { font-weight: 550; }

/* detail */
.detail-img { aspect-ratio: 16 / 8; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); margin-block: 1.5rem 2rem; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.meta { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; padding-block: 1rem; border-block: 1px solid var(--line); margin-bottom: 2rem; }
.meta div { display: grid; }
.meta dt { font-size: 0.78rem; color: var(--muted); }
.crumb { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.9rem; }
.crumb:hover { color: var(--text); }
.job-layout { display: grid; grid-template-columns: 1fr 440px; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.apply { position: sticky; top: calc(var(--nav-h) + 1.5rem); padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }

/* forms */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.5rem; }
.field label, .label { font-size: 0.88rem; font-weight: 600; }
.help { font-size: 0.8rem; color: var(--muted); }
.input, .textarea {
  width: 100%; min-height: 48px; padding: 0.7rem 0.9rem; border-radius: var(--r-input);
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; line-height: 1.5;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus-visible, .textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; border-color: transparent; }
.field.has-error .input, .field.has-error .textarea { border-color: var(--danger); }
.error { color: var(--danger); font-size: 0.82rem; display: flex; gap: 0.35rem; align-items: center; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 0.7rem; align-items: start; font-size: 0.85rem; color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent-text); }
.file-box { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.9rem; border: 1px dashed var(--line-strong); border-radius: var(--r-input); }
.file-box input { font-size: 0.85rem; max-width: 100%; }
.success { display: grid; gap: 0.6rem; justify-items: start; }
.success .ic { width: 40px; height: 40px; color: var(--accent-text); }
.empty { padding: 3rem 1.5rem; border: 1px dashed var(--line-strong); border-radius: var(--r-card); color: var(--muted); text-align: center; }

/* footer (참고 사이트처럼 어두운 푸터. 화면 모드와 관계없이 고정) */
.foot { background: #0b0e0d; color: #e9eeeb; padding-block: 3.5rem 2rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1.3fr; gap: 2rem 3rem; }
.foot h2 { font-size: 0.82rem; font-weight: 650; color: #9aa6a0; margin-bottom: 0.9rem; }
.foot li, .foot p, .foot a { font-size: 0.92rem; color: #c4cdc8; }
.foot li + li { margin-top: 0.45rem; }
.foot a:hover { color: #fff; }
.foot .brand { color: #e9eeeb; }
.foot .brand + p { margin-top: 0.75rem; max-width: 30ch; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(233 238 235 / 0.12); font-size: 0.82rem; color: #9aa6a0; }
.foot-bottom a { color: #9aa6a0; font-size: 0.82rem; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 90; padding: 0.8rem 1.2rem; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 0.9rem; font-weight: 600; pointer-events: none; transition: opacity 0.3s, transform 0.3s var(--ease); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* motion (reduced-motion 사용자는 전부 정지) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; translate: 0 22px; transition: opacity 0.8s var(--ease), translate 0.8s var(--ease), transform 0.35s var(--ease), border-color 0.25s; transition-delay: var(--d, 0ms), var(--d, 0ms), 0ms, 0ms; }
  .js [data-reveal].in { opacity: 1; translate: none; }
  .hero-copy > * { animation: rise 0.9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
  .hero-img { animation: settle 1.8s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.06); } to { transform: scale(1); } }

/* responsive */
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: absolute; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem 1.25rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.9rem 0.25rem; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .hero { min-height: 620px; }
  .hero::after, .page-hero::after { background: linear-gradient(180deg, rgb(8 10 9 / 0.35) 0%, rgb(8 10 9 / 0.82) 100%); }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .bento, .showcase, .band-grid, .vm-grid, .loc-grid, .job-layout { grid-template-columns: 1fr; grid-template-rows: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: 1fr; gap: 1.75rem; }
  .cell-a { grid-row: auto; min-height: 340px; }
  .showcase .pcard:first-child { grid-row: auto; }
  .showcase .pcard:first-child .thumb { min-height: 220px; }
  .showcase .pcard:not(:first-child) { flex-direction: column; }
  .showcase .pcard:not(:first-child) .thumb { flex: none; min-height: 180px; }
  .grid-12 > .pcard, .grid-12 > .pcard:nth-child(n) { grid-column: span 12; }
  .grid-12 > .pcard:last-child:nth-child(4n + 1) .thumb { aspect-ratio: 3 / 2; }
  .biz-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .apply { position: static; }
  .detail-img { aspect-ratio: 16 / 9; }
  .row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 0.2rem; }
  .kv dd { margin-bottom: 0.8rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.2rem; }
  .foot-grid { grid-template-columns: 1fr; }
}
