/* Hillview Wesleyan Church: site styles. Plain CSS, no build step. */
@font-face {
  font-family: "Didact Gothic";
  src: url("/fonts/didact-gothic-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Didact Gothic";
  src: url("/fonts/didact-gothic-latin-ext-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --green: #11b500;       /* logo green */
  --green-dark: #0d7813;  /* calendar green, also hover */
  --navy: #34587c;        /* old site button text */
  --ink: #1d2b38;
  --muted: #5b6875;
  --paper: #f5f7f4;
  --white: #fff;
  --wrap: 1140px;
  --font: "Didact Gothic", "Century Gothic", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.7; color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); }
h1, h2, h3 { font-weight: 400; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .02em; }
h2 { font-size: clamp(30px, 4vw, 44px); }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border: 0; border-radius: 2px; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-green { background: var(--green-dark); color: var(--white); }  /* darker green: 5.7:1 contrast with white text */
.btn-green:hover { background: #0a5f0f; }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: #e9f6e6; }
.play { width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.phone { width: 16px; height: 16px; background: currentColor; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2z"/></svg>') center/contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2z"/></svg>') center/contain no-repeat; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .25s, box-shadow .25s; }
.site-header.scrolled, .site-header.open { background: rgba(22, 34, 45, .96); box-shadow: 0 2px 16px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand img { width: 170px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { color: var(--white); text-decoration: none; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; }
.site-nav a:hover { color: #b8f5ad; }
.site-nav .nav-cta { background: var(--green-dark); padding: 9px 18px; border-radius: 2px; }
.site-nav .nav-cta:hover { background: #0a5f0f; color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; padding: 12px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 26px; height: 2px; background: var(--white); position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -8px; } .bars::after { top: 8px; }
.open .bars { background: transparent; }
.open .bars::before { transform: translateY(8px) rotate(45deg); }
.open .bars::after { transform: translateY(-8px) rotate(-45deg); }

/* Photo backgrounds */
.hero, .band { position: relative; color: var(--white); isolation: isolate; overflow: hidden; }
.bg, .bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after, .band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,20,28,.62), rgba(10,20,28,.45) 55%, rgba(10,20,28,.6)); }

/* Hero */
.hero { display: grid; place-items: center; text-align: center; }
.eyebrow { font-size: 15px; letter-spacing: .3em; text-transform: uppercase; color: #b8f5ad; margin: 0 0 18px; }
.hero h1 { font-size: clamp(34px, 6vw, 64px); letter-spacing: .08em; max-width: 15em; margin: 0 auto 22px; }
.hero-meta { font-size: clamp(17px, 2vw, 21px); margin: 0 0 36px; }
.hero-meta a { color: var(--white); text-decoration-color: rgba(255,255,255,.45); text-underline-offset: 5px; }
.hero-meta strong { font-weight: 400; color: #b8f5ad; white-space: nowrap; }
.dot { margin: 0 12px; opacity: .6; }

/* About */
.about { padding: 96px 0 80px; text-align: center; background: var(--paper); }
.about .lead { font-size: 22px; }
.about p { color: #34414d; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 52px; }
.fact { background: var(--white); padding: 28px 20px; border-top: 4px solid var(--green); box-shadow: 0 6px 24px rgba(29,43,56,.07); display: flex; flex-direction: column; gap: 6px; }
.fact-label { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.fact-value { font-size: 22px; line-height: 1.4; color: var(--ink); text-decoration: none; }
a.fact-value:hover { color: var(--green-dark); }
.social { list-style: none; display: flex; justify-content: center; gap: 14px; margin: 44px 0 0; padding: 0; }
.social a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: var(--white); transition: background .2s; }
.social a:hover { background: var(--green-dark); }
.social svg { width: 22px; height: 22px; fill: currentColor; }

/* Calendar */
.calendar { padding: 90px 0; text-align: center; }
.cal-frame { position: relative; height: 640px; background: var(--paper); border: 1px solid #e1e6dd; }
.cal-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.cal-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); }

/* Bands */
.band { padding: clamp(90px, 12vw, 150px) 0; text-align: center; }
.band p { font-size: 20px; max-width: 34em; margin: 0 auto 30px; }

/* Contact */
.contact { text-align: left; }
.contact::after { background: linear-gradient(120deg, rgba(10,20,28,.78), rgba(13,120,19,.55)); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.contact-intro p { margin: 0 0 30px; max-width: 24em; }
.contact-form { background: var(--white); color: var(--ink); padding: 34px; border-radius: 4px; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; color: var(--muted); }
.opt { text-transform: none; letter-spacing: 0; }
.field input, .field textarea { width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; border: 1px solid #cfd6cb; border-radius: 3px; background: #fbfcfa; color: var(--ink); }
.field input:focus, .field textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(17,181,0,.2); }
.field.invalid input, .field.invalid textarea { border-color: #c0392b; }
.cf-turnstile { margin: 8px 0 18px; min-height: 65px; }
.form-status { margin: 14px 0 0; font-size: 16px; }
.form-status.ok { color: var(--green-dark); }
.form-status.err { color: #b03a2e; }
.contact-form.sent .field, .contact-form.sent .cf-turnstile, .contact-form.sent button { display: none; }
.contact-form.sent .form-status { font-size: 20px; text-align: center; padding: 30px 0; }

/* Footer */
.site-footer { background: #16222d; color: #c9d2da; padding: 44px 0; font-size: 16px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-info p { margin: 0; }
.site-footer a { color: #c9d2da; }
.site-footer a:hover { color: #b8f5ad; }
.copy { margin: 0; font-size: 14px; opacity: .75; }

/* Small screens */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 84px; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(22,34,45,.98); padding: 8px 0 18px; display: none; }
  .open .site-nav { display: flex; }
  .site-nav a { padding: 14px 20px; width: 100%; text-align: center; }
  .site-nav .nav-cta { width: auto; margin-top: 8px; }
  .facts { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .contact-intro { text-align: center; }
  .contact-intro p { margin-inline: auto; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .brand img { width: 140px; }
  .btn { padding: 13px 22px; font-size: 14px; }
  .buttons .btn { width: 100%; justify-content: center; }
  .dot { display: block; height: 0; overflow: hidden; margin: 0; }
  .cal-frame { height: 520px; }
  .contact-form { padding: 24px 20px; }
  .about .lead { font-size: 20px; }
}
.nw { white-space: nowrap; }

/* ---------- Multi-page additions ---------- */
.center { text-align: center; }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: #26425e; }
.site-nav a[aria-current="page"] { color: #b8f5ad; box-shadow: inset 0 -2px 0 #b8f5ad; }

/* Inner page header */
.page-hero { position: relative; color: var(--white); isolation: isolate; overflow: hidden; display: grid; place-items: center; text-align: center; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,20,28,.72), rgba(10,20,28,.5)); }
.page-hero h1 { font-size: clamp(36px, 5.5vw, 58px); letter-spacing: .06em; margin: 0; }
.page-sub { font-size: clamp(17px, 2vw, 21px); color: #b8f5ad; margin: 12px auto 0; max-width: 34em; }

/* Home cards */
.cards-section { padding: 0 0 90px; background: var(--paper); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 34px 28px; background: var(--navy); color: var(--white); text-decoration: none; border-radius: 3px; transition: transform .2s, background .2s; }
.card:hover { transform: translateY(-3px); background: #26425e; }
.card-kicker { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: #b8f5ad; }
.card-title { font-size: 27px; line-height: 1.25; }
.card-more { margin-top: 10px; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; }
.card-more::after { content: " \2192"; }
.about .lead + p .btn { margin-top: 6px; }
.about-buttons { margin-top: 36px; }

/* Calendar page */
.calendar { padding: 64px 0 80px; }
.cal-note { margin: 22px 0 0; color: var(--muted); }

/* Give page */
.give-section { padding: 80px 0 90px; }
.give-section h2 { text-align: center; }
.give-section .lead { font-size: 21px; margin: 0 0 26px; }
.app-guide { margin-top: 80px; padding-top: 70px; border-top: 1px solid #e1e6dd; max-width: 960px; }
.app-guide p { max-width: 40em; margin: 0 auto 30px; }
.app-img { display: block; border: 1px solid #e1e6dd; box-shadow: 0 10px 34px rgba(29,43,56,.1); }

/* Contact page */
.contact-section { padding: 80px 0 90px; background: var(--paper); }
.contact-section .contact-intro p { color: #34414d; }
.contact-section .contact-form { box-shadow: 0 10px 34px rgba(29,43,56,.12); }
.contact-address a { color: var(--ink); }
.contact-address { margin-top: 28px !important; }

/* Footer nav */
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { text-decoration: none; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .site-nav a[aria-current="page"] { box-shadow: none; }
}

/* Every page's header photo is the same height (home and inner pages). */
.hero, .page-hero { min-height: clamp(460px, 62vh, 580px); padding: 110px 0 50px; }
@media (max-width: 520px) { .hero, .page-hero { min-height: 580px; padding: 100px 0 40px; } }

/* Soft fade between pages (browsers that support cross-page view transitions;
   others just change page as normal). The header stays put while the page fades. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: ease; }
.site-header { view-transition-name: site-header; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* Contact page map (small, under the phone and address) */
.map-small { display: block; width: 100%; max-width: 420px; height: 230px; margin-top: 24px; border: 1px solid #dde3d9; border-radius: 4px; box-shadow: 0 6px 20px rgba(29,43,56,.08); }
@media (max-width: 860px) { .map-small { margin-inline: auto; } }

/* Contact page: "Send Us a Message" lines up with the top of the form, and the map
   grows to fill the rest of the column so it lines up with the bottom of the form. */
@media (min-width: 861px) {
  .contact-section .contact-grid { align-items: stretch; }
  .contact-section .contact-intro { display: flex; flex-direction: column; align-items: flex-start; }
  .contact-section .contact-intro h2 { margin-top: -0.2em; }
  .contact-section .map-small { flex: 1 1 auto; min-height: 230px; height: auto; max-width: none; }
}

/* Phone-only strip under the home photo (address, service time, buttons). Hidden on
   larger screens, where the same things sit inside the photo. */
.hero-info { display: none; }

/* Phones: every header photo is about half the desktop height (300px). On the home
   page the address, service time and buttons move out of the photo into the
   .hero-info strip just below it. */
@media (max-width: 520px) {
  .hero, .page-hero { min-height: 300px; padding: 92px 0 24px; }
  .page-hero h1 { font-size: 30px; }
  .page-sub { font-size: 15px; margin-top: 8px; }
  .eyebrow { font-size: 12px; letter-spacing: .22em; margin-bottom: 10px; }
  .hero h1 { font-size: 28px; letter-spacing: .05em; margin-bottom: 0; }
  .hero .hero-meta, .hero .buttons { display: none; }
  .hero-info { display: block; background: #16222d; color: var(--white); text-align: center; padding: 22px 0 26px; }
  .hero-info .hero-meta { font-size: 15px; line-height: 1.6; margin: 0 0 18px; }
  .hero-info .hero-meta a { color: var(--white); text-decoration-color: rgba(255,255,255,.45); text-underline-offset: 4px; }
  .hero-info .hero-meta strong { font-weight: 400; color: #b8f5ad; }
  .hero-info .buttons { flex-wrap: nowrap; gap: 10px; }
  .hero-info .buttons .btn { width: auto; flex: 1 1 0; justify-content: center; padding: 12px 8px; font-size: 12px; letter-spacing: .1em; }
}

/* Safari on iPhone colours the areas above and below the page (status bar, toolbar,
   bounce) from the body background, so the body is the dark footer colour and the
   page content itself is white. */
html, body { background: #16222d; }
main { display: block; background: var(--white); }
.site-footer { padding-bottom: calc(44px + env(safe-area-inset-bottom)); }

/* ---------- Light / dark pill in the footer (like millhallfire.com) ---------- */
.footer-legal { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-top: 1px solid #2a3a48; padding-top: 20px; margin-top: 4px; }
@media (max-width: 860px) { .footer-legal { justify-content: center; } }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 2px solid #2f4254; border-radius: 999px; background: transparent; color: #c9d2da; font: inherit; font-size: 14px; line-height: 1.5; cursor: pointer; transition: border-color .2s, color .2s; }
.theme-toggle:hover { border-color: #5b7389; color: var(--white); }
.theme-toggle svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

/* ---------- Dark mode ----------
   Set by js/theme.js (device setting, or the visitor's choice from the button).
   Photos, the header, the footer and the green buttons stay the same; the white and
   light grey areas turn dark. Google's calendar and map stay light (Google draws them). */
html.dark { color-scheme: dark; }
html.dark main { background: #10181f; }
html.dark body { color: #e4eaef; }
html.dark main p:not(.hero-meta) a:not(.btn), html.dark .contact-address a:hover { color: #5ad648; }
html.dark h1, html.dark h2, html.dark h3 { color: #f2f5f7; }
html.dark .hero h1, html.dark .page-hero h1 { color: var(--white); }
html.dark .about, html.dark .cards-section, html.dark .contact-section { background: #131e27; }
html.dark .about p, html.dark .contact-section .contact-intro p, html.dark .app-guide p, html.dark .give-section .lead { color: #c3ced7; }
html.dark .fact { background: #1b2833; box-shadow: none; }
html.dark .fact-label { color: #9fb0bf; }
html.dark .fact-value, html.dark .contact-address a { color: #e4eaef; }
html.dark a.fact-value:hover { color: #5ad648; }
html.dark .social a { background: #2b4a69; color: var(--white); }
html.dark .card { background: #22384f; }
html.dark .card:hover { background: #2b4a69; }
html.dark .cal-frame { background: #131e27; border-color: #2a3a48; }
html.dark .cal-loading, html.dark .cal-note { color: #9fb0bf; }
html.dark .app-guide { border-top-color: #2a3a48; }
html.dark .contact-form { background: #1b2833; color: #e4eaef; box-shadow: none; border: 1px solid #2a3a48; }
html.dark .field label { color: #9fb0bf; }
html.dark .field input, html.dark .field textarea { background: #10181f; border-color: #33475a; color: #e4eaef; }
html.dark .form-status.ok { color: #5ad648; }
html.dark .form-status.err { color: #ff8a7a; }
html.dark .map-small { border-color: #2a3a48; box-shadow: none; }
html.dark .btn-white { background: #e4eaef; color: #1d2b38; }
html.dark .btn-white:hover { background: #ffffff; }
html.dark .btn-navy { background: #2b4a69; color: var(--white); }
html.dark .btn-navy:hover { background: #355a80; }
html.dark .site-footer { background: #0c141b; }
html.dark, html.dark body { background: #0c141b; }
html.dark .skip { background: #1b2833; color: #e4eaef; }
