/* ===========================================================
   이음새 (eeumsae) — landing page
   Palette & system drawn from the logo: navy + coral on warm white,
   soft rounded geometry echoing the interlocking-square mark.
   =========================================================== */

:root {
  /* Brand */
  --navy: #2E3A5C;
  --navy-700: #26314e;
  --navy-900: #1b2236;
  --coral: #F0795B;
  --coral-600: #e8674a;
  --coral-tint: #fceae2;

  /* Neutrals */
  --ink: #2a3142;
  --muted: #5f6878;
  --muted-2: #8c93a3;
  --bg: #FBFAF7;
  --bg-2: #f4f1ea;
  --surface: #ffffff;
  --line: #ece6dc;
  --line-2: #e3ddd1;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(27, 34, 54, .04), 0 3px 10px rgba(27, 34, 54, .05);
  --shadow-md: 0 12px 32px rgba(27, 34, 54, .09), 0 3px 10px rgba(27, 34, 54, .05);
  --shadow-lg: 0 28px 64px rgba(27, 34, 54, .14);
  --ring: 0 0 0 4px rgba(46, 58, 92, .12);

  /* Radii */
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --pill: 999px;

  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
          'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, 'Segoe UI', Roboto, sans-serif;
  --maxw: 1120px;
}

/* ── Reset / base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -0.025em; color: var(--navy); font-weight: 800; }
strong { font-weight: 700; color: var(--navy-700); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

:where(a, button):focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  --btn-bg: var(--navy);
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 700; font-size: 1rem; line-height: 1;
  padding: 14px 22px; border-radius: var(--pill);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-700); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-2); }
.btn-ghost:hover { background: #fff; border-color: var(--navy); transform: translateY(-2px); }
.btn-lg { padding: 17px 30px; font-size: 1.06rem; }

/* ── Header ────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.8);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background-color .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(251, 250, 247, 0.92); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-weight: 800; font-size: 1.28rem; color: var(--navy); letter-spacing: -0.03em; }

.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.nav > a { font-weight: 600; font-size: .98rem; color: var(--muted); transition: color .15s ease; }
.nav > a:hover { color: var(--navy); }
.nav-cta {
  color: var(--navy) !important; font-weight: 700 !important;
  border: 1.5px solid var(--line-2); padding: 9px 18px; border-radius: var(--pill);
  transition: border-color .18s ease, background-color .18s ease;
}
.nav-cta:hover { border-color: var(--navy); background: #fff; }
@media (max-width: 680px) { .nav > a:not(.nav-cta) { display: none; } }

/* ── Hero ──────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 9vw, 104px); }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(240, 121, 91, .10), transparent 70%),
    radial-gradient(55% 55% at 92% 14%, rgba(46, 58, 92, .08), transparent 70%),
    radial-gradient(circle, rgba(46, 58, 92, .05) 1px, transparent 1px);
  background-size: auto, auto, 24px 24px;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--navy-700); font-weight: 600; font-size: .88rem;
  padding: 7px 14px; border-radius: var(--pill); box-shadow: var(--shadow-sm);
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px var(--coral-tint); }

.hero-title { font-size: clamp(2.1rem, 4.8vw, 3.4rem); margin-top: 22px; }
.hero-title .accent { color: var(--coral); }
.hero-lead { margin-top: 22px; font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: .92rem; color: var(--muted-2); }

/* Flow diagram */
.hero-visual { display: flex; justify-content: center; }
.flow-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow-lg);
}
.flow-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.flow-tag { font-weight: 700; font-size: .92rem; color: var(--navy); background: var(--bg-2); padding: 5px 12px; border-radius: var(--pill); }
.flow-live { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.flow-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #3fb27f; animation: pulse 1.6s ease-in-out infinite; }

.flow { display: flex; flex-direction: column; align-items: stretch; }
.flow-node {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 16px;
}
.flow-node .flow-ico {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  font-size: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.flow-label { font-weight: 700; font-size: .98rem; color: var(--navy); }
.flow-node.n-trigger { border-color: color-mix(in srgb, var(--navy) 25%, var(--line)); }
.flow-node.n-end { background: var(--coral-tint); border-color: color-mix(in srgb, var(--coral) 35%, var(--line)); }
.flow-node.n-end .flow-ico { border-color: color-mix(in srgb, var(--coral) 30%, var(--line)); }

/* The "seam" — animated flowing connector (vertical by default) */
.flow-edge {
  width: 3px; height: 26px; margin-inline-start: 35px; align-self: flex-start;
  position: relative; overflow: hidden;
}
.flow-edge::after {
  content: ""; position: absolute; left: 0; right: 0;
  top: -13px; height: calc(100% + 13px);
  background-image: linear-gradient(180deg, var(--coral) 0 55%, transparent 0 100%);
  background-size: 3px 13px; background-repeat: repeat-y;
  animation: flow-y .7s linear infinite;
}
@keyframes flow-y { to { transform: translateY(13px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.flow-foot { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.flow-chip { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.flow-bell { font-size: 1rem; }

/* ── About / name meaning ─────────────────────────────── */
.about { padding-block: clamp(56px, 8vw, 96px); }
.about-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-mark { color: var(--navy); }
.about-mark svg { width: clamp(96px, 14vw, 168px); height: auto; }
.eyebrow { font-weight: 700; font-size: .86rem; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); margin-bottom: 14px; }
.about-title { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
.about-body { margin-top: 18px; font-size: clamp(1.02rem, 1.4vw, 1.16rem); color: var(--muted); max-width: 40em; }

/* ── Sections / generic ───────────────────────────────── */
.section { padding-block: clamp(60px, 9vw, 120px); scroll-margin-top: 84px; }
.section-head { max-width: 40em; margin-bottom: clamp(36px, 5vw, 56px); }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
.section-lead { margin-top: 16px; font-size: clamp(1.02rem, 1.4vw, 1.16rem); color: var(--muted); }

/* Problem cards */
.problem { background: var(--bg-2); }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-ico { font-size: 30px; width: 56px; height: 56px; display: grid; place-items: center; background: var(--bg-2); border-radius: var(--r); margin-bottom: 18px; }
.card h3 { font-size: 1.18rem; }
.card p { margin-top: 10px; color: var(--muted); font-size: .98rem; }

/* How — steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px 28px; box-shadow: var(--shadow-sm); }
.step-num { display: inline-block; font-size: 1.05rem; font-weight: 800; color: var(--coral); background: var(--coral-tint); width: 44px; height: 44px; border-radius: 14px; text-align: center; line-height: 44px; margin-bottom: 18px; letter-spacing: 0; }
.step h3 { font-size: 1.2rem; }
.step p { margin-top: 10px; color: var(--muted); font-size: .98rem; }

/* Features 2x2 */
.cards-2x2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 28px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-ico { font-size: 26px; width: 54px; height: 54px; display: grid; place-items: center; background: var(--bg-2); border-radius: var(--r); margin-bottom: 18px; }
.feature h3 { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feature p { margin-top: 10px; color: var(--muted); font-size: .99rem; }
.soon { font-size: .72rem; font-weight: 700; letter-spacing: .02em; color: var(--coral-600); background: var(--coral-tint); padding: 3px 10px; border-radius: var(--pill); }

/* ── Showcase ─────────────────────────────────────────── */
.showcase-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.check-list { list-style: none; padding: 0; margin-top: 26px; display: grid; gap: 14px; }
.check-list li { position: relative; padding-left: 34px; color: var(--ink); font-weight: 500; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; display: grid; place-items: center;
  background: var(--navy); color: #fff; border-radius: 50%; font-size: .8rem; font-weight: 800;
}

/* Kakao message mock */
.showcase-phone { display: flex; justify-content: center; }
.kakao {
  width: 100%; max-width: 360px; background: #b2c7da; /* KakaoTalk chat bg */
  border-radius: var(--r-xl); padding: 22px 20px 26px; box-shadow: var(--shadow-lg);
}
.kakao-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.kakao-avatar { width: 38px; height: 38px; border-radius: 13px; background: var(--navy); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.kakao-avatar svg { width: 26px; height: 26px; }
.kakao-name { font-weight: 700; font-size: .92rem; color: #2b3a47; }
.kakao-bubble { background: #fff; border-radius: 6px 18px 18px 18px; padding: 18px 18px 16px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.kakao-bubble p { font-size: .98rem; color: #2a2f38; }
.kakao-bubble p + p { margin-top: 12px; }
.kakao-title { font-weight: 800; color: var(--navy) !important; font-size: 1.02rem !important; }
.kakao-sign { color: var(--muted) !important; }
.kakao-bubble strong { color: var(--coral-600); }
.kakao-time { display: block; margin-top: 8px; font-size: .76rem; color: #4a5b69; text-align: left; padding-left: 4px; }

/* ── Product preview (window-framed shots) ────────────── */
.section-head--center { margin-inline: auto; text-align: center; }
.product { background: var(--bg-2); }

.shot { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: #0f141b; border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
.shot-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #161c26; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.shot-bar span { width: 11px; height: 11px; border-radius: 50%; }
.shot-bar span:nth-child(1) { background: #f0795b; }
.shot-bar span:nth-child(2) { background: #f3b54e; }
.shot-bar span:nth-child(3) { background: #4aa777; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { background: var(--surface); color: var(--muted); font-size: .92rem; font-weight: 600; text-align: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.shot-narrow { max-width: 560px; margin-inline: auto; margin-top: 44px; }
.shot-wide { max-width: 1000px; margin-inline: auto; }
.shot-on-dark { background: #0f141b; border-color: rgba(255, 255, 255, .12); }

/* ── AI assistant / MCP · Skill band ──────────────────── */
.ai { background: var(--navy); color: #fff; }
.ai-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.eyebrow.on-dark { color: var(--coral); }
.ai-title { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.ai-body { margin-top: 18px; font-size: clamp(1.04rem, 1.5vw, 1.2rem); color: rgba(255, 255, 255, .82); }
.ai-list { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 13px; }
.ai-list li { position: relative; padding-left: 30px; color: rgba(255, 255, 255, .78); }
.ai-list li::before { content: "→"; position: absolute; left: 0; color: var(--coral); font-weight: 800; }
.ai-list strong { color: #fff; }
.ai-tagline { margin-top: 28px; font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.ai-tagline::before { content: ""; display: block; width: 40px; height: 3px; background: var(--coral); border-radius: 3px; margin-bottom: 14px; }

/* ── Closing CTA ──────────────────────────────────────── */
.cta { text-align: center; }
.cta-inner { max-width: 36em; margin-inline: auto; }
.cta-mark { width: 64px; height: 64px; margin: 0 auto 24px; }
.cta-title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.cta-body { margin-top: 18px; font-size: clamp(1.04rem, 1.4vw, 1.18rem); color: var(--muted); }
.cta .btn { margin-top: 30px; }
.cta-domain { margin-top: 22px; font-weight: 700; color: var(--muted-2); letter-spacing: .02em; }

/* ── Footer ───────────────────────────────────────────── */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); padding-block: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-mark { width: 28px; height: 28px; }
.footer-tagline { margin-top: 12px; font-size: .95rem; color: rgba(255,255,255,.6); }
.footer-meta { text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.footer-meta a { color: rgba(255,255,255,.82); font-weight: 600; }
.footer-meta a:hover { color: #fff; }
.footer-sep { display: none; }
.footer-copy { margin-top: 12px; font-size: .86rem; color: rgba(255,255,255,.45); }

/* ── Reveal animation ─────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: 2; }
  .about-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .showcase-inner { grid-template-columns: 1fr; }
  .ai-inner { grid-template-columns: 1fr; }
  .cards-3, .steps { grid-template-columns: 1fr; }
  .cards-2x2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; align-items: flex-start; }
}

/* ── Motion / a11y ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
