:root {
  --bg: #f4f7fc;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --border: rgba(18, 80, 159, 0.12);
  --border-strong: rgba(18, 80, 159, 0.24);
  --text: #0f1c33;
  --muted: #64748b;
  --brand: #12509f;
  --brand-light: #2f7bd6;
  --brand-soft: rgba(18, 80, 159, 0.08);
  --danger: #d92d44;
  --radius: 20px;
  --shadow-sm: 0 2px 10px rgba(18, 45, 90, 0.06);
  --shadow: 0 18px 44px rgba(18, 45, 90, 0.10);
  --shadow-lg: 0 30px 70px rgba(18, 45, 90, 0.16);
  --glass-blur: saturate(180%) blur(18px);
}

* { box-sizing: border-box; }

/* Must win over the display rules of any component below. */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(760px 460px at 8% -6%, rgba(47, 123, 214, 0.16), transparent 62%),
    radial-gradient(680px 420px at 96% 2%, rgba(18, 80, 159, 0.12), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

/* Column layout so the footer can be pushed to the bottom of the viewport
   while the library is short, leaving open space above it. */
#libraryView {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h, 70px));
}

/* ------------------------------- header ------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.2px;
  color: var(--brand);
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand small {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

/* Company mark and partner badge read as one lockup, split by a hairline. */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-sep {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, transparent, var(--border-strong), transparent);
}

.partner-badge {
  height: 46px;
  width: auto;
}

.event-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  padding: 8px 15px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.2px;
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}

.event-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ------------------------- ambient background ------------------------- */

/* Purely decorative drifting shapes that keep the wide margins from
   reading as dead space. Sits behind everything and ignores pointers. */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
}

.orb-1 {
  width: 420px; height: 420px;
  top: -110px; left: -130px;
  background: radial-gradient(circle at 30% 30%, rgba(47, 123, 214, 0.55), transparent 70%);
  animation: drift 22s ease-in-out infinite;
}

.orb-2 {
  width: 380px; height: 380px;
  bottom: -140px; right: -110px;
  background: radial-gradient(circle at 60% 40%, rgba(214, 158, 46, 0.40), transparent 70%);
  animation: drift 27s ease-in-out infinite reverse;
}

.orb-3 {
  width: 300px; height: 300px;
  top: 44%; left: 52%;
  background: radial-gradient(circle at 50% 50%, rgba(120, 80, 200, 0.28), transparent 70%);
  animation: drift 33s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(46px, 40px, 0) scale(1.09); }
  66%      { transform: translate3d(-34px, 26px, 0) scale(0.95); }
}

.ring {
  position: absolute;
  top: 20%;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(18, 80, 159, 0.13);
  border-radius: 50%;
  animation: float 13s ease-in-out infinite;
}

.ring::after {
  content: '';
  position: absolute;
  inset: 46px;
  border: 1px solid rgba(18, 80, 159, 0.10);
  border-radius: 50%;
}

.ring-l { left: -168px; }
.ring-r { right: -168px; top: 42%; animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-30px) rotate(9deg); }
}

/* Everything above the ambient layer. */
.site-header, #libraryView, .watch { position: relative; z-index: 1; }

/* -------------------------------- hero -------------------------------- */

/* Kept deliberately compact: the video grid should be reachable without
   scrolling on a laptop screen. */
.hero {
  padding: 24px 0 20px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 6px 15px 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--brand);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: var(--glass-blur);
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink { 50% { opacity: 0.25; } }

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -1.6px;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

.hero h1 span {
  position: relative;
  background: linear-gradient(120deg, var(--brand), var(--brand-light) 45%, #d69e2e);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 7s ease-in-out infinite;
}

@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero p {
  max-width: 790px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.trust li {
  padding: 10px 18px;
  font-size: 0.86rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.trust li:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.trust b { color: var(--text); font-weight: 600; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------- section head ---------------------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-head h2 {
  margin: 0;
  font-size: 1.22rem;
  letter-spacing: -0.4px;
}

.section-head p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

/* ------------------------------ pagination ----------------------------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.pager button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pager button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.pager button[aria-current='page'] {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--brand), var(--brand-light));
  box-shadow: var(--shadow-sm);
}

.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}

.pager .pager-gap {
  padding: 0 2px;
  color: var(--muted);
  user-select: none;
}

/* -------------------------------- footer ------------------------------- */

/* Holds open a card-row's worth of space above the footer, and absorbs any
   leftover height so the footer sits at the bottom of a short page. */
.footer-gap {
  flex: 1 0 auto;
  min-height: 240px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 0 34px;
  font-size: 0.83rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.site-footer p { margin: 0; }
.site-footer a { color: var(--brand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .sep { margin: 0 8px; opacity: 0.5; }

/* ------------------------------- cards -------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  padding: 22px 0 26px;
}

/* A part-full page keeps the four-column card size and stays left-aligned
   with the section heading. Higher specificity than the width rules below,
   so it holds at every breakpoint. */
.grid.few {
  grid-template-columns: repeat(auto-fit, 278px);
  justify-content: start;
}

@media (max-width: 1120px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .grid { grid-template-columns: minmax(0, 1fr); } }

/* `backwards`, not `both`: a retained end state would beat the hover transform. */
.card {
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--i, 0) * 80ms + 240ms);
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-7px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  outline: none;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, #e8eff9, #dbe6f6);
  overflow: hidden;
}

.thumb img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .thumb img { transform: scale(1.06); }

/* Shown when a video has no artwork; a real thumbnail stacks over it. */
.thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(47, 123, 214, 0.20), transparent 60%),
    linear-gradient(140deg, #eaf1fb, #d9e5f5);
}

.thumb-fallback::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(18, 80, 159, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 80, 159, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}

.thumb-fallback span {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding-left: 4px;
  font-size: 19px;
  color: var(--brand);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(18, 45, 90, 0.16);
}

.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(15, 28, 51, 0.42), rgba(15, 28, 51, 0));
  opacity: 0;
  transition: opacity 0.28s ease;
}

.card:hover .play,
.card:focus-visible .play { opacity: 1; }

.play span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  padding-left: 5px;
  font-size: 22px;
  color: var(--brand);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px rgba(18, 45, 90, 0.28);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--brand);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
}

.card-body { padding: 17px 19px 21px; }

.card-body h3 {
  margin: 0 0 6px;
  font-size: 1.07rem;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------------------- watch (player) --------------------------- */

.watch {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h, 70px));
  animation: fade 0.22s ease;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.watch-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1500px, 96vw);
  margin: 0 auto;
  padding: 18px 0 14px;
}

.back-btn { flex: none; padding: 10px 18px; }

.watch-meta {
  min-width: 0;
  padding-left: 20px;
  border-left: 1px solid var(--border-strong);
}

.watch-meta h2 {
  margin: 0;
  font-size: 1.32rem;
  letter-spacing: -0.6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-meta p {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-stage {
  position: relative;
  flex: 1;
  display: flex;
  width: min(1500px, 96vw);
  min-height: calc(100vh - var(--header-h, 70px) - 108px);
  margin: 0 auto 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #05070d;
  box-shadow: var(--shadow-lg);
}

.stage-media { flex: 1; display: flex; }

.watch-stage video,
.watch-stage iframe {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - var(--header-h, 70px) - 110px);
  border: 0;
  display: block;
  background: #05070d;
}

.watch-stage video { object-fit: contain; }

/* Shown until the player has enough data to start. */
.stage-idle {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #05070d;
  transition: opacity 0.35s ease;
}

.stage-idle.gone { opacity: 0; pointer-events: none; }

.stage-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  padding-left: 6px;
  font-size: 30px;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 16px 40px rgba(18, 80, 159, 0.45);
  animation: pulse 1.9s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.07); opacity: 1; }
}

.stage-idle p {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
  color: #8fa1c0;
}

@media (max-width: 640px) {
  .watch-bar { flex-wrap: wrap; gap: 10px; }
  .watch-stage { border-radius: 14px; }
}

/* ------------------------------- modal -------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 40, 75, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal.open { display: flex; }

.modal-box {
  width: min(520px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
  animation: rise 0.26s ease;
}

.modal-box.wide { width: min(940px, 100%); padding: 20px; }

/* ----------------------------- gate card ------------------------------ */

.modal-box.gate {
  position: relative;
  width: min(440px, 100%);
  padding: 38px 34px 34px;
  text-align: center;
}

.gate-close { position: absolute; top: 16px; right: 16px; }

.gate-head { margin-bottom: 26px; }

.gate-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  padding-left: 4px;
  font-size: 22px;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 14px 32px rgba(18, 80, 159, 0.32);
}

.gate-head h2 {
  margin: 0 0 8px;
  font-size: 1.38rem;
  letter-spacing: -0.6px;
}

.gate-head p {
  margin: 0 auto;
  max-width: 300px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

.gate-head p b { color: var(--text); font-weight: 600; }

.modal-box.gate form { text-align: left; }
.modal-box.gate .field { margin-bottom: 18px; }
.modal-box.gate .field:last-of-type { margin-bottom: 24px; }

.btn.lg { padding: 14px 24px; font-size: 1rem; border-radius: 14px; }

.thanks-icon {
  padding-left: 0;
  font-size: 28px;
  animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.thanks-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.thanks-actions .btn { width: 100%; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-head h2 { margin: 0 0 4px; font-size: 1.28rem; letter-spacing: -0.4px; }
.modal-head p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.icon-btn {
  flex: none;
  width: 34px;
  height: 34px;
  font-size: 18px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover { color: var(--brand); border-color: var(--border-strong); }

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1220;
}

.player video,
.player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* -------------------------------- form -------------------------------- */

.field { margin-bottom: 17px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--muted);
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.85);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field textarea { min-height: 86px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: #a3aec1; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 4px rgba(47, 123, 214, 0.14);
}

.field input[type='file'] { padding: 10px; cursor: pointer; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.pw-toggle:hover { color: var(--brand); background: var(--brand-soft); }
.pw-toggle:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 1px; }
.pw-toggle svg { width: 19px; height: 19px; }

.hint { margin: 7px 0 0; font-size: 0.78rem; color: var(--muted); }

.callout {
  margin-top: 9px;
  padding: 11px 13px;
  font-size: 0.79rem;
  line-height: 1.6;
  color: #7a5310;
  border: 1px solid rgba(214, 158, 46, 0.32);
  border-radius: 12px;
  background: rgba(250, 200, 60, 0.12);
}

.callout b { color: #6b470c; }
.callout em { font-style: normal; font-weight: 600; }

.callout .share-mail {
  display: inline-block;
  padding: 1px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: #6b470c;
  border-radius: 6px;
  background: rgba(214, 158, 46, 0.22);
  user-select: all;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  color: #fff;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 8px 20px rgba(18, 80, 159, 0.24);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(18, 80, 159, 0.30); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }

.btn.ghost {
  color: var(--brand);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn.ghost:hover { background: #fff; border-color: var(--brand-light); }

.btn.danger {
  background: linear-gradient(135deg, #e23a52, var(--danger));
  box-shadow: 0 8px 18px rgba(217, 45, 68, 0.22);
}

.btn.sm { padding: 8px 15px; font-size: 0.84rem; }

.alert {
  display: none;
  margin-bottom: 16px;
  padding: 11px 14px;
  font-size: 0.87rem;
  border-radius: 12px;
  border: 1px solid rgba(217, 45, 68, 0.28);
  background: rgba(217, 45, 68, 0.07);
  color: #a51f34;
}

.alert.ok {
  border-color: rgba(16, 148, 110, 0.28);
  background: rgba(16, 148, 110, 0.07);
  color: #0b7a5b;
}

.alert.show { display: block; }

.empty {
  padding: 74px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
}

.empty h3 { color: var(--text); margin: 12px 0 8px; }

/* ------------------------------- admin -------------------------------- */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  padding: 36px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
}

.login-card img { width: 58px; height: 58px; object-fit: contain; }
.login-card h1 { margin: 18px 0 6px; font-size: 1.5rem; letter-spacing: -0.6px; }
.login-card > p { margin: 0 0 26px; color: var(--muted); font-size: 0.9rem; }
.login-card form { text-align: left; }

/* ------------------------------ sidebar ------------------------------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 260px;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: transform 0.28s ease, width 0.28s ease, padding 0.28s ease;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 22px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.side-brand img { width: 38px; height: 38px; object-fit: contain; }

.side-brand small {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.side-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.side-label {
  margin: 16px 10px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #9aa7bd;
}

.side-label:first-child { margin-top: 0; }
.side-label.push-down { margin-top: auto; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  text-align: left;
  text-decoration: none;
  color: var(--muted);
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.nav-item:hover { color: var(--brand); background: var(--brand-soft); }
.nav-item.danger:hover { color: var(--danger); background: rgba(217, 45, 68, 0.08); }

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 8px 18px rgba(18, 80, 159, 0.26);
}

.nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  font-size: 1rem;
  line-height: 1;
}

.g-icon { width: 16px; height: 16px; display: block; }
/* The brand mark keeps its colours on the active (blue) row. */
.nav-item.active .g-icon { filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)); }

.side-foot {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 12px 4px;
  border-top: 1px solid var(--border);
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
}

.side-user {
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #9aa7bd;
}

.side-user small {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(20, 40, 75, 0.28);
  backdrop-filter: blur(4px);
}

.sidebar-scrim.show { display: block; }

.admin-main {
  margin-left: 260px;
  transition: margin-left 0.28s ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px clamp(18px, 3.4vw, 40px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.topbar-title { min-width: 0; }
.topbar h1 { margin: 0; font-size: 1.4rem; letter-spacing: -0.7px; }

.topbar-title p {
  margin: 1px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar-action { margin-left: auto; text-decoration: none; }
.topbar-action .nav-ico { font-size: 0.95rem; }

.admin-body { padding: 26px clamp(18px, 3.4vw, 40px) 0; }

/* Collapsed sidebar: icons only */
.sidebar.collapsed { width: 78px; padding-left: 12px; padding-right: 12px; }
.sidebar.collapsed .nav-txt,
.sidebar.collapsed .side-label,
.sidebar.collapsed .side-brand span { display: none; }
.sidebar.collapsed .side-brand { justify-content: center; padding-bottom: 18px; }
.sidebar.collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
/* Kept as a zero-height spacer so Logout stays pinned to the bottom. */
.sidebar.collapsed .side-label.push-down {
  display: block;
  margin: auto 0 0;
  height: 0;
  padding: 0;
  overflow: hidden;
  visibility: hidden;
}
.sidebar.collapsed .side-foot { justify-content: center; }
.sidebar.collapsed + .sidebar-scrim + .admin-main { margin-left: 78px; }

.panel { display: none; padding-bottom: 70px; }
.panel.active { display: block; }

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.panel-head h2 { margin: 0 0 4px; font-size: 1.3rem; letter-spacing: -0.5px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 0.88rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.stat {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
}

.stat b {
  display: block;
  font-size: 1.9rem;
  letter-spacing: -1.2px;
  color: var(--brand);
}

.stat span {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--muted);
}

.table-wrap {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
  gap: 20px;
}

.admin-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-card .thumb { aspect-ratio: 16 / 9; }
.admin-card-body { padding: 15px 17px 17px; }
.admin-card-body h4 { margin: 0 0 4px; font-size: 0.98rem; letter-spacing: -0.2px; }
.admin-card-body p { margin: 0 0 13px; font-size: 0.8rem; color: var(--muted); }

.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 11px !important;
  padding: 6px 11px;
  font-size: 0.75rem !important;
  font-weight: 600;
  border-radius: 999px;
}

.chip.busy {
  color: var(--brand) !important;
  background: var(--brand-soft);
}

.chip.busy .spinner {
  border-color: rgba(18, 80, 159, 0.3);
  border-top-color: var(--brand);
  width: 13px;
  height: 13px;
}

.chip.warn {
  color: #7a5310 !important;
  background: rgba(250, 200, 60, 0.16);
}

.chip.ok {
  color: #0b7a5b !important;
  background: rgba(16, 148, 110, 0.12);
}

/* ---------------------------- drive panel ----------------------------- */

.drive-status {
  margin-bottom: 24px;
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-sm);
}

.drive-status h3 { margin: 0 0 8px; font-size: 1.08rem; letter-spacing: -0.3px; }

.drive-status p {
  margin: 0 0 14px;
  max-width: 640px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
}

.drive-status p:last-child { margin-bottom: 0; }

.drive-status pre {
  margin: 0 0 14px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--brand);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--brand-soft);
}

.drive-connected {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drive-connected div { flex: 1; min-width: 0; }
.drive-connected h3 { margin: 0 0 3px; }
.drive-connected p { margin: 0; }

.drive-dot {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.drive-search {
  min-width: 230px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
}

.drive-search:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(47, 123, 214, 0.14);
}

.current-files {
  margin-bottom: 18px;
  padding: 11px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
  word-break: break-all;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--brand-soft);
}

.current-files b { color: var(--text); }

/* DataTables, restyled for the light theme */
table.dataTable { width: 100% !important; color: var(--text); border-collapse: collapse !important; }
table.dataTable thead th {
  border-bottom: 1px solid var(--border-strong) !important;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  padding: 13px 10px !important;
}
table.dataTable tbody td {
  border-top: 1px solid rgba(18, 80, 159, 0.08) !important;
  padding: 13px 10px !important;
  font-size: 0.9rem;
}
table.dataTable tbody tr { background: transparent !important; }
table.dataTable tbody tr:hover td { background: var(--brand-soft) !important; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 7px 11px;
  margin-left: 8px;
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(47, 123, 214, 0.14);
}
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate { color: var(--muted) !important; font-size: 0.85rem; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  margin: 0 3px;
  background: rgba(255, 255, 255, 0.7) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #fff !important;
  border-color: var(--brand-light) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-light)) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled { opacity: 0.4; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.ghost .spinner { border-color: rgba(18, 80, 159, 0.3); border-top-color: var(--brand); }

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

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .admin-main,
  .sidebar.collapsed + .sidebar-scrim + .admin-main { margin-left: 0; }
}

@media (max-width: 640px) {
  .hero { padding: 44px 0 16px; }
  .modal-box { padding: 24px; }
  .partner-badge { height: 28px; }
  .brand small { display: none; }
  .brand-lockup { gap: 11px; }
  .brand-sep { height: 26px; }
  .event-chip { display: none; }
  .site-header .container { justify-content: flex-start; }
  .trust { gap: 8px; }
  .trust li { padding: 8px 13px; font-size: 0.78rem; }
  .section-head { margin-top: 34px; }
  .ring { display: none; }
}

@media (max-width: 1080px) {
  .event-chip { font-size: 0.72rem; padding: 7px 12px; }
}

/* Short laptop screens: shrink the intro so the video grid stays reachable
   without scrolling. Keyed to viewport height, not width. */
@media (min-width: 720px) and (max-height: 820px) {
  .hero { padding: 16px 0 12px; }
  .eyebrow { margin-bottom: 10px; padding: 5px 13px 5px 11px; font-size: 0.7rem; }
  .hero h1 { margin-bottom: 10px; font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
  .hero p { font-size: 0.94rem; line-height: 1.6; }
  .trust { margin-top: 13px; gap: 9px; }
  .trust li { padding: 7px 14px; font-size: 0.8rem; }
  .section-head { margin-top: 18px; padding-bottom: 10px; }
  .grid { padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .ring, .eyebrow i, .event-chip i, .hero h1 span { animation: none !important; }
  .card, .hero h1, .hero p, .eyebrow, .trust { animation-duration: 0.01ms !important; }
}
