:root {
  --ink: #000000;
  --muted: #1c1c1c;
  --line: #000000;
  --paper: #e7d9cb;
  --header-bg: #c2c8cc;
  --card: #ffffff;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Bitter", Georgia, "Times New Roman", serif;
  --max: 72rem;
  --prose: 40rem;
  --header: 5.75rem;
}

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

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #000;
  color: #fff;
  padding: 0.6rem 0.8rem;
  z-index: 50;
}

.skip-link:focus {
  top: 0.5rem;
}

.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;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(1.15rem, env(safe-area-inset-left));
  padding-right: max(1.15rem, env(safe-area-inset-right));
}

.narrow {
  max-width: var(--prose);
}

.center {
  text-align: center;
}

.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header);
  padding: 0.7rem max(1.15rem, env(safe-area-inset-right)) 0.7rem max(1.15rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.15;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-desktop {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 0.15rem;
}

.nav-link {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.7rem 0.75rem;
  min-height: 44px;
  cursor: pointer;
}

.nav-folder {
  position: relative;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 16.5rem;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.35rem 0;
  z-index: 30;
}

.nav-folder:last-of-type .nav-dropdown {
  left: auto;
  right: 0;
}

.nav-folder.is-open .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 0.7rem 1rem;
  min-height: 44px;
  text-decoration: none;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus {
  background: var(--soft);
}

.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 6px;
  background: #000;
  color: #fff;
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-solid {
  background: #000;
  color: #fff;
}

.btn:hover,
.btn:focus {
  background: #222;
  color: #fff;
}

.header-cta {
  margin-left: 0.35rem;
}

.burger {
  -webkit-appearance: none;
  appearance: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.burger-lines {
  width: 1.25rem;
  height: 0.85rem;
  position: relative;
  display: block;
}

.burger-lines span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #111;
}

.burger-lines span:nth-child(1) { top: 0; }
.burger-lines span:nth-child(2) { top: 6px; }
.burger-lines span:nth-child(3) { bottom: 0; }

.nav-mobile {
  display: none;
}

.nav-mobile.is-open {
  display: block;
  position: fixed;
  top: var(--header);
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--header-bg);
  z-index: 25;
  padding: 0.4rem max(1.15rem, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom)) max(1.15rem, env(safe-area-inset-left));
}

.nav-mobile a,
.nav-mobile .folder-label {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.nav-mobile .folder-label {
  margin: 0.8rem 0 0;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.nav-mobile .sub {
  padding-left: 0.7rem;
}

.mobile-cta {
  margin-top: 0.7rem;
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .nav-folder:hover .nav-dropdown,
  .nav-folder:focus-within .nav-dropdown {
    display: block;
  }
}

@media (min-width: 960px) {
  .nav-desktop { display: flex; }
  .burger { display: none; }
  .nav-mobile { display: none !important; }
  .site-title { font-size: 1.45rem; }
}

.home {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.6rem max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  display: grid;
  gap: 1.15rem;
}

.panel {
  background: var(--card);
  border: 6px solid #000;
  border-radius: 22px;
  padding: 1rem 1.05rem 1.15rem;
  text-align: center;
}

.panel h1 {
  font-size: clamp(3.1rem, 5vw, 3.55rem);
  line-height: 0.95;
  margin: 0;
}

.panel h2 {
  font-size: clamp(2rem, 5vw, 2.7rem);
  margin-bottom: 0.8rem;
}

.offer p,
.story p,
.how p {
  margin-bottom: 0.85rem;
}

.offer {
  font-size: 1.22rem;
  line-height: 1.45;
}

.offer-price {
  margin-top: 1rem;
}

.schedule a {
  font-size: 1.38rem;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.photo {
  margin: 0;
  min-height: 16rem;
}

.photo img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.videos h2,
.issues h2,
.contact-band h2 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 2.7rem);
  margin: 0.4rem 0 1rem;
}

.contact-band {
  padding-bottom: 1rem;
}

.topic-grid,
.card-grid,
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.topic-card {
  display: block;
  text-decoration: none;
  background: #fff;
  border-radius: 22px;
  padding: 1.15rem 1.1rem;
  min-height: 100%;
}

.topic-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.topic-card strong {
  font-weight: 600;
}

.video-card {
  margin: 0;
}

.video-card figcaption {
  margin-top: 0.55rem;
  font-size: 1rem;
}

.embed-frame {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  background: #000;
}

.embed-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.page-hero {
  text-align: center;
  padding: 3rem 0 1.4rem;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.page-hero time,
.lede {
  color: var(--muted);
}

.listen-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  justify-content: center;
}

.listen-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.page-hero-image {
  max-width: 56rem;
  margin: 0 auto 1.5rem;
  padding: 0 1.15rem;
}

.page-hero-image.is-cover {
  max-width: 18rem;
}

.page-hero-image img {
  width: 100%;
}

.prose {
  padding-bottom: 2.5rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.prose h2,
.prose h3 {
  text-align: left;
  margin-top: 1.6em;
  font-size: 1.8rem;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.prose img {
  margin: 1.2rem auto;
}

.prose audio,
.prose video {
  width: 100%;
  margin: 1rem 0;
}

.card-grid {
  padding-bottom: 1rem;
}

.entry-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 22px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

.entry-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #d9cfc3;
}

.entry-card .body {
  padding: 1rem 1rem 1.15rem;
}

.entry-card h2 {
  font-size: 1.45rem;
  text-align: left;
  margin-bottom: 0.35rem;
}

.entry-card time,
.entry-card p {
  color: var(--muted);
  font-size: 0.98rem;
}

.entry-card p {
  margin: 0.4rem 0 0;
}

.form-wrap {
  max-width: 36rem;
  margin: 0 auto;
}

.form {
  display: grid;
  gap: 0.85rem;
}

.form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.98rem;
}

.form input,
.form textarea {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: #111;
  background: #fff;
  border: 1px solid #111;
  border-radius: 0;
  padding: 0.75rem 0.8rem;
  min-height: 44px;
}

.form textarea {
  min-height: 9rem;
  resize: vertical;
}

.form input:focus,
.form textarea:focus,
.btn:focus,
.nav-link:focus,
.burger:focus {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.form .btn {
  width: 100%;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1rem;
}

.form-status.error {
  color: #7a2218;
}

.form-intro {
  color: var(--muted);
}

.site-footer {
  padding: 1.5rem 0 calc(2rem + env(safe-area-inset-bottom));
  background: transparent;
}

.footer-grid {
  display: grid;
  gap: 1.15rem;
  max-width: 26rem;
  margin: 0 auto;
}

.footer-card {
  border: 6px solid #000;
  border-radius: 11px;
  padding: 1.1rem 1rem 1.2rem;
  text-align: center;
  background: var(--paper);
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: grid;
  justify-items: center;
}

.footer-links a {
  min-height: 44px;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus {
  text-decoration: underline;
}

@media (min-width: 860px) {
  .home {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "headline james"
      "offer james"
      "cadet story"
      "how tree"
      "videos videos"
      "issues issues"
      "contact contact";
    align-items: stretch;
  }

  .photo { height: 100%; }
  .headline { grid-area: headline; }
  .offer { grid-area: offer; }
  .james { grid-area: james; }
  .cadet { grid-area: cadet; }
  .story { grid-area: story; }
  .how { grid-area: how; }
  .tree { grid-area: tree; }
  .videos { grid-area: videos; }
  .issues { grid-area: issues; }
  .contact-band { grid-area: contact; }

  .video-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
  }

  .topic-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "comm infidelity"
      "sex narcissism"
      "anxiety threats"
      "roommate codependency";
  }

  .comm { grid-area: comm; }
  .sex { grid-area: sex; }
  .anxiety { grid-area: anxiety; }
  .threats { grid-area: threats; }
  .roommate { grid-area: roommate; }
  .infidelity { grid-area: infidelity; }
  .narcissism { grid-area: narcissism; }
  .codependency { grid-area: codependency; }

  .card-grid { grid-template-columns: 1fr 1fr; }
  .form .btn { width: auto; }
}

@media (min-width: 1100px) {
  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@supports not (aspect-ratio: 1) {
  .entry-card img {
    height: 12rem;
  }
}
