/* freeCAD Indonesia — CAD academy theme (light + dark) */
:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --bg-2: #e8edf4;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --text: #121820;
  --muted: #5a6778;
  --gold: #b8860b;
  --gold-2: #9a7209;
  --blue: #1a6fd4;
  --line: #d4dbe6;
  --danger: #c43b44;
  --ok: #1a8a4a;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(18, 24, 32, 0.08);
  --font: "Source Sans 3", system-ui, sans-serif;
  --display: "Outfit", "Source Sans 3", sans-serif;
  --max: 1120px;
  --hero-iso-bg: #e8eef6;
  --skip-bg: rgba(196, 59, 68, 0.08);
  --skip-border: rgba(196, 59, 68, 0.35);
  --skip-text: #9b2430;
  --notice-bg: rgba(26, 111, 212, 0.08);
  --notice-border: rgba(26, 111, 212, 0.28);
  --tag-bg: rgba(184, 134, 11, 0.12);
  --tag-border: rgba(184, 134, 11, 0.4);
  --gold-glow: rgba(184, 134, 11, 0.14);
  --blue-glow: rgba(26, 111, 212, 0.12);
  --btn-on-gold: #1a1400;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1018;
    --bg-2: #121a26;
    --surface: #171f2c;
    --surface-2: #1d2736;
    --text: #eef3fb;
    --muted: #9aa8bd;
    --gold: #f5c211;
    --gold-2: #c8960a;
    --blue: #6eb3ff;
    --line: #2a3648;
    --danger: #f07178;
    --ok: #4ade80;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --hero-iso-bg: #0e1622;
    --skip-bg: rgba(240, 113, 120, 0.12);
    --skip-border: rgba(240, 113, 120, 0.4);
    --skip-text: #ffc2c5;
    --notice-bg: rgba(110, 179, 255, 0.1);
    --notice-border: rgba(110, 179, 255, 0.3);
    --tag-bg: rgba(245, 194, 17, 0.12);
    --tag-border: rgba(245, 194, 17, 0.35);
    --gold-glow: rgba(245, 194, 17, 0.08);
    --blue-glow: rgba(110, 179, 255, 0.08);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--gold-glow), transparent 50%),
    radial-gradient(900px 400px at -10% 20%, var(--blue-glow), transparent 45%),
    var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.8rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logos {
  display: grid;
  place-items: center;
}
.brand-logo {
  grid-area: 1 / 1;
  width: auto;
  height: 40px;
}
.brand-logo--dark { display: none; }
.brand-logo--light { display: block; }
@media (prefers-color-scheme: dark) {
  .brand-logo--light { display: none; }
  .brand-logo--dark { display: block; }
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.nav-main a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav-main a:hover,
.nav-main a.is-active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  max-width: 14rem;
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}
.nav-user:hover { text-decoration: none; color: var(--text); }
.nav-user-avatar {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.nav-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  color: var(--btn-on-gold);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--muted); }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--muted); }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.lang-switch a.is-active {
  background: var(--gold);
  color: var(--btn-on-gold);
}
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0 0.4rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-size: 1.1rem;
}

main { flex: 1; }

.hero {
  padding: 4.2rem 0 3rem;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}
.eyebrow {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 0.6rem;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0 0 0.8rem; }
.lead { color: var(--muted); font-size: 1.12rem; margin: 0 0 1.4rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.hero-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.3rem;
  box-shadow: var(--shadow);
}
.hero-iso {
  aspect-ratio: 4/3;
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--blue-glow), transparent 40%),
    repeating-linear-gradient(90deg, transparent, transparent 23px, var(--gold-glow) 24px),
    repeating-linear-gradient(0deg, transparent, transparent 23px, var(--blue-glow) 24px),
    var(--hero-iso-bg);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--display);
  font-weight: 700;
  text-align: center;
  padding: 1rem;
}
.hero-iso span { display: block; color: var(--muted); font-weight: 500; font-size: 0.9rem; margin-top: 0.4rem; }

.section { padding: 3rem 0; }
.section h2 { margin: 0 0 0.5rem; font-size: 1.7rem; }
.section-lead { color: var(--muted); margin: 0 0 1.6rem; }

.grid-3, .grid-2, .course-grid {
  display: grid;
  gap: 1rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.course-grid { grid-template-columns: repeat(3, 1fr); }

.card, .course-card, .stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}
.course-card h3, .card h3 { margin: 0.35rem 0 0.4rem; font-size: 1.15rem; }
.muted { color: var(--muted); }
.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--gold);
  border: 1px solid var(--tag-border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
}
.price { font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--gold); }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0; }

.steps { counter-reset: step; }
.steps li { list-style: none; }
.steps { padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.steps li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 1rem 3.2rem;
  position: relative;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--btn-on-gold);
  font-weight: 800;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 2rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.form-group { margin-bottom: 0.9rem; }
label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
input, textarea, select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
.msg { min-height: 1.3rem; font-size: 0.92rem; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }
.msg.loading { color: var(--blue); }
.form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.form-hint--error { color: var(--danger); }
.signup-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.45;
  cursor: pointer;
}
.signup-consent input {
  margin-top: 0.25rem;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  accent-color: var(--gold);
}
.business-type-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.business-type-row select { flex: 1; min-width: 0; }
.business-type-add-btn {
  flex-shrink: 0;
  min-width: 2.75rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  font-size: 1.25rem;
  line-height: 1;
}
.business-type-custom {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.5rem;
}
.business-type-custom-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
  align-items: start;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
}

.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.9fr);
  gap: 1.2rem;
  padding: 1.5rem 0 3rem;
}
.player-wrap {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}
video { width: 100%; display: block; background: #000; }
.playlist { display: grid; gap: 0.5rem; }
.playlist button {
  text-align: left;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  font: inherit;
}
.playlist button.is-active { border-color: var(--gold); }
.playlist button.is-done { box-shadow: inset 3px 0 0 var(--ok); }
.lesson-notes {
  margin: 1rem 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.lesson-notes h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.lesson-docs { margin: 1.2rem 0; }
.lesson-docs ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.skip-banner {
  background: var(--skip-bg);
  border: 1px solid var(--skip-border);
  color: var(--skip-text);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin: 0.8rem 0;
}
.progress-bar {
  height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--blue));
}

.btn-linkedin {
  background: #0a66c2;
  color: #fff;
  border-color: #0a66c2;
}
.btn-linkedin:hover { filter: brightness(1.08); color: #fff; }
#certificateCanvas { width: 100%; max-width: 960px; background: #f6efdc; border-radius: 8px; box-shadow: var(--shadow); }
.verify-form { max-width: 520px; }
#verifyCanvasWrap { margin-top: 1.4rem; }

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 0.7rem 0.4rem;
}

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: var(--text);
}

.seller-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.seller-toolbar h1 { margin: 0 0 0.35rem; }
.library-filters { margin: 1.2rem 0; }
.library-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.library-cats .btn.is-active {
  border-color: var(--gold);
  color: var(--text);
}
.library-card a { color: inherit; text-decoration: none; }
.library-card h3 a:hover { text-decoration: underline; }
.library-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-2);
  display: block;
  margin-bottom: 0.65rem;
}
.library-thumb--empty {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--gold);
}
.library-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}
.library-gallery img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.library-keep-files {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
}
.library-keep-files .signup-consent { margin: 0; }

@media (max-width: 900px) {
  .hero-grid, .grid-3, .course-grid, .auth-shell, .video-layout, .grid-2 {
    grid-template-columns: 1fr;
  }
  .nav-main {
    display: none;
    position: absolute;
    inset: 60px 1rem auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.8rem;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-main.is-open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .nav-user { max-width: 9.5rem; }
}

@media print {
  .site-header, .site-footer, .cert-actions, .verify-form, .menu-toggle { display: none !important; }
  #certificateCanvas { max-width: 100%; box-shadow: none; }
}
