/*
Theme Name: Marriage Resource Center
Theme URI: https://marriageresourcecenter.org/
Description: Editorial one-page theme for a marriage and wedding-planning guide. Full-width sunset hero photo, sticky section navigation, and a single-column reading area.
Author: Marriage Resource Center
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marriage-resource-center
Tags: one-column, custom-menu, editor-style, full-width-template
*/

:root{
  --navy:#141c33;
  --navy-deep:#0b1020;
  --ivory:#f8f1e4;
  --champagne:#e3c88f;
  --champagne-dark:#cfae6b;
  --lavender:#f1ecf8;
  --lavender-deep:#e6def2;
  --burgundy:#8a1538;
  --ink:#241f2b;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --admin-offset:0px;
  --header-h:58px;
  --nav-h:74px;
}

*,*::before,*::after{box-sizing:border-box;}

html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto;}
}

body{
  margin:0;
  background:var(--lavender);
  color:var(--ink);
  font-family:var(--sans);
  font-size:1.0625rem;
  line-height:1.7;
  overflow-x:hidden;
}

img{max-width:100%;}

a{color:var(--burgundy);}

:focus-visible{
  outline:3px solid var(--burgundy);
  outline-offset:3px;
  border-radius:2px;
}

.skip-link{
  position:absolute;
  left:50%;
  top:-100px;
  transform:translateX(-50%);
  z-index:100;
  background:var(--champagne);
  color:var(--navy-deep);
  padding:.65rem 1.2rem;
  font-weight:700;
  text-decoration:none;
  border-radius:0 0 6px 6px;
  transition:top .15s ease;
}
.skip-link:focus{top:0;}

/* ---------- Header ---------- */
.site-header{
  position:sticky;
  top:var(--admin-offset);
  z-index:40;
  background:var(--navy);
  text-align:center;
  padding:.85rem 1rem;
  box-shadow:0 1px 0 rgba(255,255,255,.06);
}
.site-header a{
  color:var(--ivory);
  font-family:var(--serif);
  font-size:clamp(1.25rem,3.4vw,2rem);
  font-weight:700;
  letter-spacing:.01em;
  text-decoration:none;
  display:inline-block;
}
.site-header a:hover{color:#fff;}
.site-header a:focus-visible{outline-color:var(--champagne);}
.site-logo{display:inline-block;line-height:0;max-width:100%;}
.site-logo img{
  display:block;
  height:clamp(18px,4.6vw,32px);
  width:auto;
  max-width:100%;
}

/* ---------- Hero ---------- */
.hero{
  position:relative;
  isolation:isolate;
  min-height:clamp(420px,62vh,600px);
  display:flex;
  align-items:center;
  overflow:hidden;
  background:var(--navy-deep);
}
.hero__photo{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:50% 50%;
  z-index:-2;
}
.hero__scrim{
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(90deg,rgba(11,16,32,.92) 0%,rgba(11,16,32,.82) 30%,rgba(11,16,32,.5) 54%,rgba(11,16,32,.12) 76%,rgba(11,16,32,0) 100%),
    linear-gradient(180deg,rgba(11,16,32,.45) 0%,rgba(11,16,32,0) 40%);
}
.hero__inner{
  width:min(1200px,100%);
  margin:0 auto;
  padding:3rem clamp(1.25rem,5vw,4rem);
}
.hero__text{max-width:min(38rem,56%);}
h1{
  font-family:var(--serif);
  color:var(--ivory);
  font-size:clamp(2.4rem,6vw,4rem);
  line-height:1.05;
  margin:0 0 1rem;
  font-weight:700;
  text-wrap:balance;
  text-shadow:0 2px 18px rgba(8,12,24,.55);
}
.hero__lede{
  color:#efe7f3;
  font-size:clamp(1.0625rem,2.2vw,1.35rem);
  line-height:1.55;
  margin:0 0 2rem;
  max-width:24rem;
  text-shadow:0 1px 12px rgba(8,12,24,.6);
}
.btn{
  display:inline-block;
  background:linear-gradient(180deg,var(--champagne) 0%,var(--champagne-dark) 100%);
  color:#2a2110;
  font-family:var(--serif);
  font-size:clamp(1.125rem,2.2vw,1.5rem);
  font-weight:700;
  text-decoration:none;
  padding:.7em 1.3em;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.25);
  box-shadow:0 6px 18px rgba(0,0,0,.28);
}
.btn:hover{filter:brightness(1.06);}
.btn:active{transform:translateY(1px);}
.btn:focus-visible{outline-color:var(--ivory);}

/* Mobile: keep both faces in frame and darken the text side a little more */
@media (max-width:719px){
  .hero{min-height:440px;}
  .hero__photo{object-position:78% 26%;}
  .hero__scrim{
    background:
      linear-gradient(180deg,rgba(11,16,32,.55) 0%,rgba(11,16,32,.2) 45%,rgba(11,16,32,.35) 100%),
      linear-gradient(90deg,rgba(11,16,32,.9) 0%,rgba(11,16,32,.72) 42%,rgba(11,16,32,.3) 72%,rgba(11,16,32,.12) 100%);
  }
  .hero__inner{padding:2.5rem 1.25rem;}
  .hero__text{max-width:15.5rem;}
}
@media (min-width:720px) and (max-width:1023px){
  .hero__photo{object-position:62% 40%;}
}

/* ---------- Section navigation ---------- */
.guide-nav{
  background:var(--lavender-deep);
  border-top:1px solid rgba(20,28,51,.12);
  border-bottom:1px solid rgba(20,28,51,.12);
}
.guide-nav ul{
  list-style:none;
  margin:0 auto;
  padding:0;
  width:min(1200px,100%);
  display:grid;
  grid-template-columns:repeat(2,1fr);
}
.guide-nav li{border-bottom:1px solid rgba(20,28,51,.1);}
.guide-nav li:nth-child(odd){border-right:1px solid rgba(20,28,51,.1);}
.guide-nav li:nth-last-child(-n+2){border-bottom:0;}
.guide-nav a{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-height:66px;
  padding:.85rem .5rem 1.1rem;
  font-family:var(--serif);
  font-size:1.0625rem;
  line-height:1.25;
  color:var(--navy);
  text-decoration:none;
  position:relative;
}
.guide-nav a::after{
  content:"";
  position:absolute;
  bottom:.65rem;
  left:50%;
  transform:translateX(-50%);
  width:62px;
  height:3px;
  border-radius:2px;
  background:var(--burgundy);
  opacity:0;
  transition:opacity .2s ease;
}
.guide-nav a:hover::after{opacity:.4;}
.guide-nav a[aria-current="true"]{color:var(--burgundy);}
.guide-nav a[aria-current="true"]::after{opacity:1;}

@media (min-width:860px){
  .guide-nav{position:sticky;top:calc(var(--header-h) + var(--admin-offset));z-index:30;}
  .guide-nav ul{grid-template-columns:repeat(6,1fr);}
  .guide-nav li{border-bottom:0;}
  .guide-nav li:nth-child(odd){border-right:0;}
  .guide-nav a{font-size:1.125rem;min-height:var(--nav-h);}
}

/* ---------- Content ---------- */
.guide-section{
  padding:3.5rem clamp(1.25rem,5vw,2rem) 1rem;
  scroll-margin-top:calc(var(--header-h) + var(--admin-offset) + 8px);
}
@media (min-width:860px){
  .guide-section{scroll-margin-top:calc(var(--header-h) + var(--nav-h) + var(--admin-offset) + 8px);}
}
.guide-section + .guide-section{border-top:1px solid rgba(20,28,51,.09);}

.wrap{width:min(68ch,100%);margin:0 auto;}

h2{
  font-family:var(--serif);
  font-size:clamp(1.9rem,4.6vw,2.75rem);
  line-height:1.15;
  text-align:center;
  color:var(--navy);
  margin:0 0 .75rem;
  font-weight:700;
  text-wrap:balance;
}
.rule{
  width:64px;
  height:3px;
  background:var(--burgundy);
  border:0;
  border-radius:2px;
  margin:0 auto 1.75rem;
}
h3{
  font-family:var(--serif);
  font-size:1.3rem;
  color:var(--navy);
  margin:2rem 0 .5rem;
}
.lede{
  font-family:var(--serif);
  font-size:clamp(1.15rem,2.6vw,1.3rem);
  line-height:1.6;
  text-align:center;
  color:var(--ink);
  margin:0 auto 1.75rem;
  max-width:56ch;
}
p{margin:0 0 1.15rem;}
.guide-section ul{margin:0 0 1.15rem;padding-left:1.25rem;}
.guide-section li{margin-bottom:.5rem;}

.callout{
  background:#fffdf7;
  border:1px solid var(--lavender-deep);
  border-left:5px solid var(--champagne-dark);
  border-radius:8px;
  padding:1.25rem 1.35rem;
  margin:1.75rem 0;
}
.callout__label{
  display:block;
  font-size:1rem;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-weight:700;
  color:var(--burgundy);
  margin-bottom:.4rem;
}
.callout p{margin:0;font-family:var(--serif);font-size:1.15rem;line-height:1.55;}

.table-scroll{
  overflow-x:auto;
  margin:1.5rem 0;
  border:1px solid var(--lavender-deep);
  border-radius:8px;
  background:#fffdf7;
}
table{border-collapse:collapse;width:100%;min-width:520px;font-size:1rem;}
caption{
  caption-side:top;
  text-align:left;
  padding:.9rem 1rem .2rem;
  font-weight:700;
  color:var(--navy);
}
th,td{
  text-align:left;
  padding:.7rem 1rem;
  border-bottom:1px solid var(--lavender-deep);
}
thead th{
  background:var(--lavender);
  font-size:1rem;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--navy);
}
tbody tr:last-child td{border-bottom:0;}

details{
  background:#fffdf7;
  border:1px solid var(--lavender-deep);
  border-radius:8px;
  margin-bottom:.9rem;
}
summary{
  cursor:pointer;
  list-style:none;
  padding:1rem 3rem 1rem 1.2rem;
  font-family:var(--serif);
  font-size:1.2rem;
  font-weight:700;
  color:var(--navy);
  position:relative;
}
summary::-webkit-details-marker{display:none;}
summary::after{
  content:"+";
  position:absolute;
  right:1.1rem;
  top:50%;
  transform:translateY(-50%);
  font-size:1.5rem;
  line-height:1;
  color:var(--burgundy);
}
details[open] summary::after{content:"\2013";}
summary:hover{color:var(--burgundy);}
.details__body{padding:0 1.2rem 1.1rem;}
.details__body p:last-child{margin-bottom:0;}

/* ---------- Footer ---------- */
.site-footer{
  background:var(--navy);
  color:#d9d2e6;
  text-align:center;
  padding:2.5rem 1.25rem 3rem;
  margin-top:3rem;
}
.site-footer p{margin:0 0 1.25rem;font-size:1rem;}
.to-top{
  display:inline-block;
  color:var(--navy-deep);
  background:var(--champagne);
  text-decoration:none;
  font-weight:700;
  padding:.6em 1.3em;
  border-radius:8px;
}
.to-top:hover{filter:brightness(1.06);}
.to-top:focus-visible{outline-color:var(--ivory);}
.site-footer small{display:block;margin-top:1.5rem;color:#b5abc7;font-size:1rem;}


/* ---------- WordPress integration ---------- */
body.admin-bar{--admin-offset:32px;}
@media screen and (max-width:782px){body.admin-bar{--admin-offset:46px;}}

.entry-content > *{max-width:100%;}
.entry-content a{color:var(--burgundy);}
.entry-content img,
.wp-block-image img{height:auto;border-radius:8px;}
.entry-content blockquote,
.wp-block-quote{
  border-left:5px solid var(--champagne-dark);
  background:#fffdf7;
  margin:1.75rem 0;
  padding:1rem 1.35rem;
  border-radius:0 8px 8px 0;
}
.entry-content pre,
.wp-block-code{overflow-x:auto;background:#fffdf7;padding:1rem;border-radius:8px;}
.post-list{list-style:none;padding:0;margin:0;}
.post-list li{margin-bottom:1.75rem;}
.post-list h3{margin-top:0;}
.post-meta{font-size:1rem;color:#5c5469;margin-bottom:.4rem;}
.alignwide,.alignfull{max-width:100%;}
.screen-reader-text{
  position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(1px,1px,1px,1px);clip-path:inset(50%);white-space:nowrap;
}
.pagination{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap;margin:2rem 0;}
.pagination .page-numbers{
  padding:.4em .8em;border-radius:6px;background:#fffdf7;
  border:1px solid var(--lavender-deep);text-decoration:none;
}
.pagination .current{background:var(--burgundy);color:#fff;border-color:var(--burgundy);}

/* ---------- Inner pages (posts, pages, 404) ---------- */
.page-head{
  background:var(--navy-deep);
  color:var(--ivory);
  text-align:center;
  padding:3rem 1.25rem;
}
.page-head h1{
  font-size:clamp(2rem,5vw,3rem);
  margin:0 auto;
  max-width:24ch;
  text-shadow:none;
}
.page-head .back-home{
  display:inline-block;
  margin-top:1rem;
  color:var(--champagne);
  font-size:1rem;
}
