/* ==========================================================================
   SLP Lab theme
   ========================================================================== */

:root {
	--ink: #0e1726;
	--ink-2: #3b4658;
	--ink-3: #6b7587;
	--line: #e3e6ec;
	--paper: #ffffff;
	--paper-2: #f5f6f8;
	--navy: #0b1f3a;
	--accent: #2455e6;
	--accent-ink: #1a43bd;
	--accent-soft: #e8eefd;
	--speech: #5b3fd6;
	--speech-soft: #efebfd;
	--nlp: #0b8a7c;
	--nlp-soft: #e2f5f2;
	--live: #0a7a3c;
	--live-soft: #dcf4e5;
	--dev: #8a5a00;
	--dev-soft: #fcefc7;
	--planned: #1d4ea1;
	--planned-soft: #e3ecfb;

	--radius: 14px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(14, 23, 38, .04), 0 8px 24px rgba(14, 23, 38, .06);
	--shadow-lg: 0 2px 4px rgba(14, 23, 38, .05), 0 18px 40px rgba(14, 23, 38, .10);
	--container: 1180px;
	--gutter: clamp(16px, 4vw, 32px);
	--header-h: 72px;

	--font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

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

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }

[hidden] { display: none !important; }

.icon { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- Buttons & links ---------- */

.btn {
	display: inline-flex; align-items: center; gap: .45em;
	padding: .8em 1.35em; border-radius: 999px; border: 1px solid transparent;
	font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2;
	cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
	white-space: nowrap;
}
.btn .icon { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-primary:hover .icon-arrow { transform: translateX(2px); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-muted { background: var(--paper-2); color: var(--ink-3); cursor: default; }
.btn-sm { padding: .55em 1em; font-size: 13.5px; }
.icon-arrow { transition: transform .2s; }

.text-link { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; color: var(--accent); }
.text-link:hover .icon-arrow { transform: translateX(3px); }

.eyebrow {
	margin: 0 0 .9rem; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}

/* ---------- Header ---------- */

.site-header {
	position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
	background: rgba(255, 255, 255, .86);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { max-height: 40px; width: auto; }
.brand-mark { display: inline-flex; align-items: center; gap: 3px; height: 28px; padding: 0 7px; background: var(--navy); border-radius: 8px; }
.brand-mark i { display: block; width: 3px; border-radius: 2px; background: #fff; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 11px; background: #8fb0ff; }
.brand-mark i:nth-child(4) { height: 5px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; letter-spacing: -0.01em; }
.brand-text small { font-size: 11px; color: var(--ink-3); letter-spacing: .02em; }

.site-nav .menu { display: flex; gap: 6px; list-style: none; }
.site-nav a { display: block; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--ink-2); transition: background .2s, color .2s; }
.site-nav a:hover { background: var(--paper-2); color: var(--ink); }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--accent); background: var(--accent-soft); }

.nav-toggle { display: none; border: 0; background: none; padding: 8px; margin-right: -8px; color: var(--ink); cursor: pointer; }
.nav-toggle .icon { width: 26px; height: 26px; }

@media (max-width: 760px) {
	.nav-toggle { display: block; }
	.site-nav {
		position: absolute; inset: var(--header-h) 0 auto 0;
		background: var(--paper); border-bottom: 1px solid var(--line);
		padding: 8px var(--gutter) 16px;
		display: none;
	}
	.site-nav.is-open { display: block; }
	.site-nav .menu { flex-direction: column; gap: 2px; }
	.site-nav a { padding: 12px 14px; border-radius: var(--radius-sm); }
	.brand-text small { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(56px, 8vw, 104px); }
.section-title { font-size: clamp(26px, 3.4vw, 38px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }

.page-hero { padding-block: clamp(48px, 7vw, 88px) clamp(32px, 4vw, 48px); background: var(--paper-2); border-bottom: 1px solid var(--line); }
.page-title { font-size: clamp(32px, 5vw, 52px); letter-spacing: -0.03em; }
.page-lead { margin-top: 16px; max-width: 46em; font-size: clamp(16px, 1.6vw, 18px); color: var(--ink-2); }

.empty { padding: 48px 16px; text-align: center; color: var(--ink-3); background: var(--paper-2); border-radius: var(--radius); }

/* ---------- Hero ---------- */

.hero {
	position: relative; overflow: hidden;
	background:
		radial-gradient(900px 480px at 85% 10%, rgba(36, 85, 230, .10), transparent 60%),
		radial-gradient(700px 420px at 0% 100%, rgba(11, 138, 124, .08), transparent 60%),
		var(--paper);
	padding-block: clamp(56px, 9vw, 120px) clamp(56px, 8vw, 104px);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-title {
	font-size: clamp(34px, 5.6vw, 64px); line-height: 1.16; letter-spacing: -0.035em; font-weight: 800;
	animation: rise .8s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-lead { margin-top: 24px; max-width: 34em; font-size: clamp(16px, 1.7vw, 19px); color: var(--ink-2); animation: rise .8s .12s cubic-bezier(.2, .7, .2, 1) both; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; animation: rise .8s .22s cubic-bezier(.2, .7, .2, 1) both; }
.hero .eyebrow { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }

.hero-visual {
	position: relative; padding: 32px; border-radius: 24px;
	background: var(--navy); color: #fff; box-shadow: var(--shadow-lg);
	animation: rise .9s .15s cubic-bezier(.2, .7, .2, 1) both;
}
.wave { display: flex; align-items: center; gap: 5px; height: 120px; }
.wave i {
	flex: 1; height: 100%; border-radius: 3px;
	background: linear-gradient(180deg, #8fb0ff, #5b7cff);
	transform-origin: center; transform: scaleY(.15);
	animation: wave 1.6s ease-in-out infinite;
	animation-delay: calc(var(--i) * -0.11s);
}
.wave i:nth-child(3n) { animation-duration: 1.9s; }
.wave i:nth-child(4n+1) { animation-duration: 1.3s; }
.transcript { display: grid; gap: 10px; margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); }
.t-line {
	display: block; height: 10px; width: var(--w); border-radius: 5px; background: rgba(255, 255, 255, .22);
	transform-origin: left; animation: type 5s ease-in-out infinite;
}
.t-line:nth-child(2) { animation-delay: .35s; }
.t-line:nth-child(3) { animation-delay: .7s; }
.t-line:nth-child(4) { animation-delay: 1.05s; }
.t-accent { background: #5ee0cf; }
.hero-labels { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; font-size: 13px; font-weight: 600; letter-spacing: .06em; color: rgba(255, 255, 255, .7); }
.hero-labels .arrow { color: rgba(255, 255, 255, .35); }

@keyframes wave { 0%, 100% { transform: scaleY(.15); } 50% { transform: scaleY(1); } }
@keyframes type { 0% { transform: scaleX(0); } 30%, 80% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
	.hero-inner { grid-template-columns: 1fr; }
	.hero-visual { padding: 24px; }
	.wave { height: 84px; }
}

/* ---------- Intro ---------- */

.intro { border-top: 1px solid var(--line); }
.intro-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.intro-body { font-size: clamp(16px, 1.6vw, 18px); color: var(--ink-2); }
.intro-body .text-link { margin-top: 20px; }
@media (max-width: 760px) { .intro-inner { grid-template-columns: 1fr; } }

/* ---------- Mission ---------- */

.mission { background: var(--paper-2); }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.mission-card {
	display: flex; flex-direction: column; gap: 12px; padding: 32px 28px;
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
	transition: transform .25s, box-shadow .25s, border-color .25s;
}
.mission-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.mission-card h3 { font-size: 21px; margin-top: 8px; }
.mission-card p { color: var(--ink-3); }
.mission-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.mission-icon .icon { width: 28px; height: 28px; }
@media (max-width: 860px) { .mission-grid { grid-template-columns: 1fr; } }

/* ---------- Service cards ---------- */

.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.svc-grid--featured { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.svc-card {
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
	transition: transform .25s, box-shadow .25s, border-color .25s;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.svc-card.is-hidden { display: none; }

.svc-media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.svc-card:hover .svc-media img { transform: scale(1.04); }
.svc-placeholder { display: grid; place-items: center; width: 100%; height: 100%; }
.svc-placeholder .icon { width: 56px; height: 56px; stroke-width: 1.5; }
.svc-placeholder--speech { background: linear-gradient(135deg, var(--speech-soft), #fff); color: var(--speech); }
.svc-placeholder--nlp { background: linear-gradient(135deg, var(--nlp-soft), #fff); color: var(--nlp); }

.svc-status {
	position: absolute; top: 12px; right: 12px;
	padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4;
	background: rgba(255, 255, 255, .92); box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.svc-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 2px; }
.svc-status--live { color: var(--live); }
.svc-status--dev { color: var(--dev); }
.svc-status--planned { color: var(--planned); }
.svc-status--inline { position: static; box-shadow: none; list-style: none; }
.svc-status--inline.svc-status--live { background: var(--live-soft); }
.svc-status--inline.svc-status--dev { background: var(--dev-soft); }
.svc-status--inline.svc-status--planned { background: var(--planned-soft); }

.svc-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-bottom: 12px; }
.svc-tag { padding: 3px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--paper-2); }
.svc-tag--speech { color: var(--speech); background: var(--speech-soft); }
.svc-tag--nlp { color: var(--nlp); background: var(--nlp-soft); }
.svc-title { font-size: 19px; }
.svc-title a:hover { color: var(--accent); }
.svc-short { margin-top: 8px; color: var(--ink-3); font-size: 15px; line-height: 1.6; }
.svc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 20px; }

.services { padding-top: clamp(32px, 4vw, 48px); }

/* ---------- Services toolbar ---------- */

.svc-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 999px; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); transition: background .2s, color .2s; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(14, 23, 38, .12); }
.tab-count { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.tab[aria-selected="true"] .tab-count { color: var(--accent); }

.search { position: relative; display: block; flex: 0 1 300px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search input {
	width: 100%; padding: 11px 16px 11px 42px; border: 1px solid var(--line); border-radius: 999px;
	font: inherit; font-size: 15px; background: var(--paper); color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
@media (max-width: 640px) {
	.search { flex-basis: 100%; }
	.tabs { width: 100%; border-radius: var(--radius-sm); }
	.tab { flex: 1 1 auto; justify-content: center; border-radius: 6px; padding: 9px 10px; font-size: 13.5px; }
}

/* ---------- About ---------- */

.vision-inner { display: grid; grid-template-columns: 220px 1fr; gap: clamp(20px, 5vw, 64px); }
.vision-label { font-size: 15px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.vision-body { font-size: clamp(18px, 2vw, 22px); line-height: 1.75; color: var(--ink); font-weight: 500; }
.vision-body p + p { color: var(--ink-2); font-weight: 400; font-size: .88em; }
@media (max-width: 760px) { .vision-inner { grid-template-columns: 1fr; } }

.philosophy { background: var(--paper-2); }
.philosophy-list { list-style: none; margin-top: 40px; display: grid; gap: 20px; }
.philosophy-item {
	display: grid; grid-template-columns: 160px 1fr; gap: clamp(20px, 4vw, 48px);
	padding: clamp(24px, 4vw, 44px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.philosophy-head { display: flex; flex-direction: column; gap: 16px; }
.philosophy-num { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--line); }
.philosophy-text h3 { font-size: clamp(22px, 2.6vw, 28px); }
.philosophy-summary { margin-top: 6px; font-weight: 600; color: var(--accent); }
.philosophy-text p:not(.philosophy-summary) { color: var(--ink-2); font-size: 16.5px; }
.philosophy-text .philosophy-summary + p { margin-top: 16px; }
@media (max-width: 760px) {
	.philosophy-item { grid-template-columns: 1fr; }
	.philosophy-head { flex-direction: row; align-items: center; justify-content: space-between; }
}

.cta-band { background: var(--navy); color: #fff; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-inner h2 { font-size: clamp(22px, 3vw, 30px); }

/* ---------- Service detail ---------- */

.back-link { display: inline-block; margin-bottom: 20px; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.back-link:hover { color: var(--accent); }
.svc-detail .page-hero .svc-tags { margin-bottom: 16px; }
.svc-detail .page-hero .svc-actions { padding-top: 28px; }
.svc-detail-body { max-width: 860px; }
.svc-detail-media { margin: 0 0 40px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.svc-detail-media img { width: 100%; }

/* ---------- Prose (editor content) ---------- */

.prose { max-width: 760px; font-size: 17px; color: var(--ink-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 26px; color: var(--ink); margin-top: 2em; }
.prose h3 { font-size: 21px; color: var(--ink); margin-top: 1.6em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose img { border-radius: var(--radius-sm); }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--ink); }
.prose code { padding: 2px 6px; border-radius: 4px; background: var(--paper-2); font-size: .9em; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.post-list { list-style: none; }
.post-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-list time { color: var(--ink-3); font-size: 14px; white-space: nowrap; }

/* ---------- Footer ---------- */

.site-footer { padding-block: 48px calc(40px + env(safe-area-inset-bottom, 0px)); background: #0a1424; color: rgba(255, 255, 255, .7); font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; }
.footer-brand strong { font-size: 17px; color: #fff; }
.footer-brand p { margin-top: 4px; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; font-style: normal; text-align: right; }
.footer-contact a:hover { color: #fff; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; }
.footer-nav a:hover { color: #fff; }
.footer-copy { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: rgba(255, 255, 255, .45); }
@media (max-width: 640px) {
	.footer-inner { grid-template-columns: 1fr; }
	.footer-contact { text-align: left; }
}

/* ---------- Motion ---------- */

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.wave i { transform: scaleY(.55); }
	.wave i:nth-child(odd) { transform: scaleY(.3); }
	.reveal { opacity: 1; transform: none; }
}
