:root {
  --ink: #0b0f14;
  --muted: #5b6472;
  --faint: #9aa3b2;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --line: #e7e9ec;
  --accent: #023047;
  --accent-soft: rgba(2, 48, 71, 0.06);
  --accent-line: rgba(2, 48, 71, 0.14);
  --radius: 16px;
  --container: 1180px;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Pretendard", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
.label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent);
  display: inline-block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}
.nav-links a:hover { color: var(--ink); }
.admin-trigger {
  background: none;
  border: none;
  color: var(--faint);
  font-size: 16px;
  line-height: 1;
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s, color 0.15s;
}
.admin-trigger:hover { opacity: 1; }
.admin-trigger.is-signed-in { color: var(--accent); opacity: 1; }
.theme-toggle {
  background: none;
  border: none;
  font-size: 15px;
  line-height: 1;
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s, transform 0.15s;
}
.theme-toggle:hover { opacity: 1; transform: scale(1.08); }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---- Hero ---- */
.hero {
  padding: 96px 0 64px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: end;
}
.hero .label { margin-bottom: 22px; }
.hero .label div + div { margin-top: 2px; }
.hero h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.05;
  letter-spacing: -1.5px;
  font-weight: 700;
  margin: 0;
}
.hero-side {
  padding-bottom: 8px;
}
.hero-side p {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0 0 24px;
}
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-weight: 600;
  font-size: 14.5px;
  border: none;
  background: none;
  cursor: pointer;
}
.btn-primary { color: var(--accent); }
.btn-primary:hover { text-decoration: underline; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--accent); text-decoration: underline; }
.btn-danger { color: #c0392b; margin-right: auto; }
.btn-danger:hover { text-decoration: underline; }

/* ---- Trust strip ---- */
.trust {
  padding: 36px 0 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust .wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.trust .label { white-space: nowrap; }
.trust-items { display: flex; gap: 28px; flex-wrap: wrap; }
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14.5px;
  filter: grayscale(1);
  opacity: 0.75;
  transition: opacity 0.15s, filter 0.15s;
}
.trust-item:hover { opacity: 1; filter: grayscale(0); color: var(--accent); }
.trust-item .dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
}

/* ---- Bento services ---- */
.section { padding: 88px 0; }
.section-head { margin-bottom: 40px; max-width: 560px; }
.section-head .label { margin-bottom: 14px; }
.section-head h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.6px;
  font-weight: 700;
  margin: 0 0 10px;
}
.section-head p { color: var(--muted); margin: 0; font-size: 15.5px; }

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(200px, auto);
  grid-auto-flow: dense;
  gap: 16px;
}
.bento-card.wide { grid-column: span 4; }
.bento-card {
  grid-column: span 2;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.bento-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.bento-card.big { grid-column: span 3; grid-row: span 2; }
.bento-card.small { grid-column: span 1; }
.bento-card .label { color: var(--accent); margin-bottom: 16px; }
.bento-card h3 {
  font-size: clamp(19px, 2vw, 25px);
  letter-spacing: -0.3px;
  margin: 0 0 10px;
  font-weight: 700;
}
.bento-card p { color: var(--muted); font-size: 14.5px; margin: 0; max-width: 40ch; }
.bento-card.big p, .bento-card.wide p { max-width: none; }
.bento-card.big .bento-card-copy { position: relative; z-index: 1; }
.bento-card.big .bento-card-copy p { max-width: 30ch; }
.device-mock {
  position: absolute;
  right: -18px;
  bottom: -14px;
  width: min(62%, 420px);
  pointer-events: none;
}
.device-mock svg { width: 100%; height: auto; display: block; }
.bento-card .go {
  margin-top: 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.bento-card .go svg { width: 14px; height: 14px; transition: transform 0.15s; }
.bento-card:hover .go svg { transform: translateX(3px); }

/* ---- Content page (text-driven subpages) ---- */
.content-block { margin-bottom: 72px; }
.content-block:last-child { margin-bottom: 0; }
.content-block h3 {
  font-size: clamp(19px, 2vw, 23px);
  letter-spacing: -0.3px;
  font-weight: 700;
  margin: 0 0 14px;
}
.prose { max-width: none; }
.prose p { color: var(--muted); font-size: 16px; line-height: 1.85; margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.compare-table th, .compare-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.compare-table th {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.compare-table td { color: var(--muted); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td.win { color: var(--accent); font-weight: 700; }
.compare-table td:first-child, .compare-table th:first-child { color: var(--ink); font-weight: 600; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feature-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-card .label { color: var(--accent); margin-bottom: 12px; }
.feature-card h4 { font-size: 16px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.2px; }
.feature-card p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0; }

/* ---- Footer ---- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 28px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.footer-links a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 12.5px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card, .bento-card.big, .bento-card.wide { grid-column: span 2; grid-row: span 1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .device-mock { width: min(44%, 200px); }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 28px 24px;
    border-bottom: 1px solid var(--line);
    display: none;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero { padding: 56px 0 40px; }
  .section { padding: 60px 0; }
  .bento { grid-template-columns: 1fr; }
  .bento-card, .bento-card.big, .bento-card.wide { grid-column: span 1; }
  .feature-grid { grid-template-columns: 1fr; }
  .content-block { margin-bottom: 52px; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef1f5;
    --muted: #9aa3b2;
    --faint: #6b7280;
    --bg: #0a0d12;
    --bg-soft: #12161d;
    --line: #22262e;
    --accent: #4a9fc2;
    --accent-soft: rgba(74, 159, 194, 0.1);
    --accent-line: rgba(74, 159, 194, 0.25);
  }
  :root:not([data-theme="light"]) .site-header { background: rgba(10, 13, 18, 0.82); }
  :root:not([data-theme="light"]) .nav-links { background: #0a0d12; }
}
:root[data-theme="dark"] {
  --ink: #eef1f5;
  --muted: #9aa3b2;
  --faint: #6b7280;
  --bg: #0a0d12;
  --bg-soft: #12161d;
  --line: #22262e;
  --accent: #4a9fc2;
  --accent-soft: rgba(74, 159, 194, 0.1);
  --accent-line: rgba(74, 159, 194, 0.25);
}
:root[data-theme="dark"] .site-header { background: rgba(10, 13, 18, 0.82); }
:root[data-theme="dark"] .nav-links { background: #0a0d12; }
