/* =========================================================
   Latte Beaver Pension Design System — lb-design-system.css
   beaver-pension.com | prefix: lb-
   ========================================================= */

:root {
  /* Brand Core */
  --color-brown-900: #3a1f10;
  --color-brown-800: #4b2814;
  --color-brown-700: #653615;
  --color-brown-600: #7a451f;
  --color-brown-500: #9a6338;

  /* Cream / Latte */
  --color-cream-50:  #fffaf3;
  --color-cream-100: #fff4e7;
  --color-cream-200: #f8ead8;
  --color-cream-300: #efd8bd;

  /* Beige */
  --color-beige-50:  #fffdf8;
  --color-beige-100: #faf2e8;
  --color-beige-200: #f0dfcc;
  --color-beige-300: #dfc2a2;

  /* Accent */
  --color-caramel:   #c8874a;
  --color-latte:     #e6b17a;
  --color-peach:     #f7c6a3;
  --color-mint-soft: #cfd9c4;

  /* Text */
  --color-text-main:  #3b2417;
  --color-text-sub:   #6d5849;
  --color-text-muted: #9a8778;
  --color-white:      #ffffff;

  /* UI */
  --color-border:       #ead9c7;
  --color-border-light: #f1e4d6;
  --shadow-soft:   0 8px 24px rgba(78, 43, 20, 0.08);
  --shadow-card:   0 4px 14px rgba(78, 43, 20, 0.07);
  --shadow-button: 0 4px 10px rgba(78, 43, 20, 0.14);

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-pill: 999px;

  /* Layout */
  --container-width: 1120px;
  --section-y:       72px;

  /* Font */
  --font-sans: "Pretendard", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Noto Serif KR", serif;
  --font-hand: "Nanum Pen Script", "Gaegu", cursive;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background:
    radial-gradient(circle at top left, rgba(246, 211, 176, 0.22), transparent 28%),
    linear-gradient(180deg, var(--color-cream-50) 0%, #fffaf5 45%, var(--color-beige-50) 100%);
  line-height: 1.65;
  letter-spacing: -0.025em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6,
p, li, a, button {
  word-break: keep-all;
  overflow-wrap: break-word;
}

code, pre, .lb-table {
  word-break: normal;
  overflow-wrap: normal;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea,
select {
  font-family: inherit;
}

/* ─── Layout ─── */
.lb-container {
  width: min(100% - 40px, var(--container-width));
  margin: 0 auto;
}

.lb-section {
  padding: var(--section-y) 0;
}

.lb-section-sm {
  padding: 48px 0;
}

.lb-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.lb-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.lb-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* ─── Header ─── */
.lb-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 243, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border-light);
}

.lb-header-inner {
  width: min(100% - 40px, var(--container-width));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lb-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(15px, 4.5vw, 26px);
  font-weight: 800;
  color: var(--color-brown-800);
  letter-spacing: -0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.lb-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-sub);
}

.lb-nav a {
  transition: color 0.18s ease;
}

.lb-nav a:hover {
  color: var(--color-brown-700);
}

/* ─── Buttons ─── */
.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease;
}

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

.lb-btn-primary {
  color: var(--color-white);
  background: var(--color-brown-700);
  box-shadow: var(--shadow-button);
}

.lb-btn-primary:hover {
  background: var(--color-brown-800);
}

.lb-btn-outline {
  color: var(--color-brown-700);
  background: rgba(255, 255, 255, 0.64);
  border-color: var(--color-brown-500);
}

.lb-btn-outline:hover {
  background: var(--color-cream-100);
}

.lb-btn-pill {
  border-radius: var(--radius-pill);
}

/* ─── Typography ─── */
.lb-eyebrow {
  margin: 0 0 12px;
  color: var(--color-brown-600);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lb-eyebrow-hand {
  margin: 0 0 12px;
  color: var(--color-brown-600);
  font-family: var(--font-hand);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lb-title-xl {
  margin: 0;
  color: var(--color-brown-900);
  font-size: clamp(36px, 6vw, 74px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.065em;
  text-wrap: pretty;
}

.lb-title-lg {
  margin: 0;
  color: var(--color-brown-900);
  font-size: clamp(29px, 4vw, 46px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-wrap: pretty;
}

.lb-title-md {
  margin: 0;
  color: var(--color-brown-900);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-wrap: pretty;
}

.lb-subtitle {
  margin: 16px 0 0;
  color: var(--color-text-sub);
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: -0.04em;
  text-wrap: pretty;
}

.lb-body {
  margin: 16px 0 0;
  color: var(--color-text-sub);
  font-size: 17px;
  line-height: 1.78;
  text-wrap: pretty;
}

/* ─── Cards ─── */
.lb-card {
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.lb-card-padded {
  padding: 28px;
}

.lb-soft-panel {
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.92), rgba(250, 242, 232, 0.88));
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.lb-card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--color-cream-100);
  font-size: 22px;
}

.lb-card-desc {
  margin: 10px 0 0;
  color: var(--color-text-sub);
  font-size: 15px;
  line-height: 1.65;
  text-wrap: pretty;
}

.lb-card-link {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  color: var(--color-brown-700);
  font-size: 15px;
  font-weight: 800;
  transition: color 0.18s ease;
}

.lb-card-link:hover {
  color: var(--color-brown-900);
}

/* ─── Hero ─── */
.lb-hero {
  padding: 44px 0 36px;
}

.lb-hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
}

.lb-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.lb-trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.lb-trust-list li {
  padding: 7px 14px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.62);
  color: var(--color-brown-700);
  font-size: 14px;
  font-weight: 700;
}

.lb-hero-visual {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 42% 36%, rgba(255, 255, 255, 0.9), transparent 30%),
    linear-gradient(145deg, #fff5e8, #f9e5ce);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-soft);
}

.lb-mascot-card {
  width: min(82%, 320px);
  padding: 32px 24px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--color-border-light);
}

.lb-mascot-placeholder {
  font-size: 88px;
  line-height: 1;
}

.lb-mascot-card p {
  margin: 16px 0 0;
  color: var(--color-brown-800);
  font-size: 20px;
  line-height: 1.5;
  font-weight: 800;
}

/* ─── Section Head ─── */
.lb-section-head {
  max-width: 760px;
  margin-bottom: 36px;
}

/* ─── Framework ─── */
.lb-framework-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  overflow: hidden;
}

.lb-step {
  padding: 32px 28px;
  border-right: 1px solid var(--color-border-light);
}

.lb-step:last-child {
  border-right: 0;
}

.lb-step-number {
  color: var(--color-brown-500);
  font-size: 16px;
  font-weight: 900;
}

.lb-step-title {
  margin-top: 6px;
  color: var(--color-brown-900);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

/* ─── Quote ─── */
.lb-quote {
  margin-top: 24px;
  padding: 24px 26px;
  border-left: 5px solid var(--color-brown-600);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-cream-100);
  color: var(--color-brown-800);
  font-size: 20px;
  line-height: 1.55;
  font-weight: 800;
}

/* ─── Content Topics ─── */
.lb-topic-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.lb-topic {
  min-height: 120px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--color-border-light);
  color: var(--color-brown-800);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.45;
  transition: background-color 0.18s ease, transform 0.18s ease;
  display: flex;
  align-items: flex-start;
}

.lb-topic:hover {
  background: var(--color-cream-100);
  transform: translateY(-2px);
}

/* ─── CTA Block ─── */
.lb-cta {
  padding: 52px 40px;
  text-align: center;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, rgba(255, 244, 231, 0.96), rgba(250, 231, 209, 0.76));
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-card);
}

.lb-cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ─── Footer ─── */
.lb-footer {
  padding: 28px 0;
  background: var(--color-brown-900);
  color: rgba(255, 250, 243, 0.86);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.lb-footer-inner {
  width: min(100% - 40px, var(--container-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.lb-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.lb-footer a {
  color: rgba(255, 250, 243, 0.86);
  transition: color 0.18s ease;
}

.lb-footer a:hover {
  color: var(--color-cream-50);
}

/* ─── Forms ─── */
.lb-input,
.lb-select,
.lb-textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--color-text-main);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.lb-input:focus,
.lb-select:focus,
.lb-textarea:focus {
  border-color: var(--color-brown-500);
  box-shadow: 0 0 0 3px rgba(154, 99, 56, 0.13);
}

.lb-label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-brown-800);
  font-size: 15px;
  font-weight: 800;
}

.lb-form-row {
  margin-bottom: 20px;
}

/* ─── Badges ─── */
.lb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background: var(--color-cream-100);
  border: 1px solid var(--color-border-light);
  color: var(--color-brown-700);
  font-size: 13px;
  font-weight: 800;
}

/* ─── Tables ─── */
.lb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-beige-50);
}

.lb-table th,
.lb-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-light);
  text-align: left;
  vertical-align: top;
}

.lb-table th {
  background: var(--color-cream-100);
  color: var(--color-brown-800);
  font-weight: 800;
}

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

/* ─── Stat Cards ─── */
.lb-stat-card {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-card);
}

.lb-stat-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.lb-stat-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--color-brown-900);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.lb-stat-value--accent {
  color: var(--color-brown-600);
}

/* ─── Alerts ─── */
.lb-alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.lb-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.lb-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.lb-alert-info {
  background: var(--color-cream-100);
  border: 1px solid var(--color-border);
  color: var(--color-brown-800);
}

/* ─── Form Hint ─── */
.lb-form-hint {
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ─── Form Grid ─── */
.lb-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ─── Detail Items (key-value pairs) ─── */
.lb-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light);
  gap: 16px;
}

.lb-detail-item:last-child {
  border-bottom: 0;
}

.lb-detail-label {
  font-size: 14px;
  color: var(--color-text-sub);
  flex-shrink: 0;
}

.lb-detail-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-brown-800);
  text-align: right;
}

.lb-detail-value--accent {
  color: var(--color-brown-600);
}

/* ─── Page Hero (inner pages) ─── */
.lb-page-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 0;
}

/* ─── Tabs ─── */
.lb-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-light);
}

.lb-tab {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-brown-700);
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  letter-spacing: -0.01em;
}

.lb-tab:hover {
  background: var(--color-cream-100);
  border-color: var(--color-brown-500);
}

.lb-tab-active {
  background: var(--color-brown-700);
  color: var(--color-white);
  border-color: var(--color-brown-700);
}

.lb-tab-active:hover {
  background: var(--color-brown-800);
  border-color: var(--color-brown-800);
  color: var(--color-white);
}

/* ─── Nav Active State ─── */
.lb-nav-active {
  color: var(--color-brown-800) !important;
  font-weight: 800 !important;
}

/* ─── Spinner ─── */
.lb-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-brown-600);
  border-radius: 50%;
  animation: lb-spin 0.7s linear infinite;
}

.lb-spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

@keyframes lb-spin {
  to { transform: rotate(360deg); }
}

/* ─── Input Group ─── */
.lb-input-group {
  display: flex;
  align-items: stretch;
}

.lb-input-group .lb-input {
  flex: 1;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.lb-input-group-text {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--color-cream-100);
  border: 1px solid var(--color-border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-muted);
  font-size: 14px;
  white-space: nowrap;
}

/* ─── Text Utilities ─── */
.lb-text-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.4;
}

.lb-text-muted {
  color: var(--color-text-muted);
}

.lb-text-sm {
  font-size: 13px;
  line-height: 1.5;
}

/* ─── Form Check (checkbox) ─── */
.lb-form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0 0;
  border-top: 1px solid var(--color-border-light);
  margin-top: 8px;
}

.lb-form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-brown-700);
  cursor: pointer;
}

.lb-form-check label {
  display: inline;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
  cursor: pointer;
}

/* ─── Accessibility ─── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Visibility Utilities ─── */
.desktop-only {
  display: inline;
}

.mobile-only {
  display: none;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .lb-container {
    width: min(100% - 32px, var(--container-width));
  }

  .lb-form-grid-2 {
    grid-template-columns: 1fr;
  }

  .lb-title-xl {
    font-size: 36px;
    line-height: 1.14;
    letter-spacing: -0.045em;
  }

  .lb-title-lg {
    font-size: 29px;
    line-height: 1.25;
    letter-spacing: -0.04em;
  }

  .lb-title-md {
    font-size: 21px;
    line-height: 1.35;
  }

  .lb-subtitle {
    font-size: 18px;
    line-height: 1.6;
  }

  .lb-body {
    font-size: 16px;
    line-height: 1.75;
  }

  .lb-card-desc {
    font-size: 15px;
    line-height: 1.65;
  }

  .lb-eyebrow-hand {
    font-size: 22px;
    line-height: 1.35;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline !important;
  }
}

@media (max-width: 900px) {
  :root {
    --section-y: 52px;
  }

  .lb-header,
  .lb-nav {
    display: none;
  }

  .lb-hero-inner,
  .lb-grid-2,
  .lb-grid-3,
  .lb-grid-4,
  .lb-framework-steps {
    grid-template-columns: 1fr;
  }

  .lb-hero-visual {
    min-height: 300px;
  }

  .lb-step {
    border-right: 0;
    border-bottom: 1px solid var(--color-border-light);
  }

  .lb-step:last-child {
    border-bottom: 0;
  }

  .lb-topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .lb-hero-actions,
  .lb-cta-actions {
    flex-direction: column;
  }

  .lb-hero-actions .lb-btn,
  .lb-cta-actions .lb-btn {
    width: 100%;
  }

  .lb-card-padded {
    padding: 22px;
  }

  .lb-topic-grid {
    grid-template-columns: 1fr;
  }
}
