/* Young Life Cedar Park: small layer on top of theme.json. Keep design tokens in theme.json. */

/* Accessibility */
:where(a):focus-visible,:where(button):focus-visible,:where(input,select,textarea):focus-visible,.wp-block-button__link:focus-visible{outline:3px solid var(--wp--preset--color--ink);outline-offset:3px;box-shadow:0 0 0 6px var(--wp--preset--color--sun)}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Header / footer */
/* The header part is wrapped in a template-part div, so that wrapper is what sticks */
:root{--yl-header-h:89px}
.wp-site-blocks>:has(>.yl-site-header){position:sticky;top:0;z-index:50}
.admin-bar .wp-site-blocks>:has(>.yl-site-header){top:32px}
.yl-site-header{box-shadow:0 1px 0 rgba(19,41,61,.08)}
@media (max-width:600px){:root{--yl-header-h:69px}}
.yl-site-header .wp-block-site-logo img{height:auto}
.yl-footer-badge{text-align:center;margin:0 auto}
.yl-footer-badge img{border-radius:50%;display:inline-block}

/* Headings: poster-style display type. Display sizes scale with the viewport. */
h1.wp-block-heading{font-size:clamp(2.6rem,7vw,5.5rem)}
h2.wp-block-heading{font-size:clamp(2rem,5vw,3.75rem)}
.yl-hero h1.wp-block-heading{font-size:clamp(3rem,9vw,7rem)}
.yl-eyebrow{font-family:var(--wp--preset--font-family--ylcp-script);font-size:clamp(1.5rem,3vw,2rem);line-height:1;margin-bottom:.25em}

/* Grain on mint and blue sections, like the social posts */
.has-mint-background-color,.has-blue-background-color{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}

/* Cards */
.yl-card{height:100%;background:var(--wp--preset--color--white);border-radius:14px;padding:var(--wp--preset--spacing--40);box-shadow:0 6px 20px rgba(19,41,61,.08)}
.yl-card h3.wp-block-heading{font-size:clamp(1.5rem,2.4vw,2rem)}
.yl-card .wp-block-image img{border-radius:10px}

/* Schedule list (static fallback) */
.yl-schedule{list-style:none;margin:0;padding:0}
.yl-schedule li{display:grid;grid-template-columns:8rem 1fr;gap:1rem;padding:.75rem 0;border-bottom:1px solid rgba(255,255,255,.3)}
.yl-schedule strong{text-transform:uppercase;letter-spacing:.04em}
@media (max-width:480px){.yl-schedule li{grid-template-columns:1fr;gap:.25rem}}

/* Leaders: team title + gilded frames with names over the photo */
.yl-team>h2.wp-block-heading{font-size:clamp(2.25rem,5.5vw,4.25rem);line-height:.9;letter-spacing:-.04em;margin-bottom:var(--wp--preset--spacing--40)}
.yl-leaders{gap:clamp(1.5rem,3.5vw,3rem)!important}
/* Leftover polaroids in the last row are centered instead of hugging the left */
.yl-leaders.is-layout-grid{display:flex!important;flex-wrap:wrap;justify-content:center}
.yl-leaders>.yl-leader{flex:0 1 calc((100% - 3 * clamp(1.5rem,3.5vw,3rem)) / 4);min-width:min(15rem,100%)}
/* Leader polaroid: white instant-photo card, square photo, handwritten name in the team color */
.yl-leader{container-type:inline-size;margin:0;padding:clamp(10px,4.5cqi,16px) clamp(10px,4.5cqi,16px) 0;background:#fffdf8;border-radius:3px;
  box-shadow:0 1px 2px rgba(19,41,61,.12),0 14px 28px -8px rgba(19,41,61,.32);transition:transform .2s ease,box-shadow .2s ease}
.yl-leader>.wp-block-image{margin:0}
.yl-leader>.wp-block-image img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:1px;filter:saturate(1.06) contrast(1.03);box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)}
.yl-leader>p{margin:0;padding:.3em .25em .45em;text-align:center;font-family:var(--wp--preset--font-family--ylcp-script);font-weight:600;font-size:clamp(1.5rem,12cqi,2.3rem);line-height:1.05;overflow-wrap:normal}
.yl-leaders>.yl-leader:nth-child(4n+1){transform:rotate(-2.2deg)}
.yl-leaders>.yl-leader:nth-child(4n+2){transform:rotate(1.6deg) translateY(10px)}
.yl-leaders>.yl-leader:nth-child(4n+3){transform:rotate(-1deg)}
.yl-leaders>.yl-leader:nth-child(4n){transform:rotate(2.4deg) translateY(6px)}
.yl-leaders>.yl-leader:hover{transform:rotate(0) translateY(-4px) scale(1.02);box-shadow:0 2px 4px rgba(19,41,61,.12),0 22px 36px -10px rgba(19,41,61,.38);z-index:1}
/* Team pill menu. The inset shadow darkens only the pill background (not the text) so white clears 4.5:1 at this size. */
.yl-team-nav .wp-block-buttons{gap:.4rem .5rem}
.yl-team-nav .wp-block-button{flex:0 0 auto}
.yl-team-nav .wp-block-button__link{font-size:.9rem;padding:.5em 1em;letter-spacing:.03em;white-space:nowrap;box-shadow:inset 0 0 0 100vmax rgba(0,0,0,.16)}
.yl-team-nav .wp-block-button__link:hover{box-shadow:inset 0 0 0 100vmax rgba(0,0,0,.3)}
.wp-block-post-content>.alignfull:has(.yl-team-nav--sticky){position:sticky;top:var(--yl-header-h,84px);z-index:40;padding-block:.6rem;box-shadow:0 1px 0 rgba(19,41,61,.08)}
.admin-bar .wp-block-post-content>.alignfull:has(.yl-team-nav--sticky){top:calc(var(--yl-header-h,84px) + 32px)}
.wp-block-post-content>[id]{scroll-margin-top:150px}
@media (max-width:600px){
  .yl-team-nav--sticky .wp-block-buttons{flex-wrap:nowrap!important;justify-content:flex-start!important;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
}

/* Quote band */
.yl-quote p{margin:0}

/* Full-width sections sit flush against each other on landing pages */
.wp-block-post-content>.alignfull,.wp-block-post-content>.alignfull+*{margin-block-start:0}

/* Mobile header: logo, menu toggle and Give stay on one row */
@media (max-width:600px){
  .yl-site-header .alignwide{flex-wrap:nowrap!important;gap:.5rem}
  .yl-site-header .wp-block-site-logo{flex:1 1 auto;min-width:0}
  .yl-site-header .wp-block-site-logo img{width:150px!important}
  .yl-site-header .wp-block-button__link{padding:.5em 1em;font-size:.8rem}
}
.wp-site-blocks>main,.wp-site-blocks>main+*{margin-block-start:0}

/* Checkerboard strips (events poster style). Add class yl-checker to a full-width group inside a colored section. */
.yl-checker{--sq:clamp(18px,2.4vw,30px);--chk:var(--wp--preset--color--cream);
  padding-block:calc(var(--sq) + var(--wp--preset--spacing--60))!important;
  background:linear-gradient(90deg,var(--chk) 50%,transparent 0) top left/calc(var(--sq)*2) var(--sq) repeat-x,
             linear-gradient(90deg,transparent 50%,var(--chk) 0) bottom left/calc(var(--sq)*2) var(--sq) repeat-x}
