/* ============================================================
   guymarcozzi.com — main.css
   Apple-inspired: clarity, deference, whitespace.
   Palette: near-white bg, near-black text, one navy accent.
   ============================================================ */

:root {
  color-scheme: only light;
  --bg: #fbfbfd;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0a2a4f;
  --accent-hover: #123c6d;
  --divider: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
  --radius: 16px;
  --nav-height: 52px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ---------- Reset & base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Inter, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms var(--ease);
}

a:hover {
  color: var(--accent-hover);
}

main p a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(10, 42, 79, 0.4);
}

main p a:not(.btn):hover {
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 24px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 980px;
  font-weight: 500;
}

.skip-link:focus {
  top: 10px;
}

/* ---------- Type scale ---------- */

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--text);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  letter-spacing: -0.022em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

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

.hero-eyebrow,
.hero-tagline,
.page-subtitle {
  text-wrap: balance;
}

p,
li,
blockquote {
  text-wrap: pretty;
}

p {
  max-width: 65ch;
}

/* ---------- Layout ---------- */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.content-narrow {
  max-width: 720px;
}

.content-mid {
  max-width: 920px;
}

section {
  padding: 64px 0;
}

@media (min-width: 768px) {
  body {
    font-size: 18px;
  }
  section {
    padding: 120px 0;
  }
}

.hero-eyebrow,
.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.hero-eyebrow {
  color: var(--accent);
}

.section-label {
  color: var(--muted);
}

.divider {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 48px 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 980px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease),
    border-color 180ms var(--ease), transform 180ms var(--ease);
}

.btn:hover {
  background: var(--accent);
  color: #fff;
}

.btn:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

.btn-solid {
  background: var(--accent);
  color: #fff;
}

.btn-solid:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 253, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--divider);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 4px 0;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  margin-right: -12px;
}

.nav-toggle .bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 250ms var(--ease), opacity 250ms var(--ease);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(251, 251, 253, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--divider);
    padding: 8px 24px 16px;
    display: flex;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 200ms var(--ease), transform 200ms var(--ease),
      visibility 0s linear 200ms;
  }
  .nav-links.open {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 1.05rem;
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

/* ---------- Hero (home) ---------- */

.home-hero {
  padding-top: 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 768px) {
  .home-hero {
    padding-top: 120px;
  }
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
  }
}

.hero-tagline {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 500;
  color: var(--text);
  margin-top: 20px;
  letter-spacing: -0.01em;
}

.hero-desc {
  color: var(--muted);
  margin-top: 16px;
  font-size: 1.05rem;
}

.hero-photo img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

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

.focus-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 600px) {
  .focus-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .focus-grid {
    gap: 24px;
  }
}

.focus-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.focus-card:has(a):hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.focus-card a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.focus-card h3 {
  margin-bottom: 10px;
}

.focus-card p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Proof / highlights ---------- */

.proof-section {
  border-top: 1px solid var(--divider);
}

.proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px 40px;
  margin-top: 32px;
}

@media (min-width: 1024px) {
  .proof-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.proof-item {
  border-top: 1px solid var(--divider);
  padding-top: 24px;
}

.proof-item h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.proof-item p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- CTA band ---------- */

.cta-strip {
  text-align: center;
  border-top: 1px solid var(--divider);
}

.cta-strip p {
  color: var(--muted);
  margin: 16px auto 0;
}

.cta-strip .btn {
  margin-top: 32px;
}

/* ---------- Inner-page hero ---------- */

.page-hero {
  padding: 72px 0 0;
  text-align: center;
}

@media (min-width: 768px) {
  .page-hero {
    padding: 110px 0 0;
  }
}


.page-subtitle {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 16px auto 0;
}

.page-subtitle .byline {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.page-title {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
}

.page-body h2 {
  font-size: 1.6rem;
  margin: 56px 0 20px;
}

.page-body h2:first-child {
  margin-top: 0;
}

.page-body p + p {
  margin-top: 1em;
}

.page-body ul {
  list-style: none;
  margin-top: 8px;
}

.page-body ul li {
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}

.page-body ul li:last-child {
  border-bottom: none;
}

.page-body ul li strong {
  font-weight: 600;
}

.page-body ul li .detail {
  color: var(--muted);
  font-size: 0.95rem;
  display: block;
  margin-top: 2px;
}

/* ---------- Bio ---------- */

.bio-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  margin: 40px auto 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ---------- Book ---------- */

.book-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

@media (min-width: 768px) {
  .book-layout {
    grid-template-columns: 280px 1fr;
  }
}

.book-cover img {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  max-width: 280px;
  box-shadow: 0 20px 40px -20px rgba(10, 42, 79, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.06);
}

.book-cover-placeholder {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: linear-gradient(160deg, #f2f2f7, #e8e8ee);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #58585d;
  font-size: 0.95rem;
  line-height: 2;
  max-width: 280px;
}

.book-cover-placeholder em {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  font-style: italic;
  color: var(--accent);
}

blockquote {
  margin: 36px 0;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text);
}

blockquote footer {
  margin-top: 14px;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- Speaking: video grid ---------- */

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 32px;
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--divider);
  padding: 40px 0;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 12px 0;
  margin: -12px 0;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.nav-links a:active,
.footer-links a:active {
  opacity: 0.6;
}

/* ---------- Reveal animation ---------- */

.reveal-armed {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}

.reveal-armed.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal-armed {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* ---------- Mobile reading sizes ---------- */

@media (max-width: 767px) {
  .focus-card p,
  .proof-item p,
  .page-body ul li .detail {
    font-size: 1rem;
  }
}

/* ---------- Speaking: talk cards ---------- */

.talk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.talk-card:hover,
.talk-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.talk-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border-bottom: 1px solid var(--divider);
  background: radial-gradient(
      110% 85% at 50% 42%,
      rgba(10, 42, 79, 0.09),
      rgba(10, 42, 79, 0) 68%
    ),
    linear-gradient(160deg, #f5f5f7 0%, #e8ebf0 100%);
}

/* If a real embed is dropped in, it takes the clicks instead of the card link */
.talk-card:has(.talk-poster iframe) .talk-poster {
  z-index: 1;
}

.talk-poster iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.talk-play {
  transition: transform 200ms var(--ease);
}

.talk-play-ring,
.talk-play-tri {
  transition: fill 200ms var(--ease), fill-opacity 200ms var(--ease);
}

.talk-card:hover .talk-play,
.talk-card:focus-within .talk-play {
  transform: scale(1.05);
}

.talk-card:hover .talk-play-ring,
.talk-card:focus-within .talk-play-ring {
  fill: var(--accent);
  fill-opacity: 1;
}

.talk-card:hover .talk-play-tri,
.talk-card:focus-within .talk-play-tri {
  fill: #fff;
}

.talk-body {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  padding: 24px;
}

.page-body .talk-card p {
  margin: 0;
  max-width: none;
}

.talk-card .talk-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.page-body .talk-card .talk-meta {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 12px;
}

.page-body .talk-card .talk-desc {
  font-size: 0.95rem;
  color: var(--muted);
}

.page-body .talk-card .talk-action {
  margin-top: auto;
  padding-top: 20px;
}

.talk-link {
  font-weight: 500;
  font-size: 0.95rem;
}

/* Makes the whole card a click target for the watch link */
.talk-link::before {
  content: "";
  position: absolute;
  inset: 0;
}

.talk-link::after {
  content: "→";
  display: inline-block;
  margin-left: 6px;
  transition: transform 200ms var(--ease);
}

.talk-card:hover .talk-link::after,
.talk-card:focus-within .talk-link::after {
  transform: translateX(3px);
}

@media (max-width: 767px) {
  .page-body .talk-card .talk-desc {
    font-size: 1rem;
  }
}

/* ---------- Podcast: GeoHeroes episodes ---------- */

/* Shared audio player — native controls, sized to the column */

.episode-audio {
  display: block;
  width: 100%;
  max-width: 460px;
  border-radius: 980px;
}

.episode-audio:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Featured episode card */

.episode-featured {
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: 18px;
  padding: 28px 24px;
  margin-top: 40px;
}

@media (min-width: 768px) {
  .episode-featured {
    padding: 36px 32px;
  }
}

.episode-featured .section-label {
  margin-bottom: 12px;
}

.episode-featured .featured-title {
  font-size: 1.5rem;
  margin: 0 0 10px;
}

.page-body .episode-featured p {
  max-width: 58ch;
}

.page-body .episode-featured .episode-meta {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 14px;
}

.page-body .episode-featured .episode-desc {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 22px;
}

.page-body .episode-featured .episode-featured-link {
  margin-top: 18px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Episode list — keyline rows, inherits .page-body ul li */

.page-body .episode-count {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: -6px;
}

.episode-list {
  margin-top: 20px;
}

.page-body .episode-list li {
  padding: 22px 0;
}

.episode-list .episode-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.page-body .episode-list li .detail {
  margin-top: 4px;
}

.episode-play {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 14px;
}

.episode-play .episode-audio {
  flex: 1 1 260px;
}

.episode-link {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(10, 42, 79, 0.4);
}

.episode-link:hover {
  text-decoration-color: currentColor;
}

@media (max-width: 767px) {
  .page-body .episode-featured .episode-desc,
  .page-body .episode-count {
    font-size: 1rem;
  }
}
