/* OnNode — site stylesheet
   One accent (status-on green), ink type on white, Pretendard only.
   All colors are tokens; dark mode redefines them below. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --surface: #f5f6f7;
  --ink: #15181d;
  --ink-2: #4b5260;
  --ink-3: #5f6673;
  --rule: #e2e5e9;
  --rule-strong: #c4cad3;
  --accent: #087a4f;
  --accent-hover: #06663f;
  --on-accent: #ffffff;
  --accent-tint: #e9f5ef;
  --led: #17b26a;
  --led-halo: rgba(23, 178, 106, 0.22);
  --focus: #087a4f;
  --field-disabled: #f0f1f3;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic",
    "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --step-4: clamp(2rem, 1.3rem + 3.2vw, 3.5rem);
  --step-4s: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);

  --gutter: 1rem;
  --max: 72rem;
  --radius: 10px;
  --section: clamp(3.5rem, 2.5rem + 4vw, 6rem);
}

@media (min-width: 40em) {
  :root { --gutter: 1.5rem; }
}

@media (min-width: 64em) {
  :root { --gutter: 2rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --surface: #191c20;
    --ink: #eceef1;
    --ink-2: #b6bcc6;
    --ink-3: #9ca3ae;
    --rule: #2a2e35;
    --rule-strong: #3d434c;
    --accent: #3ccb8a;
    --accent-hover: #5fd8a0;
    --on-accent: #06150e;
    --accent-tint: #142a20;
    --led: #3ccb8a;
    --led-halo: rgba(60, 203, 138, 0.25);
    --focus: #5fd8a0;
    --field-disabled: #1d2025;
  }
}

/* ---------- Base ---------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.num { font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: var(--gutter);
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

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

.site-header { border-bottom: 1px solid var(--rule); }

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  min-height: 4.25rem;
  padding-block: 0.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 48px;
  color: var(--ink);
  font-size: 1.3125rem;
  font-weight: 760;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.wordmark-dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0 4px var(--led-halo);
}

/* The one page-load moment: the indicator switches on, home page only. */
.home .site-header .wordmark-dot { animation: led-on 700ms ease-out 250ms both; }

@keyframes led-on {
  from {
    background: var(--rule-strong);
    box-shadow: 0 0 0 0 transparent;
  }
  to {
    background: var(--led);
    box-shadow: 0 0 0 4px var(--led-halo);
  }
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 -0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.5rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover { color: var(--ink); }

.site-nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.site-nav .nav-quote { color: var(--accent); }

@media (min-width: 40em) {
  .site-nav ul { gap: 0.5rem; }
  .site-nav a { padding: 0 0.75rem; }
  .site-nav ul { margin-right: -0.75rem; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--bg);
  border-color: var(--rule-strong);
  color: var(--ink);
}

.btn-secondary:hover { border-color: var(--ink-2); }

.btn-small {
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
}

.btn:disabled {
  background: var(--field-disabled);
  border-color: var(--rule);
  color: var(--ink-3);
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Home ---------- */

.hero {
  padding-block: clamp(3.5rem, 2rem + 6vw, 7.5rem) var(--section);
}

.hero h1 {
  max-width: 15em;
  font-size: var(--step-4);
  font-weight: 750;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.hero .lead {
  max-width: 36em;
  margin-top: 1.75rem;
  color: var(--ink-2);
  font-size: var(--step-1);
  line-height: 1.75;
}

.hero .actions { margin-top: 2.25rem; }

.band {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 2rem;
}

.section-head h2 { font-size: var(--step-3); }

.section-head a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* Category tiles: one panel split by hairlines, not floating cards. */
.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 40em) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (min-width: 64em) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tiles > :last-child:nth-child(odd) { grid-column: auto; }
}

.tile {
  position: relative;
  padding: 1.5rem 1.5rem 1.75rem;
  background: var(--bg);
  transition: background-color 150ms ease;
}

.tile:hover { background: var(--accent-tint); }

.tile h3 {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: var(--step-1);
}

.tile h3 a {
  color: var(--ink);
  text-decoration: none;
}

.tile h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.tile h3 a:focus-visible { outline: none; }

.tile h3 a:focus-visible::after {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.tile p {
  margin-top: 0.625rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.led {
  flex: none;
  display: inline-block;
  margin-top: 0.55em;
  margin-top: calc((1lh - 0.4375rem) / 2);
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0 3px var(--led-halo);
}

.app-row {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: start;
}

@media (min-width: 48em) {
  .app-row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}

.app-row h3 { font-size: var(--step-2); }

.app-row p {
  max-width: 34em;
  margin-top: 0.75rem;
  color: var(--ink-2);
}

.cta-band .container {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: end;
}

@media (min-width: 48em) {
  .cta-band .container { grid-template-columns: minmax(0, 1fr) auto; }
}

.cta-band h2 { font-size: var(--step-3); }

.cta-band p {
  max-width: 34em;
  margin-top: 0.75rem;
  color: var(--ink-2);
}

/* ---------- Sub pages ---------- */

.page-head {
  padding-block: clamp(2.75rem, 1.5rem + 4vw, 4.5rem) clamp(2rem, 1.5rem + 2vw, 3rem);
}

.page-head h1 {
  font-size: var(--step-4s);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.page-head .lead {
  max-width: 38em;
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: var(--step-1);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--ink-3);
}

.crumbs li + li::before {
  content: "/";
  margin: 0 0.625rem;
  color: var(--rule-strong);
}

.crumbs a { color: var(--ink-2); }

/* ---------- Solutions catalog ---------- */

.catalog {
  display: grid;
  gap: 2rem;
  padding-bottom: var(--section);
}

@media (min-width: 64em) {
  .catalog {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    gap: 4rem;
  }
}

.catalog-nav h2 {
  margin-bottom: 0.75rem;
  color: var(--ink-3);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0;
}

.catalog-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.catalog-nav a:hover {
  border-color: var(--rule-strong);
  color: var(--ink);
}

@media (min-width: 64em) {
  .catalog-nav > div {
    position: sticky;
    top: 1.5rem;
  }

  .catalog-nav ul {
    flex-direction: column;
    gap: 0;
    border-left: 1px solid var(--rule);
  }

  .catalog-nav a {
    width: 100%;
    margin-left: -1px;
    padding: 0.375rem 0 0.375rem 1rem;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
  }

  .catalog-nav a:hover { border-left-color: var(--accent); }
}

.category {
  padding-block: 2.5rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1rem;
}

.category:first-child {
  padding-top: 0;
  border-top: 0;
}

.category > h2 {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: var(--step-3);
}

.category-note {
  max-width: 38em;
  margin-top: 0.75rem;
  color: var(--ink-2);
}

.group { margin-top: 1.75rem; scroll-margin-top: 1rem; }

.group > h3 {
  margin-bottom: 0.5rem;
  color: var(--ink-2);
  font-size: var(--step-0);
  font-weight: 650;
  letter-spacing: 0;
}

.products {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 1.5rem;
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 40em) {
  .product {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.product-name {
  font-size: var(--step-1);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.product-desc {
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.product .btn { justify-self: start; }

.group:last-child .product:last-child { border-bottom: 0; }

.fineprint {
  max-width: 44em;
  margin-top: 2.5rem;
  color: var(--ink-3);
  font-size: var(--step--1);
  line-height: 1.65;
}

/* ---------- Quote ---------- */

.quote-layout {
  display: grid;
  gap: 2.5rem;
  padding-bottom: var(--section);
}

@media (min-width: 64em) {
  .quote-layout {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 4rem;
    align-items: start;
  }
}

.notice {
  padding: 1.5rem;
  background: var(--accent-tint);
  border-radius: var(--radius);
}

.notice-title {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.5;
}

.notice .btn { margin-top: 1.25rem; }

.notice-detail {
  margin-top: 1.25rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.notice-detail p + p { margin-top: 0.375rem; }

.selected-item {
  margin-top: 1rem;
  font-size: 0.9375rem;
}

.mail-template {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 0.9375rem;
}

.mail-template p { color: var(--ink-3); font-size: var(--step--1); }

.mail-template ul {
  margin: 0.5rem 0 0;
  padding-left: 1.125rem;
}

.form-preview {
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  min-width: 0;
}

.form-preview legend {
  padding: 0 0.5rem;
  margin-left: -0.5rem;
  font-weight: 700;
}

.form-preview .form-hint {
  margin-bottom: 1.25rem;
  color: var(--ink-3);
  font-size: 0.9375rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 40em) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field-full { grid-column: 1 / -1; }
}

.field label {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.field textarea { min-height: 9rem; resize: vertical; }

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: var(--field-disabled);
  border-color: var(--rule);
  color: var(--ink-2);
  cursor: not-allowed;
  opacity: 1;
}

.form-preview .actions { margin-top: 1.5rem; }

/* ---------- App page ---------- */

.feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: 0;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 48em) {
  .feature-list { grid-template-columns: repeat(2, 1fr); }
  .feature-list > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.feature-list > div {
  padding: 1.375rem 1.5rem;
  background: var(--bg);
}

.feature-list dt {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-weight: 700;
}

.feature-list dd {
  margin: 0.375rem 0 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.stack > * + * { margin-top: 1rem; }

.app-section {
  padding-block: 2.5rem;
  border-top: 1px solid var(--rule);
}

.app-section h2 {
  margin-bottom: 1rem;
  font-size: var(--step-2);
}

.app-section p { max-width: 38em; color: var(--ink-2); }

.app-section .actions { margin-top: 1.5rem; }

.app-section:last-child { padding-bottom: var(--section); }

.page-head + .app-section {
  padding-top: 0;
  border-top: 0;
}

/* ---------- Prose (policy / support) ---------- */

.prose {
  max-width: 44rem;
  padding-bottom: var(--section);
}

.prose > * + * { margin-top: 1rem; }

.prose h2 {
  margin-top: 2.75rem;
  font-size: var(--step-2);
}

.prose h3 {
  margin-top: 2rem;
  font-size: var(--step-1);
}

.prose h4 {
  margin-top: 1.5rem;
  font-size: var(--step-0);
}

.prose h2 + *,
.prose h3 + *,
.prose h4 + * { margin-top: 0.75rem; }

.prose ul,
.prose ol {
  margin-bottom: 0;
  padding-left: 1.375rem;
}

.prose li + li,
.prose li > ul,
.prose li > ol { margin-top: 0.375rem; }

.prose hr {
  margin-block: 2.5rem;
  border: 0;
  border-top: 1px solid var(--rule);
}

.prose blockquote {
  margin-inline: 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: 8px;
  color: var(--ink-2);
}

.prose blockquote > * + * { margin-top: 0.5rem; }

.prose code {
  padding: 0.1em 0.35em;
  background: var(--surface);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.875em;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.prose th,
.prose td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
  min-width: 7rem;
}

.prose th {
  background: var(--surface);
  font-weight: 650;
}

.prose tr:last-child td { border-bottom: 0; }

/* Owner decisions still open in the source drafts ([오너 확인], [확인 필요]). */
.prose mark.todo {
  padding: 0 0.2em;
  background: var(--surface);
  color: inherit;
  border-radius: 3px;
  outline: 1px dashed var(--ink-3);
  outline-offset: -1px;
}

.placeholder {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
}

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

.site-footer {
  padding-block: 3rem 2.5rem;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1.75rem;
}

.footer-top .wordmark { font-size: 1.125rem; }

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
}

.biz {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2.5rem;
  margin: 0;
}

@media (min-width: 48em) {
  .biz { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.biz > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
}

.biz dt { color: var(--ink-3); }

.biz dd {
  margin: 0;
  color: var(--ink);
}

.biz a { color: var(--ink); }

.copyright {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
}
