/*
Theme Name: Arctic Restore Core
Description: Lightweight editable native block theme for Arctic Restore.
Version: 1.10.2
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: arctic-restore-core
*/

/* Shared tokens. WordPress Global Styles owns typography, palette and buttons. */
:root {
  --ar-primary: var(--wp--preset--color--primary, #10a1b9);
  --ar-secondary: var(--wp--preset--color--secondary, #007d94);
  --ar-navy: var(--wp--preset--color--navy, #003b56);
  --ar-text: var(--wp--preset--color--text, #54565b);
  --ar-pale: var(--wp--preset--color--pale, #ECF3F4);
  --ar-border: var(--wp--preset--color--border, #b3d0d3);
  --ar-radius: 24px;
  --ar-gap: 24px;
  --ar-shadow: 0 8px 22px rgba(0,59,86,.055);
  --ar-wide: var(--wp--style--global--wide-size, 1280px);
  --ar-gutter: clamp(20px,4vw,64px);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ar-secondary); outline-offset: 4px; }
.wp-block-button__link { min-height: 44px; }
:root a, :root a:hover, :root a:focus, :root a:active { text-decoration: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }

/* Full-width shell and shared layout components. */
.wp-site-blocks { padding: 0; max-width: none; }
.wp-site-blocks > * { margin-block-start: 0; }
.ar-page, .ar-page > .wp-block-post-content { width: 100%; max-width: none; margin: 0; padding: 0; }
.ar-section { padding-block: clamp(40px,6vw,96px); }
.ar-row { padding: clamp(24px,4vw,56px) var(--ar-gutter); }
.ar-component { max-width: var(--ar-wide); margin-inline: auto; width: 100%; }
.ar-card { border: 1px solid var(--ar-border); border-radius: var(--ar-radius); padding: 24px; box-shadow: var(--ar-shadow); background: white; }
.ar-label { background: var(--ar-pale); color: var(--ar-text); border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 400; }
.ar-page .wp-block-post-content > :where(:not(.alignfull):not(.alignwide)):not(.ar-row) { max-width: min(var(--ar-wide),calc(100% - 2 * var(--ar-gutter))); margin-inline: auto; }
.ar-page .wp-block-post-content > .alignwide { max-width: var(--ar-wide); width: calc(100% - 2 * var(--ar-gutter)); margin-inline: auto; }
.ar-page .wp-block-post-content > .alignfull { width: 100%; max-width: none; margin-inline: 0; }
.wp-site-blocks > main:not(.ar-page) { padding-inline: clamp(16px,3vw,40px); }
.wp-site-blocks > .ar-page, .wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }
.wp-site-blocks > .ar-page > .wp-block-post-content { margin-block: 0; padding-block: 0; }
.ar-page > .wp-block-post-content > :first-child { margin-block-start: 0; }
.ar-page > .wp-block-post-content > :last-child { margin-block-end: 0; }
.ar-page .wp-block-post-content > .arhs.alignfull { margin-block: 0; margin-block-end: 0 !important; }
.ar-page .wp-block-post-content > .arhs.alignfull + * { margin-block-start: 0 !important; }
.ar-page .wp-block-post-content > :last-child:empty:is(p,.wp-block-shortcode) { display: none; }
.ar-page:has(.arhs):has(+ footer .ar-footer-montage) > .wp-block-post-content:has(> .arhs:last-child),
.ar-page:has(.arhs):has(+ footer .ar-footer-montage) > .wp-block-post-content:has(> .arhs + :last-child:empty:is(p,.wp-block-shortcode)) { margin-block-end: 0 !important; padding-block-end: 0; }

/* Header: preserve grid, sticky navigation, and both logo block types. */
.ar-promo-bar { background: var(--ar-secondary); color: white; text-align: center; padding: 8px 16px; margin: 0; font-size: 14px; }
.ar-promo-bar p { margin: 0; }
.ar-promo-bar a { color: inherit; }
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 100; background: white; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
.ar-site-header { width: 100%; max-width: none; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: clamp(12px,2vw,30px); background: white; border-bottom: 1px solid var(--ar-pale); padding: 12px clamp(16px,2vw,40px); margin: 0; }
.ar-site-header > * { margin: 0 !important; }
.ar-site-header .wp-block-site-logo img { max-height: none; width: clamp(130px,17vw,260px); max-width: 100%; }
.ar-site-header .ar-header-logo { margin: 0; flex: 0 1 240px; min-width: 0; width: min(250px,42vw); }
.ar-site-header .ar-header-logo img { display: block; width: 100%; height: auto; }
.ar-site-header .wp-block-navigation { justify-self: end; color: var(--ar-secondary); text-transform: uppercase; letter-spacing: .07em; font-size: clamp(11px,1vw,14px); font-weight: 500; }
.ar-site-header .wp-block-buttons { margin: 0; justify-self: end; }
.ar-site-header .wp-block-button__link { white-space: nowrap; }
.ar-site-header .wp-block-navigation .wp-block-navigation__submenu-container { font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0; line-height: 1.45; color: var(--ar-text); background: white; }
@media (min-width: 1101px) {
  .ar-site-header .wp-block-navigation .wp-block-navigation__submenu-container { min-width: 260px; width: max-content; max-width: 340px; padding: 8px 0; border: 1px solid var(--ar-pale); border-radius: 0 0 6px 6px; box-shadow: 0 8px 24px rgba(0,59,86,.09); left: 0; right: auto; }
  .ar-site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 10px 18px; white-space: nowrap; color: var(--ar-text); }
  .ar-site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
  .ar-site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus-visible { color: var(--ar-secondary); background: var(--ar-pale); }
}
@media (max-width: 1100px) {
  .ar-site-header .wp-block-navigation__responsive-container-open { display: flex; }
  .ar-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
  .ar-site-header .wp-block-button__link { padding-inline: 12px; }
}
@media (max-width: 782px) {
  .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; }
  .ar-site-header { gap: 10px; }
}
@media (max-width: 700px) {
  .ar-site-header .ar-header-logo { flex-basis: 145px; width: min(145px,42vw); }
}
@media (max-width: 600px) {
  .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; }
  .ar-promo-bar { font-size: 12px; }
  .ar-site-header .wp-block-site-logo img { width: 145px; }
}

/* Footer: one set of rules. Heading typography is inherited from Global Styles. */
.ar-footer-montage { width: 100%; max-width: none; margin: 0 !important; line-height: 0; }
.ar-footer-montage img { display: block; width: 100%; height: auto; }
.ar-site-footer { width: 100%; max-width: none; padding: clamp(40px,5vw,80px) var(--ar-gutter); background: #252525; color: #c4c4c4; margin: 0; }
.ar-site-footer .wp-block-columns { max-width: var(--ar-wide); margin: auto; gap: clamp(24px,3vw,48px); }
.ar-site-footer .wp-block-heading { color: white; margin: 0 0 26px; }
.ar-site-footer p { margin: 0 0 10px; color: inherit; }
.ar-site-footer p:last-child { margin-bottom: 0; }
.ar-site-footer strong { font-weight: 500; }
.ar-site-footer a { color: #7dd9e5; }
.ar-site-footer a.ar-footer-phone { color: inherit; }
.ar-site-footer .ar-footer-awards { margin: 0 0 14px; }
.ar-footer-awards img { width: 100%; max-width: 260px; height: auto; }
.ar-footer-copyright { background: linear-gradient(100deg,#398da7,var(--ar-primary),#398da7); color: white; text-align: center; padding: 18px 24px; margin: 0; }
.ar-footer-copyright p { margin: 0; font-size: 14px; }
.ar-footer-copyright a, .ar-footer-copyright a:hover { color: inherit; }
.wp-block-template-part:has(.ar-footer-montage) { margin-block-start: 0; }
.wp-site-blocks > footer.wp-block-template-part:has(.ar-footer-montage) { margin-block-start: 0 !important; padding-block-start: 0; }
.wp-site-blocks > footer.wp-block-template-part .ar-footer-montage { margin-block: 0 !important; padding-block: 0; }
.ar-footer-montage + .ar-site-footer, .ar-site-footer + .ar-footer-copyright { margin-block-start: 0 !important; }

/* Existing homepage compatibility rules. Retain until page/plugin migration. */
@media (min-width: 1101px) {
  html body.home .arsc .arsc-track > .arsc-card { flex-basis: calc((100% - 2 * var(--arsc-gap)) / 3) !important; }
}
body.home .ar-home-journal { background: linear-gradient(90deg,rgba(0,43,63,.55),rgba(0,43,63,.15)),url('https://arcticrestore.com/wp-content/uploads/2025/10/MtDiablo-ArcticRestore.png') center/cover; color: white; }
body.home .ar-home-journal .ar-home-intro :is(h2,p) { color: white; }
@media (max-width: 700px) {
  .home .ar-home-difference .ar-home-history { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; box-sizing: border-box; }
  .home .ar-home-difference .ar-home-date { min-width: 0; }
  .home .ar-home-reviews .art-nav { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
  .home .ar-home-reviews .art-nav span { flex: 0 0 100%; text-align: center; }
  .home .ar-home-reviews .art-nav button { position: static; margin: 0; transform: none; }
}

/* Homepage native block layouts (migrated from page content). */

body.home .ar-home-section{box-sizing:border-box;width:100%;max-width:none!important;margin-block:0!important;padding:clamp(40px,6vw,80px) var(--ar-gutter);overflow:clip}
body.home .ar-home-section .ar-home-inner{max-width:var(--ar-wide);width:100%;margin:0 auto!important;padding:0!important;min-width:0}
body.home .ar-home-section :where(.wp-block-group,.wp-block-heading,p,figure,.wp-block-buttons){margin-block:0}
body.home .ar-home-section .ar-home-inner>*+*{margin-block-start:30px!important}
body.home .ar-home-section .ar-home-intro{max-width:720px;margin:0 0 28px!important;text-align:left}
body.home .ar-home-section .ar-home-eyebrow{font-size:12px;font-weight:500;line-height:1.5;letter-spacing:.15em!important;text-transform:uppercase;color:var(--ar-secondary);margin:0 0 10px!important}
body.home .ar-home-section .ar-home-title{margin:0 0 16px!important}
body.home .ar-home-section h3:not(.arsc-content h3){margin:0 0 12px!important;overflow-wrap:anywhere}
body.home .ar-home-section .ar-home-lead{max-width:670px}
/* Discrete award ribbon, not a paragraph of awards. */
body.home .ar-home-awards{background:linear-gradient(90deg,var(--ar-secondary),var(--ar-navy));border-bottom:0;padding-block:18px!important}
body.home .ar-home-award-grid{display:grid;grid-template-columns:.8fr 1.35fr 1fr 1fr;align-items:center;gap:0}
body.home .ar-home-award-grid>*{margin:0!important;padding:0 24px;min-width:0}
body.home .ar-home-award-grid>*+*{border-left:1px solid rgba(255,255,255,.25)}
body.home .ar-home-award-grid .ar-home-award-label{padding-left:0;font-size:12px;font-weight:500;line-height:1.5;letter-spacing:.12em!important;text-transform:uppercase;color:#fff!important}
body.home .ar-home-award-name{font-size:16px;font-weight:500;line-height:1.35;color:#fff!important;margin:0 0 5px!important}
body.home .ar-home-award-detail{font-size:12px;font-weight:400;line-height:1.45;color:#fff!important;margin:0!important}
/* Both existing carousels share the same outside edges; navigation unchanged. */
body.home .ar-home-services{background:#fff}
body.home .ar-home-section .arsc,body.home .ar-home-section .art-carousel{width:100%!important;max-width:none!important;padding-inline:0!important;margin:0!important}
body.home .ar-home-section .art-carousel .art-tags span{background:var(--ar-pale)!important;border:0!important;color:var(--ar-navy)!important;font-size:11px;font-weight:400;line-height:1.3;padding:5px 8px!important}
body.home .ar-home-section .arsc .arsc-card,body.home .ar-home-section .art-carousel .art-track .art-card{border-radius:12px!important;box-shadow:none!important}
body.home .ar-home-section .arsc .arsc-progress,body.home .ar-home-section .art-carousel .art-progress{margin-bottom:0!important}
#Services{scroll-margin-top:145px}
/* Image-led goals. Native image, heading, paragraph and link blocks. */
body.home .ar-home-goals{background:var(--ar-pale)}
body.home .ar-home-goal-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(14px,2vw,26px)}
body.home .ar-home-goal-grid>*{margin:0!important;min-width:0}
body.home .ar-home-goal{background:white;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;border:1px solid #d9e7e9}
body.home .ar-home-goal figure{margin:0!important;aspect-ratio:4/3;overflow:hidden;background:#dbe8e9}
body.home .ar-home-goal figure img{display:block;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover;border-radius:0!important}
body.home .ar-home-goal-copy{padding:22px;display:flex;flex-direction:column;flex:1;margin:0!important}
body.home .ar-home-goal-copy p:not(.ar-home-text-link){margin:0 0 16px!important}
body.home .ar-home-goal-copy .ar-home-text-link{margin-top:auto!important;font-size:13px;font-weight:500;line-height:1.45}
body.home .ar-home-text-link a{color:var(--ar-secondary)!important;text-decoration:none!important}
body.home .ar-home-text-link a:hover{text-decoration:underline!important}
/* Editorial dark band; one restrained serif title, all other type sans. */
body.home .ar-home-difference{background:linear-gradient(115deg,var(--ar-secondary) 0%,var(--ar-navy) 100%);color:#fff}
body.home .ar-home-difference-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);gap:clamp(36px,7vw,112px);align-items:start}
body.home .ar-home-difference-grid>*{margin:0!important;min-width:0}
body.home .ar-home-difference .ar-home-eyebrow{color:#a9e2e8!important}
body.home .ar-home-difference .ar-home-title{color:white!important;max-width:520px;margin-bottom:22px!important}
body.home .ar-home-difference .ar-home-story p:not(.ar-home-eyebrow){color:#e0eef1;margin-bottom:16px!important;max-width:600px}

body.home .ar-home-difference h3:not(.arsc-content h3){color:white!important;margin-bottom:5px!important}
body.home .ar-home-features{border-top:1px solid #ffffff35}
body.home .ar-home-feature{margin:0!important;padding:16px 0;border-bottom:1px solid #ffffff35}
body.home .ar-home-feature p{color:#e0eef1}
body.home .ar-home-history{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;border-top:1px solid #ffffff35;padding-top:25px}
body.home .ar-home-date{margin:0!important}
body.home .ar-home-date .ar-home-year{font-size:clamp(24px,3vw,36px);font-weight:500;line-height:1.2;color:#fff;margin:0 0 4px!important}
body.home .ar-home-date p:not(.ar-home-year){color:#c0e0e7;font-size:13px;letter-spacing:.08em;text-transform:uppercase}
body.home .ar-home-reviews{background:#fff}
/* Memberships: tangible choices with clear price and benefits. */
body.home .ar-home-memberships{background:var(--ar-pale)}
body.home .ar-home-member-grid{display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1.6fr);align-items:center;gap:clamp(28px,4vw,60px)}
body.home .ar-home-member-grid>*{min-width:0;margin:0!important}
body.home .ar-home-member-intro .ar-home-terms{font-size:12px;line-height:1.5;margin-top:18px!important;max-width:275px}
body.home .ar-home-plans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
body.home .ar-home-plan{display:flex;flex-direction:column;align-items:flex-start;background:white;border:1px solid #d3e3e6;border-radius:8px;padding:clamp(20px,2.4vw,32px);margin:0!important;min-width:0}
body.home .ar-home-plan-main{border-top:4px solid var(--ar-secondary);padding-top:calc(clamp(20px,2.4vw,32px) - 3px)}
body.home .ar-home-plan .ar-home-price{color:var(--ar-navy);font-size:14px;margin:5px 0 16px!important}
body.home .ar-home-price strong{font-size:clamp(31px,3.4vw,46px);font-weight:500;line-height:1;letter-spacing:-.05em}
body.home .ar-home-plan .ar-home-plan-note{font-size:13px;color:var(--ar-text);margin:12px 0 23px!important}
body.home .ar-home-plan .wp-block-buttons{margin-top:auto!important}
body.home .ar-home-journal:has(.ar-home-posts:empty),body.home .ar-home-journal:not(:has(.ar-home-posts li)){display:none}
body.home .ar-home-journal .ar-home-posts{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:0!important;list-style:none;margin:0!important}
body.home .ar-home-journal .ar-home-posts li{width:auto!important;margin:0!important;padding:0 0 16px;border-bottom:1px solid #d3e3e6}
body.home .ar-home-journal .wp-block-latest-posts__featured-image img{width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;border-radius:6px;margin-bottom:12px}
body.home .ar-home-journal .wp-block-latest-posts__post-title {font-size:19px;font-weight:500;line-height:1.35;color: #ffffff !important;}
body.home .ar-home-journal .wp-block-latest-posts__post-date {font-size: 13px; color: #dcecee !important; margin-top: 8px;}
body.home .ar-home-final{background:#f4f8f8;padding-block:36px!important;border-top:1px solid #dce8e9}
body.home .ar-home-final-grid{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
body.home .ar-home-final-grid>*{margin:0!important}
body.home .ar-home-final .ar-home-title{margin-bottom:6px!important}
@media(max-width:1000px){body.home .ar-home-goal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body.home .ar-home-member-grid{grid-template-columns:1fr}body.home .ar-home-member-intro .ar-home-terms{max-width:600px}body.home .ar-home-award-grid{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:16px}body.home .ar-home-award-grid .ar-home-award-label{grid-column:1/-1;text-align:center;padding:0}body.home .ar-home-award-grid .ar-home-award-label+*{border-left:0}body.home .ar-home-award-grid>*{padding:0 15px}}
@media(max-width:650px){body.home .ar-home-section{padding:40px var(--ar-gutter)}body.home .ar-home-section .ar-home-inner>*+*{margin-block-start:22px!important}body.home .ar-home-awards{padding-block:20px!important}body.home .ar-home-award-grid{grid-template-columns:1fr;text-align:left;gap:12px}body.home .ar-home-award-grid .ar-home-award-label{text-align:left}body.home .ar-home-award-grid>*{padding:0!important}body.home .ar-home-award-grid>*+*{border-left:0;border-top:1px solid rgba(255,255,255,.25);padding-top:12px!important}body.home .ar-home-goal-grid{gap:12px}body.home .ar-home-goal-copy{padding:13px}body.home .ar-home-goal-copy .ar-home-text-link{font-size:12px}body.home .ar-home-difference-grid,body.home .ar-home-plans,body.home .ar-home-journal .ar-home-posts{grid-template-columns:1fr}body.home .ar-home-difference-grid{gap:20px}body.home .ar-home-final{padding-block:30px!important}body.home .ar-home-section .ar-home-intro{margin-bottom:22px!important}}
@media(max-width:360px){body.home .ar-home-goal-grid{grid-template-columns:1fr}}
/* Match existing plugin specificity, including its late CHS overrides. */
body.home .ar-home-section .arsc .arsc-card .arsc-content .arsc-tags span{background:var(--ar-pale)!important;border:0!important;color:var(--ar-navy)!important;font-size:11px;font-weight:400;line-height:1.3;padding:5px 8px!important}
body.home .ar-home-section .arsc .arsc-track .arsc-card{border-radius:12px!important;box-shadow:none!important}
body.home .ar-home-section .arsc .arsc-card .arsc-image{border-radius:0!important}
/* Compact service opening, scoped to homepage. */
body.home .ar-home-section.ar-home-services{padding-block-start:clamp(28px,3vw,44px)!important}
.ar-home-services .ar-home-science{color:var(--ar-secondary);font:500 clamp(16px,1.5vw,20px)/1.45 Inter,Arial,sans-serif!important;margin:10px auto 0!important;text-align:center}
body.home .ar-home-journal .ar-home-intro .ar-home-eyebrow {color:white}

