/* =========================================================
   KSJ — Full-Funnel Performance Marketer Portfolio
   Shared design system
   ========================================================= */

:root {
  /* Brand */
  --navy-900: #070d24;
  --navy-800: #0b1437;
  --navy-700: #11224e;
  --navy-600: #182d63;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --cyan-400: #38bdf8;
  --cyan-300: #7dd3fc;

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Semantic */
  --bg: var(--white);
  --bg-alt: var(--gray-50);
  --ink: var(--gray-900);
  --ink-soft: var(--gray-600);
  --ink-faint: var(--gray-400);
  --line: var(--gray-200);
  --accent: var(--blue-600);

  /* Gradients */
  --grad-brand: linear-gradient(135deg, var(--blue-600) 0%, var(--cyan-400) 100%);
  --grad-navy: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-700) 55%, var(--navy-600) 100%);
  --grad-text: linear-gradient(100deg, var(--blue-500) 0%, var(--cyan-400) 100%);

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, .14), 0 4px 8px -4px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 56px -16px rgba(15, 23, 42, .22), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-blue: 0 18px 48px -12px rgba(37, 99, 235, .45);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --maxw: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
    system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: clamp(64px, 9vw, 130px) 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section--navy {
  background: var(--grad-navy);
  color: var(--white);
  overflow: hidden;
}
.section--navy .eyebrow { color: var(--cyan-300); }
.section--navy .section-title { color: var(--white); }
.section--navy .lead { color: rgba(226, 232, 240, .82); }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.section--navy .eyebrow::before { opacity: .8; }

.section-title {
  font-size: clamp(1.65rem, 3.4vw, 2.65rem);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 20px;
  text-wrap: balance;
}
.section-head { max-width: 820px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }

.lead {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: .98rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad-brand);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 24px 60px -12px rgba(37, 99, 235, .55); }
.btn--ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .25);
  color: var(--white);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }
.btn--light { background: var(--white); color: var(--navy-700); box-shadow: var(--shadow-md); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--grad-brand);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,.4), transparent 55%);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-size: 1.05rem; color: var(--navy-800); }
.logo-text span { font-size: .68rem; font-weight: 600; color: var(--ink-faint); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 10px 16px;
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--navy-700); background: var(--gray-100); }
.nav a.is-active { color: var(--navy-800); font-weight: 700; }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 3px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-brand);
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  position: relative;
  width: 20px; height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
  transition: .25s;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0;
  width: 20px; height: 2px; background: var(--navy-800); border-radius: 2px;
  transition: .25s;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

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

/* =========================================================
   Stat cards
   ========================================================= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity .3s;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--blue-400); }
.stat-card:hover::before { opacity: 1; }
.stat-num {
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--navy-800);
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
}
.stat-num .unit { font-size: .42em; font-weight: 700; color: var(--accent); letter-spacing: -0.01em; }
.stat-num .prefix { font-size: .55em; font-weight: 800; color: var(--accent); }
.stat-label { margin-top: 10px; font-size: .96rem; font-weight: 600; color: var(--ink-soft); }
.stat-sub { margin-top: 2px; font-size: .82rem; color: var(--ink-faint); }

/* Navy variant for stat cards (on dark sections) */
.section--navy .stat-card {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
}
.section--navy .stat-num { color: var(--white); }
.section--navy .stat-num .unit, .section--navy .stat-num .prefix { color: var(--cyan-300); }
.section--navy .stat-label { color: rgba(226, 232, 240, .92); }
.section--navy .stat-sub { color: rgba(148, 163, 184, .9); }

/* =========================================================
   Generic cards
   ========================================================= */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-400); }
.card-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(56,189,248,.14));
  color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 10px; font-size: 1.18rem; font-weight: 700; letter-spacing: -0.02em; color: var(--navy-800); }
.card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }

/* Problem card (warm-flag style) */
.prob-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.prob-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-left-color: var(--blue-500); }
.prob-card .x {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: rgba(239, 68, 68, .1);
  color: #ef4444;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: .9rem;
  margin-top: 1px;
}
.prob-card p { margin: 0; font-size: .97rem; color: var(--ink); font-weight: 500; }

/* Tag/chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy-700);
  background: var(--gray-100);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* =========================================================
   Step / numbered flow cards
   ========================================================= */
.step-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  height: 100%;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-no {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.step-no b {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad-brand);
  color: var(--white);
  font-size: 1rem;
}
.step-card h3 { margin: 0 0 12px; font-size: 1.15rem; font-weight: 700; color: var(--navy-800); letter-spacing: -0.02em; }
.step-card ul { display: flex; flex-direction: column; gap: 9px; }
.step-card li {
  position: relative;
  padding-left: 22px;
  font-size: .94rem;
  color: var(--ink-soft);
}
.step-card li::before {
  content: "";
  position: absolute; left: 4px; top: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan-400);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--navy-900);
  color: var(--gray-300);
  padding: 56px 0 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand .logo-mark { width: 40px; height: 40px; }
.footer-tag { font-size: 1.02rem; font-weight: 700; color: var(--white); letter-spacing: -0.01em; }
.footer-sub { font-size: .85rem; color: var(--gray-500); margin-top: 2px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { font-size: .9rem; color: var(--gray-400); transition: color .2s; }
.footer-nav a:hover { color: var(--cyan-300); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .82rem;
  color: var(--gray-500);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Contact CTA band ---------- */
.contact {
  position: relative;
  background: var(--grad-navy);
  color: var(--white);
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 82% 18%, rgba(56,189,248,.26), transparent 52%),
              radial-gradient(circle at 8% 92%, rgba(37,99,235,.32), transparent 55%);
  pointer-events: none;
}
.contact::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 70% 50%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 70% 50%, #000, transparent 72%);
  pointer-events: none;
}
.contact .container { position: relative; z-index: 1; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.contact .eyebrow { color: var(--cyan-300); }
.contact h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  text-wrap: pretty;
}
.contact h2 .gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.contact-lead {
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  color: rgba(226, 232, 240, .82);
  margin: 0 0 30px;
  max-width: 540px;
  text-wrap: pretty;
}
.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.contact-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 24px 56px -24px rgba(0,0,0,.55);
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.contact-row + .contact-row { border-top: 1px solid rgba(255,255,255,.08); }
.contact-row:hover { background: rgba(255,255,255,.06); }
a.contact-row:hover { transform: translateX(3px); }
.contact-row .ci {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.contact-row .ci svg { width: 22px; height: 22px; }
.contact-row .ct { min-width: 0; }
.contact-row .ct .k { font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cyan-300); }
.contact-row .ct .v { font-size: 1.04rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.contact-row .arr { margin-left: auto; color: rgba(148,163,184,.7); flex: none; transition: color .2s, transform .2s; }
a.contact-row:hover .arr { color: var(--cyan-300); transform: translateX(3px); }

/* Footer contact line */
.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 14px;
}
.footer-contact a, .footer-contact span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: var(--gray-300);
  transition: color .2s;
  white-space: nowrap;
}
.footer-contact a:hover { color: var(--cyan-300); }
.footer-contact svg { width: 15px; height: 15px; color: var(--gray-500); flex: none; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 14px 20px 22px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 16px; border-radius: 12px; font-size: 1rem; }
  .nav a.is-active::after { left: 16px; right: auto; width: 22px; bottom: 8px; }
}

@media (max-width: 680px) {
  .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .logo-text span { display: none; }
  .section { padding: 60px 0; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
}
