/*
Theme Name: Where Fear Meets Faith
Theme URI: https://wherefearmeetsfaith.com
Author: Alfred Martinez
Description: Custom theme for Tina Calderone-Roth's memoir Where Fear Meets Faith. Generated from the verified static build by build_theme.py.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: Proprietary
Text Domain: wfmf
*/
/* ============================================================
   WHERE FEAR MEETS FAITH — shared theme (Tidewater system)
   WP migration: this file becomes the theme stylesheet;
   nav.html/footer.html become header.php/footer.php.
   Perf rules baked in: no large backdrop-filters, height:auto
   on imgs, content-visibility on sections, single rAF loop.
   ============================================================ */
:root{
  --deep:#0B3D3A;      /* turquoise-shifted, was #062B33 navy */
  --bar:#15665F;     /* the bar colour: header AND footer share it. Both are
                        solid so the computed contrast ratios are exact. */
  --ink:#072B2A;       /* turquoise-shifted, was #08191E */
  --foam:#F2F7F6;
  --page:#FBF9F4;
  --paper:#FFFFFF;
  --body:#0E2830;
  --muted:#3D5A62;
  --line:#E3DCCF;        /* decorative card borders */
  --field:#7C8884;       /* form-field boundary, WCAG 1.4.11 >=3:1 */
  --teal:#2FA39C;
  --teal-lit:#7FD8D0;
  --teal-deep:#15665F;
  --teal-wash:#E4F0EE;
  --gold:#E3B863;
  --gold-text:#7A5716;
  --plum:#6B4E9E;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --shadow:0 14px 34px -18px rgba(4,30,38,.35);
  --maxw:1120px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--page);color:var(--body);font-family:var(--sans);
  font-size:18px;line-height:1.7;overflow-x:hidden}
img{max-width:100%;height:auto;display:block}
h1,h2,h3{font-family:var(--serif);font-weight:600;line-height:1.12;margin:0;text-wrap:balance}
p{margin:0}
a{color:var(--teal-deep)}
.wrap{max-width:min(var(--maxw),100%);margin-inline:auto;padding-inline:24px}
.eyebrow{font-size:0.875rem;letter-spacing:.18em;text-transform:uppercase;font-weight:700;color:var(--teal-deep)}
.dim{color:var(--muted)}
#main:focus{outline:none}
:focus-visible{outline:3px solid #279089;outline-offset:3px;border-radius:4px}
/* the ring sits on the section behind the control; on the teal band #279089 is 1.73:1 */
.band :focus-visible{outline-color:#7FD8D0}
.skip{position:absolute;left:-9999px;background:var(--teal-deep);color:#fff;padding:12px 18px;z-index:99}
.skip:focus{left:12px;top:12px}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;text-align:center;gap:9px;border-radius:999px;min-height:44px;
  padding:14px 26px;font-weight:650;font-size:.98rem;text-decoration:none;border:1.5px solid transparent;
  cursor:pointer;font-family:var(--sans);transition:transform .18s cubic-bezier(.2,.9,.3,1.2),background .18s}
.btn:hover{transform:translateY(-2px)}
.btn-solid{background:var(--teal-deep);color:#fff}
.btn-solid:hover{background:#1A7A72}
.btn-line{border-color:var(--teal-deep);color:var(--teal-deep)}
.btn-line:hover{background:var(--teal-wash)}
/* nav variant forces color:#fff inline; teal-wash under white text was 1.1:1 */
#topnav .btn-line:hover{background:rgba(255,255,255,.14);color:#fff}
/* #279089 ring is only 1.76:1 on the turquoise nav */
#topnav :focus-visible{outline-color:#EAF6F4}
.btn-foam{background:var(--foam);color:var(--deep);box-shadow:0 10px 26px -10px rgba(3,20,25,.5)}

/* ============ NAV (always visible on inner pages) ============ */
#topnav{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:22px;
  padding:11px 22px;background:var(--bar);border-bottom:1px solid rgba(127,216,208,.22)}
#topnav .brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;
  font-family:var(--serif);font-size:1.32rem;letter-spacing:.02em;margin-right:auto}
#topnav a.nl{color:#DCEDEB;text-decoration:none;font-size:.9rem;padding:4px 2px;border-bottom:2px solid transparent}
#topnav a.nl:hover{border-bottom-color:var(--teal-lit);color:#fff}
#topnav a.nl[aria-current]{border-bottom-color:var(--teal-lit);color:#fff}
#topnav .btn{padding:9px 18px;font-size:0.875rem}
@media (max-width:1180px){#topnav a.nl{display:none}}
/* ---------- mobile / tablet menu ---------- */
.navtoggle{display:none;align-items:center;justify-content:center;width:44px;height:44px;
  flex-shrink:0;background:transparent;border:1px solid rgba(255,255,255,.42);border-radius:10px;
  cursor:pointer;padding:0}
.navtoggle span{display:block;width:19px;height:2px;background:#fff;border-radius:2px;position:relative;
  transition:background .2s}
.navtoggle span::before,.navtoggle span::after{content:"";position:absolute;left:0;width:19px;height:2px;
  background:#fff;border-radius:2px;transition:transform .25s ease,top .25s ease}
.navtoggle span::before{top:-6px}.navtoggle span::after{top:6px}
.navtoggle[aria-expanded="true"] span{background:transparent}
.navtoggle[aria-expanded="true"] span::before{top:0;transform:rotate(45deg)}
.navtoggle[aria-expanded="true"] span::after{top:0;transform:rotate(-45deg)}
#navpanel{position:fixed;inset:0 0 auto 0;z-index:60;background:rgba(5,34,41,.985);
  padding:82px 22px 26px;display:none;flex-direction:column;gap:2px;
  border-bottom:1px solid rgba(127,216,208,.24);max-height:100svh;overflow-y:auto}
#navpanel.open{display:flex}
.navclose{position:absolute;top:18px;right:18px;width:44px;height:44px;padding:0;cursor:pointer;
  background:transparent;border:1px solid rgba(255,255,255,.42);border-radius:10px;
  display:flex;align-items:center;justify-content:center}
.navclose span{display:block;width:19px;height:2px;background:transparent;position:relative}
.navclose span::before,.navclose span::after{content:"";position:absolute;left:0;top:0;
  width:19px;height:2px;background:#fff;border-radius:2px}
.navclose span::before{transform:rotate(45deg)}
.navclose span::after{transform:rotate(-45deg)}
/* scope to DIRECT children: an id selector here would otherwise override the
   cloned buttons' own colours and paint white text on the white pill */
#navpanel>a{color:#EAF6F4;text-decoration:none;font-family:var(--serif);font-size:1.24rem;
  padding:15px 6px;border-bottom:1px solid rgba(255,255,255,.10)}
#navpanel>a:last-of-type{border-bottom:0}
#navpanel>a[aria-current]{color:#7FD8D0}
#navpanel .pbtns{display:flex;flex-direction:column;gap:10px;margin-top:18px}
#navpanel .pbtns .btn{width:100%;padding:14px 18px;font-size:.98rem}
@media (max-width:1180px){.navtoggle{display:inline-flex}}
@media (min-width:1181px){#navpanel{display:none!important}}

@media (max-width:560px){#topnav{gap:10px}
  #topnav .btn-line{display:none}
  #topnav .brand{white-space:nowrap;font-size:1.22rem;line-height:1.15}
  #topnav .btn{white-space:nowrap;padding:8px 14px;font-size:0.875rem}}
@media (max-width:470px){#topnav .brand{white-space:normal;font-size:1.1rem;line-height:1.16}}





/* The badge belongs to the SOLID bar only. #topnav (sticky / slide-in) gets the
   turquoise oval bulging below its edge; #heronav sits on artwork with no bar to
   hang from, so it shows the bare logo. */
#topnav{overflow:visible}
#topnav .brand .markwrap{
  display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;
  background:#15665F;border-radius:50%;padding:4px 6px;
  margin-top:-6px;margin-bottom:-24px;position:relative;z-index:2;
  box-shadow:0 10px 22px -12px rgba(3,26,24,.55)}
#topnav .brand .mark{height:62px;width:auto;display:block}
@media (max-width:820px){
  #topnav .brand .markwrap{padding:3px 5px;margin-top:-5px;margin-bottom:-19px}
  #topnav .brand .mark{height:50px}}
@media (max-width:470px){
  #topnav .brand .markwrap{padding:3px 4px;margin-top:-4px;margin-bottom:-15px}
  #topnav .brand .mark{height:42px}}

@media (max-width:760px){
  /* the badge carries the name; keeping the text here forces the BUTTONS to wrap */
  #topnav .brand span,#heronav .brand span{display:none}}

@media (max-width:760px){
  /* below here the bar is taller than the badge (buttons + toggle drive its height),
     so the overhang cannot read - centre it instead of faking a bulge */
  #topnav .brand .markwrap{margin-top:0;margin-bottom:0}}

/* the wordmark must not wrap - a 2-line brand inflates the bar and leaves the
   badge floating. It is hidden below 520px anyway. */
#topnav .brand span,#heronav .brand span{white-space:nowrap}

/* ============ PAGE HERO (band) ============ */
.pagehero{position:relative;isolation:isolate;color:#fff;overflow:hidden;
  background:linear-gradient(115deg,var(--ink) 30%,var(--deep) 70%)}
.pagehero .art{position:absolute;inset:0;left:34%;background-size:cover;background-position:center;
  opacity:.55;-webkit-mask-image:linear-gradient(90deg,transparent,#000 46%);
  mask-image:linear-gradient(90deg,transparent,#000 46%)}
.pagehero .wrap{position:relative;padding-block:clamp(56px,9vw,104px)}
.pagehero .eyebrow{color:var(--teal-lit)}
.pagehero h1{font-size:clamp(2.3rem,5.4vw,3.9rem);margin-top:14px;max-width:16ch;
  text-shadow:0 2px 24px rgba(4,26,32,.6)}
.pagehero .lede{margin-top:16px;max-width:52ch;color:#DCEDEB;font-size:1.05rem;
  text-shadow:0 1px 12px rgba(4,26,32,.7)}
.pagehero .cta{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}

/* ============ SECTIONS ============ */
section{padding-block:clamp(44px,5.6vw,76px);position:relative}
main section{content-visibility:auto;contain-intrinsic-size:auto 560px}
h2.sec{font-size:clamp(1.7rem,3.2vw,2.5rem);margin-top:10px}
.reveal{opacity:0;transform:translateY(22px);transition:opacity .8s cubic-bezier(.2,.7,.3,1),transform .8s cubic-bezier(.2,.7,.3,1)}
.reveal.in{opacity:1;transform:none}

/* cards & panels */
.panel{background:var(--paper);border:1px solid var(--line);border-radius:18px;
  box-shadow:var(--shadow);padding:clamp(24px,3.2vw,40px)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:clamp(22px,3.6vw,48px);align-items:center}
.grid2 img{border-radius:12px;box-shadow:var(--shadow)}
.quote{font-family:var(--serif);font-size:1.18rem;line-height:1.55;border-left:3px solid var(--teal);
  padding-left:18px;margin-top:16px}
.sig{font-family:var(--serif);font-style:italic;color:var(--teal-deep);margin-top:12px}

/* teal quote band */
.band{background:var(--teal-deep);color:#fff;text-align:center;padding-block:clamp(48px,7vw,84px)}
.band blockquote{margin:0;font-family:var(--serif);font-size:clamp(1.45rem,3.2vw,2.3rem);
  line-height:1.35;max-width:22ch;margin-inline:auto;text-wrap:balance}
.band cite{display:block;font-style:normal;margin-top:18px;font-size:0.875rem;
  letter-spacing:.26em;text-transform:uppercase;color:#E7F1F0}

/* chips */
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.chip{border:1px solid var(--line);background:var(--paper);border-radius:999px;
  padding:7px 14px;font-size:0.875rem;color:var(--muted)}

/* forms */
label{display:block;font-size:.9rem;font-weight:650;margin-bottom:6px}
input,textarea,select{width:100%;padding:13px 15px;border-radius:10px;border:1.5px solid var(--field);
  background:var(--paper);color:var(--body);font:inherit;font-size:1rem}
input:focus,textarea:focus,select:focus{border-color:var(--teal)}
textarea{min-height:150px;resize:vertical}
form.lead{display:flex;flex-direction:column;gap:14px}
.consent{font-size:0.875rem;color:var(--muted)}
.ok{display:none;background:var(--teal-wash);border:1px solid var(--teal);border-radius:10px;
  padding:16px 18px;font-weight:650;color:var(--teal-deep)}
.check{display:flex;gap:10px;align-items:flex-start;font-size:.9rem;color:var(--muted)}
.check input{width:auto;margin-top:4px}

/* footer */
/* footer brand lockup: the logo reads on the footer because the footer now wears
   the header colour, and the oval carries its own light fill. */
.fmark{height:72px;width:auto;display:block;margin-bottom:12px}
@media (max-width:820px){.fmark{height:62px}}
@media (max-width:560px){.fmark{height:56px}}
footer.site{background:var(--bar);color:#CFE7E5;padding-block:52px 26px;margin-top:24px}
footer.site h2{font-size:.875rem;letter-spacing:.14em;text-transform:uppercase;color:#C3DAD9;
  margin:0 0 12px;font-family:var(--sans)}
footer.site a{color:#EAF6F4;text-decoration:none;display:block;padding:4px 0;font-size:.92rem}
footer.site a:hover{text-decoration:underline}
.fgrid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1.1fr;gap:32px}
.ftag{font-family:var(--serif);font-style:italic;color:#fff;font-size:1.02rem;margin-top:12px;max-width:24ch}
.give{border:1px solid rgba(255,255,255,.21);border-radius:10px;padding:12px 15px;font-size:.875rem;margin-top:16px}
.fform{display:flex;margin-top:12px}
/* `form.lead` (0-1-1) already out-specified a bare `.fform` (0-1-0), so the row
   layout here never actually applied on inner pages while the homepage still used
   it - the two footers disagreed. Stacking is the better layout in this narrow
   column: the input gets full width and the button clears 44x44. 0-2-1 wins. */
form.lead.fform{flex-direction:column;align-items:stretch;gap:10px}
form.lead.fform button{width:100%;min-height:44px}

.fform input{flex:1;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.52);color:#fff;font-size:16px}
.fform input::placeholder{color:#C3DAD9}
.fform button{white-space:nowrap;padding:11px 16px;font-size:.9rem}
.fok{display:none;margin-top:12px;font-size:.9rem;color:#9EE1DB;font-weight:650}
.fbase{border-top:1px solid rgba(255,255,255,.18);margin-top:40px;padding-top:20px;
  display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;font-size:.875rem;color:#C5D9D9;align-items:center}
/* must out-specify `footer.site a{display:block}` (0-1-2) or the legal links stack.
   A bare `.fbase a` (0-1-1) LOSES - this regressed once already. */
footer.site .fbase a{display:inline;padding:0;border-bottom:1px solid rgba(255,255,255,.38)}
footer.site .fbase span{display:inline-block}
footer.site .fbase{flex-wrap:wrap}

@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
  .reveal{opacity:1;transform:none}
  html{scroll-behavior:auto}
}
@media (max-width:900px){
  .grid2{grid-template-columns:1fr}
  .fgrid{grid-template-columns:1fr 1fr}
}
@media (max-width:560px){
  body{font-size:17px}
  .fgrid{grid-template-columns:1fr}
}

