/* Sonoran Dusk — shared theme for the Granite Reef Ward site.
   Light tokens are default; dark via prefers-color-scheme. */

:root {
  --sand: #FAF5EC;
  --paper: #FFFFFF;
  --ink: #1B2637;
  --stone: #5C5348;
  --clay: #B4502A;
  --clay-d: #A8481F;
  --on-clay: #FFF8EE;
  --amber: #E9B463;
  --sage: #46604E;
  --line: #EFE3D0;
  --tint: #F4E7D3;
  --outline: #DCCDB4;
  --tag-sage: #46604E;   --tag-sage-bg: #E7EFE6;
  --tag-clay: #B4502A;   --tag-clay-bg: #F7E6D6;
  --tag-plum: #6B5B8A;   --tag-plum-bg: #ECE7F2;
  --inkcard: #1B2637;
  --inkcard-body: rgba(252, 246, 234, .72);
  --nav-bg: #FFFFFF;
  --nav-border: #EFE3D0;
  --nav-idle: #5C5348;
  --shadow: 0 14px 30px rgba(23, 33, 46, .13);
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand: #101A28;
    --paper: #1A2738;
    --ink: #FCF6EA;
    --stone: #AFBDCB;
    --clay: #E9B463;
    --clay-d: #E9B463;
    --on-clay: #14202E;
    --line: #2B3B50;
    --tint: #24344A;
    --outline: #3A4C63;
    --tag-sage: #9CC4A8;   --tag-sage-bg: #1F3128;
    --tag-clay: #E8A37C;   --tag-clay-bg: #37241B;
    --tag-plum: #BBA9DC;   --tag-plum-bg: #282439;
    --inkcard: #0C1420;
    --nav-bg: #14202E;
    --nav-border: #263547;
    --nav-idle: #AFBDCB;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 20px;
  background: var(--sand);
  color: var(--ink);
}
body.has-tabs { padding-bottom: 78px; }
img, svg { display: block; }
a { color: var(--clay-d); }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

.serif { font-family: "Fraunces", Georgia, serif; }
.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap; border: 0; padding: 0;
}

/* ---------- type scale ---------- */
h1.hero-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700; font-size: 42px; line-height: 40px;
  letter-spacing: -0.015em; margin: 0; color: #FCF6EA;
}
h2.sec {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 21px; margin: 0; color: var(--ink);
}
.eyebrow {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .17em; color: var(--clay); margin: 0;
}
.eyebrow.amber { color: var(--amber); }
.label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .17em; color: var(--stone); margin: 0;
}

/* ---------- tags ---------- */
.tag {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  letter-spacing: .17em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.tag-sage { color: var(--tag-sage); background: var(--tag-sage-bg); }
.tag-clay { color: var(--tag-clay); background: var(--tag-clay-bg); }
.tag-plum { color: var(--tag-plum); background: var(--tag-plum-bg); }
.tc-sage { color: var(--tag-sage); }
.tc-clay { color: var(--tag-clay); }
.tc-plum { color: var(--tag-plum); }
.tagdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 14px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  border: 0; cursor: pointer; color: var(--ink); background: transparent;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--clay); color: var(--on-clay); }
.btn-outline { border: 1.5px solid var(--outline); color: var(--ink); }
.btn-amber { background: var(--amber); color: #14202E; }
.btnrow { display: flex; gap: 12px; }
.btnrow .btn { flex: 1; }

/* ---------- app header (subpages) ---------- */
.app-header {
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  min-height: 62px; padding: 4px 8px;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.app-header h1 {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 18px;
  text-align: center; margin: 0; color: var(--ink);
}
.iconbtn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 14px; color: var(--ink); cursor: pointer;
  text-decoration: none;
}
.iconbtn svg { width: 22px; height: 22px; }

/* ---------- section head ---------- */
.sechead {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 26px 16px 12px;
}
.sechead a { font-weight: 600; font-size: 14px; text-decoration: none; }

/* ---------- announcement rows ---------- */
.arow {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); margin: 0 16px 12px; overflow: hidden;
}
.arow summary {
  display: flex; gap: 14px; align-items: center;
  padding: 15px; list-style: none; cursor: pointer;
}
.arow summary::-webkit-details-marker { display: none; }
.dateblock {
  width: 48px; height: 50px; flex: none; background: var(--tint); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--ink);
}
.dateblock .mo { font-size: 9px; font-weight: 700; letter-spacing: .12em; color: var(--clay-d); }
.dateblock .dy { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 20px; line-height: 1.1; }
.dateblock svg { width: 20px; height: 20px; }
.acols { flex: 1; min-width: 0; }
.acols .catlabel { font-size: 10.5px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.acols .atitle { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin: 3px 0 2px; }
.acols .ameta { display: block; font-size: 12.5px; color: var(--stone); }
.chev { width: 20px; height: 20px; flex: none; color: var(--stone); transition: transform .15s ease; }
.arow[open] .chev { transform: rotate(90deg); }
.abody { padding: 0 15px 15px 77px; border-top: 1px solid var(--line); }
.abody p { font-size: 13.5px; color: var(--stone); margin: 12px 0 0; white-space: pre-line; }

/* ---------- link rows (ward page) ---------- */
.linkrow {
  display: flex; align-items: center; gap: 14px; width: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); margin: 0 16px 12px; padding: 15px;
  color: var(--ink); text-decoration: none; text-align: left; cursor: pointer;
  font-size: 15px; font-weight: 700;
}
.linkrow .lic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--tint); color: var(--clay-d); display: flex; align-items: center; justify-content: center; }
.linkrow .lic svg { width: 20px; height: 20px; }
.linkrow small { display: block; font-size: 12.5px; font-weight: 400; color: var(--stone); margin-top: 2px; }
.linkrow .chev { margin-left: auto; }

/* ---------- event cards (activities) ---------- */
.evcard {
  display: flex; background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow); margin: 0 16px 12px; overflow: hidden;
}
.evdate { width: 76px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 0; gap: 2px; }
.evdate .dow { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--stone); text-transform: uppercase; }
.evdate .dnum { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 25px; color: var(--ink); line-height: 1.1; }
.evdiv { width: 1px; background: var(--line); margin: 14px 0; flex: none; }
.evbody { flex: 1; min-width: 0; padding: 14px 16px 14px 14px; }
.evbody h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 8px 0 4px; }
.evbody .evmeta { font-size: 12.5px; color: var(--stone); margin: 0; }
.addcal { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; font-weight: 600; text-decoration: none; min-height: 44px; }
.addcal svg { width: 16px; height: 16px; }

/* ---------- 7-day strip ---------- */
.weekstrip { display: flex; gap: 8px; padding: 14px 16px 4px; overflow-x: auto; }
.daychip {
  width: 44px; height: 64px; flex: none; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; padding: 0;
}
.daychip .dow { font-size: 9px; font-weight: 700; letter-spacing: .1em; color: var(--stone); text-transform: uppercase; }
.daychip .dnum { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 19px; line-height: 1.1; }
.daychip .wdot { width: 5px; height: 5px; border-radius: 50%; background: var(--clay); margin-top: 2px; }
.daychip .wdot.none { background: transparent; }
.daychip[aria-pressed="true"] { background: var(--clay); border-color: var(--clay); color: var(--on-clay); }
.daychip[aria-pressed="true"] .dow { color: var(--on-clay); opacity: .75; }
.daychip[aria-pressed="true"] .wdot { background: var(--on-clay); }

/* ---------- text-alert signup card ---------- */
.alertcard {
  margin: 26px 16px 0; background: var(--inkcard); color: #FCF6EA;
  border-radius: 20px; padding: 18px; display: flex; gap: 14px; align-items: center;
  box-shadow: var(--shadow);
}
.alertcard .aicon {
  width: 44px; height: 44px; flex: none; border-radius: 14px;
  background: rgba(233, 180, 99, .16); color: var(--amber);
  display: flex; align-items: center; justify-content: center;
}
.alertcard .aicon svg { width: 22px; height: 22px; }
.alertcard h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 17px; margin: 0 0 4px; color: #FCF6EA; }
.alertcard p { font-size: 13px; color: var(--inkcard-body); margin: 0; }
.alertcard .btn { flex: none; }

/* ---------- hero ---------- */
.hero { position: relative; height: 340px; overflow: hidden; background: #233050; }
.hero svg.scenery { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-night, .ground-night { display: none; }
@media (prefers-color-scheme: dark) {
  .sky-day, .ground-day { display: none; }
  .sky-night, .ground-night { display: block; }
}
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
}
.wordmark { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 14px; letter-spacing: .22em; color: #FCF6EA; }
.menubtn {
  width: 44px; height: 44px; border-radius: 14px; border: 0; cursor: pointer;
  background: rgba(251, 243, 228, .14); color: #FCF6EA;
  display: flex; align-items: center; justify-content: center;
}
.menubtn svg { width: 22px; height: 22px; }
.menuwrap { position: relative; }
.menu {
  position: absolute; top: 52px; right: 0; z-index: 20; min-width: 190px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 6px; display: none;
}
.menu.open { display: block; }
.menu a { display: block; padding: 12px 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; border-radius: 10px; }
.menu a:active { background: var(--tint); }
.hero-text { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 54px; }
.hero-text h1 { margin: 10px 0 8px; }
.hero-text .meta { margin: 0; font-size: 13.5px; color: rgba(252, 246, 234, .8); }

/* ---------- This Sunday card ---------- */
.sunday {
  position: relative; z-index: 3; margin: -34px 16px 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); padding: 18px;
}
.sunday-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.sunday time { display: block; font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 28px; color: var(--ink); }
.sunday .addr { font-size: 13.5px; color: var(--stone); margin: 6px 0 14px; }

/* ---------- search row ---------- */
.searchrow { display: none; padding: 12px 16px 0; }
.searchrow.open { display: block; }
.searchrow input {
  width: 100%; min-height: 44px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); padding: 0 14px; font-size: 14px; font-family: inherit;
}

/* ---------- month calendar ---------- */
.calnav { display: flex; align-items: center; justify-content: space-between; margin: 18px 16px 8px; gap: 8px; }
.calnav h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 21px; margin: 0; flex: 1; text-align: center; }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0 12px; }
.caldow { text-align: center; font-size: 10px; font-weight: 700; color: var(--stone); padding: 6px 0; text-transform: uppercase; letter-spacing: .06em; }
.calday {
  min-height: 52px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  color: var(--ink); font-size: 14px; font-family: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px 2px;
}
.calday .n { font-family: "Fraunces", Georgia, serif; font-weight: 500; }
.calday.today .n { font-weight: 700; text-decoration: underline; text-decoration-color: var(--clay); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.calday.sel { border-color: var(--clay); background: var(--tint); }
.caldots { display: flex; gap: 3px; height: 6px; align-items: center; }
.callegend { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; font-size: 12.5px; color: var(--stone); margin: 12px 16px 0; }
.callegend .tagdot { margin-right: 5px; vertical-align: 1px; }

/* ---------- fineprint / footer ---------- */
.fineprint { text-align: center; color: var(--stone); font-size: 12.5px; margin: 30px 24px 8px; }
.fineprint a { color: var(--clay-d); }

/* ---------- bottom tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(78px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--nav-bg); border-top: 1px solid var(--nav-border);
  display: flex;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--nav-idle); text-decoration: none; min-height: 44px;
}
.tabbar a svg { width: 21px; height: 21px; }
.tabbar a span { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.tabbar a[aria-current="page"] { color: var(--clay); }
.topnav { display: none; }

/* ---------- forms (alerts/admin) ---------- */
.field { margin: 0 0 14px; }
.field label { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .17em; color: var(--stone); margin-bottom: 6px; }
.field input[type="text"], .field input[type="tel"], .field input[type="date"],
.field select, .field textarea {
  width: 100%; min-height: 44px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); padding: 10px 14px; font-size: 14px; font-family: inherit;
}
.field textarea { min-height: 96px; resize: vertical; }
.checkline { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; }
.checkline input { width: 22px; height: 22px; accent-color: var(--clay); flex: none; }
.formcard { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); margin: 16px; padding: 18px; }
.formcard h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 21px; margin: 0 0 6px; }
.formcard .sub { font-size: 13.5px; color: var(--stone); margin: 0 0 16px; }

/* ---------- desktop ---------- */
@media (min-width: 720px) {
  .shell { max-width: 640px; margin: 0 auto; }
  body.has-tabs { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav {
    display: flex; justify-content: center; gap: 30px; padding: 14px;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .topnav a { color: var(--nav-idle); text-decoration: none; font-weight: 700; font-size: 14px; }
  .topnav a[aria-current="page"] { color: var(--clay); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
