/* course template — clean, structured, educational. */

:root {
  --container: 960px;
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius: 8px; --radius-lg: 14px;
  --transition: 180ms ease;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-sans);
}

[data-density="compact"]     { --section-pad: var(--space-7); --hero-pad: var(--space-7); }
[data-density="comfortable"] { --section-pad: var(--space-8); --hero-pad: var(--space-8); }
[data-density="airy"]        { --section-pad: var(--space-9); --hero-pad: 120px; }

[data-theme="light"] { --bg: #ffffff; --fg: #111827; --muted: #6b7280; --surface: #f9fafb; --border: #e5e7eb; --on-primary: #ffffff; }
[data-theme="dark"]  { --bg: #0f1117; --fg: #f3f4f6; --muted: #9ca3af; --surface: #1a1d27; --border: #2a2d3a; --on-primary: #ffffff; }
[data-theme="ai"]    { --bg: #07080d; --fg: #ecf0fa; --muted: #94a3bd; --surface: #0e1220; --border: #1c2235; --on-primary: #ffffff; }

[data-palette="slate"]   { --primary: #334155; --primary-hover: #1e293b; --accent: #64748b; }
[data-palette="indigo"]  { --primary: #4f46e5; --primary-hover: #4338ca; --accent: #818cf8; }
[data-palette="emerald"] { --primary: #059669; --primary-hover: #047857; --accent: #34d399; }
[data-palette="rose"]    { --primary: #e11d48; --primary-hover: #be123c; --accent: #fb7185; }
[data-palette="amber"]   { --primary: #b45309; --primary-hover: #92400e; --accent: #f59e0b; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); font-family: var(--font-sans); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover, a:focus-visible { color: var(--primary-hover); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5); }

/* HEADER */
.hdr { position: sticky; top: 0; z-index: 10; background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.hdr-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-3) 0; }
.brand { display: flex; align-items: center; gap: var(--space-2); color: var(--fg); font-weight: 700; text-decoration: none; }
.brand img { width: auto; height: 28px; }
.hdr-nav { display: flex; gap: var(--space-5); }
.hdr-nav a { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 720px) { .hdr-nav { display: none; } }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 10px 18px; border-radius: var(--radius); font-weight: 700; transition: var(--transition); border: 1px solid transparent; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 0.9rem; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--primary-hover); text-decoration: none; }

/* HERO */
.hero { padding: var(--hero-pad) 0; text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 var(--space-4); }
.hero-subtitle { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 600px; margin: 0 auto var(--space-6); }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-6); }
.hero-image { margin-top: var(--space-6); border-radius: var(--radius-lg); overflow: hidden; }
.hero-image img { width: 100%; }

/* PRICE BADGE */
.price-badge { display: inline-flex; align-items: center; padding: 8px 18px; background: var(--surface); border: 2px solid var(--primary); border-radius: 999px; font-weight: 800; font-size: 1.15rem; color: var(--primary); }

/* SECTION HEADINGS */
.section-heading { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 var(--space-6); text-align: center; letter-spacing: -0.02em; }

/* OUTCOMES */
.outcomes { padding: var(--section-pad) 0; background: var(--surface); }
.outcomes-list { list-style: none; padding: 0; margin: 0; max-width: 640px; margin-left: auto; margin-right: auto; display: flex; flex-direction: column; gap: var(--space-4); }
.outcome-item { display: flex; align-items: flex-start; gap: var(--space-3); font-size: 1.05rem; line-height: 1.5; }
.outcome-check { color: var(--accent); font-weight: 700; font-size: 1.2rem; flex-shrink: 0; line-height: 1.4; }

/* CURRICULUM */
.curriculum { padding: var(--section-pad) 0; }
.curriculum-modules { display: flex; flex-direction: column; gap: var(--space-4); max-width: 720px; margin: 0 auto; }
.module-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.module-title { font-weight: 700; font-size: 1.1rem; cursor: pointer; padding: var(--space-4) var(--space-5); list-style: none; }
.module-title::-webkit-details-marker { display: none; }
.module-title::after { content: "+"; float: right; font-size: 1.2rem; transition: transform var(--transition); color: var(--muted); }
.module-card[open] .module-title::after { content: "\2212"; }
.lesson-list { list-style: none; padding: 0 var(--space-5) var(--space-4); margin: 0; display: flex; flex-direction: column; gap: 0; }
.lesson-item { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--border); }
.lesson-name { font-size: 0.95rem; }
.lesson-duration { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

/* INSTRUCTOR */
.instructor { padding: var(--section-pad) 0; border-top: 1px solid var(--border); }
.instructor-layout { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-7); align-items: start; }
@media (max-width: 640px) { .instructor-layout { grid-template-columns: 1fr; } }
.instructor-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); }
.instructor-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin: 0 0 var(--space-2); }
.instructor-title { color: var(--primary); font-weight: 600; font-size: 0.95rem; margin: 0 0 var(--space-4); }
.instructor-body { color: var(--fg); font-size: 1rem; line-height: 1.7; }
.instructor-body p { margin: 0 0 var(--space-4); }
.instructor-body strong { font-weight: 700; }

/* TESTIMONIALS */
.testimonials { padding: var(--section-pad) 0; background: var(--surface); }
.testimonials-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-5); }
.testimonial-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5); }
.testimonial-card blockquote { margin: 0; }
.testimonial-card p { font-size: 1rem; line-height: 1.6; margin: 0 0 var(--space-4); }
.testimonial-card cite { color: var(--muted); font-style: normal; font-weight: 600; font-size: 0.9rem; }
.testimonial-title { font-weight: 400; }

/* FAQ */
.faq { padding: var(--section-pad) 0; }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-3) var(--space-5); }
.faq-item summary { font-weight: 600; cursor: pointer; padding: var(--space-3) 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; transition: transform var(--transition); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-answer { color: var(--muted); padding-bottom: var(--space-3); line-height: 1.7; }

/* CTA */
.cta { padding: var(--section-pad) 0; background: var(--primary); color: var(--on-primary); text-align: center; }
.cta-inner { max-width: 600px; }
.cta-heading { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 var(--space-3); letter-spacing: -0.02em; }
.cta-body { font-size: 1.1rem; opacity: 0.9; margin: 0 0 var(--space-5); }
.cta-price { font-size: 1.6rem; font-weight: 800; margin: 0 0 var(--space-5); }
.cta .btn-primary { background: var(--bg); color: var(--fg); }
.cta .btn-primary:hover { background: var(--surface); }

/* FOOTER + WATERMARK */
.ddv-footer { padding: var(--space-6) 0; border-top: 1px solid var(--border); margin-top: 0; text-align: center; color: var(--muted); }
.ddv-footer-inner small { font-size: 0.85rem; }
.ddv-watermark { position: fixed; bottom: 12px; right: 12px; z-index: 50; }
.ddv-watermark a { display: inline-flex; align-items: center; padding: 6px 10px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; font-size: 0.78rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-decoration: none; }
.ddv-watermark a:hover { color: var(--fg); }
