/* The Teaching Brook
   Mint field #E8F3F2 is the cover background (rgb 232, 243, 242).
   Deep brook #114247 is the icon field and the wordmark.
   Ivory #F4F0E6 is the monogram. Waves run teal into pale mint. */

@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display-latin-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --mint: #e8f3f2;
  --paper: #f6f5f2;
  --white: #fffcf8;
  --ivory: #f4f0e6;
  --ink: #143e42;
  --ink-soft: #3e5c60;
  --deep: #114247;
  --deep-2: #0c3336;
  --link: #185e66;
  --line: rgba(20, 62, 66, 0.12);
  --shadow: 0 14px 34px rgba(17, 66, 71, 0.06);
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --content: 72rem;
  --read: 40rem;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

main {
  flex: 1;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

::selection {
  background: #b7ddd8;
  color: var(--deep);
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.site-footer :focus-visible {
  outline-color: var(--ivory);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: var(--deep);
  color: var(--ivory);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

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

.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 {
  width: min(calc(100% - 2.5rem), var(--content));
  margin-inline: auto;
}

.measure {
  width: min(calc(100% - 2.5rem), var(--read));
  margin-inline: auto;
}

.kicker {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--link);
}

.lede,
.intro {
  color: var(--ink-soft);
  font-size: 1.125rem;
  line-height: 1.6;
}

.lede {
  max-width: 38rem;
  margin: 0.35rem 0 0;
}

.tagline {
  margin: 1.35rem auto 0;
  max-width: 28rem;
  text-align: center;
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--deep);
  color: var(--ivory);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.button:hover {
  background: var(--deep-2);
}

.button[aria-disabled="true"] {
  background: transparent;
  color: var(--ink);
  border: 1px dashed rgba(20, 62, 66, 0.45);
  cursor: not-allowed;
}

.button[aria-disabled="true"]:hover {
  background: transparent;
}

.text-link {
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--mint);
  border-bottom: 1px solid rgba(20, 62, 66, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.logo img {
  width: 44px;
  height: 44px;
  border-radius: 2px;
}

.logo-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.site-header.is-open .nav-toggle-bars {
  background: transparent;
}

.site-header.is-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header.is-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--mint);
  border-bottom: 1px solid rgba(20, 62, 66, 0.08);
  padding: 0.25rem 1.25rem 0.85rem;
}

.site-header.is-open .nav {
  display: block;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.35rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  border-top: 1px solid var(--line);
}

.nav a[aria-current="page"] {
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--link);
  padding-left: 0.7rem;
}

.hero {
  background: var(--mint);
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.75rem, 7vw, 4.75rem);
}

.hero-inner {
  text-align: center;
}

.lockup {
  margin: 0;
  font-weight: 500;
  color: var(--deep);
}

.lockup-small {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.7rem, 4.6vw, 2.85rem);
  letter-spacing: 0.01em;
  line-height: 1;
}

.lockup-large {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(4.4rem, 20vw, 8.75rem);
  line-height: 0.78;
  letter-spacing: -0.035em;
  margin-top: 0.08em;
}

.intro {
  margin: 1rem auto 0;
  max-width: 36rem;
  text-align: center;
}

.waves {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0.35rem auto 0;
}

.waves-sm {
  width: min(100%, 220px);
  margin: 1.1rem 0 0.35rem;
}

.hero .waves,
.center .waves,
.site-footer .waves {
  margin-left: auto;
  margin-right: auto;
}

.site-footer .waves {
  width: min(100%, 190px);
  margin-bottom: 1.1rem;
}

.section {
  padding: clamp(2.5rem, 6vw, 4.75rem) 0;
}

.feature-grid,
.teaching-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.feature-grid > li {
  display: flex;
}

.feature-card,
.teaching-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  padding: 1.4rem 1.3rem 1.25rem;
  background:
    linear-gradient(90deg, #176e7a, #8ed4c6) 0 0 / 100% 4px no-repeat,
    var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.feature-card h2,
.teaching-card h2,
.feature-card h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}

.feature-card p,
.teaching-card p {
  margin: 0;
  color: var(--ink-soft);
}

.feature-card p:last-of-type,
.teaching-card p:last-of-type {
  flex: 1;
}

.more {
  margin-top: 0.85rem;
  font-weight: 600;
  color: var(--link);
}

.feature-card:hover .more,
a.teaching-card:hover .more {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.callout {
  background: var(--deep);
  color: var(--ivory);
  padding: clamp(3rem, 7vw, 4.75rem) 0;
}

.callout h2 {
  margin: 0.35rem 0 0.75rem;
  color: var(--ivory);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.callout p {
  max-width: 36rem;
  margin: 0;
  color: var(--ivory);
}

.callout .kicker {
  color: #c9ebe3;
}

.callout .button {
  margin-top: 1.25rem;
  background: var(--ivory);
  color: var(--deep);
}

.callout .button:hover {
  background: #fff;
}

.section-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.25rem;
}

.section-row h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.page-intro {
  background: var(--mint);
  padding: clamp(2rem, 5vw, 3.4rem) 0 clamp(2rem, 5vw, 3rem);
}

.page-intro h1 {
  margin: 0.15rem 0 0.7rem;
  font-size: clamp(2.7rem, 7vw, 4.6rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--deep);
}

.center {
  text-align: center;
}

.center .lede {
  margin-inline: auto;
}

.prose p,
.post-body p {
  margin: 0 0 1.05em;
}

.prose {
  font-size: 1.125rem;
  line-height: 1.7;
}

.actions {
  margin: 1.25rem 0 0;
}

.cover-frame {
  width: min(100%, 320px);
  margin: 0 auto 1.5rem;
  background: var(--mint);
  border: 1px solid rgba(20, 62, 66, 0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 46px rgba(17, 66, 71, 0.12);
}

.cover-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.platforms {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.4rem 0 0.55rem;
  padding: 0;
}

.platform {
  min-height: 48px;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  border: 1px dashed rgba(20, 62, 66, 0.45);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: not-allowed;
}

.form-note,
.empty {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.optional {
  font-weight: 400;
  color: var(--ink-soft);
}

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

.interest {
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.interest h2 {
  margin: 0 0 0.45rem;
  font-size: 1.7rem;
}

.interest > p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.field {
  margin-bottom: 0.8rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 62, 66, 0.22);
  background: #fff;
  font-size: 16px;
}

.field input::placeholder {
  color: #5d7376;
}

.blog-list {
  width: min(calc(100% - 2.5rem), 52rem);
}

.blog-item {
  display: grid;
  gap: 1rem;
  padding: 1.45rem 0;
  border-top: 1px solid var(--line);
}

.blog-item:last-child {
  border-bottom: 1px solid var(--line);
}

.blog-copy h2,
.blog-copy h3 {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.blog-copy h2 a,
.blog-copy h3 a {
  color: inherit;
  text-decoration: none;
}

.blog-copy h2 a:hover,
.blog-copy h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.blog-copy time {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.blog-copy p {
  margin: 0;
  color: var(--ink-soft);
}

.blog-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: var(--mint);
}

.post {
  width: min(calc(100% - 2.5rem), 38rem);
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
}

.back {
  margin: 0.4rem 0 1rem;
}

.back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
}

.back a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.back-end {
  margin-top: 0.5rem;
}

.post-cover {
  width: 100%;
  border-radius: 14px;
  margin: 0 0 1.25rem;
  background: var(--mint);
}

.post-header h1 {
  margin: 0.2rem 0 0.45rem;
  font-size: clamp(2.15rem, 5vw, 3.15rem);
  line-height: 1.08;
  color: var(--deep);
}

.post-header time {
  color: var(--ink-soft);
}

.post-body {
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.75;
}

.post-body h2 {
  font-size: 1.65rem;
  margin: 2.1rem 0 0.65rem;
}

.post-body h3 {
  font-size: 1.3rem;
  margin: 1.6rem 0 0.45rem;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1.15em;
  padding-left: 1.2rem;
}

.post-body li {
  margin: 0.35em 0;
  padding-left: 0.15rem;
}

.post-body li::marker {
  color: var(--link);
}

.post-body blockquote {
  margin: 1.6rem 0;
  padding: 0.15rem 0 0.15rem 1.1rem;
  border-left: 3px solid #8ed4c6;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.4;
}

.post-body blockquote p {
  margin: 0;
}

.post-body a {
  color: var(--link);
  text-underline-offset: 0.16em;
}

.post-body img {
  border-radius: 12px;
  margin: 1.2rem 0;
}

.post-body pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--mint);
  border-radius: 12px;
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.share {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.share h2 {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
}

.share-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
}

.share-list a,
.share-list button {
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 62, 66, 0.18);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.share-list a:hover,
.share-list button:hover {
  border-color: var(--link);
  color: var(--link);
}

.permalink {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.permalink a {
  color: var(--link);
}

.site-footer {
  background: var(--deep);
  color: var(--ivory);
  text-align: center;
  padding: 2.8rem 0 2rem;
}

.footer-name {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
}

.site-footer .tagline {
  color: var(--ivory);
  font-weight: 400;
  font-size: 1.05rem;
}

.social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.15rem;
  margin: 1.35rem 0 0;
  padding: 0;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  color: var(--ivory);
  text-decoration: none;
  font-weight: 600;
}

.social a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.social svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: none;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 1.1rem;
  margin: 1.15rem 0 0;
  padding: 0;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ivory);
  text-decoration: none;
  font-weight: 600;
}

.footer-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.copyright {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
}

@media (min-width: 720px) {
  .post-body {
    font-size: 1.1875rem;
  }

  .blog-item.has-cover {
    grid-template-columns: 220px 1fr;
    align-items: center;
    gap: 1.4rem;
  }

  .teaching-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    display: block;
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }

  .nav a {
    min-height: 44px;
    padding: 0.35rem 0.7rem;
    border-top: 0;
    border-radius: 999px;
  }

  .nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--link);
    padding-left: 0.7rem;
    background: rgba(255, 255, 255, 0.35);
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem;
  }
}

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

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .feature-card,
  a.teaching-card {
    transition: transform 0.18s ease, border-color 0.18s ease;
  }

  .feature-card:hover,
  a.teaching-card:hover {
    transform: translateY(-2px);
    border-color: rgba(20, 62, 66, 0.22);
  }

  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    transition: transform 0.15s ease, top 0.15s ease, background-color 0.15s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .feature-card:hover,
  a.teaching-card:hover {
    transform: none;
  }
}

@media (max-width: 380px) {
  .logo img {
    width: 38px;
    height: 38px;
  }
}

@media (forced-colors: active) {
  .feature-card,
  .teaching-card,
  .platform,
  .button,
  .share-list a,
  .share-list button {
    border: 1px solid ButtonText;
  }
}

@media print {
  .site-header,
  .site-footer,
  .share,
  .nav-toggle,
  .skip-link,
  .back {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero,
  .page-intro,
  .callout {
    background: #fff;
    color: #000;
  }

  .callout h2,
  .callout p {
    color: #000;
  }

  a {
    text-decoration: underline;
  }
}
