/* =====================================================================
   SOTEMS website styles – "Desert Earth"
   Editors normally do not need to change this file.
   ===================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font Licence) ---------- */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

/* ---------- Colours and fonts ---------- */
:root {
  --bg: #f6efe4;
  --surface: #fffaf2;
  --sand: #e9d6bd;
  --text: #2e2119;
  --muted: #6b5546;
  --link: #9a3d1c;
  --accent: #b5532a;
  --accent-dark: #93401e;
  --accent-ink: #fff;
  --earth: #3a261b;
  --earth-text: #f3e6d6;
  --focus: #1f6f78;
  --line: rgb(46 33 25 / .15);
  --head-font: "Fraunces", Georgia, serif;
  --body-font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

/* ---------- Basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg) url("../images/texture-grain.svg"); color: var(--text);
  font-family: var(--body-font); font-size: 1.125rem; line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--head-font); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1.1em; }
li { margin-bottom: .3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
[id] { scroll-margin-top: 1rem; }

.wrap { width: min(1160px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }
/* Pages with <main class="align-left">: text sections start at the same left edge as the wide sections */
.align-left .narrow { margin-left: max(1rem, calc((100% - 1160px) / 2)); margin-right: auto; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .6rem 1rem; background: var(--accent); color: #fff; border-radius: 6px; }
.skip:focus { top: 1rem; }

/* ---------- Header and menu (built by js/site-parts.js) ---------- */
#site-header { min-height: 76px; background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header { position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.brand img { width: 50px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--head-font); font-size: 1.45rem; font-weight: 700; letter-spacing: .04em; }
.brand-sub { font-size: .85rem; color: var(--muted); }

.nav-toggle { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a { color: inherit; text-decoration: none; display: block; padding: .5rem .75rem; border-radius: 6px; }
.site-nav a:hover, .site-nav a:focus-visible { background: rgb(181 83 42 / .12); }
.site-nav a[aria-current="page"], .site-nav .is-section > a { box-shadow: inset 0 -3px 0 var(--accent); }

@media (min-width: 960px) {
  .site-nav > ul { display: flex; gap: .15rem; }
  .site-nav li { position: relative; }
  .has-sub > a::after { content: ""; display: inline-block; width: .4em; height: .4em; margin-left: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.2em) rotate(45deg); opacity: .7; }
  .has-sub > ul {
    position: absolute; left: 0; top: 100%; min-width: 15rem; padding: .4rem;
    background: var(--surface); border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / .18);
    visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s;
  }
  .has-sub:hover > ul, .has-sub:focus-within > ul { visibility: visible; opacity: 1; transform: none; }
}
@media (max-width: 959.98px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-weight: 600;
    background: transparent; color: inherit; border: 2px solid currentColor; border-radius: 8px; padding: .4rem .9rem; cursor: pointer;
  }
  .site-nav { flex-basis: 100%; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav > ul { padding-block: .5rem; border-top: 1px solid var(--line); }
  .has-sub > ul { padding-left: 1rem; font-size: .95em; }
}

/* Simple menu shown only if JavaScript is switched off */
.noscript-nav { padding: .75rem 1rem; }
.noscript-nav strong { display: block; font-family: var(--head-font); font-size: 1.3rem; }
.noscript-nav a { display: inline-block; margin: .2rem .9rem .2rem 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: .75rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; line-height: 1.2; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-light { background: #fff; color: var(--accent-dark); }
.btn-light:hover { background: #fbeee2; }
.btn-large { font-size: 1.2rem; padding: 1rem 1.8rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Home page ---------- */
.hero {
  position: relative; min-height: clamp(420px, 72vh, 720px); display: flex; align-items: flex-end;
  background: #7a3a1c url("../images/desert-sun.jpg") center 60% / cover no-repeat; color: #fff;
}
.hero .wrap { position: relative; padding-block: 2.5rem; }
.hero-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .9rem; font-weight: 700; margin-bottom: .5rem; text-shadow: 0 1px 2px rgb(0 0 0 / .8), 0 0 14px rgb(0 0 0 / .6); }
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); max-width: 34ch; margin-bottom: 1.25rem;
  text-shadow: 0 2px 3px rgb(30 12 4 / .75), 0 0 22px rgb(30 12 4 / .55), 0 0 44px rgb(30 12 4 / .35); }
.hero .btn-primary { box-shadow: 0 4px 14px rgb(0 0 0 / .35); }
.hero .btn-ghost { color: #fff; background: rgb(35 17 8 / .35); box-shadow: 0 4px 14px rgb(0 0 0 / .25); }
.hero-lead { background: var(--earth); color: var(--earth-text); }
.hero-lead p { margin: 0; padding-block: 1.25rem; font-size: clamp(1.05rem, 2vw, 1.25rem); }

.intro { display: grid; gap: 3rem; }
@media (min-width: 900px) { .intro { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.intro h2, .experiment h2, .section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.intro figure { margin: 0; position: sticky; top: 2rem; }
.intro figure img { border-radius: 4px 80px 4px 4px; box-shadow: 0 18px 40px rgb(58 38 27 / .25); }
.pull { font-family: var(--head-font); font-style: italic; font-size: 1.5rem; line-height: 1.35; color: var(--accent-dark); border-left: 4px solid var(--accent); padding-left: 1.25rem; margin: 2rem 0; }

.experiment { background: var(--sand) url("../images/texture-grain.svg"); }
.experiment-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .experiment-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.experiment img { border-radius: 4px; margin-bottom: 1.5rem; }
.ticks { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.ticks li { padding: .55rem 0 .55rem 2rem; border-bottom: 1px solid var(--line); position: relative; margin: 0; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .9rem; height: .9rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(181 83 42 / .2); }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }

.events-band { background: var(--accent); color: #fff; }
.events-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: 2.75rem; }
.events-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .25rem; }
.events-band p { margin: 0; max-width: 52ch; }

/* ---------- Cards (home page and Ceremonies page) ---------- */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.content .card h2 { margin-top: 0; font-size: 1.45rem; color: var(--text); }
.card { background: var(--surface); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 0 rgb(58 38 27 / .06), 0 12px 28px rgb(58 38 27 / .1); display: flex; flex-direction: column; }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card h2, .card h3 { font-size: 1.45rem; }
.card h2 a, .card h3 a { color: var(--text); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { color: var(--link); }
.card .more { margin-top: auto; font-weight: 600; }

/* ---------- Inner pages ---------- */
.page-title { background: var(--sand) url("../images/texture-grain.svg"); border-bottom: 1px solid var(--line); padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-title h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin: 0; }
.page-title .page-sub { font-size: 1.2rem; color: var(--muted); margin: .5rem 0 0; }
.page-date { display: inline-block; margin-top: .9rem; padding: .35rem .9rem; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }

.content { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 6vw, 4.5rem); }
.content h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 2.2rem; color: var(--accent-dark); }
.content h3 { font-size: 1.35rem; margin-top: 1.6rem; }
.content > .narrow > h2:first-child, .content > .narrow > h3:first-child { margin-top: 0; }
.lead-text { font-size: 1.25rem; color: var(--muted); }

/* Darker beige band, for alternating light and dark sections down a page */
.band { background: var(--sand) url("../images/texture-grain.svg"); border-block: 1px solid var(--line); }
.content-tight { padding-top: 0; }
.content > .narrow > h2:first-child, .split h2:first-child { margin-top: 0; }

/* Text beside a photo. On computers the photo stays in view while the text scrolls past. */
.split { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
.split > * { min-width: 0; }   /* lets wide tables scroll inside their box instead of widening the page */
.split figure { margin: 0; }
.split figure img { border-radius: 4px 80px 4px 4px; box-shadow: 0 18px 40px rgb(58 38 27 / .22); }
.split figure.portrait { max-width: 300px; justify-self: center; }
.split figure.figure-small { max-width: 340px; justify-self: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
  .split > figure { position: sticky; top: 2rem; }
}
.content blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 4px solid var(--accent); font-style: italic; }
.signature { font-family: var(--head-font); font-size: 1.2rem; margin-top: 2rem; }
.signature span { display: block; font-family: var(--body-font); font-size: 1rem; color: var(--muted); }

/* Large photo banner at the top of a page (e.g. Vision Quest). The photo is an <img> so editors can swap it. */
/* Height grows with screen width so the frame shows sky, horizon and ground together */
.page-banner { position: relative; overflow: hidden; min-height: clamp(380px, 50vw, 820px); display: flex; align-items: flex-end; background: #5a2e18; color: #fff; }
.page-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 75%; }
.page-banner .wrap { position: relative; padding-block: 2.5rem; }
.page-banner h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); margin-bottom: .6rem;
  text-shadow: 0 2px 3px rgb(30 12 4 / .75), 0 0 22px rgb(30 12 4 / .55), 0 0 44px rgb(30 12 4 / .35); }
.page-banner .page-date { margin: 0 0 1rem; box-shadow: 0 4px 14px rgb(0 0 0 / .3); }
.page-banner .btn-primary { box-shadow: 0 4px 14px rgb(0 0 0 / .35); }

/* Photos inside text */
/* Full width of the text column */
.photo-wide { margin-block: 2rem; }
.photo-wide img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 8px; box-shadow: 0 12px 28px rgb(58 38 27 / .18); }
.photo { margin: 1.5rem 0; }
.photo img { border-radius: 6px; }
.photo figcaption { font-size: .95rem; color: var(--muted); margin-top: .4rem; }
@media (min-width: 700px) {
  .photo-right { float: right; width: 42%; margin: .3rem 0 1rem 1.75rem; }
  .photo-left { float: left; width: 42%; margin: .3rem 1.75rem 1rem 0; }
  .photo-small { width: 30%; }
  .photo-half { width: 40%; }
}
.clear { clear: both; }
.content img.float-right { border-radius: 6px; margin: .5rem 0 1rem; }
@media (min-width: 700px) {
  .content img.float-right { float: right; width: 40%; max-width: 340px; margin: .3rem 0 1rem 1.5rem; }
}

/* Photo galleries */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 0 0 2rem; padding: 0; list-style: none; }
.gallery li { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.gallery-large { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.gallery-large img { aspect-ratio: 3 / 2; }

/* Tables (timetables and costs) */
.table-wrap { overflow-x: auto; margin: 1.25rem 0 1.75rem; }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 1rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--earth); color: var(--earth-text); font-weight: 600; }

/* Notices and boxes */
.notice { background: #fbe7cf; border-left: 6px solid var(--accent); padding: 1rem 1.25rem; border-radius: 6px; margin-bottom: 2rem; }
.notice p:last-child { margin-bottom: 0; }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: var(--accent); color: #fff; padding: 1.25rem 1.5rem; border-radius: 10px; margin-bottom: 2.5rem; }
.callout h2 { color: #fff; margin: 0 0 .2rem; font-size: 1.5rem; }
.callout p { margin: 0; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.box > :last-child { margin-bottom: 0; }

/* Sweat lodge dates */
.dates-section { background: var(--sand) url("../images/texture-grain.svg"); padding-block: clamp(2.5rem, 6vw, 4rem); border-top: 1px solid var(--line); }
.dates-section > .narrow > h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-top: 0; }
.state { background: var(--surface); border-radius: 12px; border-top: 6px solid var(--accent); padding: 1.5rem clamp(1.1rem, 3vw, 2rem); margin: 0 0 2rem; box-shadow: 0 10px 26px rgb(58 38 27 / .1); }
.state > h3 { font-size: 1.7rem; margin: 0 0 .75rem; color: var(--accent-dark); }
.state h4 { font-size: 1.2rem; margin: 1.5rem 0 .4rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0 0 1rem; }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: .5rem; } }
.date-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.date-list li { margin: 0; padding: .45rem .8rem; background: var(--bg); border-radius: 6px; border-left: 4px solid var(--accent); font-weight: 400; }

/* Events list */
.event { background: var(--surface); border-radius: 10px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 8px 22px rgb(58 38 27 / .08); border-left: 6px solid var(--accent); }
.event h2 { margin: 0 0 .4rem; font-size: 1.6rem; }
.event-when { font-weight: 700; color: var(--accent-dark); margin: 0; }
.event-where { color: var(--muted); margin: 0 0 .8rem; }

/* People (facilitators) */
.person { overflow: hidden; margin: 1.5rem 0; }
.person img { float: left; width: 140px; border-radius: 8px; margin: .3rem 1.25rem .5rem 0; }

/* Contact page */
.contact-card { background: var(--surface); border-radius: 12px; padding: 1.75rem; box-shadow: 0 10px 26px rgb(58 38 27 / .1); margin-bottom: 2rem; }
.contact-card > h2:first-child, .box > h2:first-child { margin-top: 0; }
.phone-list { list-style: none; padding: 0; margin: 0; }
.phone-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.phone-list strong { display: inline-block; min-width: 11rem; }
@media (max-width: 520px) { .phone-list strong { display: block; min-width: 0; } }
a[href^="tel:"] { white-space: nowrap; }   /* keep phone numbers on one line */

/* ---------- Footer (built by js/site-parts.js) ---------- */
.site-footer { background: var(--earth); color: var(--earth-text); padding-block: 3.5rem 1.5rem; font-size: 1rem; }
.site-footer a { color: inherit; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.site-footer h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: .35rem; }
.icon { width: 1.1em; height: 1.1em; vertical-align: -.15em; fill: currentColor; margin-right: .35em; }
.fb-link { white-space: nowrap; }
.fb-link .icon { color: #1877f2; margin-right: .2em; }
.icon-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer-base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(243 230 214 / .2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .9rem; opacity: .85; }
.ack { font-style: italic; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print {
  #site-header, .site-footer, .skip, .callout, .btn-row { display: none; }
  body { background: #fff; }
}
