/* ============================================================
   LAPPIT — Legal pages stylesheet
   Shared tokens + base type + document layout for
   /privacy.html and /business.html
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Saira:ital,wght@0,600;0,700;0,800;0,900;1,700;1,800;1,900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  /* Carbon → Paper */
  --carbon-900: #0C0D10;
  --carbon-800: #15171C;
  --gray-600:   #4A4F58;
  --gray-500:   #6B7078;
  --gray-400:   #9AA0A6;
  --gray-300:   #C9CDD3;
  --gray-200:   #E2E4E9;
  --gray-100:   #ECEEF1;
  --paper:      #F4F4F6;
  --white:      #FFFFFF;

  /* Brand — Racing Red */
  --red-50:  #FFEAEE;
  --red-100: #FFD2DA;
  --red-500: #F50537;
  --red-600: #D10030;
  --red-700: #A60026;
  --blue-600: #1539CC;
  --blue-500: #1F4DFF;
  --volt:    #DDFF00;

  /* Semantic */
  --bg:            var(--paper);
  --surface:       var(--white);
  --surface-2:     var(--gray-100);
  --border:        var(--gray-200);
  --border-strong: var(--gray-300);
  --fg:            var(--carbon-900);
  --fg-strong:     #000000;
  --fg-muted:      var(--gray-500);
  --fg-subtle:     var(--gray-400);
  --accent:        var(--red-500);
  --accent-hover:  var(--red-600);
  --link:          var(--blue-600);
  --focus-ring:    var(--blue-500);

  /* Type */
  --font-display: "Saira", "Pretendard", system-ui, -apple-system, sans-serif;
  --font-sans:    "Pretendard", "Saira", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --w-medium:  500;
  --w-semibold:600;
  --w-bold:    700;
  --w-extra:   800;
  --w-black:   900;

  --tracking-tight: -0.02em;
  --tracking-caps:  0.12em;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(12,13,16,.08), 0 1px 2px rgba(12,13,16,.04);
  --shadow-md: 0 4px 12px rgba(12,13,16,.08), 0 2px 4px rgba(12,13,16,.05);

  --dur-fast: 120ms;

  --maxw-doc: 760px;
  --gutter: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--red-500); color: #fff; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.topbar .mark { width: 30px; height: 30px; display: block; }
.topbar .wm {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.02em;
  font-size: 22px;
  line-height: 1;
  color: var(--fg-strong);
}
.topbar .wm .pit { color: var(--accent); }
.topbar a { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.topbar a:hover { text-decoration: none; }
.topbar .back {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.topbar .back:hover { color: var(--accent); }

/* ---------- Document ---------- */
.doc {
  flex: 1;
  width: 100%;
  max-width: var(--maxw-doc);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) var(--gutter) 80px;
}
.doc .eyebrow {
  font-family: var(--font-mono);
  font-weight: var(--w-bold);
  font-size: 12px;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.doc h1 {
  font-family: var(--font-display);
  font-weight: var(--w-extra);
  font-size: clamp(2rem, 4vw + 1rem, 2.75rem);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  margin: 0 0 10px;
  color: var(--fg-strong);
}
.doc .updated {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-subtle);
  margin: 0 0 40px;
}
.doc h2 {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
  padding-top: 12px;
  color: var(--fg-strong);
}
.doc h3 {
  font-family: var(--font-sans);
  font-weight: var(--w-bold);
  font-size: 1.0625rem;
  margin: 24px 0 8px;
}
.doc p { margin: 0 0 16px; color: var(--fg); }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 0 0 8px; }
.doc strong { font-weight: var(--w-semibold); color: var(--fg-strong); }
.doc .muted { color: var(--fg-muted); }
.doc a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

/* Definition table (business info / contacts) */
.spec {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.spec th, .spec td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 1rem;
}
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th {
  width: 38%;
  font-family: var(--font-sans);
  font-weight: var(--w-semibold);
  color: var(--fg-muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.spec td { color: var(--fg-strong); font-weight: var(--w-medium); }
.spec td .mono, .spec td.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.note {
  margin-top: 28px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: var(--red-50);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.95rem;
  color: var(--fg-muted);
}

@media (max-width: 560px) {
  .spec th { width: 42%; white-space: normal; }
  .spec th, .spec td { padding: 12px 14px; }
}

/* ---------- Footer ---------- */
.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-subtle);
  flex-wrap: wrap;
}
.foot a { color: var(--fg-muted); text-decoration: none; transition: color var(--dur-fast); }
.foot a:hover { color: var(--accent); text-decoration: none; }
.foot .sep { opacity: .5; }
