/* ==========================================================================
   Real World Investing by Bert · black and gold, taken from the channel logo.
   Dark sections (hero, learn, reviews) alternate with ivory reading sections
   (about, book). Gold is kept for calls to action and accents.
   ========================================================================== */
:root {
  --onyx:   #0A0A0A;
  --coal:   #161513;
  --gold:   #E0A526;
  --glint:  #F5CF4A;
  --bronze: #965C14;
  --ivory:  #F7F3EA;
  --stone:  #A39C8E;
  --white:  #FFFFFF;
  --gold-gradient: linear-gradient(135deg, #F5CF4A 0%, #E0A526 45%, #B47619 100%);
  color-scheme: dark;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
html, body { overflow-x: clip; }
body { background: var(--onyx); color: var(--ivory); font-size: 17px; line-height: 1.7; }
h1, h2, h3 { text-wrap: balance; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; border-radius: 999px; background: var(--gold); color: var(--onyx); font-weight: 700; }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--glint); outline-offset: 3px; }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.section-title { font-family: Archivo, system-ui, sans-serif; font-weight: 800; font-stretch: 112%; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.04; letter-spacing: -.01em; }
.accent-word { font-family: Fraunces, Georgia, serif; font-style: italic; font-weight: 500; font-stretch: normal; letter-spacing: -.01em; }
.light-section .accent-word { color: var(--bronze); }

/* ---------- Header ---------- */
.site-header { transition: background-color .3s, box-shadow .3s, backdrop-filter .3s; }
.site-header.is-scrolled, body.menu-open .site-header { background: rgba(10,10,10,.9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(224,165,38,.25); }
.wordmark { font-family: Archivo, system-ui, sans-serif; font-weight: 800; font-stretch: 115%; font-size: 19px; letter-spacing: .01em; color: var(--white); }
@media (max-width: 380px) { .wordmark { font-size: 16px; } }
.nav-link { position: relative; padding-block: .5rem; color: rgba(247,243,234,.82); transition: color .2s; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--gold); transition: right .25s ease; }
.nav-link:hover, .nav-link.is-active { color: var(--glint); }
.nav-link:hover::after, .nav-link.is-active::after { right: 0; }

.menu-btn { display: none; width: 48px; height: 48px; place-content: center; gap: 7px; border-radius: 50%; border: 1px solid rgba(224,165,38,.5); }
@media (max-width: 767.98px) { .menu-btn { display: grid; } }
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--gold); transition: transform .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
.mobile-menu { background: rgba(10,10,10,.97); border-bottom: 1px solid rgba(224,165,38,.25); }
.mobile-link { display: block; padding: 1rem .25rem; border-bottom: 1px solid rgba(255,255,255,.08); font-family: Archivo, sans-serif; font-weight: 700; font-stretch: 112%; font-size: 24px; color: var(--white); }
.mobile-link.is-active, .mobile-link:hover { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn-gold, .btn-ghost, .btn-onyx {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 14px 32px; border-radius: 999px;
  font-weight: 700; font-size: 16px; line-height: 1; letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s, color .2s, border-color .2s;
}
.btn-gold { background: var(--gold-gradient); color: var(--onyx); box-shadow: 0 10px 30px -10px rgba(224,165,38,.7), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(224,165,38,.9), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-gold--sm { min-height: 42px; padding: 10px 22px; font-size: 14px; }
.btn-ghost { color: var(--white); border: 1.5px solid rgba(247,243,234,.35); }
.btn-ghost:hover { border-color: var(--gold); color: var(--glint); }
.btn-onyx { background: var(--onyx); color: var(--glint); box-shadow: 0 10px 24px -12px rgba(0,0,0,.6); }
.btn-onyx:hover { transform: translateY(-2px); background: #222; }
.light-section .btn-onyx:focus-visible, .newsletter .btn-onyx:focus-visible { outline-color: var(--onyx); }
.link-arrow { font-weight: 700; color: var(--bronze); border-bottom: 1.5px solid rgba(150,92,20,.35); padding-bottom: 2px; }
.link-arrow:hover { border-color: var(--bronze); }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(80% 70% at 78% 35%, rgba(224,165,38,.16) 0%, transparent 60%), radial-gradient(60% 60% at 10% 100%, rgba(150,92,20,.18) 0%, transparent 70%), var(--onyx); }
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(224,165,38,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(224,165,38,.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask: linear-gradient(180deg, transparent, #000 25%, #000 70%, transparent);
  mask: linear-gradient(180deg, transparent, #000 25%, #000 70%, transparent);
}
.hero__line { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; pointer-events: none; opacity: .9; }
.hero__line-path { stroke-dasharray: 2400; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px rgba(245,207,74,.6)); animation: draw 2.6s cubic-bezier(.4,0,.2,1) both; }

.hero-title {
  font-family: Archivo, system-ui, sans-serif; font-weight: 900; font-stretch: 108%;
  font-size: clamp(44px, 6.2vw, 82px); line-height: .92; letter-spacing: -.015em; text-transform: uppercase;
}
.gold-text { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 24px rgba(224,165,38,.25)); }

.hero-photo {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 24px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(224,165,38,.45);
}
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,10,10,.7)); }
.hero-chips { position: absolute; inset: 0; pointer-events: none; }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: rgba(22,21,19,.86); backdrop-filter: blur(8px); border: 1px solid rgba(224,165,38,.45);
  color: var(--white); font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 14px 30px -14px rgba(0,0,0,.8);
  animation: float 6s ease-in-out infinite;
}
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--glint); }
.chip--a { left: -22px; top: 14%; }
.chip--b { right: -18px; top: 46%; animation-delay: -2s; }
.chip--c { left: 18px; bottom: 26px; animation-delay: -4s; }
@media (max-width: 640px) { .chip--a { left: 8px; } .chip--b { right: 8px; } }

/* ---------- Light sections ---------- */
.light-section { background: var(--ivory); color: var(--onyx); }
.light-section .eyebrow.text-bronze { color: var(--bronze); }
.framed { overflow: hidden; border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(10,10,10,.45); }
.seal { position: absolute; right: -14px; bottom: -28px; width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 0 0 6px var(--ivory), 0 16px 30px -10px rgba(0,0,0,.5); }
@media (max-width: 640px) { .seal { right: 8px; width: 76px; height: 76px; } }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }
.pillars li { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: var(--white); border: 1px solid rgba(150,92,20,.18); font-weight: 600; line-height: 1.3; }
@media (max-width: 560px) { .pillars li { flex-direction: row; align-items: center; } }
.pillars svg { width: 26px; height: 26px; color: var(--bronze); flex: none; }

/* ---------- Learn ---------- */
.learn-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .learn-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .topic { grid-column: span 2; } .topic--wide { grid-column: span 3; } }
.topic { position: relative; overflow: hidden; border-radius: 22px; min-height: 340px; background: var(--coal); border: 1px solid rgba(224,165,38,.18); isolation: isolate; }
.topic img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.topic::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,10,10,0) 30%, rgba(10,10,10,.92) 100%); }
.topic:hover img { transform: scale(1.05); }
.topic:hover { border-color: rgba(224,165,38,.6); }
.topic__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px; }
.topic__tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: var(--onyx); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.topic h3 { margin-top: 12px; font-family: Archivo, sans-serif; font-weight: 800; font-stretch: 110%; font-size: 26px; line-height: 1.1; color: var(--white); }
.topic p { margin-top: 6px; max-width: 420px; color: rgba(247,243,234,.78); font-size: 16px; line-height: 1.5; }

/* ---------- Videos ---------- */
.btn-yt { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; min-height: 52px; padding: 14px 26px; border-radius: 999px; border: 1.5px solid rgba(224,165,38,.5); color: var(--white); font-weight: 700; transition: border-color .2s, color .2s, background-color .2s; }
.btn-yt svg { width: 24px; height: 24px; color: #FF0033; }
.btn-yt:hover { border-color: var(--gold); background: rgba(224,165,38,.08); color: var(--glint); }
.video-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.video { display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; background: var(--coal); border: 1px solid rgba(224,165,38,.18); transition: border-color .3s, transform .3s; }
.video:hover { border-color: rgba(224,165,38,.6); transform: translateY(-4px); }
.video__thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.video__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.video:hover .video__thumb img { transform: scale(1.05); }
.video__thumb::after { content: ""; position: absolute; inset: 0; background: rgba(10,10,10,.25); transition: background-color .3s; }
.video:hover .video__thumb::after { background: rgba(10,10,10,.1); }
.video__play { position: absolute; z-index: 1; left: 50%; top: 50%; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--gold-gradient); color: var(--onyx); box-shadow: 0 10px 30px -6px rgba(0,0,0,.7); transition: transform .3s; }
.video__play svg { width: 28px; height: 28px; margin-left: 3px; }
.video:hover .video__play { transform: translate(-50%, -50%) scale(1.1); }
.video--feature .video__play { width: 84px; height: 84px; }
.video__badge { position: absolute; z-index: 1; left: 16px; top: 16px; padding: 4px 12px; border-radius: 999px; background: #FF0033; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.video__meta { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 24px; }
.video--feature .video__meta { padding: 28px 32px; }
.video__title { font-family: Archivo, sans-serif; font-weight: 800; font-stretch: 108%; font-size: 19px; line-height: 1.2; color: var(--white); }
.video--feature .video__title { font-size: clamp(22px, 2.4vw, 30px); }
.video__kicker { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.video__sub { font-size: 14px; color: var(--stone); }
@media (min-width: 640px) { .video--feature { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .video--feature { display: grid; grid-template-columns: 1.6fr 1fr; align-items: center; } .video--feature .video__thumb { height: 100%; } }
.link-gold { font-weight: 700; color: var(--gold); border-bottom: 1.5px solid rgba(224,165,38,.4); padding-bottom: 2px; }
.link-gold:hover { color: var(--glint); border-color: var(--glint); }

/* ---------- Book ---------- */
.spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(10,10,10,.15); border-bottom: 1px solid rgba(10,10,10,.15); }
.spec > div { padding: 14px 14px 14px 0; min-width: 0; }
.spec > div + div { padding-left: 14px; border-left: 1px solid rgba(10,10,10,.15); }
.spec dt { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze); }
.spec dd { margin-top: 2px; font-weight: 600; font-size: 16px; line-height: 1.35; }
.book-collage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.book-collage__main { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.book-collage__a, .book-collage__b { aspect-ratio: 4 / 3; }

/* ---------- Reviews ---------- */
#reviews { background: radial-gradient(60% 80% at 50% 0%, rgba(224,165,38,.10), transparent 70%), var(--onyx); }
.review { display: flex; flex-direction: column; gap: 18px; padding: 30px; border-radius: 22px; background: var(--coal); border: 1px solid rgba(224,165,38,.2); transition: transform .3s, border-color .3s; }
.review:hover { transform: translateY(-6px); border-color: rgba(224,165,38,.6); }
.stars-row { color: var(--gold); letter-spacing: 4px; }
.review__quote { flex: 1; font-family: Fraunces, Georgia, serif; font-style: italic; font-size: 21px; line-height: 1.4; color: var(--white); }
.review__by { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.review__by strong { display: block; color: var(--white); }
.review__by span { font-size: 14px; color: var(--stone); }
.initials { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--gold-gradient); color: var(--onyx); font-weight: 800; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--gold-gradient); color: var(--onyx); box-shadow: 0 40px 80px -40px rgba(224,165,38,.6); }
.newsletter::before { content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(255,255,255,.12); }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(10,10,10,.75); }
.field { width: 100%; height: 52px; padding: 0 18px; border-radius: 14px; border: 2px solid transparent; background: var(--white); color: var(--onyx); font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field::placeholder { color: #8A8478; }
.field:focus { outline: none; border-color: var(--onyx); box-shadow: 0 0 0 4px rgba(10,10,10,.15); }

/* ---------- Footer ---------- */
.footer-link { transition: color .2s; }
.footer-link:hover { color: var(--gold); }
.social { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(224,165,38,.3); color: var(--ivory); transition: color .2s, border-color .2s; }
.social svg { width: 20px; height: 20px; }
.social:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Motion ---------- */
.reveal-pending { opacity: 0; translate: 0 30px; }
.reveal-pending.is-revealed { opacity: 1; translate: 0 0; transition: opacity .8s ease, translate .8s cubic-bezier(.2,.8,.2,1); }
@keyframes draw { from { stroke-dashoffset: 2400; } to { stroke-dashoffset: 0; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
