/* Wave After Wave (Terry Mahoney) — one-page site.
   Look carried over from the original site: deep-water hero, italic Fraunces title,
   foam-white surface, sand panel. */
:root {
  --bg: #f4f8f9;
  --white: #ffffff;
  --ink: #0e1f3b;
  --muted: #5d7892;
  --accent: #2a6b8c;
  --rule: #d8e0e6;
  --sand: #d9c9a8;
  --sand-rule: rgba(14, 31, 59, .15);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 68ch;
  --max-wide: 1100px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body); background: var(--bg); color: var(--ink);
  line-height: 1.65; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(42, 107, 140, .35); transition: border-color .2s; }
a:hover { border-bottom-color: var(--accent); }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.wrap-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 248, 249, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule); font-family: var(--font-ui);
}
.site-nav-inner { max-width: var(--max-wide); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px; }
.site-nav-brand { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em;
  color: var(--ink); border: 0; white-space: nowrap; }
.site-nav-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 22px; flex: 1; justify-content: center; }
.site-nav-links a { color: var(--muted); font-size: 13px; font-weight: 500; border: 0; letter-spacing: .01em; transition: color .15s; }
.site-nav-links a:hover { color: var(--ink); }
.site-nav-cta { font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 999px;
  background: var(--ink); color: var(--bg); border: 0; white-space: nowrap; }
.site-nav-cta:hover { opacity: .88; }
@media (max-width: 720px) {
  .site-nav-links { display: none; }
  .site-nav-inner { justify-content: space-between; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 130px 24px 220px;
  background: linear-gradient(180deg, #0e1f3b 0%, #1a3558 45%, #2a6b8c 100%);
  color: var(--bg);
}
.hero-inner { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; }
.eyebrow { font-family: var(--font-ui); font-size: 12px; font-weight: 500; letter-spacing: .28em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
.hero .eyebrow, .hero .byline { color: rgba(244, 248, 249, .7); }
.hero h1 { font-size: clamp(42px, 7vw, 92px); font-style: italic; font-weight: 500; color: var(--bg); margin-bottom: 18px; }
.hero h1 .subtitle { display: block; margin-top: 14px; font-family: var(--font-body); font-size: clamp(18px, 2.2vw, 26px);
  font-style: normal; font-weight: 400; letter-spacing: 0; line-height: 1.3; color: rgba(244, 248, 249, .82); }
.hero .byline { font-family: var(--font-ui); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 44px; }
.hook { font-size: clamp(18px, 2.3vw, 22px); line-height: 1.5; color: rgba(244, 248, 249, .92); max-width: 52ch; margin: 0 auto; }
.cta-block { margin-top: 36px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.cta-headline { font-family: var(--font-display); font-weight: 600; font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.01em; color: var(--bg); }
.cta-copy { max-width: 600px; margin: 0 0 8px; font-size: 16px; line-height: 1.6; color: rgba(244, 248, 249, .8); }
.secondary-link { font-family: var(--font-ui); font-size: 13px; letter-spacing: .02em; color: rgba(244, 248, 249, .7); border: 0; }
.secondary-link:hover { color: var(--bg); }

.email-form {
  display: flex; gap: 8px; padding: 4px 4px 4px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(244, 248, 249, .25);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-ui); width: min(440px, 100%);
}
.email-form:focus-within { border-color: rgba(244, 248, 249, .6); }
.email-form input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  color: var(--bg); font: inherit; font-size: 15px; }
.email-form input::placeholder { color: rgba(244, 248, 249, .55); }
.signup-msg { min-height: 1.4em; margin: 0; font-family: var(--font-ui); font-size: 14px; color: rgba(244, 248, 249, .85); }

.btn { font-family: var(--font-ui); font-size: 14px; font-weight: 600; letter-spacing: .02em;
  padding: 10px 18px; border-radius: 999px; background: var(--bg); color: var(--ink);
  border: 1px solid var(--bg); cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), opacity .2s; }
.btn:hover { transform: translateY(-1px); }

/* animated wave layers at the foot of the hero, filled with the page surface colour */
.wave-layers { position: absolute; left: 0; right: 0; bottom: 0; height: 260px; overflow: hidden;
  pointer-events: none; color: var(--bg); z-index: 1; }
/* solid strip under the moving front wave so its lift never exposes the gradient */
.wave-layers::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px; background: currentColor; }
.wave-layer { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; display: flex; will-change: transform; }
.wave-layer svg { flex: 1 0 50%; width: 50%; height: 100%; display: block; }
.wave-layer path { fill: currentColor; }
.wave-l1 { opacity: .25; animation: wave-back 22s ease-in-out infinite; }
.wave-l2 { opacity: .4; animation: wave-mid 16s ease-in-out infinite reverse; }
.wave-l3 { opacity: 1; animation: wave-front 11s ease-in-out infinite; }
@keyframes wave-back  { 0% { transform: translate3d(0,0,0); } 25% { transform: translate3d(-12.5%,-22px,0); } 50% { transform: translate3d(-25%,0,0); } 75% { transform: translate3d(-37.5%,18px,0); } 100% { transform: translate3d(-50%,0,0); } }
@keyframes wave-mid   { 0% { transform: translate3d(0,6px,0); } 25% { transform: translate3d(-12.5%,-14px,0); } 50% { transform: translate3d(-25%,6px,0); } 75% { transform: translate3d(-37.5%,-10px,0); } 100% { transform: translate3d(-50%,6px,0); } }
@keyframes wave-front { 0% { transform: translate3d(0,0,0); } 25% { transform: translate3d(-12.5%,-10px,0); } 50% { transform: translate3d(-25%,4px,0); } 75% { transform: translate3d(-37.5%,-8px,0); } 100% { transform: translate3d(-50%,0,0); } }

.hero-stagger { opacity: 0; transform: translateY(12px); animation: hero-in .7s var(--ease) forwards;
  animation-delay: calc(var(--stagger, 1) * 140ms); }
@keyframes hero-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave-l1, .wave-l2, .wave-l3 { animation: none; }
  .hero-stagger { opacity: 1; transform: none; animation: none; }
}

/* ---------- Section heads ---------- */
.section { padding: 96px 0; border-bottom: 1px solid var(--rule); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; padding: 0 24px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 48px); }
.section-head p { font-size: 18px; color: var(--muted); margin: 0; }

/* ---------- The book (description) ---------- */
.book-desc { background: var(--bg); padding-top: 56px; }
.book-desc-inner { max-width: 720px; margin: 0 auto; padding: 0 24px; text-align: center; }
.book-desc h2 { font-size: clamp(30px, 4.4vw, 48px); }
.book-desc-text { margin: 8px 0 0; font-size: clamp(18px, 2vw, 21px); line-height: 1.7; color: var(--ink); }
.book-desc-text cite { font-style: italic; }

/* ---------- Clips (vertical 9:16, captions burned in; played from YouTube) ---------- */
.clips { background: var(--bg); }
.clip-grid { display: grid; gap: 32px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .clip-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; } }
.clip { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.clip-media { position: relative; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden;
  background: var(--ink); box-shadow: 0 24px 50px -24px rgba(14, 31, 59, .4); }
.clip-poster, .clip-media iframe, .clip-media video { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: cover; border: 0; background: var(--ink); }
.clip-play { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; cursor: pointer; color: inherit;
  background: linear-gradient(180deg, rgba(14, 31, 59, 0) 55%, rgba(14, 31, 59, .55) 100%); }
.clip-play-icon { position: absolute; top: 50%; left: 50%; width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink); display: flex; align-items: center; justify-content: center;
  transform: translate(-50%, -50%); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.clip-play:hover .clip-play-icon { transform: translate(-50%, -50%) scale(1.08); }
.clip-play-icon svg { width: 26px; height: 26px; margin-left: 3px; }
.clip-duration { position: absolute; bottom: 12px; right: 12px; padding: 4px 8px; border-radius: 4px;
  background: rgba(0, 0, 0, .65); color: #fff; font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.clip.playing .clip-play, .clip.playing .clip-poster { display: none; }
.clip-tag { margin: 0 0 4px; font-family: var(--font-ui); font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); }
.clip-title { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.25; margin: 0; }

/* ---------- About ---------- */
.about { background: var(--white); }
.about-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; max-width: 960px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 760px) { .about-grid { grid-template-columns: 280px 1fr; gap: 64px; } }
.headshot { width: 100%; height: auto; max-width: 280px; margin: 0 auto; aspect-ratio: 1; object-fit: cover; border-radius: 8px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .25); }
.about h2 { font-size: clamp(28px, 4vw, 44px); }
.about .lead { font-size: 19px; line-height: 1.7; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.stat { font-family: var(--font-ui); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  background: rgba(14, 31, 59, .06); color: var(--ink); border: 1px solid rgba(14, 31, 59, .16); }

/* ---------- Book Terry (Cal.com) ---------- */
.book { background: var(--sand); border-bottom: 0; }
.book .section-head p { color: rgba(14, 31, 59, .72); }
.book .eyebrow { color: rgba(14, 31, 59, .6); }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 28px; font-family: var(--font-ui); }
.tab { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 10px 20px; border-radius: 999px;
  background: rgba(255, 255, 255, .45); color: var(--ink); border: 1px solid var(--sand-rule); transition: background .2s; }
.tab:hover { background: rgba(255, 255, 255, .75); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.panel-intro { text-align: center; max-width: 560px; margin: 0 auto 24px; font-size: 17px; color: rgba(14, 31, 59, .8); }
.cal-frame { width: 100%; min-height: 560px; overflow: auto; background: var(--white); border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgba(14, 31, 59, .35); }
.cal-placeholder { min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 32px; text-align: center; font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.cal-fallback { text-align: center; margin: 18px 0 0; font-family: var(--font-ui); font-size: 13px; color: rgba(14, 31, 59, .7); }
.cal-fallback a { color: var(--ink); border-bottom-color: rgba(14, 31, 59, .35); }
.contact-line { text-align: center; margin: 28px 0 0; font-family: var(--font-ui); font-size: 14px; color: rgba(14, 31, 59, .75); }
.contact-line a { color: var(--ink); }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: rgba(244, 248, 249, .6); padding: 36px 0; font-family: var(--font-ui); font-size: 13px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.foot-brand { font-family: var(--font-display); font-style: italic; font-size: 16px; color: rgba(244, 248, 249, .85); }
footer a { color: rgba(244, 248, 249, .8); border-bottom-color: rgba(244, 248, 249, .3); }
footer a:hover { color: #fff; border-bottom-color: #fff; }
