/* ============================================
   olbericz.cn — DESIGN.md Implementation
   Warm-canvas editorial interface
   ============================================ */

/* --- Color Tokens --- */
:root {
  --coral: #cc785c;
  --coral-active: #a9583e;
  --coral-disabled: #e6dfd8;
  --ink: #141413;
  --body: #3d3d3a;
  --body-strong: #252523;
  --muted: #6c6a64;
  --muted-soft: #8e8b82;
  --hairline: #e6dfd8;
  --hairline-soft: #ebe6df;
  --canvas: #faf9f5;
  --surface-soft: #f5f0e8;
  --surface-card: #efe9de;
  --surface-cream-strong: #e8e0d2;
  --surface-dark: #181715;
  --surface-dark-elevated: #252320;
  --surface-dark-soft: #1f1e1b;
  --on-primary: #ffffff;
  --on-dark: #faf9f5;
  --on-dark-soft: #a09d96;
  --accent-teal: #5db8a6;
  --accent-amber: #e8a55a;
  --success: #5db872;
  --warning: #d4a017;
  --error: #c64545;
}

/* --- Typography --- */
/* Display: serif, weight 400, negative tracking. Never bold. */
/* Body: Inter (sans), weight 400 for paragraphs, 500 for labels */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  background: var(--canvas);
  color: var(--body);
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 400;
  color: var(--ink);
}

/* --- Spacing --- */
/* {spacing.section} = 96px between major bands */

/* ===== Top Navigation ===== */
/* {component.top-nav} — 64px, canvas bg, canvas text */
.top-nav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.nav-brand-text {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.nav-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* {typography.nav-link} — 14px / 500 */
.nav-link {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }

.nav-back {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-back:hover { color: var(--ink); }

/* ===== Buttons ===== */
/* {component.button-primary} — coral, 40px h, rounded 8px */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 12px 20px;
  height: 40px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

/* {component.button-primary} */
.btn-primary {
  background: var(--coral);
  color: var(--on-primary);
}
.btn-primary:hover { background: var(--coral-active); }

/* {component.button-primary-disabled} */
.btn-primary:disabled {
  background: var(--coral-disabled);
  color: var(--muted);
}

/* {component.button-secondary} */
.btn-secondary {
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-secondary:hover { background: var(--surface-soft); }

/* {component.button-secondary-on-dark} */
.btn-on-dark {
  background: var(--surface-dark-elevated);
  color: var(--on-dark);
  border: 1px solid var(--hairline);
}
.btn-on-dark:hover { background: #2f2c27; }

/* {component.text-link} */
.text-link {
  color: var(--coral);
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  transition: opacity 0.15s ease;
}
.text-link:hover { opacity: 0.8; }

/* ===== Hero Band ===== */
/* {component.hero-band} — canvas bg, padding 96px, display-xl headline */
.hero {
  padding: 128px 32px 96px;
  max-width: 1200px;
  margin: 0 auto;
}

/* {typography.display-xl} — 64px / 400 / 1.05 / -1.5px */
.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--ink);
  margin-bottom: 8px;
}

.hero h1 em {
  font-style: normal;
  color: var(--coral);
}

/* {typography.display-sm} — 28px / 400 / 1.2 / -0.3px */
.hero .subtitle {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero .intro {
  font-size: 16px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.55;
}

/* ===== Section ===== */
/* {spacing.section} = 96px */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 96px;
}

/* {typography.caption-uppercase} — 12px / 500 / 1.5px tracking */
.section-label {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 8px;
}

/* {typography.display-md} — 36px / 400 / 1.15 / -0.5px */
.section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin-bottom: 32px;
}

/* ===== Feature Cards ===== */
/* {component.feature-card} — surface-card bg, rounded 12px, padding 32px */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--surface-card);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* {typography.title-md} — 18px / 500 / 1.4 */
.feature-card h3 {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--body-strong);
}

/* {typography.body-md} — 16px / 400 / 1.55 */
.feature-card p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.55;
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

/* ===== Dark Surface Card ===== */
/* {component.product-mockup-card-dark} — surface-dark bg, rounded 12px, padding 32px */
.dark-card {
  background: var(--surface-dark);
  border-radius: 12px;
  padding: 32px;
  color: var(--on-dark);
}

.dark-card h3 {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--on-dark);
}

.dark-card p {
  font-size: 16px;
  color: var(--on-dark-soft);
  line-height: 1.55;
}

/* ===== Course Grid ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.course-card {
  background: var(--surface-card);
  border-radius: 12px;
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-card:hover {
  background: var(--surface-cream-strong);
}

.course-card h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--body-strong);
}

.course-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.course-card .meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-soft);
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-soft);
}

/* ===== Badge ===== */
/* {component.badge-coral} — coral bg, on-primary text, 12px / 500 / 1.5px tracking, pill */
.badge {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 9999px;
  width: fit-content;
}

.badge-coral { background: var(--coral); color: var(--on-primary); }
.badge-teal { background: var(--accent-teal); color: var(--on-primary); }
.badge-amber { background: var(--accent-amber); color: var(--on-primary); }
.badge-default { background: var(--surface-card); color: var(--ink); }
.badge-coming { background: var(--muted); color: var(--on-primary); }

/* {component.badge-pill} — surface-card bg, ink text, 13px / 500 */
.badge-pill {
  background: var(--surface-card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.card-placeholder {
  opacity: 0.5;
  border: 1px dashed var(--hairline);
  background: var(--surface-soft);
}
.card-placeholder:hover { opacity: 0.7; background: var(--surface-card); }

/* ===== CTA Bands ===== */
/* {component.cta-band-dark} — surface-dark bg, on-dark text, rounded 16px, padding 64px */
.cta-band {
  background: var(--surface-dark);
  color: var(--on-dark);
  max-width: 1200px;
  margin: 0 auto 96px;
  padding: 64px 48px;
  border-radius: 16px;
  text-align: center;
}

/* {typography.display-sm} — 28px / 400 / 1.2 / -0.3px */
.cta-band h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.cta-band p {
  font-size: 16px;
  color: var(--on-dark-soft);
  margin-bottom: 24px;
}

/* {component.cta-band-coral} — coral bg, on-primary text, rounded 16px, padding 64px */
.cta-band-coral {
  background: var(--coral);
  color: var(--on-primary);
  border-radius: 16px;
  padding: 64px 48px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto 96px;
}

.cta-band-coral h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.cta-band-coral p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.cta-band-coral .btn {
  background: var(--canvas);
  color: var(--ink);
}
.cta-band-coral .btn:hover { background: var(--surface-soft); }

/* ===== Callout Card ===== */
/* {component.callout-card-coral} — coral bg, on-primary text, rounded 12px, padding 48px */
.callout-card {
  background: var(--coral);
  border-radius: 12px;
  padding: 48px;
  color: var(--on-primary);
}

.callout-card h3 {
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--on-primary);
}

.callout-card p {
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.55;
}

/* ===== Content Page ===== */
.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px 96px;
}

.content-page h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin-bottom: 24px;
}

.content-page h3 {
  font-family: "Inter", sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--body-strong);
  margin: 32px 0 12px;
}

.content-page p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 16px;
}

.content-page ul, .content-page ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.content-page li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 8px;
}

.content-page a {
  color: var(--coral);
  text-decoration: none;
}
.content-page a:hover { text-decoration: underline; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px 0;
  font-size: 14px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { margin: 0 4px; color: var(--hairline); }

/* ===== Blog List ===== */
.blog-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hairline);
}

.blog-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.blog-item:hover {
  background: var(--surface-soft);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.blog-date {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-soft);
  min-width: 96px;
  white-space: nowrap;
}

.blog-title {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--body-strong);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-desc {
  font-size: 14px;
  color: var(--muted);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Footer ===== */
/* {component.footer} — surface-dark bg, single-row */
.footer {
  background: var(--surface-dark);
  padding: 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted-soft);
}

.footer-inner a {
  color: var(--on-dark-soft);
  text-decoration: none;
}

.footer-inner a:hover { color: var(--on-dark); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .top-nav { padding: 0 16px; }
  .nav-links { display: none; }
  .hero { padding: 48px 16px 40px; }
  .hero h1 { font-size: 36px; letter-spacing: -1px; }
  .hero .subtitle { font-size: 20px; }
  .section { padding: 0 16px 48px; }
  .section-title { font-size: 28px; }
  .features { grid-template-columns: 1fr; padding: 0 16px 48px; }
  .course-grid { grid-template-columns: 1fr; }
  .blog-item { flex-wrap: wrap; gap: 4px; }
  .blog-date { min-width: auto; }
  .blog-title { white-space: normal; overflow: visible; }
  .blog-desc { display: none; }
  .cta-band { margin: 0 16px 48px; padding: 40px 24px; border-radius: 12px; }
  .cta-band h2 { font-size: 28px; }
  .cta-band-coral { margin: 0 16px 48px; padding: 40px 24px; border-radius: 12px; }
  .cta-band-coral h2 { font-size: 28px; }
  .content-page { padding: 0 16px 48px; }
  .footer { padding: 24px 16px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .callout-card { padding: 32px 24px; }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
