/* =====================================================================
   style.css: all the visual styling for the Burjo Technology site.

   How CSS works, in one sentence:
     selector { property: value; }
   The selector picks which HTML elements to style (e.g. ".hero" means
   "anything with class="hero""), and the lines inside the braces say
   how they should look.
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. VARIABLES (called "custom properties")
   Define colors and sizes once here, then reuse them below with var().
   To change a color site-wide, you only edit it in this one place.
   :root means "the whole document", so these work everywhere.
   --------------------------------------------------------------------- */
:root {
  /* Brand colors */
  --color-header-bg: #12122e;   /* dark header background */
  --color-cream:     #e9e6e1;   /* page background + header link text */
  --color-navy:      #262f74;   /* title and button */
  --color-gray:      #4f4f4f;   /* subtitle text */
  --color-footer-bg: #88a7bc;   /* footer background */

  /* Sizes of the fixed bars. The hero uses these to know how much
     space to leave at the top and bottom. */
  --header-height: 72px;
  --footer-height: 60px;   /* 33px-tall footer logo + 13px padding above and below */

  /* Font stacks: the browser uses the first font that's installed.
     "serif" / "sans-serif" at the end are safe fallbacks that always work. */
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans:  "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}


/* ---------------------------------------------------------------------
   2. BASE / RESET
   Browsers add their own default spacing. We clear some of it so the
   layout behaves the same in every browser.
   --------------------------------------------------------------------- */

/* "*" selects every element. box-sizing: border-box makes an element's
   width INCLUDE its padding and border, which makes sizing much easier. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default outer spacing on the page and give it our colors/font. */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;

    /* "contain" keeps the small bounce at the top and bottom of the page
       but turns off the phone's own pull-to-refresh, which fires on a
       short tug. swipe-refresh.js replaces it with a longer, deliberate
       swipe down from the top. Sideways stretching stays off. */
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
}

/* TEXT SIZE: almost every size on the site is in "rem", which means
   "times this base size". So changing the base here makes all the
   text bigger or smaller together.
     106.25% = 17px, a touch larger than the browser's usual 16px
     125%    = 20px, used when a visitor clicks "Larger text"
   (text-size.js adds the "text-large" class; see the footer.) */
html {
  font-size: 106.25%;
}

html.text-large {
  font-size: 125%;
}

body {
  background-color: var(--color-cream);
  font-family: var(--font-sans);
  color: var(--color-gray);
  line-height: 1.5;   /* comfortable spacing between lines of text */

  /* Reserve room for the fixed header and footer. Because the universal
     box-sizing rule above makes height include padding, the body stays
     exactly one window tall, and the hero fills what's left in between.
     This means the page has nothing extra to scroll. */
  padding-top: var(--header-height);
  padding-bottom: var(--footer-height);
}

/* Images never grow wider than their container. */
img {
  max-width: 100%;
  display: block;   /* removes a small gap browsers put under inline images */
}


/* ---------------------------------------------------------------------
   3. HEADER: fixed to the top of the window
   --------------------------------------------------------------------- */
.site-header {
  /* position: fixed pins the header to the window, so it stays put
     even when the page scrolls. top/left/right: 0 stretch it full width. */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);

  /* z-index decides which element sits on top when they overlap.
     A higher number = closer to the viewer. Keeps the header above the hero,
     and above the footer (10) so a long Menu dropdown isn't cut off by it. */
  z-index: 15;

  background-color: var(--color-header-bg);
  padding: 0 32px;   /* space on the left and right edges */

  /* Flexbox: an easy way to line items up in a row.
     justify-content: space-between pushes the logo to the far left
     and the menu to the far right. align-items: center centers them
     vertically inside the header. */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo size. Height is fixed; width adjusts automatically to keep its shape. */
  .logo {
    height: 50px;          /* same height as before */
    width: auto;
    aspect-ratio: 5 / 2;   /* box is 2.5x as wide as it is tall (110 x 44px) */
    object-fit: cover;     /* fill that box and crop off what doesn't fit */
      border-radius: 8px;   /* rounds all four corners */
}

/* The menu list: remove bullet points and default spacing,
   and lay the items out in a row with a gap between them. */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 32px;
}

/* The menu links themselves. */
.main-nav a {
  color: var(--color-cream);
  text-decoration: none;          /* remove the default underline */
  font-size: 16px;                /* fixed in px, so the menu fits the header at any text size */
  letter-spacing: 0.03em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;   /* invisible line, shown on hover */
  transition: border-color 0.2s;          /* fades the line in smoothly */
}

/* :hover = mouse is over the link. :focus-visible = selected with the
   keyboard (Tab key). Styling both keeps the site keyboard-friendly. */
.main-nav a:hover,
.main-nav a:focus-visible {
  border-bottom-color: var(--color-cream);
}

/* CURRENT PAGE: a soft, see-through box behind the menu link for the
   page you're on. Each page marks its own link with aria-current="page",
   and [aria-current="page"] selects only links that have it.
   rgba(233, 230, 225, 0.15) = the cream text color at 15% strength.
   The padding makes the box; the matching negative margin cancels it
   out, so the word stays in exactly the same spot as the other links. */
.main-nav a[aria-current="page"] {
  background-color: rgba(233, 230, 225, 0.15);
  border-radius: 6px;
  padding: 6px 12px;
  margin: 0 -12px;
}

/* LEGACY CLIENTS SPOTLIGHT: the menu's Legacy Clients link jumps to this
   card on the Legacy Clients page. The scroll margin keeps it clear of the fixed
   header, and :target applies only when the address ends in #legacy-clients,
   so the card looks normal when someone simply opens the page.
   Used on: Legacy Clients page. */
#legacy-clients {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

#legacy-clients:target {
  background-color: #fbfaf7;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 3px rgba(38, 47, 116, 0.25), 0 8px 24px rgba(18, 18, 46, 0.12);
}

/* A thin line above a link in the dropdown, to separate two groups. */
.js .main-nav .menu-more .menu-group-start {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(233, 230, 225, 0.2);
}

/* MENU BUTTON: opens a dropdown (menu.js opens and closes it).
   On computers it sits right of Schedule, and its dropdown holds only the
   extra links (.menu-more). On phones every menu link folds into it.
   The "js" rules only apply when the page's script is running (the "js"
   class is added by a line in each page's <head>), so the main links still
   show normally in the rare case scripts are turned off. */
.menu-button {
  display: none;
}

.main-nav .menu-more {
  display: none;
}

.js .main-nav.is-open .menu-more {
  display: block;
}

.js .menu-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.03em;
  color: var(--color-cream);
  background: none;
  border: 1px solid rgba(233, 230, 225, 0.4);   /* faint cream outline */
  border-radius: 6px;
  cursor: pointer;
  pointer-events: auto;   /* the menu area ignores taps except on its controls */
}

/* A small down-arrow after "Menu", drawn with two borders of a square
   turned 45 degrees. It flips to point up while the menu is open. */
.js .menu-button::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.js .menu-button[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

/* Computers and tablets: "order" puts the button at the end of the row,
   right of Schedule, and the dropdown hangs under it from the bottom edge
   of the header bar, lined up with the button's right side. */
@media (min-width: 601px) {
  .js .main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
  }

  .js .menu-button {
    order: 1;
  }

  .js .main-nav.is-open .menu-more {
    position: absolute;
    top: calc(50% + var(--header-height) / 2);
    right: 0;
  }

  .js .main-nav .menu-more ul {
    display: block;
    min-width: 180px;
    max-height: calc(100vh - var(--header-height));   /* scrolls if the window is too short */
    overflow-y: auto;
    pointer-events: auto;
    padding: 8px;
    background-color: var(--color-header-bg);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(18, 18, 46, 0.3);
  }

  /* Each link is a full-width row. */
  .js .main-nav .menu-more a,
  .js .main-nav .menu-more a[aria-current="page"] {
    display: block;
    padding: 12px 14px;
    margin: 0;
    border-bottom: none;
    border-radius: 6px;
  }

  .js .main-nav .menu-more a:hover,
  .js .main-nav .menu-more a:focus-visible {
    background-color: rgba(233, 230, 225, 0.1);
  }
}

/* Small tablets: tighter spacing, so the longer row fits beside the logo. */
@media (min-width: 601px) and (max-width: 700px) {
  .js .main-nav,
  .main-nav ul {
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .js .menu-button {
    font-size: 14.5px;
  }

  /* The dropdown: hidden until opened. "position: static" on the menu
     lets the list line up with the header itself, so it drops down from
     the bottom edge of the header bar. */
  .js .main-nav {
    position: static;
  }

  .js .main-nav ul {
    display: none;
  }

  .js .main-nav.is-open ul {
    display: block;
    position: absolute;
    top: 100%;
    right: 16px;
    min-width: 180px;
    max-height: calc(100vh - var(--header-height));   /* scrolls if a sideways phone is too short */
    overflow-y: auto;
    padding: 8px;
    background-color: var(--color-header-bg);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(18, 18, 46, 0.3);
    pointer-events: auto;
  }

  /* A thin line between Schedule and Memberships, where the extra links
     begin. Phones only: on computers those links already sit in their own
     dropdown. Same line as .menu-group-start above Legacy Clients. */
  .js .main-nav.is-open .menu-more {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(233, 230, 225, 0.2);
  }

  /* The extra links simply continue the same list, after Schedule. */
  .js .main-nav.is-open .menu-more ul {
    position: static;
    min-width: 0;
    max-height: none;
    overflow-y: visible;
    padding: 0;
    box-shadow: none;
  }

  /* Each link is a full-width row that's easy to tap. */
  .js .main-nav.is-open a {
    display: block;
    padding: 12px 14px;
    margin: 0;
    font-size: 16px;
    border-bottom: none;
    border-radius: 6px;
  }

  .js .main-nav.is-open a:hover,
  .js .main-nav.is-open a:focus-visible {
    background-color: rgba(233, 230, 225, 0.1);
  }

  /* The page you're on keeps its soft highlight. */
  .js .main-nav.is-open a[aria-current="page"] {
    background-color: rgba(233, 230, 225, 0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .menu-button::after { transition: none; }
}

/* The menu sits on top (z-index), but only its links and controls
   respond to taps (pointer-events), so a tap in the gaps between menu
   links falls through to whatever is underneath. */
.main-nav {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.main-nav a {
  pointer-events: auto;
}


/* ---------------------------------------------------------------------
   4. HERO: fills the space between header and footer
   --------------------------------------------------------------------- */
.hero {
  /* position: relative lets us place the image and the text box
     inside it using position: absolute (see below). */
  position: relative;

  /* 100% of the body's inner space: everything between the padding the
     body reserves for the header and footer. It updates automatically
     whenever the window is resized. */
  height: 100%;
  min-height: 420px;   /* don't get too squished on very short windows */

  overflow: hidden;    /* hide any part of the image that spills outside */

  /* Center the text box both horizontally and vertically. */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* The hero picture is stretched to cover the whole hero area.
   object-fit: cover = fill the box completely, cropping the edges
   if needed, without distorting the picture. */
.hero-image {
  position: absolute;
  inset: 0;            /* shorthand for top: 0; right: 0; bottom: 0; left: 0 */
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* The text box on top of the image. */
.hero-content {
  position: relative;  /* puts it above the absolutely-positioned image */
  z-index: 1;
  max-width: 760px;    /* keeps lines of text from getting too long to read */
  padding: 0 24px;
  text-align: center;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 700;    /* 700 = bold */
  color: var(--color-navy);

  /* clamp(min, preferred, max): the font size grows and shrinks with the
     window width (vw = 1% of window width) but never goes below 2rem or
     above 3.5rem. This is what makes the title "responsive". */
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin: 0 0 20px;    /* top, left/right, bottom */
}

.hero-subtitle {
  color: var(--color-gray);
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin: 0 auto 32px;
  max-width: 600px;
}

/* A link that looks like a button. */
.button {
  display: inline-block;   /* lets the link have padding like a box */
  background-color: var(--color-navy);
  color: var(--color-cream);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 6px;      /* slightly rounded corners */
  transition: transform 0.15s, box-shadow 0.15s;
}

/* Lift the button slightly with a soft shadow when hovered or focused. */
.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(38, 47, 116, 0.35);
}


/* ---------------------------------------------------------------------
   4b. INNER PAGES (Community, Services, Schedule)
   These pages share the same header and footer as the home page, but
   instead of the full-screen hero they have a simple content area:
   a page title, a short intro, and sections of content below.
   --------------------------------------------------------------------- */
.page {
  /* Fill at least the space between header and footer, like the hero.
     If the content grows taller than the window, the page scrolls. */
  min-height: 100%;

  /* The extra bottom padding (footer height + 56px) makes sure the last
     bit of content can scroll up ABOVE the fixed footer instead of
     hiding behind it. */
  padding: 56px 32px calc(var(--footer-height) + 56px);
}

/* Keeps lines of text a comfortable reading width, centered on the page. */
.page-inner {
  max-width: 960px;
  margin: 0 auto;
}

/* Page title: same font, weight and color as the home page title. */
.page-title {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-navy);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 16px;
}

/* The short sentence under the title. */
.page-intro {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 640px;
  margin: 0 0 48px;
}

/* One block of content, e.g. "Upcoming events". */
.page-section {
  margin-bottom: 48px;
}

.page-section h2 {
  font-family: var(--font-serif);
  color: var(--color-navy);
  font-size: 1.5rem;
  margin: 0 0 16px;
}

/* A link inside a section heading (e.g. "National Presbyterian Church")
   takes the heading's own color. The browser's default underline stays,
   just like "here" in the card below, so it still looks clickable. */
.page-section h2 a {
  color: inherit;
}

.page-section p {
  margin: 0 0 12px;
}

/* A dashed box that marks "content goes here". Delete the box (or the
   class) once you've added real content. */
.placeholder {
  border: 2px dashed rgba(38, 47, 116, 0.25);   /* faint navy dashes */
  border-radius: 8px;
  padding: 24px;
  background-color: rgba(255, 255, 255, 0.35);  /* a touch lighter than the page */
}

/* Cards in a grid. "auto-fit, minmax(220px, 1fr)" means: fit as many
   columns as there's room for, each at least 220px wide, sharing the
   space equally. On a phone that becomes a single column automatically. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  /* Nearly solid, so text sits on a clean surface and the background
     drawings don't show through. The soft shadow lifts it off the page. */
  background-color: rgba(251, 250, 247, 0.96);
  border: 1px solid rgba(38, 47, 116, 0.1);
  box-shadow: 0 1px 2px rgba(18, 18, 46, 0.04), 0 6px 18px rgba(18, 18, 46, 0.05);
  border-radius: 8px;
  padding: 24px;
}

.card h3 {
  font-family: var(--font-serif);
  color: var(--color-header-bg);   /* the darker navy, matching the News timeline headlines */
  font-size: 1.2rem;
  margin: 0 0 8px;
}

/* A card title that is the only thing in its card doesn't need the
   space below it. */
.card h3:last-child {
  margin-bottom: 0;
}

/* A link inside a card title (e.g. "here" on the Community page) keeps the
   title's font and size, but uses the regular navy like the other links. */
.card h3 a {
  color: var(--color-navy);
}

.card p {
  margin: 0;
}

/* When a card holds more than one paragraph, put a gap between them.
   "p + p" means "a paragraph that comes right after another paragraph". */
.card p + p {
  margin-top: 12px;
}

/* BUTTON ROW: a few buttons side by side that wrap onto a new line
   on narrow screens. Used on: Schedule page. */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: -24px 0 48px;   /* tucks up under the intro, keeps the usual gap below */
}

/* A lighter version of .button: navy outline, see-through fill. */
.button-outline {
  background-color: transparent;
  color: var(--color-navy);
  box-shadow: inset 0 0 0 2px var(--color-navy);   /* a border that doesn't change the size */
}

.button-outline:hover,
.button-outline:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-navy), 0 6px 16px rgba(38, 47, 116, 0.2);
}

/* STACKED BUTTON ROW (phones only): on computers these buttons sit in
   one row like any other button row. On phones the group fills the full
   width of the page (inside the page's usual side padding): the first
   button goes on top across both columns, and the next two sit side by
   side underneath, each exactly half, so their outer edges line up with
   the top button's. A row of only two buttons stacks them, both full width.
   Used on: Schedule page (Email on top, Text and Call below),
   Services page (Book a visit on top, Email and Call below), and
   Community page (Helping a Parent? on top, NPC Guide below). */
@media (max-width: 600px) {
  .button-row-stacked {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .button-row-stacked > :first-child,
  .button-row-stacked > :nth-child(2):last-child {
    grid-column: 1 / -1;   /* spans both columns */
  }

  .button-row-stacked .button {
    text-align: center;
  }
}

/* VISIT FORM: two rows of two boxes on wide screens, one column on phones.
   min(100%, ...) keeps a box from overflowing on the narrowest phones.
   Used on: Schedule page. */
.visit-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px 24px;
}

/* A box that spans every column (the message box and the button). */
.form-field-wide {
  grid-column: 1 / -1;
}

.form-field label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-header-bg);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;                     /* use the site font, not the browser's */
  color: var(--color-header-bg);
  background-color: #fbfaf7;         /* the same off-white as the Community notes */
  border: 1px solid rgba(38, 47, 116, 0.25);
  border-radius: 6px;
}

.form-field textarea {
  resize: vertical;   /* can be made taller, but not wider */
}

/* A small gray note under a box, e.g. the hours under "Preferred time". */
.card .form-hint {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--color-gray);
}

/* SCHEDULE LAYOUT: the booking form with the Hours card beside it on
   computers, and Hours under the form on phones and tablets.
   Used on: Schedule page. */
.schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

/* One column inside the narrower form card, so every box is full width. */
.schedule-layout .visit-form {
  grid-template-columns: 1fr;
}

.hours-card .hours-table {
  margin-bottom: 0;
}

/* In the narrow column beside the form, each day sits above its hours
   instead of beside them, so the times don't wrap onto two lines. */
@media (min-width: 901px) {
  .hours-card .hours-table,
  .hours-card .hours-table tbody,
  .hours-card .hours-table tr,
  .hours-card .hours-table th,
  .hours-card .hours-table td {
    display: block;
  }

  .hours-card .hours-table tr {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(38, 47, 116, 0.12);
  }

  .hours-card .hours-table tr:last-child {
    border-bottom: none;
  }

  .hours-card .hours-table th,
  .hours-card .hours-table td {
    padding: 0;
    border: none;
    text-align: left;
  }

  .hours-card .hours-table td {
    margin-top: 2px;
  }
}

@media (max-width: 900px) {
  .schedule-layout {
    grid-template-columns: 1fr;
  }
}

/* A navy ring around the box you're typing in. */
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 3px rgba(38, 47, 116, 0.18);
}

/* <button> elements need a few resets to match the .button links. */
button.button {
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.card .form-note {
  margin-top: 8px;
  font-size: 0.85rem;
}

/* BACKUP BOX: shown under the form after "Send request", with the request
   written out and a Copy button. The dashed border matches the site's
   other side notes. Used on: Schedule page. */
.form-backup {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 20px;
  border: 2px dashed rgba(38, 47, 116, 0.3);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.5);
}

/* "display: grid" above would otherwise beat the hidden attribute. */
.form-backup[hidden] {
  display: none;
}

.form-backup-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-header-bg);
}

.form-backup textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--color-header-bg);
  background-color: #fbfaf7;
  border: 1px solid rgba(38, 47, 116, 0.25);
  border-radius: 6px;
  resize: vertical;
}

/* The Copy button sits at the left instead of stretching across the box. */
.form-backup .button {
  justify-self: start;
}

/* STEPS: a numbered row of cards. The numbers come from a CSS counter,
   drawn as navy circles in each card's top corner. Used on: Schedule page. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;   /* start counting at 0 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.steps li {
  counter-increment: step;   /* add 1 for each step */
}

.steps li::before {
  content: counter(step);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background-color: var(--color-navy);
  color: var(--color-cream);
  font-weight: 700;
}

/* HOURS TABLE: day on the left, hours on the right, thin lines between.
   Used on: Schedule page. */
.hours-table {
  width: 100%;
  border-collapse: collapse;   /* one shared line between rows, not two */
  margin-bottom: 16px;
}

.hours-table th,
.hours-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(38, 47, 116, 0.12);
}

.hours-table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-header-bg);
}

.hours-table td {
  text-align: right;
}

.hours-table tr:last-child th,
.hours-table tr:last-child td {
  border-bottom: none;
}

/* Today's row gets a soft navy fill (added by the Schedule page's script). */
.hours-table tr.is-today {
  background-color: rgba(38, 47, 116, 0.08);
}

.today-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;   /* a pill shape */
  background-color: var(--color-navy);
  color: var(--color-cream);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.card a {
  color: var(--color-navy);
}

/* SERVICE CARDS: a small line drawing above each title and a short list
   of common requests. Used on: Services page. */
.service-icon {
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  fill: none;
  stroke: var(--color-navy);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-list {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 0.92rem;
}

.service-list li + li {
  margin-top: 4px;
}

/* The bullet dots use the same blue-gray as the Community board pins. */
.service-list li::marker {
  color: var(--color-footer-bg);
}

/* A card with a dashed border, for a side note like "Don't see what you
   need?". It sits below a card grid, so it gets a gap above. */
.card-dashed {
  margin-top: 24px;
  border-style: dashed;
  border-color: rgba(38, 47, 116, 0.3);
}

/* RATES: two prices side by side that stack on phones.
   Used on: Services page. */
.rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 16px;
}

.card .rate-amount {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-navy);
}

/* "per hour" next to the price: smaller and plainer. */
.rate-amount span {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-gray);
}

.card .rate-label {
  margin-top: 6px;
  font-weight: 600;
  color: var(--color-header-bg);
}

/* SERVICE LIST: services laid out without boxes: a small drawing, a
   title, and one line each, in up to three columns. The open space
   between them does the separating, so the page feels lighter.
   Used on: Services page. */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px 40px;   /* space between rows, then between columns */
}

.service-item h3 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-header-bg);
}

.service-item p {
  margin: 0;
  font-size: 0.95rem;
}

.service-item .service-icon {
  margin-bottom: 10px;
}

/* PRICING CARDS: separate cards stacked with a gap between them. Rates sit
   side by side, split by a thin line. On phones the rates stack.
   Used on: Services page. */
.pricing-card {
  padding: 28px;
}

.pricing-card + .pricing-card {
  margin-top: 16px;
}

.pricing-rates {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pricing-rates > div + div {
  padding-left: 28px;
  margin-left: 28px;
  border-left: 1px solid rgba(38, 47, 116, 0.12);
}

/* "Memberships" and "Our service area": small labels, not big headings. */
.card .pricing-label {
  margin-bottom: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-navy);
}

/* "Tap to learn more": the same small label, centered under the rates.
   The padding makes the link an easier target to tap. */
/* Four services across on computers, two on most phones.
   Used on: Services page. */
.service-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 32px 32px;
}

/* "Example: a typical 1½-hour visit..." under the hourly rates, set
   apart by a thin line. Used on: Services page. */
.card .pricing-example {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(38, 47, 116, 0.12);
  color: var(--color-header-bg);
}

/* MEMBERSHIP TEASER: one line about memberships with a button beside it
   (under it on phones). Used on: Services page. */
.membership-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.membership-teaser .pricing-label {
  margin-bottom: 6px;
}

.membership-teaser .rate-label {
  margin: 0;
}

.membership-teaser .button {
  flex: none;
}

@media (max-width: 600px) {
  .membership-teaser {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

.card .pricing-more {
  margin: 16px 0 0;
  text-align: center;
}

.pricing-more a {
  display: inline-block;
  padding: 8px 12px;
}

/* The hours table inside the "Where & when" card doesn't need the extra
   space below it that it has on the Schedule page. */
.pricing-card .hours-table {
  margin-bottom: 0;
}

/* Inside that card the table sits right against the card's own padding,
   so it needs less side padding, and each day and time stays on one line. */
.pricing-card .hours-table th,
.pricing-card .hours-table td {
  padding: 10px 4px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .pricing-card {
    padding: 22px;
  }

  .pricing-rates {
    grid-template-columns: 1fr;
  }

  .pricing-rates > div + div {
    padding: 18px 0 0;
    margin: 18px 0 0;
    border-left: none;
    border-top: 1px solid rgba(38, 47, 116, 0.12);
  }
}

/* CALL-TO-ACTION CARD: a dark navy card with a cream button, so the
   last thing on the page is the next step. ".card.cta-card" (both classes)
   beats the plain ".card" rules above, so the colors here win. */
.card.cta-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  background-color: var(--color-header-bg);
  border-color: var(--color-header-bg);
  color: var(--color-cream);
}

.card.cta-card h3 {
  color: var(--color-cream);
  font-size: 1.4rem;
}

.card.cta-card .button {
  background-color: var(--color-cream);
  color: var(--color-navy);
}

/* COMMUNITY NOTES, EXTRAS: a smaller line drawing, a small label above
   the title, and the links as rounded "pill" buttons.
   Used on: Community page. */
.note-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
}

.note-tag {
  display: block;
  margin-bottom: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-navy);
}

.note-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.note-links a {
  padding: 6px 14px;
  border-radius: 999px;   /* a pill shape */
  background-color: rgba(38, 47, 116, 0.08);
  color: var(--color-navy);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.note-links a:hover,
.note-links a:focus-visible {
  background-color: var(--color-navy);
  color: var(--color-cream);
}

@media (prefers-reduced-motion: reduce) {
  .note-links a { transition: none; }
}

/* GUIDE CARD: a drawing on the left and the text on the right.
   On phones the drawing sits above the text instead.
   Used on: Community page. */
.guide-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.guide-card .service-icon {
  flex: none;
  width: 44px;
  height: 44px;
  margin: 0;
}

/* A button row inside a card doesn't need the big gaps it has under a
   page intro. */
.card .button-row {
  margin: 16px 0 0;
}

/* Buttons inside a card keep their own text colors. Without these, the
   ".card a" rule (navy links) turns a navy button's text navy too, and
   the words disappear into the button. */
.card .button {
  color: var(--color-cream);
}

.card .button-outline {
  color: var(--color-navy);
}

@media (max-width: 600px) {
  .guide-card {
    flex-direction: column;
    gap: 12px;
  }
}

/* PLAN CARDS: the two memberships side by side (stacked on phones).
   The button sits at the bottom of each card, so the two line up even
   when one list is longer. Used on: Memberships page. */
.plan-grid {
  padding-top: 12px;   /* room for the "Best value" tag above the card */
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan-card .button-row {
  margin-top: auto;      /* pushes the button to the bottom of the card */
  padding-top: 20px;
}

/* The featured plan: navy border and a slightly brighter card. */
.plan-card-featured {
  border: 2px solid var(--color-navy);
  background-color: #ffffff;
}

/* "Best value": a small navy tag sitting on the card's top edge. */
.card .plan-badge {
  position: absolute;
  top: 0;
  right: 24px;
  transform: translateY(-50%);
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;   /* a pill shape */
  background-color: var(--color-navy);
  color: var(--color-cream);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The tag floats above the card, so the plan name under it shouldn't get
   the usual gap between paragraphs (".card p + p"). This keeps both
   cards' text at the same height. */
.card .plan-badge + .pricing-label {
  margin-top: 0;
}

/* "Save up to $40 a month": a soft pill right under the price. */
.card .plan-savings {
  align-self: flex-start;
  margin: 10px 0 4px;
  padding: 3px 12px;
  border-radius: 999px;
  background-color: rgba(136, 167, 188, 0.25);   /* the footer blue-gray, faded */
  color: var(--color-header-bg);
  font-size: 0.85rem;
  font-weight: 600;
}

/* "Everything in Premium, plus:" between the two lists. */
.card .plan-includes {
  margin: 14px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-navy);
}

.plan-includes + .service-list {
  margin-top: 6px;
}

/* VIDEO CARD: a YouTube player that fills the card's width and keeps the
   16:9 widescreen shape, so it shrinks to fit on phones.
   Used on: Community page (Digital Safety web series). */
.video-card {
  max-width: 820px;
}

.video-frame {
  margin-top: 8px;
  border-radius: 6px;
  overflow: hidden;              /* rounds the player's corners too */
  background-color: var(--color-header-bg);   /* dark box while the player loads */
  box-shadow: 0 2px 8px rgba(18, 18, 46, 0.12);
}

.video-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* LETTER CARD: a thank-you note in the serif font, signed at the bottom
   with the small B logo. Used on: Legacy Clients page. */
.letter-card p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--color-header-bg);
}

.letter-sign {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.letter-sign img {
  width: 44px;
  height: auto;
  border-radius: 8px;
}

/* The name under the letter goes back to the regular font and size.
   ".letter-card .letter-sign p" beats ".letter-card p" above. */
.letter-card .letter-sign p {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--color-gray);
}

.letter-sign strong {
  color: var(--color-header-bg);
}

/* The two member rates sit just below the letter. */
.perk-grid {
  margin-top: 24px;
  margin-bottom: 0;
}

.card .perk-fine {
  font-size: 0.82rem;
  font-style: italic;
}

/* TIMELINE EXTRAS: links and area labels inside news entries.
   Used on: Legacy Clients page. */
.timeline .note-links {
  margin-top: 10px;
}

/* The "Coming up" label next to a future date. The date is normally on
   its own line, so for upcoming entries it's made inline to keep the
   label beside it. */
.timeline li.is-upcoming .timeline-when {
  display: inline;
}

.timeline .today-tag {
  margin-left: 4px;
}

/* A future entry gets a dashed dot, since it hasn't happened yet. */
.timeline li.is-upcoming::before {
  border-style: dashed;
}

/* Areas served, shown as small rounded labels in a row. */
.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

/* ".timeline ul.area-list li" also undoes the timeline's own <li> rules
   (its padding and its dot), which would otherwise apply here too. The
   "ul" makes this rule specific enough to win over the timeline's
   "li:last-child" rule further down, so the last label keeps its padding. */
.timeline ul.area-list li {
  padding: 3px 10px;
  border: 1px solid rgba(38, 47, 116, 0.2);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  color: var(--color-header-bg);
}

.timeline ul.area-list li::before {
  content: none;
}

/* REVIEW CARDS: three small cards under the home page button, in the
   same style as the Services cards but smaller. Used on: Home page. */
.review-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* always three across */
  gap: 16px;
  margin-top: 40px;
}

.review-card {
  padding: 16px;
  transition: transform 0.15s, box-shadow 0.15s;   /* smooth lift, like .button */
}

/* Hovering lifts the card slightly with a soft shadow, the same small
   rise the buttons have. */
.review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(38, 47, 116, 0.18);
}

/* Visitors who've asked their device for less motion get no lift. */
@media (prefers-reduced-motion: reduce) {
  .review-card { transition: none; }
  .review-card:hover { transform: none; }
}

/* The person drawing: smaller than on the Services cards, and centered
   like the rest of the home page text. */
.review-card .service-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
}

.card.review-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.review-card p {
  font-size: 0.88rem;
}

/* If a window is too short to fit everything, let the home page scroll
   instead of cutting off the bottom. "margin: auto" keeps the text
   centered like before, but (unlike centering with flexbox alone) it
   never pushes the top out of reach. */
.hero {
  overflow-y: auto;
}

.hero-content {
  margin: auto;
  padding-block: 24px;
}

/* Phones: three cards won't fit side by side, so they stack in one
   column and you scroll down the page to see them. */
@media (max-width: 600px) {
  .review-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 28px;
  }

  /* Let the home page grow taller than the screen and scroll like a
     normal page (on computers it stays exactly one screen tall).
     Scrolling the whole page, instead of only the picture area, also
     lets swipe-refresh.js tell when you've really reached the bottom,
     so scrolling up through the cards doesn't reload the page. */
  .home-page {
    height: auto;
    min-height: 100%;
  }

  .home-page .hero {
    height: auto;
    overflow: visible;

    /* Still at least one screen tall between the header and footer.
       svh ("small viewport height") ignores the phone's sliding address
       bar; the vh line before it is a fallback for older phones. */
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    min-height: calc(100svh - var(--header-height) - var(--footer-height));
  }

  /* The title, paragraph and button fill the first screen (the space
     between header and footer, less the 24px of padding above and below
     .hero-content) and sit in the middle of it, with equal space above
     and below. The reviews start just under it, so you scroll to see them. */
  .home-page .hero-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--header-height) - var(--footer-height) - 48px);
    min-height: calc(100svh - var(--header-height) - var(--footer-height) - 48px);
  }
}

/* PROFILE CARD: a round picture beside a name, role, and labels.
   On phones the picture sits on top and everything is centered.
   Used on: About page. */
.profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-photo {
  flex: none;
  width: 112px;
  height: 112px;
  object-fit: cover;     /* fills the circle without stretching */
  border-radius: 50%;    /* a circle */
  border: 3px solid #fbfaf7;
  box-shadow: 0 2px 8px rgba(18, 18, 46, 0.15);
}

.profile-card h3 {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.card .profile-role {
  font-weight: 600;
  color: var(--color-navy);
}

.profile-card .area-list {
  margin-top: 12px;
}

/* A bigger photo and name for the top of the About page. */
.profile-card-large {
  gap: 32px;
  padding: 32px;
}

.profile-card-large .profile-photo {
  width: 150px;
  height: 150px;
}

.profile-card-large h3 {
  font-size: 1.9rem;
}

@media (max-width: 600px) {
  .profile-card-large {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
  }

  .profile-card-large .profile-photo {
    width: 120px;
    height: 120px;
  }
}

/* STORY CARD: keeps the story's lines to a comfortable reading length
   (about 70 letters), like a printed page. Used on: About page. */
.story-card p {
  max-width: 68ch;
  line-height: 1.65;
}

/* The small round photo next to the name at the end of the story.
   Starts with ".story-card" so the Legacy Clients page letter keeps its own look. */
.story-card .letter-sign .profile-photo {
  width: 48px;
  height: 48px;
  border-width: 2px;
  border-radius: 50%;
}

/* "American University" under the Education title, and the line under
   Experience: a quiet subtitle. */
.card .background-place {
  margin-top: -4px;
  font-weight: 600;
  color: var(--color-navy);
}

/* SERVICE AREA: a line of text right after the town labels in a card
   gets some room above it. Used on: Services and Schedule pages. */
.card .area-list + p {
  margin-top: 14px;
}

/* Small rounded labels in a row, anywhere on the site. (The Legacy Clients page
   timeline has its own version of this rule for its area labels.) */
.area-list li {
  padding: 3px 10px;
  border: 1px solid rgba(38, 47, 116, 0.2);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  color: var(--color-header-bg);
}

@media (max-width: 600px) {
  .profile-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-card .area-list {
    justify-content: center;
  }
}

/* PRIVACY CARD: one card with a short heading and paragraph per topic.
   Each heading after the first gets room above it. Used on: Privacy page. */
.privacy-card {
  max-width: 720px;   /* keeps lines a comfortable reading length */
}

.privacy-card p + h3 {
  margin-top: 22px;
}

/* A "Coming soon" label sitting above a card title. Used on: NPC Help page. */
.card > .today-tag {
  margin: 0 0 8px;
}

/* HEADINGS: spread a heading's words evenly across its lines, so a long
   title never ends with one word sitting alone on the last line. */
h1,
h2,
h3 {
  text-wrap: balance;
}

/* COMMUNITY BOARD: events look like notes pinned to a board, each
   tilted slightly. The pin is the same blue-gray as the dot in the logo.
   Used on: Community page. */
.note-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding-top: 8px;   /* room for the tilt at the top */
}

.note {
  position: relative;
  padding: 28px 20px 20px;
  background-color: #fbfaf7;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(18, 18, 46, 0.12);
  transform: rotate(-1.2deg);    /* tilt left */
  transition: transform 0.2s;    /* smooth straighten on hover */
}

/* Every second note tilts the other way, so the board looks hand-pinned. */
.note:nth-child(even) {
  transform: rotate(1deg);
}

/* The pin: a small circle centered at the top of each note. */
.note::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;   /* half its width, so it's truly centered */
  border-radius: 50%;
  background-color: var(--color-footer-bg);
  box-shadow: 0 1px 2px rgba(18, 18, 46, 0.35);
}

/* Hovering straightens the note and lifts it a little. */
.note:hover {
  transform: rotate(0) translateY(-3px);
}

.note h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-header-bg);   /* the darker navy, matching the service card titles */
}

.note p {
  margin: 0;
  font-size: 0.92rem;
}

.note-when {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-header-bg);
}

/* Links inside a note (YouTube, Facebook, Nextdoor) use the site's navy,
   the same color as the page titles, instead of the browser's default
   blue (or purple once visited). This one rule covers both. */
.note-when a {
  color: var(--color-navy);
}

/* Visitors who've asked their device for less motion get no animation. */
@media (prefers-reduced-motion: reduce) {
  .note { transition: none; }
}

/* TIMELINE: items strung along a vertical line, each marked by a dot,
   inside a soft box. Used on: Legacy Clients page. */
.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 24px 24px 24px 56px;   /* extra left room for the line and dots */
  background-color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(38, 47, 116, 0.12);
  border-radius: 8px;
}

/* The vertical line. */
.timeline::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 32px;
  bottom: 32px;
  width: 2px;
  background-color: rgba(38, 47, 116, 0.2);
}

.timeline li {
  position: relative;
  padding-bottom: 24px;
}
.timeline li:last-child {
  padding-bottom: 0;
}

/* The dot for each item, centered on the line. */
.timeline li::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-cream);
  border: 3px solid var(--color-navy);
}

.timeline-when {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-navy);
}

.timeline h3 {
  margin: 2px 0 4px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-header-bg);
}

.timeline p {
  margin: 0;
  font-size: 0.92rem;
}

/* PAGE BACKGROUNDS: each inner page has its own soft drawing, in the same
   style as the home page's hero. A class on each page's <body> picks it:
     community-page = neighbors and houses   (images/community.svg)
     services-page  = laptop, phone, TV      (images/services.svg)
     schedule-page  = calendar, clock, house (images/schedule.svg)
     news-page      = newspaper, megaphone   (images/news.svg)
     gallery-page   = flowers and a butterfly (images/garden.svg)
     notfound-page  = the home page drawing   (images/hero.svg)

   This first rule holds everything they share. Listing several selectors
   separated by commas applies the same rule to all of them.

   ::before adds an extra, empty layer to the page that we can paint.
   position: fixed keeps the drawing still while the content scrolls over
   it, and top/bottom stop it at the header and footer so the hills sit
   just above the footer. z-index: -1 puts it behind everything else. */
.home-page::before,
.about-page::before,
.privacy-page::before,
.gallery-page::before,
.community-page::before,
.services-page::before,
.schedule-page::before,
.news-page::before,
.notfound-page::before {
  content: "";
  position: fixed;
  top: var(--header-height);
  bottom: var(--footer-height);
  left: 0;
  right: 0;
  z-index: -1;

  /* 100% auto = always the full width of the window, so nothing gets cut
     off the sides on phones. "center bottom" anchors it to the bottom;
     on tall screens the cream page color simply continues above it. */
  background-size: 100% auto;
  background-position: center bottom;
  background-repeat: no-repeat;

  /* How strong the drawing is: 0.38 = 38% visible, soft enough to read
     as texture behind the solid cards. Lower = fainter. */
  opacity: 0.38;
}

/* Then each page just names its own picture. */
.community-page::before { background-image: url("/images/community.svg"); }
.services-page::before  { background-image: url("/images/services.svg"); }
.schedule-page::before  { background-image: url("/images/schedule.svg"); }
.news-page::before      { background-image: url("/images/news.svg"); }
.notfound-page::before  { background-image: url("/images/hero.svg"); }
.home-page::before      { background-image: url("/images/hero.svg"); }
.about-page::before     { background-image: url("/images/community.svg"); }
.privacy-page::before   { background-image: url("/images/services.svg"); }
.gallery-page::before   { background-image: url("/images/garden.svg"); }


/* ---------------------------------------------------------------------
   5. FOOTER: slim bar fixed to the bottom
   Two layers:
     .site-footer  = the full-width colored bar, pinned to the window
     .footer-inner = the content row inside it, capped at 1200px and
                     centered, so on very wide screens the items don't
                     drift to the far edges of the window
   --------------------------------------------------------------------- */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background-color: var(--color-footer-bg);
}

/* PHONES: pages open with the footer tucked away; it slides up into view
   when you scroll up, and back down out of sight when you scroll down
   (footer-scroll.js adds and removes "footer-is-hidden" on the whole
   page). translateY(100%) moves it down by its own height. */
@media (max-width: 600px) {
  .site-footer {
    transition: transform 0.25s ease;
  }

  .footer-is-hidden .site-footer {
    transform: translateY(100%);
  }

  /* While the footer is hidden, each page's background drawing stretches
     down to the bottom of the screen, so no blank strip shows where the
     footer was. It slides at the same speed as the footer.
     ("footer-is-hidden" is on the whole page whenever the footer is hidden.) */
  .home-page::before,
  .about-page::before,
  .privacy-page::before,
  .gallery-page::before,
  .community-page::before,
  .services-page::before,
  .schedule-page::before,
  .news-page::before,
  .notfound-page::before {
    transition: bottom 0.25s ease;
  }

  .footer-is-hidden .home-page::before,

  .footer-is-hidden .about-page::before,

  .footer-is-hidden .privacy-page::before,
  .footer-is-hidden .gallery-page::before,

  .footer-is-hidden .community-page::before,
  .footer-is-hidden .services-page::before,
  .footer-is-hidden .schedule-page::before,
  .footer-is-hidden .news-page::before,
  .footer-is-hidden .notfound-page::before {
    bottom: 0;
  }

  /* Home page: its picture scrolls with the page, and the page keeps a
     footer-tall gap at the very bottom so nothing ends up behind the
     footer. The negative margin pulls the picture down into that gap,
     and the matching padding keeps the reviews clear of the footer, so
     the picture always reaches the bottom of the page. */
  .home-page .hero {
    margin-bottom: calc(-1 * var(--footer-height));
    padding-bottom: var(--footer-height);
  }
}

/* Visitors who've asked their device for less motion: it still hides
   and shows, just without the slide. */
@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
  .site-footer,
  .home-page::before,
  .about-page::before,
  .privacy-page::before,
  .gallery-page::before,
  .community-page::before,
  .services-page::before,
  .schedule-page::before,
  .news-page::before,
  .notfound-page::before {
    transition: none;
  }
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;                     /* "auto" on left and right centers the row */
  min-height: var(--footer-height);   /* never shorter than the space the body reserves */
  padding: 13px 32px;                 /* the padding, not a fixed height, sets the bar's size */

  /* CSS Grid with three columns: "1fr auto 1fr".
       auto = the middle column is exactly as wide as the tagline
       1fr  = the two side columns split the leftover space EQUALLY
     Because the side columns are always equal, the tagline sits at the
     true horizontal center of the footer, even though the logo (left)
     and the contact line (right) are different widths. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;   /* center everything vertically in the bar */
  column-gap: 24px;

  /* Fixed in px, so the footer bar stays the same height at any text size. */
  font-size: 15px;
  color: var(--color-header-bg);   /* dark text reads well on the blue-gray bar */
}

/* justify-self places an item inside its own grid column.
   The grid fills its columns in the order items appear in the HTML,
   so these rules go by POSITION, not by class: whatever is 2nd in the
   HTML is centered, and whatever is last sits at the far right.
   To swap two items, just swap their lines in the HTML.
   (":nth-child(2)" = the 2nd item, ":last-child" = the last item.) */
.footer-brand                 { justify-self: start; }                    /* far left */
.footer-inner > :nth-child(2) { text-align: center; }                     /* middle */
.footer-inner > :last-child   { justify-self: end; text-align: right; }   /* far right */

/* The B logo and the copyright line, side by side. */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Smaller logo than the header's. height: auto keeps its proportions.
   display: block removes a small gap browsers leave under links. */
.footer-logo {
  display: block;
}

.footer-logo img {
  width: 50px;
  height: auto;
   border-radius: 8px;   /* rounds all four corners */
}

/* The copyright line: a little smaller than the other footer text, so it
   fits beside the logo even on narrower computer screens. */
.footer-inner .footer-copyright {
  font-size: 13px;
  white-space: nowrap;
}

/* Paragraphs come with top/bottom margins by default; remove them
   so the text sits neatly centered in the slim bar. */
.footer-inner p {
  margin: 0;
}

/* The phone and email links take the footer's text color instead of
   the browser's default blue, and underline on hover/focus. */
.footer-contact a {
  color: inherit;
  text-decoration: none;

  /* A bigger tap area for fingers. Padding on an inline link grows the
     tappable space without making the footer any taller. */
  padding: 10px 2px;

  /* Keep the phone number and email from breaking across two lines. */
  white-space: nowrap;
}

/* The Privacy link: it sits beside the copyright line on computers. That
   line is hidden on smaller screens, so a second copy after "Larger text"
   appears there instead (see MEDIUM SCREENS below). */
.footer-link {
  color: inherit;
  text-decoration: none;
  padding: 10px 2px;
  white-space: nowrap;
}

.footer-link:hover,
.footer-link:focus-visible {
  text-decoration: underline;
}

.footer-privacy-small {
  display: none;
}

/* The "Share Page" and "Larger text" buttons: same look as the plain
   footer text, with the same bigger tap area and hover underline as the
   contact links. They're <button>s (they do something on the page rather
   than going to another page), so they need the browser's button
   styling removed. */
.share-button,
.text-size-button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 10px 2px;
  white-space: nowrap;
}

.footer-contact a:hover,
.footer-contact a:focus-visible,
.share-button:hover,
.share-button:focus-visible,
.text-size-button:hover,
.text-size-button:focus-visible {
  text-decoration: underline;
}

/* SHARE MENU: the small box that pops up above the footer when
   "Share Page" is clicked (built by share.js). On wide screens it sits
   above the button at the right; the max() keeps it lined up with the
   footer's content, which stops widening at 1200px. */
.share-menu {
  position: fixed;
  z-index: 20;   /* above the footer (10) */
  bottom: calc(var(--footer-height) + 12px);
  right: max(32px, calc((100vw - 1200px) / 2 + 32px));
  width: 240px;
  display: grid;
  gap: 8px;
  padding: 16px;
  background-color: #fbfaf7;   /* the same off-white as the Community notes */
  border: 1px solid rgba(38, 47, 116, 0.15);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(18, 18, 46, 0.18);
}

/* "display: grid" above would otherwise beat the hidden attribute
   and keep the menu showing. */
.share-menu[hidden] {
  display: none;
}

.share-menu-title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-header-bg);
}

/* The two choices look like the site's buttons: solid navy, then outlined. */
.share-option {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  background-color: var(--color-navy);
  color: var(--color-cream);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.share-option-outline {
  background-color: transparent;
  color: var(--color-navy);
  box-shadow: inset 0 0 0 2px var(--color-navy);
}

.share-option:hover,
.share-option:focus-visible {
  box-shadow: 0 4px 12px rgba(38, 47, 116, 0.3);
}

.share-option-outline:hover,
.share-option-outline:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-navy), 0 4px 12px rgba(38, 47, 116, 0.2);
}

/* "Copy link" and "More ways to share…" are <button>s, not links, so
   they need the browser's button look switched off to match. */
button.share-option {
  width: 100%;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* "Link copied. Paste it anywhere to share." under the choices.
   Empty (and taking no space) until something is copied. */
.share-menu-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-gray);
  text-align: center;
}

.share-menu-note:empty {
  display: none;
}


/* ---------------------------------------------------------------------
   6. MEDIUM SCREENS (tablets, narrow windows)
   Below 900px there isn't room for logo + tagline + contact in three
   balanced columns, so the footer hides the logo and centers the
   tagline and contact side by side on one line.
   --------------------------------------------------------------------- */
@media (max-width: 900px) {
  .footer-inner {
    display: flex;
    justify-content: center;
    text-align: center;
  }

  /* The header already shows the logo, and there's no room for the
     copyright line beside the contact details, so both are hidden here. */
  .footer-brand {
    display: none;
  }

  .footer-privacy-small {
    display: inline;
  }

  /* The footer is centered here, so the share menu is too.
     left: 50% plus translateX(-50%) centers it. */
  .share-menu {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}


/* ---------------------------------------------------------------------
   7. SMALL SCREENS (phones)
   A "media query" applies these rules ONLY when the window is 600px
   wide or less. They override the rules above to fit smaller screens.
   --------------------------------------------------------------------- */
@media (max-width: 600px) {
  :root {
    --header-height: 60px;
    --footer-height: 70px;   /* two lines of text + 4px gap + 10px padding above and below */
  }

  .site-header {
    padding: 0 16px;
  }

  .logo {
    height: 34px;
  }

  .main-nav ul {
    gap: 16px;
  }

  .main-nav a {
    font-size: 14.5px;   /* fixed, like the desktop size above */
  }

  /* A slimmer current-page box on phones, where the links sit closer. */
  .main-nav a[aria-current="page"] {
    padding: 6px 7px;
    margin: 0 -7px;
  }


  /* Inner pages: less padding so content gets more room on small screens. */
  .page {
    padding: 32px 16px calc(var(--footer-height) + 32px);
  }

  /* On phones, stack the tagline above the contact line, both centered.
     Stacking every time (instead of wrapping only when it runs out of
     room) keeps the footer a predictable height. */
  .footer-inner {
    flex-direction: column;
    row-gap: 4px;
    padding: 10px 16px;
  }

  /* On phones the share menu spans the screen, with the usual 16px edges. */
  .share-menu {
    left: 16px;
    right: 16px;
    width: auto;
    transform: none;
  }
}

/* SWIPE TO REFRESH: the look of the long swipe down on phones (see
   swipe-refresh.js). Two parts:
     - .refresh-pull: the small circle with the "B" that slides down as
       you pull, with a ring that fills in. The script moves it; these
       rules give it its shape and the smooth glide back up.
     - .refresh-splash: the logo with three bouncing dots and
       "Refreshing…", covering the page while it refreshes. */
.refresh-pull {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 50%;
  z-index: 1001;          /* above the header (15) and the splash */
  width: 48px;
  height: 48px;
  margin-left: -24px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 6px 18px rgba(18, 18, 46, 0.22);
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-70px);
  /* Glides back up when you let go; while dragging it follows the finger. */
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}

.refresh-pull.is-dragging {
  transition: opacity 0.15s ease;
}

.refresh-pull img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.35);      /* trims the white edges of the "B" picture */
  transition: transform 0.2s ease;
}

.refresh-pull.is-ready img {
  transform: scale(1.6);       /* "let go now" */
}

.refresh-ring {
  position: absolute;
  inset: 0;
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);   /* the ring starts filling from the top */
}

.refresh-ring circle {
  fill: none;
  stroke-width: 3;
}

.refresh-ring-track {
  stroke: rgba(38, 47, 116, 0.12);
}

.refresh-ring-fill {
  stroke: var(--color-navy);
  stroke-linecap: round;
  stroke-dasharray: 126;       /* the ring's full length (2 x pi x 20) */
  stroke-dashoffset: 126;      /* starts empty; the script fills it */
}

.refresh-splash {
  position: fixed;
  inset: 0;               /* stretch to all four edges of the screen */
  z-index: 1000;          /* above the header (15) and footer */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  background-color: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.refresh-splash.is-visible {
  opacity: 1;
}

/* Cropped to a wide shape, like the header logo, which also trims the
   faint corner marks in logo.jpg. It settles gently into place. */
.refresh-splash img {
  width: min(320px, 76vw);
  aspect-ratio: 5 / 2;
  object-fit: cover;
  transform: scale(0.94);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.refresh-splash.is-visible img {
  transform: scale(1);
}

/* Three navy dots that bounce one after another. */
.refresh-dots {
  display: flex;
  gap: 8px;
}

.refresh-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--color-navy);
  animation: refresh-bounce 1s ease-in-out infinite;
}

.refresh-dots i:nth-child(2) { animation-delay: 0.15s; }
.refresh-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes refresh-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40%           { transform: translateY(-8px); opacity: 1; }
}

.refresh-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-gray);
}

@media (prefers-reduced-motion: reduce) {
  .refresh-splash,
  .refresh-splash img,
  .refresh-pull { transition: none; }
  .refresh-dots i { animation: none; opacity: 0.7; }
}

/* =====================================================================
   POLISH: small touches that make the site feel smooth. The scripts for
   the header shadow, fade-ins, and open status are in polish.js.
   Everything that moves is switched off for anyone whose device is set
   to "reduce motion".
   ===================================================================== */

/* PAGE TRANSITIONS: moving between pages gently cross-fades instead of
   flashing white. Browsers that don't support this simply skip it.
   The header gets its own name, so it stays put while the page under
   it fades (only the highlighted menu item changes). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.25s;
  }

  .site-header {
    view-transition-name: site-header;
  }
}

/* HEADER SHADOW: appears once the page scrolls (polish.js adds
   "is-scrolled"), so the header looks like it floats over the page. */
.site-header {
  transition: box-shadow 0.25s ease;
}

.is-scrolled .site-header {
  box-shadow: 0 4px 18px rgba(18, 18, 46, 0.28);
}

/* FADE IN ON SCROLL: items below the screen start slightly lower and
   see-through, then ease up into place as they come into view.
   "translate" (not "transform") is used so tilted notes keep their tilt.
   --reveal-delay makes cards in a row arrive one after another. */
.reveal {
  transition: opacity 0.6s ease, translate 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-pending {
  opacity: 0;
  translate: 0 18px;
}

/* BUTTON PRESS: buttons already lift on hover; now they also press down
   a touch when tapped or clicked, so every tap feels like it registered. */
.button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(38, 47, 116, 0.25);
  transition-duration: 0.05s;
}

/* PLAN CARDS LIFT: the membership plans rise slightly under the mouse,
   since each one has a button to choose it. (Only on devices with a
   mouse; phones don't hover.) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .plan-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(18, 18, 46, 0.12);
  }
}

/* OPEN NOW / CLOSED: one line above each hours table (added by
   polish.js), with a green dot when open and a gray dot when closed. */
.open-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-header-bg);
}

/* ".card .open-status" beats the usual gap between paragraphs. */
.card .open-status {
  margin: 0 0 8px;
}

.open-status::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #9a9aa8;   /* gray: closed */
}

.open-status.is-open::before {
  background-color: #2e7d4f;   /* green: open */
  box-shadow: 0 0 0 3px rgba(46, 125, 79, 0.2);
}

/* ICON DRAW: moving the mouse over a service, card, or note makes its
   line drawing trace itself again, like a pen sketching it. polish.js
   gives each line pathLength="1", so "1" here means "the whole line".
   The dash starts pushed all the way off (offset 1 = hidden) and slides
   to 0 (fully drawn). Mouse devices only, and not for reduced motion. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service-icon > * {
    stroke-dasharray: 1 1;
  }

  :is(.service-item, .card, .note):hover .service-icon > * {
    animation: icon-draw 0.8s ease-in-out both;
  }
}

@keyframes icon-draw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

/* ICON DRAW ON SCROLL: on phones and tablets (no hover), each icon waits
   blank, then draws itself once as it scrolls into view (polish.js adds
   these classes). The short delay lets its card start fading in first. */
@media (prefers-reduced-motion: no-preference) {
  .icon-draw-pending > * {
    stroke-dasharray: 1 1;
    stroke-dashoffset: 1;
  }

  .icon-drawing > * {
    animation: icon-draw 0.9s ease-in-out 0.15s both;
  }
}

/* =====================================================================
   HOME PAGE SECTIONS: the hero still fills the first screen, and a short
   tour (meet John, services, latest video, booking) follows below it,
   so the home page now scrolls like the other pages.
   ===================================================================== */
.home-page {
  height: auto;
  min-height: 100%;
}

/* The hero is at least one screen tall between the header and footer
   (svh ignores the phone's sliding address bar; the vh line is a
   fallback for older browsers). It no longer needs the phone-only trick
   that pulled its picture behind the footer, since content follows it. */
.home-page .hero {
  height: auto;
  overflow: hidden;
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  min-height: calc(100svh - var(--header-height) - var(--footer-height));
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Book a visit and Call, centered side by side (stacked on narrow phones). */
.hero-buttons {
  justify-content: center;
  margin: 0;
}

/* TRUST LINE: three short reasons, each with a small check mark. */
.hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin: 24px 0 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-header-bg);
}

.hero-trust li::before {
  content: "✓";
  margin-right: 6px;
  color: #2e7d4f;   /* the same green as the "Open now" dot */
}

.hero .open-status {
  margin: 14px 0 0;
}

/* The sections below the hero: the same side padding as other pages. */
.home-sections {
  padding: 56px 32px 24px;

  /* Starts in the same soft blue as the bottom of the hero picture and
     fades into the page color, so there's no hard line between them. */
  background: linear-gradient(to bottom, #b6c7d4 0, var(--color-cream) 200px);
}

/* MEET JOHN: a round photo beside a short hello. */
.home-meet {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 32px;
}

.home-meet .profile-photo {
  width: 150px;
  height: 150px;
}

.page-section .home-meet h2 {
  margin-bottom: 10px;
}

.home-meet .button-row {
  margin-top: 18px;
}

/* SERVICE TILES: small cards with a drawing and a name, four across
   (two on phones). Each leads to the Services page, and lifts a little
   under the mouse, like a button. */
.service-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card.service-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 12px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  color: var(--color-header-bg);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.service-tile .service-icon {
  margin: 0;
}

.card.service-tile:hover,
.card.service-tile:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(38, 47, 116, 0.35);
  box-shadow: 0 8px 20px rgba(18, 18, 46, 0.1);
}

/* "Who I help, and where" cards on the home page: whole cards are links,
   styled like the tiles above (no underline, same lift on hover). */
a.card.link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

a.card.link-card h3 {
  color: var(--color-header-bg);
}

a.card.link-card:hover,
a.card.link-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(38, 47, 116, 0.35);
  box-shadow: 0 8px 20px rgba(18, 18, 46, 0.1);
}

/* "See all services and prices →" under the tiles. */
.home-more-link {
  margin: 16px 0 0;
  text-align: right;
  font-weight: 600;
}

.home-more-link a {
  color: var(--color-navy);
}

@media (prefers-reduced-motion: reduce) {
  .card.service-tile { transition: none; }
}

@media (max-width: 600px) {
  .home-sections {
    padding: 40px 16px 16px;
  }

  .home-meet {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
  }

  .home-meet .profile-photo {
    width: 110px;
    height: 110px;
  }

  .service-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .home-more-link {
    text-align: left;
  }
}

/* =====================================================================
   PAGE TEXTURE AND BANDS
   ===================================================================== */

/* FULL-LENGTH TEXTURE: a faint grid of navy dots, like graph paper, on
   every page's content area from the very top to the very bottom. It
   scrolls with the page, so long and short pages are covered the same.
   A soft white wash at the top brightens where each page begins.
   position + z-index make each content area its own layer, so the bands
   below sit above the texture but behind the cards. */
.page,
.home-sections {
  position: relative;
  z-index: 0;
  overflow-x: clip;   /* full-width bands never cause sideways scrolling */
  background-image:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 420px),
    radial-gradient(rgba(38, 47, 116, 0.055) 1px, transparent 1.4px);
  background-size: 100% 100%, 22px 22px;
}

/* The home page's sections start in the hero's soft blue and fade into
   the same dot texture as the other pages. */
.home-sections {
  background-image:
    linear-gradient(to bottom, #b6c7d4 0, rgba(182, 199, 212, 0) 220px),
    radial-gradient(rgba(38, 47, 116, 0.055) 1px, transparent 1.4px);
  background-size: 100% 100%, 22px 22px;
}

/* BAND: a soft, full-width light strip behind one section, to give long
   pages a calm rhythm. Add class="band" to a <section class="page-section">.
   The strip is drawn behind the section (::before) and stretched to the
   full window width, with a hairline at its top and bottom edges. */
.band {
  position: relative;
  padding-block: 44px;
}

.band::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  background-color: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(38, 47, 116, 0.08);
}

/* GALLERY: photo tiles with a short caption below each one.
   3 across on computers and tablets, 2 across on phones. Until "See more"
   is pressed, only the first 2 rows show: 6 photos on computers, 4 on
   phones (gallery.js adds "is-expanded" to show the rest).
   Used on: Flower Gallery page. */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  scroll-margin-top: calc(var(--header-height) + 16px);   /* "See less" scrolls here, clear of the header */
}

/* "position: relative" lets the "..." button and its menu sit in the
   photo's corner. */
.card.gallery-tile {
  position: relative;
  margin: 0;
  padding: 10px 10px 12px;
}

/* The tile with its menu open sits above its neighbours, so the menu
   isn't hidden behind the next photo. */
.gallery-tile:has(.gallery-options:not([hidden])) {
  z-index: 5;
}

/* The photo itself. Every tile keeps the same 4:3 shape, so the rows
   line up whatever size the real photos turn out to be; object-fit
   fills the frame without stretching the picture. */
.gallery-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
  background-color: #dfe5ec;   /* shows while the photo loads */
}

.gallery-tile figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--color-gray);
  text-align: center;
}

/* THE "..." BUTTON: a small round button in the photo's top right corner. */
.gallery-options-button {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: rgba(251, 250, 247, 0.9);
  box-shadow: 0 1px 4px rgba(18, 18, 46, 0.2);
  color: var(--color-navy);
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s;
}

.gallery-options-button:hover,
.gallery-options-button:focus-visible,
.gallery-options-button[aria-expanded="true"] {
  background-color: #fff;
  box-shadow: 0 3px 10px rgba(18, 18, 46, 0.28);
}

.gallery-options-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* THE "..." MENU: Open and Share, just below the "..." button (built by
   gallery.js). It reuses the Share Page menu's button styles. */
.gallery-options {
  position: absolute;
  top: 58px;
  right: 18px;
  z-index: 6;
  width: 190px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background-color: #fbfaf7;
  border: 1px solid rgba(38, 47, 116, 0.15);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(18, 18, 46, 0.18);
}

.gallery-options[hidden] {
  display: none;
}

/* ".card a" would otherwise turn the solid Open button's text navy. */
.card .gallery-options .share-option {
  color: var(--color-cream);
}

.card .gallery-options .share-option-outline {
  color: var(--color-navy);
}

/* Photos past the first 2 rows wait for "See more". Only when scripts
   are on (".js"), so without them every photo simply shows. */
.js .gallery-grid:not(.is-expanded) .gallery-tile:nth-child(n + 7) {
  display: none;
}

.gallery-more {
  margin-top: 28px;
  text-align: center;
}

.gallery-more-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* The little arrow turns over when the gallery is open. */
.gallery-more-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.gallery-more-button[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Newly shown photos ease in rather than popping up. */
@media (prefers-reduced-motion: no-preference) {
  .gallery-grid.is-expanded .gallery-tile {
    animation: gallery-in 0.4s ease both;
  }
}

@keyframes gallery-in {
  from { opacity: 0; translate: 0 10px; }
  to   { opacity: 1; translate: 0 0; }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .card.gallery-tile {
    padding: 8px 8px 10px;
  }

  .gallery-tile figcaption {
    font-size: 0.8rem;
  }

  .gallery-options-button {
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
  }

  .gallery-options {
    top: 50px;
    right: 10px;
    width: 150px;
    padding: 10px;
  }

  /* Phones: only the first 2 rows (4 photos) until "See more". */
  .js .gallery-grid:not(.is-expanded) .gallery-tile:nth-child(n + 5) {
    display: none;
  }
}


/* =====================================================================
   DARK MODE
   Off by default: every visitor starts in light mode. Clicking the
   "© 2026 Burjo LLC" line in the footer turns dark mode on (and off
   again). theme.js remembers the choice on that device, and a tiny line
   in each page's <head> adds the "theme-dark" class to <html> before the
   page appears, so it never flashes light first.

   Each rule below repeats a rule from above with "html.theme-dark" in
   front, so it only applies in dark mode and wins over the light one.
   ===================================================================== */

/* The theme switch: the copyright line, looking exactly like plain text.
   On phones and tablets it's the short "© 2026" at the end of the
   "Share Page · Larger text · Privacy" line. */
.theme-toggle {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  padding: 10px 2px;
  cursor: pointer;
  white-space: nowrap;
}

/* The very narrowest phones (320px wide, like the first iPhone SE): a
   slightly smaller footer line so "© 2026" still fits on the same line. */
@media (max-width: 345px) {
  .footer-tagline {
    font-size: 13px;
  }
}

html.theme-dark {
  --dk-bg:      #14162a;                    /* page background */
  --dk-surface: #1e2137;                    /* cards, notes, menus */
  --dk-head:    #eef0fb;                    /* headings (dark navy text in light mode) */
  --dk-link:    #b8c0ff;                    /* titles and links (navy in light mode) */
  --dk-line:    rgba(184, 192, 255, 0.16);  /* borders and dividers */
  --dk-soft:    rgba(184, 192, 255, 0.08);  /* faint highlights */

  --color-gray:      #b9bdcc;   /* body text */
  --color-footer-bg: #232b3f;   /* footer bar */
  --color-navy:      #4552c4;   /* buttons and badges: brighter so they stand out */
  color-scheme: dark;           /* dark scrollbars and form controls */
}

html.theme-dark body {
  background-color: var(--dk-bg);
}

/* Header and its drop-down menus: a touch darker than the page. */
html.theme-dark .site-header,
html.theme-dark.js .main-nav .menu-more ul,
html.theme-dark.js .main-nav.is-open ul {
  background-color: #0b0c1d;
}

/* Titles and links that are navy in light mode. */
html.theme-dark .hero-title,
html.theme-dark .page-title,
html.theme-dark .page-section h2,
html.theme-dark .card h3 a,
html.theme-dark .button-outline,
html.theme-dark .card a,
html.theme-dark .note-tag,
html.theme-dark .note-links a,
html.theme-dark .card .button-outline,
html.theme-dark .card .profile-role,
html.theme-dark .card .background-place,
html.theme-dark .note-when a,
html.theme-dark .timeline-when,
html.theme-dark .home-more-link a,
html.theme-dark .gallery-options-button,
html.theme-dark .share-option-outline,
html.theme-dark .card .rate-amount,
html.theme-dark .card .pricing-label,
html.theme-dark .card .plan-includes,
html.theme-dark .card .gallery-options .share-option-outline,
html.theme-dark :where(main a:not([class])) {
  color: var(--dk-link);
}

html.theme-dark .service-icon {
  stroke: var(--dk-link);
}

/* Text that sits on a filled button or badge stays cream. */
html.theme-dark .button,
html.theme-dark .card .button,
html.theme-dark .share-option,
html.theme-dark .card .gallery-options .share-option,
html.theme-dark .note-links a:hover,
html.theme-dark .note-links a:focus-visible,
html.theme-dark .steps li::before,
html.theme-dark .today-tag,
html.theme-dark .card .plan-badge {
  color: var(--color-cream);
}

/* Outline buttons: a light outline instead of navy. */
html.theme-dark .button-outline,
html.theme-dark .card .button-outline,
html.theme-dark .share-option-outline {
  box-shadow: inset 0 0 0 2px var(--dk-link);
}
html.theme-dark .button-outline:hover,
html.theme-dark .button-outline:focus-visible,
html.theme-dark .share-option-outline:hover,
html.theme-dark .share-option-outline:focus-visible {
  box-shadow: inset 0 0 0 2px var(--dk-link), 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Headings and labels that are the darker navy in light mode. */
html.theme-dark .card h3,
html.theme-dark .form-field label,
html.theme-dark .form-field textarea,
html.theme-dark .form-backup-label,
html.theme-dark .form-backup textarea,
html.theme-dark .hours-table th,
html.theme-dark .card .rate-label,
html.theme-dark .service-item h3,
html.theme-dark .card .pricing-example,
html.theme-dark .card .plan-savings,
html.theme-dark .letter-card p,
html.theme-dark .letter-sign strong,
html.theme-dark .timeline ul.area-list li,
html.theme-dark .area-list li,
html.theme-dark .note h3,
html.theme-dark .note-when,
html.theme-dark .timeline h3,
html.theme-dark .footer-inner,
html.theme-dark .share-menu-title,
html.theme-dark .open-status,
html.theme-dark .hero-trust,
html.theme-dark .card.service-tile {
  color: var(--dk-head);
}

/* Cards, notes and pop-up menus. */
html.theme-dark .card,
html.theme-dark .note,
html.theme-dark #legacy-clients:target {
  background-color: var(--dk-surface);
  border-color: var(--dk-line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
}
html.theme-dark #legacy-clients:target {
  border-color: var(--dk-link);
}
html.theme-dark .plan-card-featured {
  background-color: #23274a;
  border-color: var(--color-navy);
}
html.theme-dark .share-menu,
html.theme-dark .gallery-options {
  background-color: var(--dk-surface);
  border-color: var(--dk-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
html.theme-dark .gallery-options-button {
  background-color: rgba(30, 33, 55, 0.92);
}
html.theme-dark .gallery-options-button[aria-expanded="true"] {
  background-color: #2a2e4a;
}

/* The dark "call to action" card: a deep blue so it still stands out
   from the dark page. Its button keeps cream with navy text. */
html.theme-dark .card.cta-card {
  background-color: #232863;
  border-color: #323a85;
}
html.theme-dark .card.cta-card,
html.theme-dark .card.cta-card h3 {
  color: var(--color-cream);
}
html.theme-dark .card.cta-card .button {
  color: #262f74;
}

/* Form boxes */
html.theme-dark .form-field input,
html.theme-dark .form-field select,
html.theme-dark .form-field textarea,
html.theme-dark .form-backup textarea {
  color: var(--dk-head);
  background-color: #171a2e;
  border-color: var(--dk-line);
}
html.theme-dark .form-field input::placeholder,
html.theme-dark .form-field textarea::placeholder {
  color: #8a8fa6;
}
html.theme-dark .form-field input:focus,
html.theme-dark .form-field select:focus,
html.theme-dark .form-field textarea:focus {
  border-color: var(--dk-link);
  box-shadow: 0 0 0 3px rgba(184, 192, 255, 0.2);
}
html.theme-dark .placeholder,
html.theme-dark .form-backup {
  border-color: var(--dk-line);
  background-color: rgba(255, 255, 255, 0.04);
}

/* Dividers, tables and pills */
html.theme-dark .hours-card .hours-table tr,
html.theme-dark .hours-table td,
html.theme-dark .card .pricing-example,
html.theme-dark .pricing-rates > div + div,
html.theme-dark .card-dashed {
  border-color: var(--dk-line);
}
html.theme-dark .hours-table tr.is-today,
html.theme-dark .note-links a {
  background-color: var(--dk-soft);
}
html.theme-dark .note-links a:hover,
html.theme-dark .note-links a:focus-visible {
  background-color: var(--color-navy);
}
html.theme-dark .card .plan-savings {
  background-color: rgba(136, 167, 188, 0.18);
}
html.theme-dark .timeline ul.area-list li,
html.theme-dark .area-list li {
  border-color: var(--dk-line);
  background-color: rgba(255, 255, 255, 0.05);
}
html.theme-dark .profile-photo {
  border-color: var(--dk-surface);
}

/* Timeline (News page) */
html.theme-dark .timeline {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--dk-line);
}
html.theme-dark .timeline::before {
  background-color: var(--dk-line);
}
html.theme-dark .timeline li::before {
  background-color: var(--dk-bg);
  border-color: var(--dk-link);
}

/* Home page: a night-sky version of the hero picture, and the sections
   below it fade from that picture's bottom color into the page. */
html.theme-dark .home-page .hero {
  background: url("/images/hero-dark.svg") center / cover no-repeat;
}
html.theme-dark .home-page .hero-image {
  visibility: hidden;
}
html.theme-dark .home-sections {
  background-image:
    linear-gradient(to bottom, #1d2638 0, rgba(29, 38, 56, 0) 220px),
    radial-gradient(rgba(184, 192, 255, 0.06) 1px, transparent 1.4px);
}

/* Every page's dot texture: faint light dots instead of navy, and no
   white wash at the top. */
html.theme-dark .page {
  background-image:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 420px),
    radial-gradient(rgba(184, 192, 255, 0.06) 1px, transparent 1.4px);
}

/* Each page's background drawing (community.svg, services.svg and so on)
   is pale with navy lines. Inverting it turns that into a dark drawing
   with faint light lines; hue-rotate keeps the blues blue. */
html.theme-dark body::before {
  filter: invert(1) hue-rotate(180deg);
  opacity: 0.3;
}
html.theme-dark .hero-trust li::before {
  color: #5cc48a;   /* a brighter green that shows on dark */
}
html.theme-dark .band::before {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--dk-line);
}

/* Photo gallery and the refresh splash */
html.theme-dark .gallery-photo {
  background-color: #262a40;
}
html.theme-dark .refresh-splash {
  background-color: var(--dk-bg);
}
/* In dark mode the logo sits on a rounded white badge, like the header. */
html.theme-dark .refresh-splash img {
  border-radius: 14px;
}
html.theme-dark .refresh-pull {
  background-color: var(--dk-surface);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
html.theme-dark .refresh-ring-track {
  stroke: rgba(184, 192, 255, 0.18);
}
html.theme-dark .refresh-ring-fill,
html.theme-dark .refresh-dots i {
  stroke: var(--dk-link);
  background-color: var(--dk-link);
}

/* ---------------------------------------------------------------------
   ADMIN LOGIN LINK: the small link at the very bottom of the About John
   page. Kept quiet on purpose: small gray text, underlined only when
   pointed at. The padding gives fingers a comfortable area to tap.
   --------------------------------------------------------------------- */
.admin-login-link {
  text-align: center;
  margin: 8px 0 0;
  font-size: 0.82rem;
}

.admin-login-link a {
  display: inline-block;
  padding: 12px 16px;
  color: var(--color-gray);
  text-decoration: none;
}

.admin-login-link a:hover,
.admin-login-link a:focus-visible {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------
   RESEARCH CARD: the "Tech Research & Buying Advice" card below the
   service list on the Services page. It reuses the Pricing card look
   (.pricing-card, .pricing-label, .rate-label, .pricing-example); these
   rules add its larger title and the three points side by side, split
   by thin lines like the prices. On phones the points stack.
   --------------------------------------------------------------------- */
.research-card {
  margin-top: 40px;
}

.card .research-title {
  font-size: 1.6rem;
  line-height: 1.2;
  margin: 0 0 8px;
}

.research-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.research-points > div + div {
  padding-left: 24px;
  margin-left: 24px;
  border-left: 1px solid rgba(38, 47, 116, 0.12);
}

.research-points .rate-label {
  margin-top: 0;
}

.research-points p + p {
  margin-top: 4px;
}

html.theme-dark .research-points > div + div {
  border-color: var(--dk-line);
}

/* The small print at the bottom of the card. */
.card .research-disclaimer {
  margin-top: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-gray);
}

@media (max-width: 760px) {
  .research-points {
    grid-template-columns: 1fr;
  }

  .research-points > div + div {
    padding: 16px 0 0;
    margin: 16px 0 0;
    border-left: none;
    border-top: 1px solid rgba(38, 47, 116, 0.12);
  }

  html.theme-dark .research-points > div + div {
    border-color: var(--dk-line);
  }
}
