/* app.css — Oneness Lifestyles app shell, Oneness brand palette.
   Palette tokens and font match the frozen reference (captures/site/styles.css)
   exactly. WCAG adjustments over the site CSS: every text size stays >= 18px,
   touch targets >= 44px, visible focus, reduced-motion honored. */

/* ---------- Brand palette (from owlifestylesfoundation.org) ---------- */
:root {
  --brand-blue: #283890;   /* deep blue — primary (theme-color) */
  --brand-green: #6dbc45;  /* vibrant lime green — accent CTA */
  --brand-sand: #c1a178;   /* warm sand — accent */
  --brand-teal: #25c4b8;   /* fun accent */
  --brand-pink: #ff4d8d;   /* fun accent */
  --bg: #f7faff;           /* page background */
  --surface: #ffffff;      /* cards / surfaces */
  --text: #141414;         /* body text */
  --text-2: #3f3f3f;       /* secondary text */
  --line: #dfe5f6;         /* soft blue-grey divider */

  /* WCAG-safe derivations (frozen tokens above are unchanged) */
  --brand-green-deep: #5fae3d;  /* green pill hover (from reference CSS) */
  --brand-green-text: #357a24;  /* link green, >= 4.5:1 on white/surface */
  --brand-sand-light: #e0cbaa;  /* footer link sand, >= 4.5:1 on brand blue */
}

/* ---------- Base / reset ---------- */
* {
  box-sizing: border-box;
}

html {
  font-size: 18px;   /* WCAG: root 18px so 1rem = 18px and no text falls below the floor */
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;   /* WCAG: base text >= 18px */
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Accessibility: visible focus + skip link ---------- */
:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

.site-footer :focus-visible {
  outline-color: var(--brand-sand-light);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  display: inline-block;
  padding: 12px 20px;
  min-height: 44px;
  background-color: var(--brand-blue);
  color: #ffffff;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

.skip-link:focus-visible {
  left: 0;
  outline-offset: 0;
}

/* ---------- Layout container ---------- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ---------- Header ---------- */
.site-header {
  background-color: var(--surface);
  border-bottom: 4px solid var(--brand-sand);
}

.site-name {
  margin: 1em 0;
  color: var(--brand-blue);
  font-weight: bold;
  letter-spacing: 0.04em;
}

/* ---------- Main / home region ---------- */
main {
  display: block;
}

/* Placeholder home region — unit U-02 fills this region with the home
   content (greeting, entry tiles, guides, ritual door, deeper doors). */
.home-region {
  min-height: 60vh;
}

/* ---------- Hero (component styling for unit U-02; no content here) ---------- */
.hero {
  text-align: center;
  padding: 56px 20px;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(37, 196, 184, 0.24), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 77, 141, 0.16), transparent 55%),
    linear-gradient(180deg, #eef2ff 0%, var(--bg) 100%);
}

.hero-heading {
  font-size: 2.2rem;
  margin: 0 0 12px;
  color: var(--brand-blue);
}

.hero-subheading {
  font-size: 1.2rem;
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-2);
}

/* ---------- Sections ---------- */
.section {
  padding: 48px 0;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
}

.section-heading {
  font-size: 1.6rem;
  color: var(--brand-blue);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 4px solid var(--brand-sand);
  display: inline-block;
}

.section p {
  margin: 0 0 16px;
  color: #33443f;
}

.section--alt {
  background-color: var(--bg);
  border-top: none;
}

/* ---------- Home entry section: flowing-water backdrop ----------
   A looping video of waves washing onto the shore (per Shifa: "soft foam
   on sand") fills this section behind the cards. The video is decorative:
   muted, looping, hidden from assistive tech. The poster frame (also
   water-bg.jpg) shows before the video loads, for no-JS, and when the
   reader prefers reduced motion. A light 55% veil keeps the flow clearly
   visible while text contrast stays >= 4.5:1 — brand blue on the pale
   foam reads ~7:1, and all other text sits on white cards. */
.section.home-entry {
  position: relative;
  overflow: hidden;
  /* Fallback while the video loads and for reduced-motion: the poster
     still as a plain background layer beneath the video element. */
  background:
    linear-gradient(rgba(247, 250, 255, 0.55), rgba(247, 250, 255, 0.55)),
    url('images/water-bg.jpg') center / cover no-repeat;
  background-color: var(--bg);   /* fallback while the image loads */
}

.water-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}

/* The veil: a pale sheet over the video so cards and text keep contrast. */
.home-entry::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(247, 250, 255, 0.55);
  z-index: 1;
  pointer-events: none;
}

.home-entry > .container {
  position: relative;
  z-index: 2;
}

/* Readers who prefer reduced motion see the calm still frame instead of
   the moving video. */
@media (prefers-reduced-motion: reduce) {
  .water-backdrop {
    display: none;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 24px;
  background-color: var(--brand-blue);
  color: #e7ebfa;      /* 8.6:1 on brand blue */
  text-align: center;
  font-size: 1rem;     /* 1rem = 18px (html root is 18px); >= WCAG floor */
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--brand-sand-light);  /* 6.5:1 on brand blue */
  text-decoration: underline;
}

/* Small print: the gentle medical note at the foot of every page. */
.site-footer p.footer-note {
  margin: 10px 0 0;
  font-size: 0.78rem;      /* small but readable */
  line-height: 1.45;
  text-align: center;
  color: var(--brand-sand-light);  /* on brand blue, same as links */
  max-width: 34em;         /* keeps the note from spanning the whole row */
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Links ---------- */
a {
  color: var(--brand-green-text);   /* 5.3:1 on white */
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Buttons (brand lime green — dark text for readable contrast) ---------- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  min-height: 44px;               /* WCAG: touch target >= 44px */
  border-radius: 999px;
  background-color: var(--brand-green);
  color: var(--text);             /* 7.8:1 on brand green */
  font-weight: bold;
  text-decoration: none;
  font-size: 1.125rem;            /* >= 18px (WCAG floor) */
  transition: background-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--brand-green-deep);  /* slightly deeper lime for hover */
}

.hero-actions {
  margin: 28px 0 0;
}

/* ---------- Responsive (mobile-first; text never below 18px) ---------- */
@media (min-width: 1024px) {
  .hero {
    padding: 90px 24px;
  }
  .hero-heading {
    font-size: 2.8rem;
  }
  .section {
    padding: 60px 0;
  }
  .section-heading {
    font-size: 2rem;
  }
}

/* ---------- JS reveal (only active when JS is on) ---------- */
.js-enabled .reveal {
  opacity: 0;
  transition: opacity 1s ease;
}

.js-enabled .reveal.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .js-enabled .reveal {
    opacity: 1;
    transition: none;
  }
}

/* ==========================================================================
   HOME REGION (unit U-02) — appended to the app shell.
   Palette tokens and the html root font-size are untouched. Every
   user-facing text >= 18px and >= 4.5:1 on its background; every link
   target >= 44px tall; focus-visible and reduced-motion already handled
   above by the shell's global rules.
   ========================================================================== */

/* ---------- Front door greeting + Circle welcome ---------- */
.home-greeting {
  font-size: 1.35rem;         /* 24.3px — the front door */
  font-style: italic;
  color: var(--brand-blue);   /* ~9:1 on the hero background */
  max-width: 640px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* Short line above the greeting. Same Georgia family, a little smaller.
   The gold is brand sand deepened so it stays readable on the pale hero. */
.covenant-line {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;         /* 20.7px, a little smaller than the greeting */
  font-style: italic;
  letter-spacing: 0.04em;
  color: #6a5842;
  max-width: 640px;
  margin: 0 auto 8px;
  line-height: 1.4;
}

.invited-by {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.03em;
  color: #6a5842;
  max-width: 640px;
  margin: 0 auto 16px;
  line-height: 1.4;
}

.covenant-card {
  display: block;
  max-width: 640px;
  margin: 4px auto 20px;
  padding: 22px 22px 26px;
  background-color: var(--surface);
  border: 2px solid var(--line);
  border-top: 6px solid var(--brand-sand);
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-sizing: border-box;
}

.covenant-card:hover,
.covenant-card:focus-visible {
  border-color: var(--brand-sand);
  box-shadow: 0 2px 12px rgba(193, 161, 120, 0.28);
}

.covenant-card-title {
  display: block;
  font-size: 1.45rem;
  line-height: 1.35;
  font-weight: bold;
  color: var(--brand-blue);
  margin: 0 0 16px;
}

.covenant-card-label {
  display: inline-block;
  padding: 12px 30px;
  min-height: 44px;
  border-radius: 999px;
  background-color: var(--brand-green);
  color: var(--text);
  font-weight: bold;
  font-size: 1.125rem;
  line-height: 20px;
}

.covenant-card:hover .covenant-card-label,
.covenant-card:focus-visible .covenant-card-label {
  background-color: var(--brand-green-deep);
}

.home-welcome {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.home-welcome p {
  margin: 0 0 16px;
  color: var(--text-2);       /* ~9.5:1 on the hero background */
}

/* January 13 invitation, in the hero so a guest sees it with the welcome. */
.gathering-invite {
  max-width: 640px;
  margin: 8px auto 28px;
  padding: 22px 22px 26px;
  background-color: var(--surface);
  border: 2px solid var(--line);
  border-top: 6px solid var(--brand-sand);
  border-radius: 12px;
  text-align: center;
}

.gathering-heading {
  font-size: 1.45rem;
  line-height: 1.35;
  color: var(--brand-blue);
  margin: 0 0 12px;
}

.gathering-detail {
  margin: 0 0 8px;
  color: var(--text-2);
}

.gathering-tagline {
  margin: 12px 0 0;
  font-style: italic;
  color: var(--brand-blue);
}

.gathering-invite .hero-actions {
  margin: 20px 0 0;
}

@media (max-width: 640px) {
  /* Keep the invitation on the first screen. The hero container's
     48px side padding is for the wider layout; a phone needs the
     greeting and the card in the same view. */
  #home .hero {
    padding: 28px 0 36px;
  }
  #home .hero .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  #home .hero-heading {
    font-size: 1.9rem;
    margin-bottom: 8px;
  }
  #home .home-greeting {
    margin-bottom: 12px;
  }
  .covenant-line {
    margin-bottom: 6px;
  }
  .invited-by {
    margin-bottom: 10px;
  }
  .covenant-card {
    margin: 4px 0 14px;
    padding: 16px 16px 18px;
  }
  .covenant-card-title {
    font-size: 1.22rem;
    line-height: 1.25;
    margin-bottom: 12px;
  }
  .gathering-heading {
    font-size: 1.22rem;
    line-height: 1.25;
    margin-bottom: 8px;
  }
  .gathering-invite {
    margin: 4px 0 16px;
    padding: 16px 16px 18px;
  }
  .gathering-detail {
    margin-bottom: 4px;
  }
  .gathering-tagline {
    margin-top: 8px;
  }
  .gathering-invite .hero-actions {
    margin-top: 14px;
  }
}

/* ---------- The welcome tree door video (portrait, above the entry heading) ----------
   The looping video of the walk into the lodge is the only visible
   visual. The tree photo stays in the markup but hidden: it is a one-load
   strut while devices still hold the previous stylesheet, and its poster
   shows while the video loads and for reduced-motion (the inline script
   pauses the video then, so its poster still shows). */
.entry-photo-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 560px;   /* enlarged per Shifa (was 400px) */
  aspect-ratio: 540 / 960;   /* the video's own shape, so the frame never collapses */
  margin: 0 auto 28px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(20, 20, 20, 0.16);
  overflow: hidden;
}

.entry-photo {
  display: none;   /* the video is the only visual */
}

.entry-photo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Entry tiles ---------- */
.tiles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0 0 40px;
}

.tile {
  display: block;
  padding: 22px 24px;
  min-height: 44px;           /* WCAG touch floor */
  background-color: var(--surface);
  border: 2px solid var(--line);
  border-left: 6px solid var(--brand-blue);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover,
.tile:focus-visible {
  border-color: var(--brand-blue);
  box-shadow: 0 2px 12px rgba(40, 56, 144, 0.14);
}

.tile-heading {
  display: block;
  font-size: 1.3rem;          /* 23.4px */
  font-weight: bold;
  color: var(--brand-blue);   /* ~10:1 on white */
  margin-bottom: 6px;
}

.tile-text {
  display: block;
  color: var(--text-2);       /* ~10.5:1 on white */
}

/* The Porch: free gatherings, beside the top doors. */
.porch {
  margin: 4px 0 28px;
  text-align: center;
}

.porch .porch-label {
  margin: 0 0 2px;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a5842;
}

.porch .home-subheading {
  margin-bottom: 8px;
  line-height: 1.2;
}

.porch-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 2px 12px;
  background-color: var(--surface);
  border: 2px solid var(--line);
  border-left: 6px solid var(--brand-blue);
  border-radius: 12px;
  text-align: left;
}

.porch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title join"
    "when join";
  column-gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.porch-row:first-child {
  border-top: none;
}

.porch-title {
  grid-area: title;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.15;
  font-weight: bold;
  color: var(--brand-blue);
}

.porch .porch-when {
  grid-area: when;
  margin: 1px 0 0;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--text-2);
}

.porch-join {
  grid-area: join;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background-color: var(--brand-green);
  color: var(--text);
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.2;
  text-decoration: none;
}

.porch-join:hover,
.porch-join:focus-visible {
  background-color: var(--brand-green-deep);
}

/* ---------- Full-width product card (below the tile grid) ---------- */
.skin-card {
  display: block;
  margin: 0 0 40px;
  padding: 28px 24px;
  background-color: var(--surface);
  border: 2px solid var(--line);
  border-left: 6px solid var(--brand-green);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  box-sizing: border-box;
}
.skin-card:hover,
.skin-card:focus-visible {
  border-color: var(--brand-green);
  box-shadow: 0 2px 12px rgba(109, 188, 69, 0.18);
}
.skin-card .skin-name {
  display: block;
  font-size: 1.3rem;          /* 23.4px */
  font-weight: bold;
  color: var(--brand-green);
  margin-bottom: 4px;
}
.skin-card .skin-sub {
  display: block;
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 8px;
}
.skin-card .skin-tagline {
  display: block;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 16px;
}
.skin-card .skin-btn {
  display: inline-block;
  background: var(--brand-green);
  color: #fff;
  padding: 10px 28px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s ease;
}
.skin-card .skin-btn:hover {
  background: var(--brand-green-deep);
}


/* ---------- The six gentle guides ---------- */
.home-subheading {
  font-size: 1.4rem;          /* 25.2px */
  color: var(--brand-blue);
  margin: 0 0 20px;
}

.guides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0 0 40px;
}

.guide-tile {
  display: block;
  padding: 18px 20px;
  min-height: 44px;           /* WCAG touch floor */
  background-color: var(--bg);
  border: 2px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.guide-tile:hover,
.guide-tile:focus-visible {
  border-color: var(--brand-sand);
}

.guide-name {
  display: block;
  font-size: 1.25rem;         /* 22.5px */
  font-weight: bold;
  color: var(--brand-blue);
  margin-bottom: 4px;
}

.guide-line {
  display: block;
  color: var(--text-2);       /* ~9.5:1 on bg */
}

/* ---------- Brand sign-off ---------- */
.home-signoff {
  text-align: center;
}

.home-signoff .signoff-text {
  font-size: 1.2rem;          /* 21.6px */
  font-weight: bold;
  color: var(--brand-blue);   /* ~9:1 on bg */
  margin: 0;
}

/* ---------- Home grids at desktop width (mobile-first above) ---------- */
@media (min-width: 1024px) {
  .tiles-grid {
    grid-template-columns: 1fr 1fr;
  }
  .guides-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ---------- Home sanctuary sound (index.html only) ----------
   Clan Mother Shifa's track lives on the Sanctuary home page.
   The control is a quiet pill: paused until a tap, then soft.
   The audio element itself has no native controls. */
.sanctuary-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sanctuary-sound {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px 8px 14px;
  border: 2px solid var(--brand-sand);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.94);
  color: var(--brand-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(40, 56, 144, 0.12);
}

.sanctuary-sound-mark {
  font-size: 1.15rem;
  line-height: 1;
}

.sanctuary-sound:hover,
.sanctuary-sound:focus-visible {
  border-color: var(--brand-blue);
  background-color: #ffffff;
}

.sanctuary-sound[aria-pressed="true"] {
  border-color: var(--brand-blue);
}

.sanctuary-sound[aria-pressed="true"] .sanctuary-sound-mark {
  color: var(--brand-green-text);
}
