/*
 * Sonsu UI — shared design tokens and primitives for public pages
 * (product, policies, sign-in, checkout). The concept is a maker's
 * workshop: warm paper, ink, and the volt accent of the Sonsu mark used
 * like a highlighter. Volt is a fill behind ink, never text on paper.
 */
:root {
  --paper: #f5f3ee;
  --paper-deep: #ece9e1;
  --card: #ffffff;
  --line: #e1ddd3;
  --line-strong: #cbc6ba;
  --ink: #151a1e;
  --ink-soft: #2e353b;
  --muted: #5d646b;
  --volt: #c8ff3d;
  --volt-deep: #a6e000;
  --volt-wash: #f1ffd2;
  --olive: #4b6a00;
  --night: #111518;
  --night-raise: #1a2025;
  --night-line: #2a3238;
  --night-text: #eef1ea;
  --night-muted: #a3ab9f;
  --danger: #b42318;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shell: 1180px;
  --gutter: 24px;
  --shadow-card: 0 1px 0 rgba(21, 26, 30, 0.04), 0 18px 40px -26px rgba(21, 26, 30, 0.34);
  --shadow-float: 0 2px 0 rgba(21, 26, 30, 0.05), 0 28px 60px -28px rgba(21, 26, 30, 0.45);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sans: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic",
    system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

p {
  margin: 0;
}

/* Ink outline with a volt halo reads on paper and white; dark sections
   switch the outline to volt. */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 6px rgba(200, 255, 61, 0.55);
}

.section-night :focus-visible,
.closing :focus-visible {
  outline-color: var(--volt);
  box-shadow: none;
}

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

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* Part tag: a small spec-sheet label with a volt square. */
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--olive);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}

.label::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--volt);
  box-shadow: 0 0 0 1.5px var(--ink);
}

.label-night {
  color: var(--volt);
}

.label-night::before {
  box-shadow: 0 0 0 1.5px var(--volt);
  background: transparent;
}

/* Highlighter stroke behind ink text. */
.hl {
  padding: 0 0.06em;
  background: linear-gradient(
    180deg,
    transparent 58%,
    var(--volt) 58%,
    var(--volt) 92%,
    transparent 92%
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 680;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-ink {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(21, 26, 30, 0.7);
}

.btn-ink:hover {
  background: var(--ink-soft);
}

.btn-volt {
  background: var(--volt);
  color: var(--ink);
  border-color: var(--ink);
}

.btn-volt:hover {
  background: #d6ff6a;
}

.btn-line {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-strong);
}

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

.btn-ghost-night {
  background: transparent;
  color: var(--night-text);
  border-color: var(--night-line);
}

.btn-ghost-night:hover {
  border-color: var(--night-muted);
}

.btn-lg {
  min-height: 54px;
  padding: 0 26px;
  border-radius: 12px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn[aria-disabled="true"],
.btn:disabled {
  cursor: not-allowed;
  transform: none;
  background: var(--paper-deep);
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 620;
  line-height: 1;
  white-space: nowrap;
}

.chip-volt {
  border-color: var(--ink);
  background: var(--volt);
  color: var(--ink);
}

/* Site header shared by product and policy pages. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(245, 243, 238, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  transition: border-color 0.2s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.brand-word {
  font-size: 20px;
  font-weight: 820;
  letter-spacing: -0.03em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-login {
  padding: 8px 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.header-login:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Footer shared by product and policy pages. */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 14px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding: 56px 0 40px;
}

.footer-brand p {
  max-width: 300px;
  margin-top: 14px;
  color: var(--muted);
}

.footer-col h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.business-info {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin: 0;
}

.business-info div {
  display: flex;
  gap: 6px;
}

.business-info dt {
  color: var(--muted);
}

.business-info dd {
  margin: 0;
  color: var(--ink-soft);
}

/* Document pages (policies): readable prose with a section index. */
.doc {
  padding: 56px 0 96px;
}

.doc-head {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin-bottom: 40px;
}

.doc-head h1 {
  font-size: clamp(32px, 4.4vw, 48px);
}

.doc-meta {
  color: var(--muted);
  font-size: 14px;
}

.doc-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 56px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 14px;
}

.doc-toc strong {
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.doc-toc a {
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--ink-soft);
  text-decoration: none;
}

.doc-toc a:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.doc-body {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.doc-body section + section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.doc-body h2 {
  margin-bottom: 14px;
  font-size: 21px;
}

.doc-body p,
.doc-body li {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.doc-body p + p {
  margin-top: 12px;
}

.doc-body ul,
.doc-body ol {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.doc-body table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 14px;
}

.doc-body th,
.doc-body td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc-body th {
  background: var(--paper);
  font-weight: 700;
}

.doc-callout {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--ink);
  border-radius: 0 10px 10px 0;
  background: var(--volt-wash);
  color: var(--ink);
  font-size: 15px;
}

.doc-body a {
  color: var(--ink);
  font-weight: 650;
  text-underline-offset: 3px;
}

@media (max-width: 960px) {
  .site-nav {
    display: none;
  }

  .doc-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .doc-toc {
    position: static;
  }

  .header-inner {
    justify-content: space-between;
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 16px;
  }

  .header-login {
    padding: 8px 6px;
  }

  .header-actions .btn {
    min-height: 40px;
    padding: 0 14px;
  }

  .btn-lg {
    min-height: 52px;
    padding: 0 20px;
  }

  .doc-body {
    padding: 24px 20px;
  }

  .doc-body table {
    display: block;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
