/*
 * live.churchmediadrop.com — Drop Editor's own look (src/theme/dropTheme.ts
 * via drop-tokens.css), not a generic template. One file, no build-time
 * preprocessing, dark by default, no light mode.
 */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scrollbar-gutter: stable; background: var(--bg-default); }

body {
  margin: 0;
  background: var(--bg-default);
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-main); outline-offset: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 18px; border-radius: var(--radius-md);
  background: var(--accent-main); color: #ffffff; text-decoration: none;
  font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 12px var(--gutter, 40px);
  background: color-mix(in srgb, var(--bg-default) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-default);
}
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 28px; width: auto; }
.topbar-spacer { flex: 1; }
.topbar .pill {
  padding: 7px 16px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border-default);
  color: var(--text-secondary); text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.topbar .pill:hover { color: var(--text-primary); border-color: var(--accent-main); }

main { padding: 0 0 64px; }

.hero { padding: 28px var(--gutter, 40px) 0; }
.hero-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-paper);
  border: 1px solid var(--border-default);
}
.hero-video, .hero-video iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.hero-offline {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px; padding: 24px;
  background: var(--bg-paper);
}
.offline-title { margin: 0; font-size: 24px; font-weight: 600; color: var(--text-primary); }
.offline-sub { margin: 0; font-size: 15px; color: var(--text-secondary); }

.hero-title {
  margin: 22px 0 0;
  padding: 0 var(--gutter, 40px);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.catchup-line {
  margin: 8px 0 0;
  padding: 0 var(--gutter, 40px);
  color: var(--text-secondary);
  font-size: 15px;
}

.next-stream {
  margin: 8px 0 0;
  padding: 0 var(--gutter, 40px);
  color: var(--text-secondary);
  font-size: 15px;
}

.cards {
  margin-top: 40px;
  padding: 0 var(--gutter, 40px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-paper);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
}
.card h2 { margin: 0; font-size: 19px; font-weight: 600; }
.card-sub { margin: 4px 0 14px; color: var(--text-secondary); font-size: 14px; max-width: 32ch; }

.qr-wrap {
  padding: 14px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.qr-wrap canvas { display: block; width: 176px; height: 176px; }
.qr-wrap img.qr-mark {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #ffffff;
  padding: 4px;
  box-shadow: var(--shadow-dropdown);
}

.code {
  margin: 16px 0 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--accent-main);
}

.btn-primary {
  margin-top: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-main);
  background: var(--accent-main);
  color: #ffffff;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active { transform: scale(0.97); }

.link-fallback {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-disabled);
  text-decoration: underline;
  word-break: break-all;
}

/*
 * Breakpoint-scoped copy/controls: desktop shows the QR + code + scan copy,
 * phone shows one line of copy + a tappable join button (you can't scan your
 * own screen). `.only-desktop`/`.only-phone` are generic show/hide; the two
 * element-specific rules restore the display value each tag actually needs
 * once shown (a link stays inline, the button stays a flex pill), at higher
 * specificity than the generic class so source order never matters.
 */
.only-phone { display: none; }
.only-desktop { display: block; }
a.link-fallback.only-desktop { display: inline; }
a.btn-primary.only-phone { display: none; }

.footer {
  padding: 30px var(--gutter, 40px) 48px;
  border-top: 1px solid var(--border-default);
  color: var(--text-disabled);
  font-size: 12px;
  display: flex; align-items: center; gap: 10px;
}
.footer img { height: 16px; width: auto; opacity: 0.7; }

:root { --gutter: 40px; }

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .cards { grid-template-columns: 1fr; }
  .only-desktop { display: none; }
  .only-phone { display: block; }
  a.link-fallback.only-desktop { display: none; }
  a.btn-primary.only-phone { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
