/* Earneli Media site. Brand colours match YouTube/README.md. */
:root {
  --green-deep: #0B5D4B;
  --green-mid: #0E7560;
  --green-ink: #0B3D31;
  --gold: #F2B544;
  --gold-hover: #F6C86C;
  --mint: #D7EFE8;
  --paper: #F4FAF7;
  --surface: #FFFFFF;
  --text: #0B3D31;
  --text-soft: #3C6359;
  --line: #CFE3DC;
  --link: #0E7560;
  --focus-ring: #0B5D4B;
  --radius-lg: 20px;
  --radius-sm: 12px;
  --wrap: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #062A22;
    --surface: #0A3A2F;
    --text: #E6F5F0;
    --text-soft: #A9CDC2;
    --line: #175A4A;
    --link: #F2B544;
    --focus-ring: #F2B544;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

a { color: var(--link); text-underline-offset: 0.18em; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* Visually hidden utility (opts out on :focus-within / :active for skip links) */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip:focus-visible {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  background: var(--gold);
  color: var(--green-ink);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  outline: 3px solid var(--green-ink);
  outline-offset: 2px;
}

/* Hero */

.hero {
  background: var(--green-deep);
  color: #fff;
  position: relative;
  overflow: hidden;
  --focus-ring: var(--gold);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--green-mid);
  pointer-events: none;
}
.hero::before { width: 620px; height: 620px; right: -220px; top: -260px; opacity: 0.55; }
.hero::after { width: 420px; height: 420px; left: -200px; bottom: -260px; opacity: 0.45; }

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-block-size: 44px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; }

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  min-block-size: 44px;
  color: var(--mint);
  font-weight: 500;
  font-size: 0.9375rem;
}
.topbar-link:hover { color: #fff; }

.hero-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  padding-top: 40px;
  padding-bottom: 104px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 1.4rem + 4.5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 11ch;
}

.hero .lede {
  margin: 24px 0 0;
  max-width: 36ch;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--mint);
}

.actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-block-size: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-gold { background: var(--gold); color: var(--green-ink); }
.btn-gold:hover { background: var(--gold-hover); }
.btn-ghost { color: #fff; border-color: rgba(215, 239, 232, 0.5); }
.btn-ghost:hover { border-color: #fff; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* The rising-bars mark: the one animated moment on the page. */
.mark {
  justify-self: end;
  width: min(100%, 380px);
  aspect-ratio: 1;
}
.mark svg { width: 100%; height: 100%; overflow: visible; }
.mark .bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.mark .bar:nth-of-type(2) { animation-delay: 0.12s; }
.mark .bar:nth-of-type(3) { animation-delay: 0.24s; }
.mark .coin {
  animation: drop 0.7s cubic-bezier(0.3, 1.4, 0.5, 1) 0.85s both;
}

@keyframes rise {
  from { transform: scaleY(0.08); }
  to { transform: scaleY(1); }
}
@keyframes drop {
  from { transform: translateY(-90px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Sections */

main section { padding: 80px 0; }
main section + section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}

.section-head > div { max-width: 40rem; }

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 750;
}

.section-head p {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 1.125rem;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 44px;
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
}

/* Start here + playlists */

.start {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}

.video {
  display: block;
  color: inherit;
  text-decoration: none;
}

.video .thumb {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--green-deep);
  border: 2px solid transparent;
  transition: border-color 0.15s ease, transform 0.2s ease;
}

.video .thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video:hover .thumb {
  border-color: var(--gold);
}

.duration {
  position: absolute;
  inset-block-end: 12px;
  inset-inline-end: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(6, 42, 34, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.duration svg { width: 12px; height: 12px; flex: none; }

.video:hover .duration {
  background: var(--gold);
  color: var(--green-ink);
  border-color: transparent;
}

.video-meta {
  margin: 16px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-soft);
}

.video h3 {
  margin: 16px 0 6px;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.video-meta + h3 { margin-top: 6px; }

.video:hover h3 {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.video p:not(.video-meta) {
  margin: 0;
  color: var(--text-soft);
}

.aside-label {
  margin: 0 0 14px;
  font-weight: 600;
  color: var(--text-soft);
  font-size: 0.9375rem;
}

.playlists { margin: 0; padding: 0; list-style: none; }
.playlists li + li { margin-top: 12px; }
.playlists a {
  display: block;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.playlists a:hover { border-color: var(--green-mid); }
.playlists strong { display: block; font-size: 1.0625rem; }
.playlists span { display: block; margin-top: 2px; color: var(--text-soft); font-size: 0.9375rem; }

/* Latest videos grid */

.video-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.video-grid .video h3 {
  font-size: 1.25rem;
}

.shorts-bar {
  margin-top: 36px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.shorts-bar p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9375rem;
}

.shorts-bar strong { color: var(--text); }

.shorts-bar a {
  display: inline-flex;
  align-items: center;
  min-block-size: 40px;
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
}

/* Coming next */

.next {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  max-width: 48rem;
}

.next-badge {
  min-inline-size: 5.5rem;
  min-block-size: 5.5rem;
  padding: 0.75rem 1rem;
  border-radius: 22px;
  background: var(--gold);
  color: var(--green-ink);
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.next p { margin: 10px 0 0; color: var(--text-soft); }

/* Contact & trust row */

.contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
}

.contact h3 { margin: 0 0 8px; font-size: 1.125rem; }
.contact p { margin: 0; color: var(--text-soft); font-size: 0.975rem; }

.contact .email {
  display: inline-block;
  font-weight: 600;
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 40px;
  margin-top: 8px;
  font-weight: 600;
  font-size: 1.0625rem;
}

.email-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

/* Copy button (Invoker Commands + live-region confirmation bubble) */

.copy {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 36px;
  min-block-size: 36px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.copy-button:hover { border-color: var(--green-mid); }
.copy-button svg { width: 18px; height: 18px; display: block; }
.copy-button .icon-check { display: none; }
.copy-button[data-copied] .icon-copy { display: none; }
.copy-button[data-copied] .icon-check { display: block; color: var(--green-mid); }

@media (prefers-color-scheme: dark) {
  .copy-button[data-copied] .icon-check { color: var(--gold); }
}

.copy .tip {
  position: absolute;
  inset-block-end: calc(100% + 8px);
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--green-ink);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.copy .tip:empty {
  padding: 0;
  border: 0;
}

.copy-button[data-copied] + .tip,
.copy-button[data-failed] + .tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (pointer: coarse) {
  .copy-button {
    min-inline-size: 44px;
    min-block-size: 44px;
  }
}

/* Footer */

footer {
  background: var(--green-ink);
  color: var(--mint);
  padding: 40px 0 48px;
  font-size: 0.9375rem;
  --focus-ring: var(--gold);
}
footer a { color: #fff; }
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 40px;
}
.foot p { margin: 0; max-width: 46rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 40px;
}

/* Disclaimer page */

.page-hero .hero-body { grid-template-columns: 1fr; padding-bottom: 72px; }
.page-hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.5vw, 4rem); max-width: none; }

.prose { max-width: 42rem; }
.prose h2 { font-size: 1.5rem; margin-top: 44px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 6px; }
.updated { color: var(--text-soft); font-size: 0.9375rem; margin-top: 40px; }

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .mark .bar, .mark .coin { animation: none; }
  .btn, .video .thumb, .duration, .playlists a, .copy-button { transition: none; }
  .copy .tip {
    transform: translateX(-50%);
    transition: opacity 0.15s ease;
  }
}

/* Forced Colors Mode (Windows High Contrast) */

@media (forced-colors: active) {
  .btn,
  .playlists a,
  .shorts-bar,
  .next-badge,
  .copy-button,
  .copy .tip,
  .duration,
  .video .thumb {
    border: 1px solid CanvasText;
  }
  .btn-gold {
    border-color: ButtonText;
  }
  :focus-visible {
    outline: 3px solid Highlight;
  }
}

/* Small screens */

@media (max-width: 820px) {
  .hero-body {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 68px;
  }
  .mark {
    order: -1;
    justify-self: start;
    width: 76px;
  }
  .start, .video-grid, .contact { grid-template-columns: 1fr; }
  main section { padding: 60px 0; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .topbar-link span { display: none; }
  .actions .btn { width: 100%; }
  .next { grid-template-columns: 1fr; gap: 18px; }
  .next-badge { justify-self: start; min-inline-size: 4.5rem; min-block-size: 4.5rem; border-radius: 18px; font-size: 1.0625rem; }
}
