/* ============================================
   Gerry Invests — Design tokens
   Premium / editorial / understated finance-media aesthetic
   ============================================ */

:root {
  --ink: #14171A;
  --ink-soft: #4A5058;
  --paper: #FAF8F3;
  --paper-alt: #F1EEE5;
  --line: rgba(20, 23, 26, 0.10);
  --accent: #1F3D2B;      /* deep forest green */
  --accent-soft: #E7EDE7;
  --accent-contrast: #F5F1E8;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 1140px;
  --max-narrow: 760px;

  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img, svg { max-width: 100%; display: block; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}
.container.narrow { max-width: var(--max-narrow); }
.center { text-align: center; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

h1 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.35rem); margin: 0 auto 40px; max-width: 780px; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }

p { margin: 0 0 16px; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.eyebrow.center { text-align: center; }

.section-lede {
  font-size: 1.05rem;
  max-width: 560px;
  margin: -10px auto 44px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, opacity .2s ease;
  white-space: nowrap;
  will-change: transform;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { opacity: 0.92; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-block { width: 100%; }

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.cta-row.center { justify-content: center; }

.micro-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow .25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.logo span { color: var(--accent); font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a:not(.nav-cta) {
  position: relative;
  padding-bottom: 2px;
}
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s ease;
}
.nav-links a:not(.nav-cta):hover { color: var(--accent); }
.nav-links a:not(.nav-cta):hover::after,
.nav-links a:not(.nav-cta).active::after { right: 0; }
.nav-links a:not(.nav-cta).active { color: var(--accent); }

/* Scroll progress indicator */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

.nav-cta {
  padding: 10px 20px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: var(--radius);
  font-weight: 600;
}
.nav-cta:hover { opacity: 0.9; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 32px;
}
.hero-graphic {
  color: var(--accent);
  justify-self: center;
  width: 100%;
  max-width: 340px;
}

/* Soft cursor-reactive glow — desktop only, very low opacity */
.cursor-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  margin-left: -260px;
  margin-top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0;
  filter: blur(40px);
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
  transform: translate(var(--x, 50vw), var(--y, 200px));
}
.hero:hover .cursor-glow { opacity: 0.14; }
@media (max-width: 900px), (hover: none) {
  .cursor-glow { display: none; }
}

/* ============ Kinetic tagline ticker ============ */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper-alt);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 32s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  white-space: nowrap;
  padding-right: 28px;
}
.ticker-item::after {
  content: "•";
  color: var(--accent);
  font-family: var(--font-sans);
  font-style: normal;
  margin-left: 28px;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ============ Sections ============ */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.section.alt { background: var(--paper-alt); }

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
}
.mini-item { text-align: center; }
.mini-item .num {
  display: block;
  font-family: var(--font-serif);
  color: var(--accent);
  font-size: 1.6rem;
  margin-bottom: 10px;
}

/* ============ About ============ */
.about-inner {
  display: grid;
  grid-template-columns: 0.4fr 0.6fr;
  gap: 64px;
  align-items: center;
}
.about-visual { justify-self: center; }
.monogram {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-serif);
  font-size: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.body-text { font-size: 1.02rem; max-width: 540px; }

.credibility-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.credibility-list li {
  padding-left: 24px;
  position: relative;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.credibility-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============ Proof of work ============ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 24px;
}
.video-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  padding: 0 0 22px;
}
.video-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.video-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(20, 23, 26, 0.25);
}
.video-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--accent) 0%, #0F1F16 100%);
  margin-bottom: 18px;
  overflow: hidden;
  padding: 0;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.video-card:hover .video-thumb img {
  transform: scale(1.05);
}
.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 31, 22, 0.15) 0%, rgba(15, 31, 22, 0.45) 100%);
  transition: background 0.3s ease;
}
.video-card:hover .video-thumb::after {
  background: linear-gradient(180deg, rgba(15, 31, 22, 0.05) 0%, rgba(15, 31, 22, 0.3) 100%);
}
.play-icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(245, 241, 232, 0.15);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  border: 1px solid rgba(245, 241, 232, 0.4);
  transition: transform 0.3s ease, background 0.3s ease;
}
.video-card:hover .play-icon {
  transform: scale(1.12);
  background: rgba(245, 241, 232, 0.28);
}
.video-card h3, .video-card p { padding: 0 22px; }
.video-card p { font-size: 0.92rem; margin-bottom: 10px; }
.watch-link {
  display: inline-block;
  margin: 6px 22px 0;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  cursor: pointer;
}
.watch-link:hover { text-decoration: underline; }
.more-link { margin-top: 40px; }
.more-link a { font-weight: 600; color: var(--accent); }

/* ============ Chips ============ */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}
.chip-grid.small { justify-content: flex-start; margin-top: 20px; }
.chip {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
}
.chip.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.chip:hover {
  transform: translateY(-2px);
}
.soft-note {
  margin-top: 32px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Chip marquee — auto-scrolling row, pauses on hover, kept slow/quiet */
.chip-marquee {
  overflow: hidden;
  margin-top: 40px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.chip-marquee-track {
  display: flex;
  width: max-content;
  gap: 12px;
  animation: chip-marquee-scroll 28s linear infinite;
}
.chip-marquee:hover .chip-marquee-track {
  animation-play-state: paused;
}
.chip-marquee .chip {
  transition: transform 0.2s ease;
}
@keyframes chip-marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .chip-marquee-track { animation: none; }
}

/* ============ Conversation format ============ */
.format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  max-width: 900px;
  margin: 0 auto;
}
.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.fact-list li {
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding-left: 22px;
  position: relative;
}
.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.fact-list strong { color: var(--ink); }
.topics-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

/* ============ Benefits ============ */
.benefit-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1rem;
  color: var(--ink-soft);
}
.check {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* ============ Final CTA ============ */
.cta-section {
  background: var(--paper-alt);
}

/* ============ Footer ============ */
.site-footer {
  /* Intentionally fixed (not theme-linked): the footer is always an
     inverted dark band, in both light and dark mode. */
  background: #14171A;
  color: #FAF8F3;
  padding: 56px 0 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(250, 248, 243, 0.14);
  margin-bottom: 24px;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.05rem;
}
.footer-logo span { color: #8FBFA0; font-weight: 300; }
.footer-links {
  display: flex;
  gap: 28px;
  font-size: 0.9rem;
}
.footer-links a:hover { color: #8FBFA0; }
.disclaimer {
  font-size: 0.78rem;
  color: rgba(250, 248, 243, 0.5);
  margin: 0;
}

/* ============ Mobile sticky CTA ============ */
.mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  z-index: 90;
  display: none;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.mobile-cta.visible { transform: translateY(0); }

/* ============ Reveal animation ============
   Elements are visible by default; JS opts them into the
   pre-animation state only once it can guarantee it will reveal them. */
.reveal.pre-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.pre-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal.pre-reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Curtain reveal — a wipe rather than a fade, for headline emphasis.
   Same visible-by-default / JS-opts-in pattern as .reveal above. */
.curtain.pre-curtain {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
.curtain.pre-curtain.in-view {
  clip-path: inset(0 0 0 0);
}
@media (prefers-reduced-motion: reduce) {
  .curtain.pre-curtain { clip-path: none; transition: none; }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-graphic { display: none; }
  .about-inner { grid-template-columns: 1fr; text-align: center; }
  .about-visual { order: -1; }
  .body-text { margin-left: auto; margin-right: auto; }
  .credibility-list { align-items: center; }
  .credibility-list li { text-align: left; max-width: 420px; }
  .video-grid { grid-template-columns: 1fr; }
  .format-grid { grid-template-columns: 1fr; gap: 40px; }
  .chip-grid.small { justify-content: center; }
}

/* ============ Video lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.lightbox.open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 20, 0.82);
  backdrop-filter: blur(4px);
}
.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lightbox.open .lightbox-dialog {
  transform: translateY(0) scale(1);
}
.lightbox-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
}
.lightbox-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(250, 248, 243, 0.3);
  background: rgba(250, 248, 243, 0.08);
  color: var(--accent-contrast);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lightbox-close:hover {
  background: rgba(250, 248, 243, 0.18);
  border-color: rgba(250, 248, 243, 0.5);
}
@media (max-width: 600px) {
  .lightbox { padding: 16px; }
  .lightbox-close { top: -40px; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 28px 28px;
    gap: 18px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; }
  .nav-cta { text-align: center; }
  .nav-toggle { display: flex; }
  .mobile-cta { display: block; }
  .site-footer { padding-bottom: 100px; }
  .three-col { grid-template-columns: 1fr; gap: 40px; }
}
