/* Sarah Sax — site styles. Colors taken from the Squarespace theme. */
:root {
  --cyan: #30c0dc;
  --cyan-dark: #1b8ea5;      /* cyan darkened for text on white (AA) */
  --purple: #a456c1;
  --gold: #ffcb5a;
  --ink: #272727;
  --muted: #5c5c5c;
  --bg: #fff;
  --tint: #f4fbfd;
  --heading: "gopher", "Outfit", "Avenir Next", system-ui, sans-serif; /* Adobe Fonts; Outfit is the free fallback */
  --body: "effra", "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1100px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--body);
  color: var(--ink);
  background: var(--bg);
}
img, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--cyan-dark); text-underline-offset: 2px; }
a:hover { color: var(--purple); }
p { margin: 0 0 1em; }

h1, h2, h3, h4 {
  font-family: var(--heading);
  font-weight: 700;
  line-height: 1.15;
  text-transform: lowercase;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5vw, 2.75rem); color: var(--purple); }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); color: var(--cyan); }
h3 { font-size: 1.5rem; color: var(--purple); }
h4 { font-size: 1.15rem; color: var(--ink); text-transform: none; margin-top: 1.5em; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: #fff; padding: 8px; }

/* Announcement bar */
.announcement {
  display: block;
  background: var(--purple);
  color: var(--ink);
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  padding: .55rem var(--gutter);
  text-decoration: none;
}
.announcement:hover { color: var(--ink); text-decoration: underline; }

/* Header + nav */
.site-header {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 5;
}
.site-title {
  font: 700 1.75rem/1 var(--heading);
  color: var(--cyan);
  text-decoration: none;
  white-space: nowrap;
}
.menu nav ul { list-style: none; margin: 0; padding: 0; }
.menu nav a, .nav-folder {
  font: 700 1.15rem/1 var(--heading);
  color: var(--cyan);
  text-decoration: none;
  text-transform: lowercase;
}
.menu nav a:hover, .menu nav a[aria-current] { color: var(--purple); }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0; }

@media (min-width: 860px) {
  .menu nav > ul { display: flex; gap: 1.4rem; align-items: center; }
  .has-children { position: relative; }
  .nav-folder { cursor: default; }
  .has-children ul {
    display: none;
    position: absolute;
    top: 100%;
    left: -1rem;
    padding: .75rem 1rem !important;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgb(0 0 0 / .12);
    min-width: 250px;
  }
  .has-children ul li { padding: .4rem 0; }
  .has-children:hover ul, .has-children:focus-within ul { display: block; }
  .has-children::after { content: ""; position: absolute; inset: 100% 0 -12px; } /* hover bridge */
}
@media (max-width: 859px) {
  .menu-toggle {
    width: 44px; height: 44px;
    display: flex; flex-direction: column; justify-content: center; gap: 5px; align-items: center;
  }
  .menu-toggle span { display: block; width: 26px; height: 3px; border-radius: 2px; background: var(--cyan); transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .menu nav { display: none; }
  .menu nav.open {
    display: block;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    padding: .5rem var(--gutter) 1.5rem;
    box-shadow: 0 12px 20px rgb(0 0 0 / .08);
  }
  .menu nav li { padding: .55rem 0; }
  .menu .has-children ul { padding-left: 1rem; margin-top: .4rem; }
  .menu .has-children ul a { font-size: 1rem; }
  .nav-folder { color: var(--ink); opacity: .6; }
}

/* Layout */
main { min-height: 50vh; }
.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.section { padding: clamp(2rem, 6vw, 4rem) 0; }
.section.tint { background: var(--tint); }
.page-title { text-align: center; margin-bottom: 1.5rem; }
.lede { font-size: 1.15rem; text-align: center; max-width: 720px; margin: 0 auto 2rem; }

.button {
  display: inline-block;
  background: var(--cyan);
  color: #fff;
  font: 700 .95rem/1 var(--heading);
  letter-spacing: .1em;
  text-transform: none;
  text-decoration: none;
  padding: .95rem 1.5rem;
  border-radius: 999px;
  transition: background .15s;
}
.button:hover { background: var(--purple); color: #fff; }

/* Home */
.covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2.5vw, 28px);
  padding: 1rem 0 3rem;
}
.covers a { display: block; transition: transform .2s; }
.covers a:hover { transform: translateY(-4px) rotate(-1deg); }
.covers img { width: 100%; border-radius: 4px; box-shadow: 0 6px 18px rgb(0 0 0 / .14); }
@media (max-width: 700px) { .covers { grid-template-columns: repeat(2, 1fr); } }

.find-sarah { text-align: center; }
.find-sarah .doodle { width: 140px; margin: 0 auto 1rem; }
.event-mini { list-style: none; padding: 0; margin: 0 auto; max-width: 560px; text-align: left; }
.event-mini li { padding: .9rem 0; border-top: 1px solid #e6e6e6; }
.event-mini .date { display: block; font-weight: 700; color: var(--purple); font-size: .9rem; }

/* Book features (cover + description, alternating) */
.book {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1px solid #eee;
}
.book:first-of-type { border-top: 0; }
.book:nth-of-type(even) { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.book:nth-of-type(even) .book-cover { order: 2; }
.book-cover img { width: 100%; border-radius: 4px; box-shadow: 0 8px 24px rgb(0 0 0 / .15); }
.book .tagline { font-weight: 700; }
.praise { margin-top: 1.5rem; padding: 1.25rem 1.5rem; background: var(--tint); border-radius: var(--radius); }
.praise h4 { margin-top: 0; color: var(--purple); text-transform: lowercase; font-size: 1.25rem; }
.praise p { font-size: .97rem; }
@media (max-width: 760px) {
  .book, .book:nth-of-type(even) { grid-template-columns: 1fr; }
  .book:nth-of-type(even) .book-cover { order: 0; }
  .book-cover { max-width: 320px; }
}

/* About */
.portrait { width: 100%; max-width: 420px; margin: 0 auto .5rem; border-radius: var(--radius); }
.credit { text-align: center; font-size: .9rem; color: var(--muted); }
.embed { position: relative; aspect-ratio: 16 / 9; margin: 1.5rem 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }
.audio-embed iframe { width: 100%; border: 0; border-radius: 12px; }

/* School visits */
.testimonials { display: grid; gap: 1.5rem; }
.testimonial { margin: 0; padding: 1.5rem 1.75rem; background: var(--tint); border-left: 5px solid var(--cyan); border-radius: var(--radius); }
.testimonial blockquote { margin: 0 0 .75rem; font-size: 1.02rem; }
.testimonial figcaption { font-weight: 700; color: var(--purple); }

/* Photo carousel (full-bleed strip, scroll-snap, arrow buttons) */
.carousel { position: relative; margin: 0 0 2.5rem; }
.carousel-track {
  display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { flex: 0 0 auto; scroll-snap-align: center; } /* <picture> wrappers from eleventy-img */
.carousel-track img { height: clamp(240px, 42vw, 400px); width: auto; max-width: none; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(39, 39, 39, .75); color: #fff; font-size: 1.4rem; cursor: pointer;
}
.carousel-btn:hover, .carousel-btn:focus-visible { background: var(--ink); }
.carousel-btn.prev { left: var(--gutter); }
.carousel-btn.next { right: var(--gutter); }

/* Art gallery */
.gallery { columns: 3 280px; column-gap: 16px; }
.gallery a { display: block; margin-bottom: 16px; break-inside: avoid; border-radius: 6px; overflow: hidden; }
.gallery img { width: 100%; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.03); }
.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgb(20 20 20 / .92); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 4rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); width: auto; object-fit: contain; }
.lightbox figcaption { color: #eee; margin-top: 1rem; text-align: center; max-width: 60ch; }
.lightbox button {
  position: fixed; background: none; border: 0; color: #fff; font-size: 2.5rem; cursor: pointer; padding: .5rem 1rem; line-height: 1;
}
.lightbox .close { top: .5rem; right: .5rem; }
.lightbox .prev { left: .25rem; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: .25rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox figure { padding: 3rem .5rem; } }

/* Resources / downloads */
.download { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: center; margin-top: 1.5rem; }
.download img { border-radius: var(--radius); }
@media (max-width: 560px) { .download { grid-template-columns: 1fr; } .download img { max-width: 240px; } }

/* Events */
.event-list { list-style: none; padding: 0; margin: 0; }
.event-card { display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid #eee; }
.event-card img { border-radius: 6px; }
.event-card h3 { font-size: 1.3rem; margin-bottom: .25rem; }
.event-card h3 a { color: inherit; text-decoration: none; }
.event-card h3 a:hover { color: var(--cyan-dark); }
.event-meta { color: var(--muted); font-size: .95rem; margin-bottom: .5rem; }
.event-meta strong { color: var(--ink); }
@media (max-width: 560px) { .event-card { grid-template-columns: 1fr; } .event-card img { max-width: 260px; } }
.event-hero { width: 100%; max-width: 560px; margin: 0 auto 1.5rem; border-radius: var(--radius); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }
address { font-style: normal; font-weight: 700; margin-bottom: 1em; }
form.contact label { display: block; font-weight: 700; margin: 1rem 0 .3rem; }
form.contact input, form.contact textarea {
  width: 100%; font: inherit; padding: .7rem .85rem; border: 1.5px solid #cfcfcf; border-radius: 8px;
}
form.contact input:focus, form.contact textarea:focus { outline: 2px solid var(--cyan); border-color: var(--cyan); }
form.contact button { margin-top: 1rem; border: 0; cursor: pointer; }

/* Footer */
.site-footer { text-align: center; padding: 3rem var(--gutter) 2rem; margin-top: 3rem; border-top: 1px solid #eee; }
.subscribe { max-width: 640px; margin: 0 auto 2rem; }
.subscribe h2 { font-size: 1.7rem; }
.social { list-style: none; display: flex; justify-content: center; gap: 1rem; padding: 0; margin: 0 0 .75rem; }
.social a { color: var(--ink); display: inline-flex; padding: 4px; }
.social a:hover { color: var(--purple); }
.copyright { font-size: .9rem; color: var(--muted); }
