/* West Coast View/Navion — base layout adapted from Travelers Tree Consulting */
:root {
  --forest: #26443d;
  --forest-dark: #173029;
  --terracotta: #c17f4e;
  --terracotta-dark: #a5673c;
  --sand: #f1e6d8;
  --paper: #ffffff;
  --ink: #242422;
  --muted: #5c5c58;
  --rule: #e4ded2;
  --wrap: 50rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--forest-dark);
  line-height: 1.2;
  font-weight: 600;
}

a { color: var(--forest); text-underline-offset: 2px; }
a:hover { color: var(--terracotta); }

img, iframe { max-width: 100%; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem 1rem; z-index: 20; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header + nav ---------- */
.site-header { background: var(--forest); color: var(--sand); position: relative; z-index: 10; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .75rem 1.5rem;
  padding: 1.1rem 1.5rem; max-width: var(--wrap); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--sand); }
.brand-mark {
  flex-shrink: 0; width: 1.4rem; height: 1.4rem;
  background: var(--terracotta); border-radius: 3px 3px 3px 10px; transform: rotate(-8deg);
}
.brand-text { display: flex; flex-direction: column; font-family: "Fraunces", Georgia, serif; }
.brand-1 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta); }
.brand-2 { font-size: 1.3rem; }

.site-nav { font-size: .95rem; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.nav-item { position: relative; }
.nav-item > a { color: var(--sand); text-decoration: none; display: inline-block; padding: .2rem 0; }
.nav-item > a:hover,
.nav-item > a[aria-current="page"] { color: var(--terracotta); }
.has-menu > a::after { content: " ▾"; font-size: .7em; opacity: .8; }

.nav-menu {
  list-style: none; margin: 0; padding: .4rem 0;
  position: absolute; top: 100%; left: -0.75rem; min-width: 12rem;
  background: var(--forest-dark);
  border: 1px solid rgba(241,230,216,.15); border-radius: 6px;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease, visibility .12s;
  z-index: 30;
}
.nav-item.has-menu:hover .nav-menu,
.nav-item.has-menu:focus-within .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu li { margin: 0; }
.nav-menu a { display: block; padding: .5rem .9rem; color: var(--sand); text-decoration: none; font-size: .92rem; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { color: var(--terracotta); background: rgba(241,230,216,.06); }

@media (max-width: 640px) {
  .nav-list { flex-direction: column; gap: .5rem; width: 100%; }
  .nav-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: transparent; padding: .25rem 0 .25rem 1rem;
  }
  .has-menu > a::after { content: ""; }
}

/* ---------- generic page bodies ---------- */
.page-body, .prose { max-width: var(--wrap); margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.prose { max-width: 44rem; }
.prose h1, .page-body h1 { font-size: clamp(1.9rem, 4vw, 2.4rem); margin: 0 0 .8rem; }
.prose h2 { font-size: 1.4rem; margin: 2rem 0 .5rem; }
.prose h3 { font-size: 1.12rem; margin: 1.5rem 0 .4rem; }
.prose p, .prose li { max-width: 42rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.eyebrow { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta-dark); margin: 0 0 .3rem; }
.eyebrow a { color: inherit; }
.lede { font-size: 1.18rem; color: var(--muted); }
.fine { font-size: .9rem; color: var(--muted); }
.credit { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .9rem; color: var(--muted); }

/* ---------- hero (home) ---------- */
.hero { background: var(--sand); border-bottom: 1px solid var(--rule); }
.hero .wrap { padding: 3rem 1.5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin: .3rem 0 .6rem; }
.hero .lede { max-width: 40rem; margin-bottom: 1.5rem; }

.hero-photo {
  border-bottom: 0;
  background:
    linear-gradient(94deg, rgba(20,36,27,.9) 0%, rgba(20,36,27,.62) 42%, rgba(20,36,27,.12) 78%, rgba(20,36,27,.04) 100%),
    #14241b url("/assets/img/view-beach.jpg") center 42% / cover no-repeat;
}
.hero-photo .wrap { padding: clamp(3.5rem, 9vw, 6rem) 1.5rem; min-height: 24rem; display: flex; flex-direction: column; justify-content: center; }
.hero-photo .eyebrow { color: var(--terracotta); }
.hero-photo h1 { color: #fff; }
.hero-photo .lede { color: rgba(241, 230, 216, .92); }
.hero-photo .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero-photo .btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.footer-band { margin: 0; line-height: 0; }
.footer-band img {
  display: block; width: 100%; height: auto;
  max-height: 40rem;
  object-fit: cover; object-position: center 55%;
}
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--forest); color: var(--sand); text-decoration: none;
  padding: .6rem 1.15rem; border-radius: 5px; font-weight: 600; border: 1px solid var(--forest); }
.btn:hover { background: var(--forest-dark); color: var(--sand); }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: rgba(38,68,61,.08); color: var(--forest-dark); }

.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem;
  max-width: var(--wrap); margin: 0 auto; padding: 2.75rem 1.5rem 3.5rem; }
.panel h2 { font-size: 1.25rem; margin: 0 0 .4rem; }
.panel p { margin: 0 0 .6rem; color: var(--muted); }
.panel a { font-weight: 600; text-decoration: none; }
.panel a:hover { text-decoration: underline; }

/* ---------- rally / guide lists ---------- */
.rally-list, .guide-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.rally-list li, .guide-list li { padding: 1.2rem 0; border-top: 1px solid var(--rule); }
.rally-list li:first-child, .guide-list li:first-child { border-top: 0; }
.rally-list h2, .guide-list h2 { font-size: 1.2rem; margin: 0 0 .25rem; }
.rally-list h2 a, .guide-list h2 a { text-decoration: none; }
.rally-list h2 a:hover, .guide-list h2 a:hover { text-decoration: underline; }
.rally-list .meta { font-size: .9rem; color: var(--muted); margin: 0 0 .4rem; }
.rally-list p, .guide-list p { margin: 0; color: var(--muted); }
.tag { display: inline-block; border-radius: 999px; padding: .05rem .55rem; font-size: .78rem;
  background: var(--sand); color: var(--forest-dark); }
.tag.upcoming { background: var(--forest); color: var(--sand); }

.subnav { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 1.75rem; }
.subnav a { font-size: .93rem; text-decoration: none; padding: .3rem .7rem; border: 1px solid var(--rule); border-radius: 4px; color: var(--muted); }
.subnav a:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* ---------- schedule tables ---------- */
.sched-wrap { overflow-x: auto; margin: 1rem 0; }
.sched { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 34rem; }
.sched th, .sched td { text-align: left; padding: .45rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.sched thead th { font-family: "Inter", sans-serif; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--sand); }
.sched td:first-child { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.sched td:nth-child(3) { white-space: nowrap; }

.prose table { border-collapse: collapse; width: 100%; font-size: .93rem; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid var(--rule); padding: .45rem .65rem; text-align: left; }
.prose thead th { background: var(--sand); }
.prose blockquote { margin: 1.25rem 0; padding: .75rem 1rem; border-left: 3px solid var(--terracotta); background: var(--sand); border-radius: 0 4px 4px 0; color: var(--muted); }

.map-embed { margin: 1.5rem 0; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; line-height: 0; }
.map-embed iframe { width: 100%; height: 22rem; border: 0; display: block; }

.site-map { margin: 1.5rem 0; }
.site-map img { display: block; width: 100%; max-width: 26rem; height: auto; margin: 0 auto;
  border: 1px solid var(--rule); border-radius: 6px; }
.site-map figcaption { max-width: 26rem; margin: .55rem auto 0; font-size: .85rem; color: var(--muted); text-align: center; }

/* ---------- CSS-only tabs (Cher'ere page) ---------- */
.tabs > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.tab-labels { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--rule); margin-bottom: 0; }
.tab-labels label {
  padding: .6rem 1rem; cursor: pointer; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-labels label:hover { color: var(--forest-dark); }
.tabs > input:focus-visible + label { outline: 2px solid var(--terracotta); outline-offset: -2px; }
#tab-pres:checked ~ .tab-labels label[for="tab-pres"],
#tab-sched:checked ~ .tab-labels label[for="tab-sched"],
#tab-camp:checked ~ .tab-labels label[for="tab-camp"],
#tab-hike:checked ~ .tab-labels label[for="tab-hike"] {
  color: var(--forest-dark); font-weight: 600; border-bottom-color: var(--terracotta);
}
.tab-panel { display: none; padding-top: 1.75rem; }
#tab-pres:checked ~ .tab-panels .tab-panel[data-tab="pres"],
#tab-sched:checked ~ .tab-panels .tab-panel[data-tab="sched"],
#tab-camp:checked ~ .tab-panels .tab-panel[data-tab="camp"],
#tab-hike:checked ~ .tab-panels .tab-panel[data-tab="hike"] { display: block; }

.guide-group { margin: 2rem 0; }
.guide-group > h2 { margin: 0 0 .3rem; font-size: 1.25rem; }
.guide-group > h2 a { text-decoration: none; }
.guide-group > h2 a:hover { text-decoration: underline; }

.doc-list { list-style: none; padding: 0; margin: 1.25rem 0; }
.doc-list li { border-top: 1px solid var(--rule); }
.doc-list li:last-child { border-bottom: 1px solid var(--rule); }
.doc-list a { display: flex; align-items: baseline; gap: .6rem; padding: .9rem .25rem; text-decoration: none; }
.doc-list a:hover { background: var(--sand); }
.doc-list .doc-type { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--terracotta-dark); flex-shrink: 0; }
.doc-list .doc-title { color: var(--forest-dark); font-weight: 600; }
.doc-list .doc-note { display: block; color: var(--muted); font-size: .88rem; font-weight: 400; margin-top: .15rem; }

/* ---------- redwood-forest page (Cher'ere) ---------- */
body.page-redwood {
  background-color: #14241b;
  background-image:
    linear-gradient(180deg, rgba(10,20,14,.3), rgba(10,20,14,.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='600' viewBox='0 0 320 600'%3E%3Crect width='320' height='600' fill='%2314241b'/%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M40 600V40' stroke='%233d2a20' stroke-width='46'/%3E%3Cpath d='M120 600V-10' stroke='%23233a2c' stroke-width='30'/%3E%3Cpath d='M210 600V20' stroke='%234a3327' stroke-width='60'/%3E%3Cpath d='M285 600V0' stroke='%2321352a' stroke-width='24'/%3E%3Cpath d='M165 600V60' stroke='%23264031' stroke-width='16'/%3E%3Cpath d='M40 600V40' stroke='%23593f30' stroke-width='10' opacity='.6'/%3E%3Cpath d='M210 600V20' stroke='%236b4a38' stroke-width='14' opacity='.5'/%3E%3C/g%3E%3Cg stroke='%232c4a39' stroke-width='2' opacity='.45'%3E%3Cpath d='M40 210q30-16 0-40M120 300q-26-14 0-38M210 160q34-18 0-44M285 260q-22-12 0-34'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 320px 600px;
  background-repeat: repeat;
  background-attachment: fixed;
}
body.page-redwood .card {
  background: var(--paper);
  max-width: 48rem;
  margin: 2.5rem auto 3.5rem;
  border-radius: 8px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.55);
  padding: 2.5rem clamp(1.25rem, 4vw, 2.75rem);
}
body.page-redwood .site-footer { color: var(--sand); }
body.page-redwood .site-footer a { color: var(--sand); }
body.page-redwood .site-footer a:hover { color: var(--terracotta); }

/* ---------- footer ---------- */
.site-footer { color: var(--muted); font-size: .9rem; }
.site-footer .wrap { padding: 1.75rem 1.5rem; }
.site-footer p { margin: .3rem 0; max-width: 44rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
