/* ─── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Nunito+Sans:wght@400;600;700&display=swap');

/* ─── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  --bg:           #060a14;
  --panel:        #0d1120;
  --panel2:       #0b0f1e;
  --text:         #e8eeff;
  --muted:        #8b96b8;
  --muted-light:  #6b759a;

  --gold:         #f0a500;
  --gold-soft:    rgba(240,165,0,0.13);
  --gold-border:  rgba(240,165,0,0.28);
  --gold-hover:   rgba(240,165,0,0.22);

  --blue:         #2563eb;
  --blue-soft:    rgba(37,99,235,0.13);
  --blue-border:  rgba(37,99,235,0.28);

  --good-bg:      rgba(34,197,94,0.09);
  --good-border:  rgba(34,197,94,0.32);
  --good-text:    #86efac;

  --danger-bg:    rgba(251,113,133,0.09);
  --danger-border:rgba(251,113,133,0.32);
  --danger-text:  #fda4af;

  --border:       rgba(255,255,255,0.08);
  --border-soft:  rgba(255,255,255,0.05);
  --shadow:       0 12px 32px rgba(0,0,0,0.5);
  --shadow-sm:    0 4px 14px rgba(0,0,0,0.35);

  --r:            16px;
  --r-sm:         10px;
  --r-lg:         22px;
  --header-h:     70px;
}

/* ─── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  background:
    radial-gradient(ellipse 1100px 600px at 15% 0%,  rgba(240,165,0,0.07)  0%, transparent 55%),
    radial-gradient(ellipse 900px 500px  at 90% 5%,  rgba(37,99,235,0.09)  0%, transparent 55%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; }
h1, h2, h3, h4, h5 { font-family: 'Outfit', system-ui, sans-serif; line-height: 1.25; }

/* ─── Site header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: #0e1e3d;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 2px 24px rgba(14,30,61,0.55);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1100px;
  margin: 0 auto;
  height: var(--header-h);
}

/* ─── Brand ────────────────────────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-sub-text {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  line-height: 1;
}

/* Hide legacy logo div */
.logo { display: none; }
/* Hide legacy h1 inside brand (we replace with spans) */
.brand > div > h1 { display: none; }

@media (max-width: 520px) {
  .brand-logo   { height: 36px; }
  .brand-text   { display: none; }
  .brand-divider{ display: none; }
}

/* ─── Nav ────────────────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
  margin-left: auto;
}

.nav select {
  min-height: 48px;
  padding: 0 42px 0 16px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  min-width: 240px;
  max-width: 360px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.nav select:hover,
.nav select:focus {
  border-color: rgba(240,165,0,0.5);
  background: rgba(255,255,255,0.12);
}

.nav select option {
  color: #111827;
  background: #ffffff;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 16px;
  border: 2px solid #c98a20;
  background: #122746;
  color: #f0a530;
  text-decoration: none;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.login-btn::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0a530' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='10' height='18' rx='2' ry='2'/%3E%3Cpath d='M10 12h10'/%3E%3Cpath d='m17 7 5 5-5 5'/%3E%3C/svg%3E");
}

.login-btn:hover,
.login-btn:focus {
  background: #173055;
  border-color: #e0a743;
  transform: translateY(-1px);
}

.login-btn:focus-visible {
  outline: 2px solid rgba(240,165,0,0.35);
  outline-offset: 2px;
}


/* ─── Container ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
.hero { padding: 0 0 8px; }

.hero-card {
  background: linear-gradient(145deg, rgba(13,17,32,0.98), rgba(18,24,48,0.98));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,165,0,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.65; }

/* ─── Big warning block ────────────────────────────────────────────────────── */
.big-warning {
  margin-top: 16px;
  border-radius: var(--r);
  border: 1px solid var(--gold-border);
  background: var(--gold-soft);
  padding: 18px 20px;
}

.big-warning h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.01em;
}

.big-warning .big { font-size: 0.9rem; line-height: 1.7; color: var(--text); }
.big-warning .big strong { color: #fff; }
.big-warning ul { margin: 8px 0 12px; padding-left: 20px; }
.big-warning li { margin: 6px 0; color: var(--text); font-size: 0.9rem; }

/* ─── Callout ──────────────────────────────────────────────────────────────── */
.callout {
  margin-top: 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  padding: 14px 16px;
}

.callout h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
}

.callout p  { margin: 0; color: var(--muted); font-size: 0.88rem; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout li { margin: 5px 0; color: var(--muted); font-size: 0.88rem; }
.callout li strong { color: var(--text); }

/* ─── Setup (DW) cards ─────────────────────────────────────────────────────── */
.dw-cards-wrapper {
  padding: 0 0 22px;
}

.dw-cards {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 760px) { .dw-cards { flex-direction: column; } }

.dw-card {
  flex: 1;
  background: rgba(13,17,32,0.98);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}

.dw-card:hover { border-color: var(--gold-border); }
.dw-card--text .dw-caption { padding-top: 22px; }

.dw-card-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(255,255,255,0.02);
}

.dw-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.dw-caption { padding: 16px 18px 20px; }

.dw-caption h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.dw-caption p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

.dw-caption p strong { color: var(--gold); }

/* ─── Section title ────────────────────────────────────────────────────────── */
.section-title {
  margin: 26px 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* ─── Step grid & cards ────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: linear-gradient(145deg, rgba(13,17,32,0.98), rgba(18,24,48,0.97));
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--gold-border);
  transform: translateY(-2px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}

.badge span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
}

.card p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.card .tips { color: var(--text); font-size: 0.86rem; line-height: 1.55; }
.card .tips strong { color: var(--gold); }

.card .actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--gold-border);
  background: var(--gold-soft);
  color: var(--gold);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
  background: var(--gold-hover);
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── Video embed ──────────────────────────────────────────────────────────── */
.video-wrap {
  aspect-ratio: 16/9;
  width: 100%;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow);
}

.video-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ─── Page layout (inner pages) ───────────────────────────────────────────── */
.page {
  margin-top: 20px;
  background: linear-gradient(145deg, rgba(13,17,32,0.98), rgba(18,24,48,0.97));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}

.page h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.page .lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.page .lead strong { color: var(--text); }

/* ─── Two-column layout ────────────────────────────────────────────────────── */
.columns {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 900px) { .columns { grid-template-columns: 1fr; } }

/* ─── Panels ───────────────────────────────────────────────────────────────── */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,0.03);
  padding: 16px 18px;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.panel ul  { margin: 0; padding-left: 20px; }
.panel li  { margin: 7px 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.panel li strong { color: var(--text); }

/* Check (green) panel */
.check {
  border-color: var(--good-border);
  background: var(--good-bg);
}
.check h3  { color: var(--good-text); }
.check li  { color: var(--text); }

/* Mistakes (red) panel */
.mistakes {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}
.mistakes h3 { color: var(--danger-text); }
.mistakes li { color: var(--text); }

/* ─── Right-hand panel in hero ─────────────────────────────────────────────── */
.dw-right-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dw-right-panel h3 { margin: 0 0 10px; }
.dw-right-panel ul { margin: 0; padding-left: 18px; }

.panel-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* ─── Right-panel image stack ──────────────────────────────────────────────── */
.quicklink-images {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quicklink-images img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.03);
  padding: 10px;
  border: 1px solid var(--border);
}

/* ─── Pager ────────────────────────────────────────────────────────────────── */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* ─── Code block ───────────────────────────────────────────────────────────── */
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  overflow: auto;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.6;
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  color: var(--muted-light);
  font-size: 0.8rem;
  padding: 28px 0 36px;
  text-align: center;
  border-top: 1px solid var(--border-soft);
  margin-top: 32px;
}

.footer a { color: var(--gold); }
.footer a:hover { opacity: 0.8; }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .container       { padding: 18px 16px; }
  .header-inner    { padding: 0 16px; }
  .hero-card       { padding: 18px; }
  .hero h2         { font-size: 1.25rem; }
  .page            { padding: 18px; }
}


@media (max-width: 900px) {
  .topbar .container,
  .header-inner {
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    align-items: stretch;
  }

  .navwrap,
  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    width: 100%;
    justify-content: flex-end;
  }

  .nav select {
    flex: 1 1 260px;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 620px) {
  .nav {
    flex-wrap: wrap;
  }

  .nav select,
  .login-btn {
    width: 100%;
  }
}




/* Mobile header alignment to match iMedia Genius main site */
.jump-label {
  display: none;
  color: rgba(255,255,255,0.72);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .brand-text { display: flex !important; }
  .brand-divider { display: block !important; }
  .brand-logo { height: 38px; }
  .brand-name { font-size: 1rem; }
  .brand-sub-text { font-size: 0.64rem; letter-spacing: 0.07em; }

  .navwrap,
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
  }

  .jump-label {
    display: block;
  }

  .nav select {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
    min-height: 52px;
  }

  .login-btn {
    width: 62px;
    min-width: 62px;
    min-height: 52px;
    padding: 0;
    font-size: 0;
    gap: 0;
    border-radius: 16px;
  }

  .login-btn::before {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }
}

@media (max-width: 520px) {
  .brand-text { display: flex !important; }
  .brand-divider { display: block !important; height: 28px; }
  .brand-logo { height: 34px; }
  .brand-name { font-size: 0.92rem; }
  .brand-sub-text { font-size: 0.56rem; letter-spacing: 0.06em; }

  .nav {
    grid-template-columns: max-content minmax(0, 1fr) auto;
    gap: 10px;
  }

  .jump-label {
    font-size: 0.8rem;
  }

  .login-btn {
    width: 58px;
    min-width: 58px;
  }
}
