/*
Theme Name: Polar Web (MTC)
Theme URI: https://polarweb.uk
Author: Marketing The Change
Author URI: https://marketingthechange.com
Description: Block theme for Polar Web. Fixed-price web design for Greater Manchester. Ring-first industrial-quarter tone. Manchester Brick on Warehouse Cotton, Machine Grey feature bands, Bee-yellow accent chips. Space Grotesk 700 headings with Inter body and Newsreader italic accent. 2px hard-edge stamped-steel buttons (signature).
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Tested up to: 6.6
License: Proprietary
Text Domain: polarweb-mtc
Tags: block-theme, one-column, custom-colors, custom-logo, editor-style, wide-blocks, block-styles
*/

/* Editor + front-end enhancements that theme.json cannot express cleanly. */

:root {
  --pw-shadow-card: 0 1px 2px rgba(26, 32, 41, 0.08);
  --pw-shadow-card-hover: 0 3px 10px rgba(26, 32, 41, 0.10);
  --pw-radius-button: 2px;
  --pw-radius-card: 6px;
  --pw-radius-chip: 2px;
}

html { scroll-behavior: smooth; }
body { background-color: #F5F1EA; color: #1A2029; }

/* Skip link */
.skip-link:focus {
  background: #A64525;
  color: #F5F1EA;
  padding: 12px 20px;
  border-radius: 2px;
  font-weight: 600;
  outline: 2px solid #E9B44C;
  outline-offset: 2px;
}

/* Buttons: force 2px hard-edge stamped-steel rectangle everywhere. SIGNATURE. */
.wp-block-button__link,
.wp-element-button,
button.wp-block-search__button {
  border-radius: 2px !important;
  font-weight: 600;
  padding: 12px 24px;
  min-height: 44px;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}
.wp-block-button.is-style-pw-primary .wp-block-button__link {
  background-color: #A64525;
  color: #F5F1EA;
}
.wp-block-button.is-style-pw-primary .wp-block-button__link:hover,
.wp-block-button.is-style-pw-primary .wp-block-button__link:focus {
  background-color: #7D3319;
  outline: 2px solid #E9B44C;
  outline-offset: 2px;
}
.wp-block-button.is-style-pw-secondary .wp-block-button__link {
  background-color: #F5F1EA;
  color: #1A2029;
  border: 2px solid #2E353B;
  font-weight: 500;
}
.wp-block-button.is-style-pw-secondary .wp-block-button__link:hover {
  background-color: #E8E3D9;
}

/* Eyebrow label - stencil-stamp letter-spacing */
.pw-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A64525;
  margin-bottom: 8px;
}

/* Bee chip - single accent */
.pw-bee-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 2px;
  background: #E9B44C;
  color: #1A2029;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Price chip - JetBrains mono */
.pw-price-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 2px;
  background: rgba(233, 180, 76, 0.16);
  color: #7D3319;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
}

/* Pack card top border - Manchester Brick */
.pw-pack-card {
  background: #F5F1EA;
  border: 1px solid #D8D2C4;
  border-top: 4px solid #A64525;
  border-radius: 6px;
  padding: 28px;
  box-shadow: var(--pw-shadow-card);
  transition: box-shadow 150ms ease;
}
.pw-pack-card:hover { box-shadow: var(--pw-shadow-card-hover); }
.pw-pack-card .pw-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: #1A2029;
}

/* Ring-town tile - regional catchment */
.pw-ring-tile {
  background: #F5F1EA;
  border: 1px solid #D8D2C4;
  border-radius: 6px;
  padding: 20px;
  position: relative;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.pw-ring-tile:hover {
  border-color: #A64525;
  box-shadow: var(--pw-shadow-card-hover);
}
.pw-ring-tile:hover::after {
  content: '';
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: #E9B44C;
  border-radius: 2px;
}

/* Image treatments */
.img-machine-wash { position: relative; overflow: hidden; isolation: isolate; }
.img-machine-wash img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-machine-wash::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(46,53,59,0.18) 0%, rgba(46,53,59,0.34) 100%);
  pointer-events: none;
}
.img-brick-warmth { position: relative; overflow: hidden; isolation: isolate; }
.img-brick-warmth img { width: 100%; height: 100%; object-fit: cover; display: block; filter: contrast(1.04) saturate(0.95); }
.img-brick-warmth::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(166,69,37,0.14) 100%);
  pointer-events: none; mix-blend-mode: multiply;
}
.img-stamped-frame {
  padding: 8px; background: #F5F1EA; border: 2px solid #2E353B;
  border-radius: 0; display: inline-block; max-width: 100%;
}
.img-stamped-frame img { width: 100%; height: auto; display: block; }

/* Newsreader pull quote - accent serif */
.pw-pullquote {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.35;
  color: #1A2029;
  border-top: 2px solid #2E353B;
  border-bottom: 2px solid #2E353B;
  padding: 24px 0;
  margin: 32px 0;
  text-align: center;
}

/* Trust strip tiles */
.pw-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 2px solid #2E353B;
  border-bottom: 2px solid #2E353B;
}
.pw-trust-strip__tile { font-family: 'Inter', sans-serif; }
.pw-trust-strip__tile .pw-eyebrow { color: #5C6670; }
@media (max-width: 782px) { .pw-trust-strip { grid-template-columns: repeat(2, 1fr); } }

/* Stencil-stamp frame around wordmark - SIGNATURE */
.pw-wordmark-frame {
  display: inline-block;
  border: 2px solid #2E353B;
  padding: 6px 12px;
  border-radius: 0;
  line-height: 1;
}
.pw-wordmark-frame .pw-mark-polar { color: #A64525; }
.pw-wordmark-frame .pw-mark-web { color: #2E353B; }
.pw-wordmark-frame {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  text-transform: lowercase;
  letter-spacing: -0.01em;
}
.pw-wordmark-frame.is-reversed {
  border-color: #F5F1EA;
  background: transparent;
}
.pw-wordmark-frame.is-reversed .pw-mark-polar { color: #E9B44C; }
.pw-wordmark-frame.is-reversed .pw-mark-web { color: #F5F1EA; }

/* wp:site-title rendered inside .pw-wordmark-frame — bulletproof wordmark that survives KSES */
.wp-block-site-title.pw-wordmark-frame,
h1.wp-block-site-title.pw-wordmark-frame,
p.wp-block-site-title.pw-wordmark-frame {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  text-transform: lowercase;
  letter-spacing: -0.01em;
  line-height: 1;
}
.wp-block-site-title.pw-wordmark-frame a {
  color: #A64525;
  text-decoration: none;
}
.wp-block-site-title.pw-wordmark-frame a:hover { color: #7D3319; }

/* Defensive header visibility: force wordmark + button colors regardless
   of theme.json element link overrides and regardless of which pack/style
   the deployed header markup happens to use. Fights the "invisible header"
   symptom when styles.elements.link.color.text cascades to child spans. */
header .pw-wordmark-frame,
header.wp-block-template-part .pw-wordmark-frame,
.pw-site-header .pw-wordmark-frame {
  color: #2E353B !important;
  text-decoration: none !important;
  background: transparent;
}
header .pw-wordmark-frame .pw-mark-polar,
.pw-site-header .pw-wordmark-frame .pw-mark-polar {
  color: #A64525 !important;
}
header .pw-wordmark-frame .pw-mark-web,
.pw-site-header .pw-wordmark-frame .pw-mark-web {
  color: #2E353B !important;
}
header .wp-block-button .wp-block-button__link,
.pw-site-header .wp-block-button .wp-block-button__link {
  background-color: #A64525 !important;
  color: #F5F1EA !important;
  border-radius: 2px !important;
}
header .wp-block-navigation a,
.pw-site-header .wp-block-navigation a {
  color: #1A2029 !important;
  text-decoration: none;
}
header .wp-block-navigation a:hover,
.pw-site-header .wp-block-navigation a:hover {
  color: #A64525 !important;
  text-decoration: underline;
}

/* Section gantry hairline - 2px between alternating bands */
.pw-section-hairline {
  border-top: 2px solid #2E353B;
}

/* Postcode routing form - Bee left-border */
.pw-postcode-card {
  background: #F5F1EA;
  border-left: 4px solid #E9B44C;
  border-top: 1px solid #D8D2C4;
  border-right: 1px solid #D8D2C4;
  border-bottom: 1px solid #D8D2C4;
  padding: 24px 28px;
  border-radius: 0 6px 6px 0;
}

/* Bee-accent left-border callout (SaaS scope-honesty, Cheshire fringe) */
.pw-bee-callout {
  background: #F5F1EA;
  border-left: 4px solid #E9B44C;
  padding: 20px 24px;
  border-radius: 0 6px 6px 0;
}

/* Focus states, accessibility */
:focus-visible { outline: 2px solid #E9B44C; outline-offset: 2px; }

/* Footer contrast: on Machine Grey ground, links go warm cotton with Bee underline. */
footer.pw-site-header, footer.wp-block-group.has-machine-grey-background-color a {
  color: #F5F1EA;
  text-decoration: none;
  border-bottom: 1px solid rgba(233, 180, 76, 0.55);
  transition: border-color 120ms ease, color 120ms ease;
}
footer.wp-block-group.has-machine-grey-background-color a:hover {
  color: #E9B44C;
  border-bottom-color: #E9B44C;
}
footer.wp-block-group.has-machine-grey-background-color h5 {
  color: #F5F1EA;
}
footer.wp-block-group.has-machine-grey-background-color ul li {
  color: rgba(245, 241, 234, 0.92);
}
/* Sticky mobile CTA (money pages) - floating Brick 2px on <=782px */
.pw-sticky-cta {
  display: none;
}
@media (max-width: 782px) {
  .pw-sticky-cta {
    display: flex;
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 40;
    gap: 8px;
    background: #F5F1EA;
    border: 2px solid #2E353B;
    border-left: 4px solid #A64525;
    padding: 10px 12px;
    box-shadow: 0 6px 20px rgba(26,32,41,0.18);
  }
  .pw-sticky-cta a {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    border-radius: 2px;
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .pw-sticky-cta a.pw-sticky-cta__call { background: #F5F1EA; color: #1A2029; border: 2px solid #2E353B; }
  .pw-sticky-cta a.pw-sticky-cta__quote { background: #A64525; color: #F5F1EA; }
  body { padding-bottom: 84px; }
}

/* FAQ accordion (native details/summary) */
.pw-faq details {
  border-top: 1px solid #D8D2C4;
  padding: 20px 0;
}
.pw-faq details:last-child { border-bottom: 1px solid #D8D2C4; }
.pw-faq summary {
  cursor: pointer;
  list-style: none;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: #1A2029;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.pw-faq summary::-webkit-details-marker { display: none; }
.pw-faq summary::after {
  content: '+';
  color: #A64525;
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  line-height: 1;
  transition: transform 150ms ease;
}
.pw-faq details[open] summary::after { content: '−'; }
.pw-faq details > p, .pw-faq details > div {
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #2E353B;
}

/* Care-tier grid (3-tier care plan) */
.pw-care-tier {
  background: #F5F1EA;
  border: 1px solid #D8D2C4;
  border-top: 4px solid #2E353B;
  border-radius: 6px;
  padding: 24px;
}
.pw-care-tier.is-featured { border-top-color: #A64525; }
.pw-care-tier .pw-tier-price {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #1A2029;
}
.pw-care-tier .pw-tier-price small {
  font-size: 14px;
  font-weight: 500;
  color: #5C6670;
}

/* Blog card grid */
.pw-blog-card {
  background: #F5F1EA;
  border: 1px solid #D8D2C4;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.pw-blog-card:hover { border-color: #A64525; box-shadow: var(--pw-shadow-card-hover); }
.pw-blog-card__body { padding: 20px 22px 24px; }
.pw-blog-card__cat { font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #A64525; }
.pw-blog-card h3 { font-size: 20px; margin: 8px 0 12px; }
.pw-blog-card__meta { font-size: 13px; color: #5C6670; }

/* Breadcrumb strip */
.pw-breadcrumb {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: #5C6670;
  padding: 16px 0;
  border-bottom: 1px solid #D8D2C4;
}
.pw-breadcrumb a { color: #5C6670; text-decoration: none; border-bottom: 1px dotted #5C6670; }
.pw-breadcrumb a:hover { color: #A64525; border-bottom-color: #A64525; }
.pw-breadcrumb .sep { margin: 0 8px; color: #A64525; }

/* Add-on price list */
.pw-addons {
  border-top: 2px solid #2E353B;
  border-bottom: 2px solid #2E353B;
}
.pw-addons dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; margin: 0; padding: 16px 0; }
.pw-addons dt { font-family: 'Inter', sans-serif; font-size: 16px; color: #1A2029; }
.pw-addons dd { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: #7D3319; margin: 0; }
.pw-addons dl + dl { border-top: 1px solid #D8D2C4; }

/* Manchester map / catchment map wrappers */
.pw-map-block {
  border: 2px solid #2E353B;
  padding: 32px 28px;
  background: #F5F1EA;
  position: relative;
}
.pw-map-block__label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A64525;
  margin-bottom: 12px;
}
.pw-catchment-list {
  columns: 2;
  column-gap: 32px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.9;
}
@media (max-width: 600px) { .pw-catchment-list { columns: 1; } }

/* Vertical / industry grid tile */
.pw-vertical-tile {
  background: #F5F1EA;
  border: 1px solid #D8D2C4;
  border-radius: 6px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.pw-vertical-tile:hover { border-color: #A64525; box-shadow: var(--pw-shadow-card-hover); }
.pw-vertical-tile__icon {
  width: 40px; height: 40px;
  background: rgba(233, 180, 76, 0.16);
  border: 1px solid #E9B44C;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: #7D3319;
}

/* Scroll hairline for sticky header (progressive enhancement) */
.pw-site-header.is-scrolled { border-bottom-color: #7D3319; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
