/* Crossing the Flood: shared stylesheet */

:root {
  --ink: #1c2b33;
  --ink-soft: #46585f;
  --deep: #123c4a;
  --deep-2: #0c2a35;
  --water: #2f7f8f;
  --water-dark: #23636f;
  --foam: #eef5f4;
  --sand: #faf7f1;
  --line: #dfe6e4;
  --clay: #b8552f;
  --clay-dark: #9a4425;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--sand);
}

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

a { color: var(--water-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--clay-dark); }

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

.skip {
  position: absolute; left: -999px; top: 0;
  background: #fff; color: var(--deep); padding: 0.6rem 1rem; z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

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

/* ---------- Header and navigation ---------- */

.site-header {
  background: var(--deep-2);
  color: #fff;
  position: relative;
  z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.9rem;
}
.brand {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}
.brand:hover { color: #cfe6e6; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid rgba(255,255,255,0.4); color: #fff;
  font: inherit; font-size: 0.9rem; padding: 0.35rem 0.8rem; border-radius: 4px; cursor: pointer;
}

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a, .site-nav .sub-label {
  display: block; padding: 0.5rem 0.85rem;
  color: #e6f0f0; text-decoration: none; font-size: 0.95rem; border-radius: 4px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(255,255,255,0.12); color: #fff; }
.site-nav .sub-label { cursor: default; }
.site-nav .sub-label::after { content: " \25BE"; font-size: 0.8em; }

.has-sub { position: relative; }
.has-sub > ul {
  display: none;
  position: absolute; right: 0; top: 100%;
  min-width: 15rem; padding: 0.4rem;
  background: var(--deep-2); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.has-sub:hover > ul, .has-sub:focus-within > ul { display: block; }

@media (max-width: 46rem) {
  .nav-toggle { display: block; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 0.5rem; }
  .site-nav .sub-label { color: #9fc2c6; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 0.9rem; }
  .site-nav .sub-label::after { content: ""; }
  .has-sub > ul { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 0.75rem; min-width: 0; }
}

/* ---------- Page banners ---------- */

.banner {
  background:
    radial-gradient(120% 140% at 15% 0%, rgba(89,170,180,0.35), transparent 60%),
    linear-gradient(160deg, var(--deep) 0%, var(--water-dark) 55%, var(--water) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.banner::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3.25rem;
  background: var(--sand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 34 C 150 6, 300 6, 450 30 S 750 58, 900 32 S 1100 8, 1200 26 L1200 60 L0 60 Z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 34 C 150 6, 300 6, 450 30 S 750 58, 900 32 S 1100 8, 1200 26 L1200 60 L0 60 Z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.banner .wrap, .banner .narrow { padding-block: 3.25rem 5.5rem; position: relative; }
.banner h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0;
}
.banner .kicker {
  margin: 0 0 0.75rem; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: #cfe6e6;
}
.banner .kicker a { color: inherit; }

/* Home hero */
.hero .wrap {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center;
  padding-block: 4rem 6.5rem;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.75rem); }
.hero .tagline {
  margin: 1rem 0 1.5rem; font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: #cfe6e6;
}
.hero p.lede { font-family: var(--serif); font-size: 1.2rem; line-height: 1.65; margin: 0 0 1.75rem; color: #f2f8f8; }
.hero figure { margin: 0; max-width: 26rem; justify-self: end; width: 100%; }
.hero img {
  width: 100%; border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.3); border: 4px solid rgba(255,255,255,0.9);
}
@media (max-width: 46rem) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; padding-block: 2.5rem 5.5rem; }
  .hero figure { max-width: 24rem; justify-self: start; }
}

/* ---------- Content ---------- */

main section { padding-block: 3rem; }
main section + section { padding-top: 0; }

.prose > *:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.25rem; }
.prose h2 {
  font-family: var(--serif); font-weight: 500; font-size: 1.75rem; line-height: 1.25;
  margin: 2.75rem 0 1rem; color: var(--deep);
}
.prose h3 {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  margin: 2.25rem 0 0.6rem; color: var(--water-dark);
}
.prose ul { margin: 0 0 1.5rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
.prose li::marker { color: var(--water); }
.prose .intro { font-family: var(--serif); font-size: 1.25rem; line-height: 1.6; color: var(--deep); }
.prose .note { font-size: 0.92rem; color: var(--ink-soft); }

.btn {
  display: inline-block;
  background: var(--clay); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 1rem; letter-spacing: 0.02em;
  padding: 0.8rem 1.6rem; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--sans);
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--clay-dark); color: #fff; transform: translateY(-1px); }
.btn-row { margin: 2rem 0; }

.callout {
  background: var(--foam); border-left: 4px solid var(--water);
  padding: 1.25rem 1.5rem; border-radius: 0 8px 8px 0; margin: 0 0 1.75rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout .label { font-weight: 700; color: var(--deep); margin-bottom: 0.35rem; }

/* Service cards */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); list-style: none; padding: 0; margin: 1.5rem 0 0; }
.cards a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 1.25rem 1.4rem; text-decoration: none;
  font-family: var(--serif); font-size: 1.2rem; color: var(--deep);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cards a::after { content: "\2192"; color: var(--water); font-family: var(--sans); }
.cards a:hover { border-color: var(--water); box-shadow: 0 8px 22px rgba(18,60,74,0.1); transform: translateY(-2px); }

.service-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
.service-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem 1.5rem; margin: 0;
}
.service-list a { font-family: var(--serif); font-size: 1.3rem; color: var(--deep); display: inline-block; margin-bottom: 0.3rem; }

.section-title {
  font-family: var(--serif); font-weight: 500; font-size: 1.6rem; color: var(--deep); margin: 0 0 0.5rem;
}

.prose ul.talks, .prose ul.service-list { padding-left: 0; }

/* Sutta quote */
.sutta { background: var(--foam); border-block: 1px solid var(--line); padding-block: 3.5rem !important; margin-top: 1rem; }
.sutta .source { font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--water-dark); margin: 0 0 1.5rem; }
.sutta dl { margin: 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.65; }
.sutta dt { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 1.25rem; }
.sutta dd { margin: 0.15rem 0 0; }

.logo-figure { margin: 1.5rem 0 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; }
.logo-figure img { margin-inline: auto; }

/* Talks */
.talks { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.talks li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.4rem; margin: 0; }
.talks h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--deep); margin: 0; }
.talks time { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.75rem; }
.talks audio { width: 100%; display: block; }

/* Forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.75rem; margin: 0 0 2rem; }
.form-card h2 { margin-top: 0; }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 34rem) { .field-row { grid-template-columns: 1fr; gap: 0; } }
label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; }
label .req { color: var(--clay); }
input[type="text"], input[type="email"], textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.7rem 0.85rem; border: 1px solid #bfcbc9; border-radius: 6px; background: #fff;
}
input:focus, textarea:focus { border-color: var(--water); outline: 3px solid rgba(47,127,143,0.25); outline-offset: 0; }
textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 1rem; }

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

.site-footer { background: var(--deep-2); color: #c9dadb; margin-top: 3rem; font-size: 0.92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; padding-block: 2rem; }
.site-footer a { color: #e6f0f0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0; padding: 0; }
.site-footer .brand { font-size: 0.8rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
