/* v6 — editorial pass. Removes stock moves (eyebrow rules, wave, glow, doodles, empty grids)
   and gives each section its own composition. Loaded last; overrides elim.css + elim-craft.css. */

/* ---------- global: quieter labels, no decorative rules ---------- */
.eyebrow { font: 500 12.5px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); gap: 0; }
.eyebrow::after { content: none; }
.on-dark .eyebrow { color: rgba(255,255,255,.6); }
.link::after { content: "→"; }

/* ---------- hero: photo only, straight edge, timetable sits on the image ---------- */
.hero::before { background: linear-gradient(180deg, rgba(8,18,36,0) 35%, rgba(8,18,36,.62) 100%); }
.hero-in { padding-bottom: clamp(64px, 9vh, 104px); }
.hero .kicker { font: 500 12.5px/1.4 var(--sans); letter-spacing: .14em; opacity: .78; }
.hero .credit { bottom: 24px; }
@media (min-width: 901px) { .sunday { background: none !important; backdrop-filter: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; } }

/* ---------- 03 verse spread ---------- */
.spread { background: var(--sand); padding: var(--s7) var(--margin) var(--s6); }
.spread-in { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: start; }
.spread .margin { grid-column: 1 / span 3; display: grid; gap: var(--s5); padding-top: 10px; }
.spread .m dt { font: 200 clamp(88px, 9vw, 136px)/.8 var(--serif); letter-spacing: -.05em; }
.spread .m.s dt { color: var(--blue); }
.spread .m.p dt { color: var(--orange-ink); }
.spread .m dd { margin-top: 18px; font: 400 15px/1.7 var(--sans); color: var(--ink-2); max-width: 17em; }
.spread .m dd b { display: block; font: 400 19px/1.4 var(--serif); color: var(--ink); margin-bottom: 4px; }
.spread .verse { grid-column: 5 / span 8; border-left: 1px solid var(--rule); padding-left: clamp(24px, 3vw, 48px); }
.spread .verse-set { font: 200 clamp(38px, 4.5vw, 70px)/1.3 var(--serif); letter-spacing: -.04em; color: var(--ink); max-width: none; }
.spread .verse-set em { font-style: normal; }
.spread .verse-set em.s { color: var(--blue); }
.spread .verse-set em.p { color: var(--orange-ink); }
.spread .verse-set em::before, .spread .verse-set em::after { content: none; }
.spread .ref { margin-top: var(--s4); font: 500 12.5px/1.4 var(--sans); letter-spacing: .14em; color: var(--ink-3); }

/* ---------- 04 week: seven short columns, real events only ---------- */
.wk { background: var(--sand); padding: 0 var(--margin) var(--s6); }
.wk-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; border-top: 1px solid var(--ink); padding-top: 20px; margin-bottom: 28px; }
.wk-head .small { max-width: 30em; text-align: right; }
.week7 { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--rule); }
.week7 .d { padding: 0 14px 22px; border-left: 1px solid var(--rule); min-height: 148px; }
.week7 .d:first-child { border-left: 0; padding-left: 0; }
.week7 .d.today { background: rgba(0,58,143,.05); }
.week7 .dh { display: flex; align-items: baseline; gap: 8px; padding: 2px 0 14px; font: 500 13px/1 var(--sans); color: var(--ink-3); }
.week7 .dh b { font: 300 26px/1 var(--serif); color: var(--ink); letter-spacing: -.02em; }
.week7 .dh i { font-style: normal; font: 600 11.5px/1 var(--sans); color: var(--orange-ink); margin-left: auto; }
.week7 .d.today .dh { box-shadow: inset 0 2px 0 var(--orange); padding-top: 14px; }
.week7 .d:not(.today) .dh { padding-top: 14px; }
.week7 ul { list-style: none; display: grid; gap: 9px; }
.week7 li { display: grid; gap: 1px; font: 400 14.5px/1.35 var(--sans); color: var(--ink); }
.week7 li b { font: 500 12.5px/1.3 var(--sans); color: var(--blue); }
.week7 li.sun b { color: var(--orange-ink); }
.week7 li.sun span { font-weight: 600; }
.week7 li.past { opacity: .42; }

/* ---------- 05 sermon: one footnote instead of repeated states ---------- */
#sermon { background: var(--spring); padding-top: var(--s6) !important; }
.archive .act:empty { display: none; }
.footnote { margin-top: 20px; font: 400 14px/1.7 var(--sans); color: var(--ink-3); }
.footnote a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bulletin { display: none; }

/* ---------- 06 924: a calendar of squares, not a sunburst ---------- */
.mountain .tally-wrap { align-self: end; }
.tally-num b { font-weight: 200 !important; }
.tally svg { width: 100%; height: auto; display: block; margin-top: 24px; }
.tally rect.on { fill: rgba(247,246,242,.78); }
.tally rect.off { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 1; }
.tally rect.latest { fill: var(--orange); }
.tally-key { margin-top: 14px; }
html.js:not(.static) .tally rect.on { opacity: 0; transition: opacity .5s ease calc(var(--i) * 1.6ms); }
html.js:not(.static) .tally.in rect.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { html.js .tally rect.on { opacity: 1 !important; transition: none !important; } }

/* ---------- 07 nations: headline sits on the globe's left ---------- */
#nations { position: relative; }
#nations .sec-head { position: absolute; z-index: 2; left: var(--margin); top: var(--s6); display: grid; gap: 24px; width: min(30%, 380px); margin: 0; pointer-events: none; }
#nations .sec-head .t, #nations .sec-head .d { grid-column: auto; }
#nations .sec-head .d { font-size: 16px; color: rgba(255,255,255,.72); }
#nations .globe-stage { margin-left: 18%; }

/* ---------- 08 gallery: captions in serif, no numbering ---------- */
#gallery .sec-head .d { grid-column: 8 / span 5; }
.story .meta { font: 500 12px/1.4 var(--sans); letter-spacing: .12em; color: var(--ink-3); }

/* ---------- 09 roots: years as a ruled list ---------- */
.years { list-style: none; border-top: 1px solid var(--ink); }
.years li { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.years b { grid-column: 1 / span 3; font: 200 clamp(36px, 3.6vw, 54px)/1 var(--serif); letter-spacing: -.04em; color: var(--blue); }
.years span { grid-column: 5 / span 7; font: 400 clamp(17px, 1.3vw, 19px)/1.6 var(--sans); color: var(--ink); }
.years li.latest b { color: var(--orange-ink); }

/* ---------- 11 arrive / leave: one sand band with a hairline between ---------- */
.paths .path.leave { background: var(--sand-2) !important; color: var(--ink) !important; }
.paths .path.leave .h2, .paths .path.leave li, .paths .path.leave .link { color: var(--ink) !important; }
.paths .path.leave .link { color: var(--blue) !important; }
.paths .path.leave .eyebrow { color: var(--ink-3) !important; }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .spread { padding: var(--s6) var(--margin) var(--s5); }
  .spread-in { grid-template-columns: 1fr; gap: var(--s5); }
  .spread .verse { grid-column: 1; grid-row: 1; border-left: 0; padding-left: 0; }
  .spread .verse-set { font-size: clamp(30px, 8.4vw, 40px); }
  .spread .margin { grid-column: 1; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--rule); padding-top: 24px; }
  .spread .m dt { font-size: 72px; }
  .wk-head { flex-direction: column; gap: 6px; }
  .wk-head .small { text-align: left; }
  .week7 { grid-template-columns: 1fr; border-bottom: 0; }
  .week7 .d { display: grid; grid-template-columns: 64px 1fr; padding: 14px 0; border-left: 0; border-top: 1px solid var(--rule); min-height: 0; }
  .week7 .d.today { padding-inline: 10px; }
  .week7 .dh, .week7 .d:not(.today) .dh, .week7 .d.today .dh { padding: 0; box-shadow: none; flex-direction: column; align-items: flex-start; gap: 4px; }
  .week7 .dh i { margin-left: 0; }
  .week7 ul { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  #nations .sec-head { position: static; width: auto; margin-bottom: var(--s4); }
  #nations .globe-stage { margin-left: 0; }
  .years li { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .years b, .years span { grid-column: 1; }
}

/* fixes after first capture */
.spread .verse-set::before, .spread .verse-set::after { content: none !important; }
.spread .verse-set em { background: none !important; box-shadow: none !important; text-decoration: none !important; padding: 0 !important; }
#nations .sec-head { grid-template-columns: 1fr !important; }
.spread .verse-set { text-indent: 0; }
.triad .you > span::after { content: none; }
.path li::before { content: none !important; }
.path li { gap: 0; }
.path li + li { border-top: 1px solid var(--rule); padding-top: 10px; }
.paths .path.leave { border-left: 1px solid var(--rule); }

/* ================= v7: one grid, trust first ================= */
/* One 12-column grid for every list. Column lines used everywhere:
   1 = labels/dates, 3 = titles, 9 = secondary, 11–12 = actions (right edge). */
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }

/* first visit */
.sunvisit { background: var(--sand); padding: var(--s6) var(--margin); border-bottom: 1px solid var(--rule); }
.sv-head { grid-column: 1 / span 4; display: grid; align-content: space-between; gap: var(--s4); }
.sv-who { font: 400 14.5px/1.8 var(--sans); color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: 14px; }
.sv-list { grid-column: 5 / span 8; border-top: 1px solid var(--ink); }
.sv-list > div { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.sv-list dt { grid-column: 1 / span 2; font: 500 13px/1.5 var(--sans); color: var(--ink-3); letter-spacing: .04em; }
.sv-list dd { grid-column: 3 / span 6; font: 400 clamp(18px, 1.45vw, 21px)/1.55 var(--serif); color: var(--ink); }
.sv-list dd b { font: 500 .92em/1 var(--sans); color: var(--blue); margin-right: 4px; }
.sv-list dd small { display: block; margin-top: 6px; font: 400 14.5px/1.6 var(--sans); color: var(--ink-2); }
.sv-list .sep { color: var(--ink-3); margin: 0 10px; }
.sv-act { grid-column: 5 / span 8; display: flex; gap: 32px; align-items: center; margin-top: var(--s4); }

/* sermon archive on the grid */
.archive-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.archive-head .h3 { grid-column: 1 / span 6; }
.archive li { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; column-gap: 24px; }
.archive .date { grid-column: 1 / span 2; }
.archive .title { grid-column: 3 / span 6; }
.archive .svc { grid-column: 9 / span 2; }
.archive .act { grid-column: 11 / span 2; }
.footnote { padding-left: calc((100% - 11 * 24px) / 12 * 2 + 48px); }

/* the week as a printed programme */
.wk-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.wk-head .h2 { grid-column: 1 / span 6; }
.wk-head .small { grid-column: 9 / span 4; text-align: left; }
.week7 { display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)) !important; column-gap: 24px; border-bottom: 0 !important; }
.week7 .pg.sun { grid-column: 1 / span 5; }
.week7 .pg.wkd { grid-column: 7 / span 6; }
.week7 h3 { font: 400 22px/1.3 var(--serif); padding-bottom: 12px; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
.week7 h3 span { font: 400 13px/1 var(--sans); color: var(--ink-3); }
.week7 ol { list-style: none; }
.week7 ol li { display: grid; grid-template-columns: auto 1fr auto 72px; align-items: baseline; column-gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--rule); font: 400 16px/1.4 var(--sans); }
.week7 .lead-dots { border-bottom: 1px dotted rgba(42,33,31,.28); transform: translateY(-4px); }
.week7 .w { font-size: 14px; color: var(--ink-2); }
.week7 ol li b { font: 400 21px/1 var(--serif); text-align: right; color: var(--ink); }
.week7 .pg.sun li.main .n { font-weight: 600; }
.week7 .pg.sun li.main b { color: var(--orange-ink); }
.week7 li.soon b::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); margin-right: 8px; vertical-align: middle; }

/* route + contacts on the same lines */
.contact { display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.contact > div:nth-child(1) { grid-column: 1 / span 3; }
.contact > div:nth-child(2) { grid-column: 4 / span 3; }
.contact > div:nth-child(3) { grid-column: 7 / span 4; }
.access { margin-top: var(--s4); }

@media (max-width: 900px) {
  .g12, .archive-head, .wk-head, .week7, .contact { grid-template-columns: 1fr !important; row-gap: 0; }
  .sv-head, .sv-list, .sv-act, .archive-head .h3, .wk-head .h2, .wk-head .small, .week7 .pg.sun, .week7 .pg.wkd, .contact > div { grid-column: 1 / -1 !important; }
  .sv-head { gap: 16px; margin-bottom: var(--s4); }
  .sv-list > div { grid-template-columns: 72px 1fr; padding: 16px 0; }
  .sv-list dt { grid-column: 1; } .sv-list dd { grid-column: 2; font-size: 17px; }
  .sv-list .sep { margin: 0 6px; }
  .sv-act { flex-direction: column; align-items: stretch; gap: 16px; text-align: center; }
  .sv-act .btn { justify-content: center; }
  .week7 .pg.wkd { margin-top: var(--s4); }
  .week7 ol li { grid-template-columns: auto 1fr auto 56px; font-size: 15px; }
  .archive li { grid-template-columns: 1fr auto !important; }
  .archive .date, .archive .title { grid-column: 1 / -1; } .archive .svc { grid-column: 1; } .archive .act { grid-column: 2; }
  .footnote { padding-left: 0; }
  .contact { row-gap: 16px; }
}
.sv-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.sv-photo figcaption { margin-top: 8px; font: 400 12.5px/1.5 var(--sans); color: var(--ink-3); }
.wk-head .small { grid-column: 7 / span 6; }
.week7 ol li b { white-space: nowrap; }
@media (max-width: 900px) { .week7 ol li { grid-template-columns: auto 1fr auto 64px; } .sv-photo { margin: 8px 0 0; } }
.sv-list .pair { white-space: nowrap; }
@media (min-width: 901px) { .sv-head { grid-row: 1 / span 2; } .sv-list { grid-row: 1; } .sv-act { grid-row: 2; align-self: start; } }
@media (max-width: 900px) { .sv-list .sep { display: none; } .sv-list .pair { display: block; } }

/* map stops: numbered, one style; the church label is the only orange one */
.m3-label.stop { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: #fff; color: var(--ink);
  font: 500 13px/1.2 var(--sans); border-radius: 999px; box-shadow: 0 1px 2px rgba(11,36,71,.18), 0 6px 18px rgba(11,36,71,.12); white-space: nowrap; transform: translateY(-14px); }
.m3-label.stop i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; font: 600 12px/1 var(--sans); }
.m3-label.stop b { font-weight: 700; }
.m3-label.stop.church { background: var(--night); color: #fff; transform: translateY(-96px); }
.m3-label.stop.church i { background: var(--orange); color: var(--night); }
.m3-label.stop.church { font: 500 13px/1.2 var(--sans); }
.m3-label.stop.church b { color: #FFC27A; font-family: var(--sans); margin-right: 4px; }
.m3-label.stop b { margin-right: 2px; }

/* ===== our own 3D model map ===== */
.map3d-canvas { position: relative; overflow: hidden; cursor: grab; }
.map3d-canvas:active { cursor: grabbing; }
.m3d-pin { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; will-change: transform; }
.m3d-pin::before { content: ""; position: absolute; left: -0.5px; bottom: 0; width: 1px; height: 28px; background: rgba(11,36,71,.55); }
.m3d-pin::after { content: ""; position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--night); box-shadow: 0 0 0 2px #fff; }
.m3d-label { position: absolute; left: 0; bottom: 28px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  background: #fff; color: var(--ink); font: 500 13px/1.2 var(--sans); border-radius: 999px; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(11,36,71,.16), 0 8px 20px rgba(11,36,71,.10); }
.m3d-label i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; font: 600 12px/1 var(--sans); }
.m3d-label b { font-weight: 700; margin-right: 2px; }
.m3d-pin.church .m3d-label { background: var(--night); color: #fff; }
.m3d-pin.church .m3d-label i { background: var(--orange); color: var(--night); }
.m3d-pin.church .m3d-label b { color: #FFC27A; }
.m3d-pin.church::after { background: var(--orange); }
.m3d-pin.s2::before { height: 64px; } .m3d-pin.s2 .m3d-label { bottom: 64px; }
.m3d-pin.church::before { height: 44px; } .m3d-pin.church .m3d-label { bottom: 44px; }
.m3d-pin.s1 .m3d-label { transform: translateX(calc(-100% + 14px)); }
.m3d-pin.s2 .m3d-label { transform: translateX(-14px); }
.m3d-label em { font-style: normal; font-weight: 400; opacity: .78; margin-left: 4px; }
@media (max-width: 520px) { .m3d-label em { display: none; } .m3d-label { font-size: 12.5px; padding-right: 10px; } }

/* ================= component system (research/REFERENCES-SYSTEM.md) ================= */
/* Focus: blue ring everywhere (orange fails 3:1 on sand) */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .hero :focus-visible { outline-color: #fff; }

/* Primary button: one per view. Orange fill, night label (5.8:1), 52px, press and focus states */
.btn { color: var(--night); background: var(--orange); height: 52px; padding: 0 26px; font: 600 16px/1 var(--sans); letter-spacing: -.01em;
  transition: background-color .18s ease, transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .18s ease; box-shadow: 0 1px 0 rgba(11,36,71,.18); }
.btn:hover { background: #F7931C; transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(239,131,6,.55); }
.btn:active { transform: translateY(0) scale(.98); background: #E07A04; box-shadow: none; }
.btn::after { content: "→"; font-weight: 500; transition: transform .2s ease; }
.btn:hover::after { transform: translateX(3px); }
/* the header keeps the same action, but as a quiet outline so the hero owns the one filled button */
.header .btn { background: transparent; color: var(--night); box-shadow: inset 0 0 0 1px rgba(11,36,71,.35); height: 44px; padding: 0 20px; font-size: 15px; }
.header .btn:hover { background: var(--night); color: #fff; box-shadow: none; transform: none; }
.header .btn::after { content: none; }

/* Text links: 1px underline that thickens on hover; arrow nudges */
.link { min-height: 44px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .32em; text-decoration-color: rgba(0,58,143,.35);
  transition: text-decoration-color .2s ease; }
.link:hover { text-decoration-color: currentColor; }
.on-dark .link { text-decoration-color: rgba(255,255,255,.4); }

/* Cards: fixed ratios, clipped photo zoom 1.03 over 400ms, no lift; caption order kicker → title */
.story { gap: 12px; }
.story img { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.story:hover img, .story:focus-visible img { transform: scale(1.03); }
.s1 { --ar: 4/5; }
.s2, .s3, .s4, .s5 { --ar: 3/2; }
.s3 { margin-top: 0; }
.story:focus-visible { outline-offset: 6px; }
.rail-ui { display: none; }

/* Archive rows: whole row responds */
.archive li { transition: background-color .2s ease; }
.archive li:hover .title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }

/* Scroll reveal: 24px + opacity, ease-out; CSS scroll timeline where supported, JS observer elsewhere */
.reveal { transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html.js:not(.static) .reveal { opacity: 1; transform: none; transition: none; animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  }
}
/* global reduced-motion safety net */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Phone: the photo stories become one swipe row (snap, 18% peek, counter + rail) */
@media (max-width: 900px) {
  .stories { display: grid !important; grid-auto-flow: column; grid-template-columns: none !important; grid-auto-columns: 78%; gap: 14px !important;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--margin); padding-inline: var(--margin); margin-inline: calc(-1 * var(--margin));
    scrollbar-width: none; overscroll-behavior-x: contain; }
  .stories::-webkit-scrollbar { display: none; }
  .stories .story { grid-column: auto !important; grid-row: auto !important; scroll-snap-align: start; margin: 0 !important; }
  .stories .story img { aspect-ratio: 4/5 !important; }
  .rail-ui { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
  .rail-count { font: 500 13px/1 var(--sans); color: var(--ink-3); min-width: 56px; }
  .rail-count b { color: var(--ink); font-weight: 600; }
  .rail-track { flex: 1; height: 2px; background: var(--rule); overflow: hidden; }
  .rail-track i { display: block; height: 100%; background: var(--night); transform-origin: left; transform: scaleX(.2); transition: transform .25s ease; }
}
