/* v1.8.2 — Home UX refinement, responsive navigation, active states, breathing motion */

/* Navigation: preserve the pill language while making tablet landscape usable. */
.public-header nav a,
body > header.page-public-header nav a { position:relative; }
.public-header nav a[aria-current="page"],
body > header.page-public-header nav a[aria-current="page"] {
  color:var(--navy);
  background:linear-gradient(135deg,rgba(246,222,215,.9),rgba(255,255,255,.88));
  border-color:rgba(184,94,77,.38);
  box-shadow:0 8px 20px rgba(17,26,55,.08), inset 0 -2px 0 rgba(184,94,77,.28);
}

@media (min-width:701px) and (max-width:1450px) {
  .public-header,
  body > header.page-public-header {
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    grid-template-rows:auto auto;
    align-items:center;
    gap:8px 14px;
    padding:9px 20px 11px;
  }
  .header-wordmark,
  body > header.page-public-header .header-wordmark {
    grid-column:1;
    grid-row:1;
    flex-basis:auto;
    width:58px;
    height:58px;
  }
  .header-access {
    grid-column:3;
    grid-row:1;
    justify-self:end;
  }
  .public-header nav,
  body > header.page-public-header nav {
    grid-column:1 / -1;
    grid-row:2;
    width:100%;
    min-width:0;
    display:flex;
    justify-content:center;
    gap:8px;
    padding:2px 4px 1px;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .public-header nav::-webkit-scrollbar,
  body > header.page-public-header nav::-webkit-scrollbar { display:none; }
  .public-header nav a,
  body > header.page-public-header nav a { padding:8px 10px; font-size:11.5px; }
  .header-access .header-relief,
  body > header.page-public-header .header-relief { min-height:44px; padding:10px 16px; font-size:12px; }
  .portal-top { min-height:42px; }
  .owner-top { width:42px; height:42px; }
}

/* Hero: remove duplicate left watermark and let the headline use the canvas. */
#home .hero { grid-template-columns:minmax(390px,.84fr) minmax(590px,1.16fr); }
#home .hero::before { content:none !important; display:none !important; }
#home .hero-copy {
  padding-left:clamp(38px,6.2vw,96px);
  padding-right:clamp(22px,2.8vw,44px);
  max-width:760px;
}
#home .hero-copy h1 { max-width:650px; }
.hero-you { display:inline-block; }
.hero-breathe {
  position:relative;
  display:inline-block;
  z-index:0;
  font-style:italic;
  letter-spacing:-.045em;
  transform-origin:50% 60%;
  animation:atmHeroBreathe 7.2s ease-in-out infinite;
}
.hero-breathe::before {
  content:"";
  position:absolute;
  z-index:-1;
  left:-.06em;
  right:-.08em;
  top:56%;
  height:.28em;
  border-radius:999px;
  background:linear-gradient(90deg,transparent,rgba(213,167,87,.12),rgba(184,94,77,.15),rgba(213,167,87,.12),transparent);
  filter:blur(3px);
  transform:translateY(-50%) scaleX(.72);
  opacity:.28;
  animation:atmBreathHighlight 7.2s ease-in-out infinite;
}
@keyframes atmHeroBreathe {
  0%,100% { transform:scale(1); text-shadow:0 0 0 rgba(184,94,77,0); }
  48% { transform:scale(1.028); text-shadow:0 7px 24px rgba(184,94,77,.10); }
  60% { transform:scale(1.012); }
}
@keyframes atmBreathHighlight {
  0%,100% { transform:translateY(-50%) scaleX(.72); opacity:.22; }
  48% { transform:translateY(-50%) scaleX(1.04); opacity:.76; }
  62% { transform:translateY(-50%) scaleX(.9); opacity:.44; }
}
.hero-promise-lines { display:grid; width:max-content; max-width:100%; gap:1px; margin-bottom:20px; }
.hero-promise-lines span { display:block; white-space:nowrap; }
.hero-promise-lines span:nth-child(2) { margin-left:1.25em; }
.hero-promise-lines span:nth-child(3) { margin-left:2.5em; }

/* Center and animate the three primary hero-card messages without disturbing the watermark. */
.relief-visual-card { justify-content:center !important; }
.relief-visual-card > span,
.relief-visual-card > strong,
.relief-visual-card > small { transition:opacity .32s ease, transform .32s ease, filter .32s ease; }
.relief-visual-card.is-swapping > span,
.relief-visual-card.is-swapping > strong,
.relief-visual-card.is-swapping > small,
.relief-promise.is-swapping > small,
.relief-promise.is-swapping > strong { opacity:0; transform:translateY(8px); filter:blur(3px); }
.relief-promise > small,
.relief-promise > strong { transition:opacity .32s ease, transform .32s ease, filter .32s ease; }
.scene .hero-watermark {
  left:50% !important;
  right:auto !important;
  top:50% !important;
  width:min(94%,760px) !important;
  opacity:.125 !important;
  transform:translate(-50%,-50%);
  animation:atmCenteredWatermarkDrift 18s ease-in-out infinite alternate !important;
}
@keyframes atmCenteredWatermarkDrift {
  from { transform:translate(-50%,-50%) scale(1.01) rotate(-.3deg); }
  to { transform:translate(-49%,-51%) scale(1.055) rotate(.3deg); }
}

/* ATM Standard: echo the hero's breath motif on this one card only. */
.breath-card > span { line-height:.92; }
.breath-card .breath-small { font-size:.82em; }
.breath-card .breath-emphasis {
  display:inline-block;
  color:inherit;
  font-size:1.18em;
  font-style:italic;
  animation:atmCarouselBreath 6.8s ease-in-out infinite;
}
@keyframes atmCarouselBreath { 0%,100%{transform:scale(1);opacity:.88} 50%{transform:scale(1.065);opacity:1} }

/* Relief Society on Home is now a teaser; the full membership presentation lives on its page. */
.home-relief-teaser {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:26px;
  align-items:center;
  padding:clamp(44px,6vw,72px) max(8vw,28px);
  background:linear-gradient(135deg,#f8e9e2,#fffaf7);
  border-block:1px solid rgba(184,94,77,.10);
}
.home-relief-teaser > div { max-width:860px; }
.home-relief-teaser h2 { margin:8px 0 14px; color:var(--navy); font:clamp(34px,4.4vw,58px)/1 Georgia,serif; }
.home-relief-teaser p:not(.eyebrow) { margin:0; max-width:760px; color:var(--muted); line-height:1.65; }

/* Back-to-top control. The glyph is intentionally easy to swap for the owner-selected icon later. */
.atm-back-to-top {
  position:fixed;
  right:20px;
  bottom:82px;
  z-index:9988;
  width:48px;
  height:48px;
  border:1px solid rgba(184,94,77,.28);
  border-radius:50%;
  display:grid;
  place-items:center;
  background:rgba(255,250,247,.94);
  color:var(--navy);
  box-shadow:0 12px 28px rgba(17,26,55,.12);
  font:800 23px/1 Georgia,serif;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  transition:opacity .22s ease,visibility .22s ease,transform .22s ease,box-shadow .22s ease;
}
.atm-back-to-top.is-visible { opacity:1; visibility:visible; transform:translateY(0); }
@media(hover:hover) and (pointer:fine){.atm-back-to-top:hover{box-shadow:0 16px 34px rgba(17,26,55,.18);transform:translateY(-2px)}}

@media (max-width:1120px) {
  #home .hero { grid-template-columns:1fr; }
  #home .hero-copy { padding:52px max(6vw,28px); max-width:820px; }
  .scene .hero-watermark { width:min(86%,680px) !important; }
}
@media (max-width:700px) {
  .hero-promise-lines { width:auto; font-size:clamp(23px,7vw,30px); }
  .hero-promise-lines span { white-space:normal; }
  .hero-promise-lines span:nth-child(2) { margin-left:.7em; }
  .hero-promise-lines span:nth-child(3) { margin-left:1.4em; }
  .home-relief-teaser { grid-template-columns:1fr; }
  .home-relief-teaser .btn { justify-self:start; }
  .atm-back-to-top { right:14px; bottom:76px; width:44px; height:44px; }
}
@media (prefers-reduced-motion:reduce) {
  .hero-breathe,.hero-breathe::before,.breath-card .breath-emphasis,.scene .hero-watermark { animation:none !important; }
  .atm-back-to-top { transition:none; }
}

/* v1.8.3 — Who We Serve refinement */
.who-hero h1.who-hero-stagger{max-width:1050px}
.who-hero-stagger span{display:block}
.who-hero-stagger span:nth-child(2){margin-left:.55em}
.who-hero-stagger span:nth-child(3){margin-left:1.1em}
.brand-bridge .btn.primary{margin-top:2px}
@media(max-width:700px){
  .who-hero-stagger span:nth-child(2),.who-hero-stagger span:nth-child(3){margin-left:0}
}

/* v1.8.4 — Who We Serve connected-ideas editorial layout */
.who-ideas{max-width:920px;margin-top:24px;color:#5f5a63}
.who-ideas-intro{margin:0 0 10px;line-height:1.65}
.who-ideas-lines{margin:0;font-family:inherit;line-height:1.65}
.who-ideas-lines span{display:block}
.who-ideas-lines span:nth-child(1){margin-left:1.35em}
.who-ideas-lines span:nth-child(2){margin-left:3em}
.who-ideas-lines span:nth-child(3){margin-left:4.65em}
@media(max-width:700px){
  .who-ideas-lines span:nth-child(1){margin-left:.7em}
  .who-ideas-lines span:nth-child(2){margin-left:1.4em}
  .who-ideas-lines span:nth-child(3){margin-left:2.1em}
}


/* v1.8.5 — navigation, Who We Serve, and Services refinement */
@media (min-width: 900px){
  body > header.page-public-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:18px;}
  body > header.page-public-header nav{display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:8px;min-width:0;}
  body > header.page-public-header nav a{white-space:nowrap;}
  body > header.page-public-header .header-access{display:flex;flex-wrap:nowrap;align-items:center;gap:10px;white-space:nowrap;}
}
body > header.page-public-header .header-wordmark img{object-fit:contain;}
.who-ideas{max-width:900px;margin:28px auto 0;text-align:center;}
.who-ideas-lines{display:inline-block;text-align:left;}
.services-hero-refined h1{font-size:clamp(40px,5vw,66px);max-width:900px;}
.services-hero-refined p:not(.eyebrow){max-width:760px;}
.service-offering-section{display:block!important;}
.service-offering-section + .service-offering-section{border-top:1px solid var(--line);margin-top:18px;padding-top:20px;}
.who-audience-guide{margin:clamp(28px,5vw,70px) max(6vw,28px);padding:clamp(30px,5vw,60px);border:1px solid var(--line);border-radius:32px;background:rgba(255,255,255,.72);text-align:center;box-shadow:0 18px 42px rgba(17,26,55,.06);}
.who-audience-guide h2{max-width:900px;margin:.25em auto .6em;color:var(--atm-navy);font:clamp(34px,4.5vw,56px)/1.05 Georgia,serif;}
.who-audience-switch{display:flex;justify-content:center;gap:10px;margin:24px auto;}
.who-audience-toggle{border:1px solid #c86e58;background:#fffaf7;color:var(--atm-navy);border-radius:999px;padding:12px 24px;font-weight:800;cursor:pointer;}
.who-audience-toggle.is-active{background:#c86e58;color:white;box-shadow:0 10px 24px rgba(200,110,88,.22);}
.who-audience-copy{max-width:760px;margin:0 auto;}
.who-audience-copy h3{margin:.2em 0;color:var(--atm-navy);font:clamp(30px,4vw,46px)/1.05 Georgia,serif;}
.who-audience-copy p{line-height:1.7;color:var(--atm-muted);}
@media (max-width:899px){.who-ideas{padding-inline:10px}.who-ideas-lines span{margin-left:0!important}.who-audience-guide{margin-inline:18px}.services-hero-refined h1{font-size:clamp(38px,11vw,58px)}}

/* v1.8.6 — public-site architecture refinement */
.who-ideas{max-width:760px;margin:30px auto 0;text-align:center}
.who-ideas-lines{display:block;text-align:center;margin-top:10px}
.who-ideas-lines span{display:block!important;margin-left:0!important}
.promise-hero{text-align:center}
.promise-hero-stagger{max-width:960px;margin-left:auto;margin-right:auto}
.promise-hero-stagger span{display:block}
.promise-hero-stagger span:nth-child(2){transform:translateX(1.2em)}
.promise-hero-stagger span:nth-child(3){transform:translateX(2.4em)}
.promise-hero>p:not(.eyebrow){max-width:760px;margin-left:auto;margin-right:auto}
.relief-society-hero{text-align:center}
.relief-society-hero h1,.relief-society-hero>p:not(.eyebrow){margin-left:auto;margin-right:auto}
.signature-packages-bridge,.package-access-note{margin:clamp(28px,5vw,70px) max(6vw,28px);padding:clamp(30px,5vw,56px);border:1px solid var(--line);border-radius:32px;background:rgba(255,255,255,.74);text-align:center;box-shadow:0 18px 42px rgba(17,26,55,.06)}
.signature-packages-bridge h2,.package-access-note h2{max-width:920px;margin:.2em auto;color:var(--atm-navy);font:clamp(32px,4vw,52px)/1.06 Georgia,serif}
.signature-packages-bridge p,.package-access-note p{max-width:820px;margin:12px auto 20px;line-height:1.7}
.signature-packages-hero{text-align:center}
.signature-packages-hero h1,.signature-packages-hero>p:not(.eyebrow){margin-left:auto;margin-right:auto}
.contact-hero-refined h1{font-size:clamp(42px,5vw,64px);max-width:850px}
.contact-grid-refined .contact-card{position:relative;overflow:hidden;transition:transform .35s ease,box-shadow .35s ease,border-color .35s ease}
.contact-grid-refined .contact-card:before{content:"";position:absolute;inset:-40% 50% 50% -30%;background:radial-gradient(circle,rgba(200,110,88,.12),transparent 68%);pointer-events:none}
.contact-grid-refined .contact-card:hover{transform:translateY(-7px);box-shadow:0 24px 52px rgba(17,26,55,.12);border-color:rgba(200,110,88,.35)}
.contact-grid-refined .contact-card .button,.contact-grid-refined .contact-card .btn{border-radius:999px}
.name-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.request-expectations{margin-top:24px}
@media(max-width:700px){.promise-hero-stagger span{transform:none!important}.name-grid{grid-template-columns:1fr}}
