/*
Theme Name:   Monument Electrical
Theme URI:    https://monumentelec.co.za
Description:  Editorial luxury child theme for Blocksy — designed for an entrepreneurial electrical contractor. Centered headlines, antique-gold accents, refined Playfair Display typography. PWA-ready (pairs with the SuperPWA plugin).
Author:       Monument
Author URI:   https://monumentelec.co.za
Template:     blocksy
Version:      1.0.0
Text Domain:  monument-electrical
License:      GPL-2.0-or-later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Tags:         electrical, business, blocksy-child, pwa, dark
*/

/* ============================================================
   MONUMENT — DESIGN TOKENS
   ============================================================ */
:root {
  /* Palette */
  --m-bg:           #080810;
  --m-bg-deep:      #050508;
  --m-bg-elev:      #0E0E18;
  --m-gold:         #CBB06A;
  --m-gold-mid:     rgba(203, 176, 106, 0.55);
  --m-gold-soft:    rgba(203, 176, 106, 0.30);
  --m-gold-line:    rgba(203, 176, 106, 0.12);
  --m-text:         #EDE8D8;
  --m-text-bright:  #F0EAD6;
  --m-text-muted:   rgba(237, 232, 216, 0.50);
  --m-text-faint:   rgba(237, 232, 216, 0.28);

  /* Typography */
  --m-font-display: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --m-font-body:    'Crimson Pro', Georgia, serif;
  --m-font-ui:      'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --m-section-pad:    80px 64px;
  --m-section-pad-sm: 56px 32px;
}

/* ============================================================
   BLOCKSY PALETTE OVERRIDE
   Blocksy uses --theme-palette-color-{1..8}. We remap them so
   Blocksy's built-in widgets, blocks, and Customizer all inherit
   the Monument scheme without manual recoloring.
   ============================================================ */
:root,
[data-prefix] {
  --theme-palette-color-1: #CBB06A; /* primary (gold) */
  --theme-palette-color-2: #B89952; /* primary hover */
  --theme-palette-color-3: #F0EAD6; /* headings */
  --theme-palette-color-4: rgba(237, 232, 216, 0.55); /* body text */
  --theme-palette-color-5: #0E0E18; /* surface / elevated bg */
  --theme-palette-color-6: rgba(203, 176, 106, 0.12); /* borders */
  --theme-palette-color-7: #080810; /* page background */
  --theme-palette-color-8: #050508; /* deepest bg */
}

/* ============================================================
   BASE — body, links, selection
   ============================================================ */
body {
  background-color: var(--m-bg);
  color: var(--m-text);
  font-family: var(--m-font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--m-gold);
  color: var(--m-bg);
}

a {
  color: var(--m-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--m-text-bright);
}

/* ============================================================
   TYPOGRAPHY — Headings
   ============================================================ */
h1, h2, h3, h4, h5, h6,
.entry-title,
.widget-title,
.has-h1-font-size,
.has-h2-font-size,
.has-h3-font-size {
  font-family: var(--m-font-display);
  color: var(--m-text-bright);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.15;
}

h1, .entry-title { font-size: clamp(40px, 5.5vw, 72px); }
h2 { font-size: clamp(32px, 3.5vw, 44px); }
h3 { font-size: clamp(20px, 2vw, 26px); }
h4 { font-size: 20px; }
h5 { font-size: 17px; }
h6 { font-size: 14px; letter-spacing: 2px; text-transform: uppercase; font-family: var(--m-font-ui); font-weight: 500; }

/* Italic variant — for the second line of split headlines */
.m-italic,
em.m-accent {
  font-style: italic;
  font-weight: 400;
  color: var(--m-gold);
}

/* ============================================================
   HEADER — Blocksy customizer should be set to "Centered Logo"
   layout; this polishes the surrounding chrome.
   ============================================================ */
header[data-row]:not([data-row="bottom"]) {
  background-color: var(--m-bg);
  border-bottom: 1px solid var(--m-gold-line);
}

.ct-header [data-row="middle"] {
  min-height: 72px;
}

/* Site title / logo text */
.site-title,
.site-logo a {
  font-family: var(--m-font-display);
  color: var(--m-gold) !important;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 22px;
  text-transform: uppercase;
}

.site-description {
  font-family: var(--m-font-ui);
  font-size: 8px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--m-gold-soft);
  margin-top: 2px;
}

/* Nav menu items */
.ct-header .menu li a,
.ct-header-account .ct-account-name {
  font-family: var(--m-font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--m-text-muted);
  transition: color 0.2s;
}

.ct-header .menu li a:hover,
.ct-header .menu .current-menu-item > a {
  color: var(--m-gold);
}

/* "Enquire" CTA button in header (apply class m-nav-cta to the menu item) */
.menu-item.m-nav-cta > a {
  border: 1px solid var(--m-gold-soft);
  padding: 8px 20px !important;
  color: var(--m-gold) !important;
}

.menu-item.m-nav-cta > a:hover {
  background: var(--m-gold);
  color: var(--m-bg) !important;
}

/* ============================================================
   BUTTONS — Override Blocksy's default button to gold-on-dark
   ============================================================ */
.wp-block-button__link,
.ct-button,
button.wp-element-button,
input[type="submit"],
.ct-cta-button {
  background-color: var(--m-gold) !important;
  color: var(--m-bg) !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: var(--m-font-ui) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  padding: 14px 36px !important;
  transition: background-color 0.2s, color 0.2s !important;
}

.wp-block-button__link:hover,
.ct-button:hover,
button.wp-element-button:hover,
input[type="submit"]:hover {
  background-color: var(--m-text-bright) !important;
  color: var(--m-bg) !important;
}

/* Outline button variant — add class "is-style-outline" in Gutenberg */
.wp-block-button.is-style-outline .wp-block-button__link,
.ct-button.outline {
  background: transparent !important;
  color: var(--m-gold) !important;
  border: 1px solid var(--m-gold-soft) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--m-gold) !important;
  color: var(--m-bg) !important;
}

/* ============================================================
   MONUMENT UTILITY CLASSES
   Use these on Gutenberg Group / Columns / Cover blocks
   ============================================================ */

/* ---- HERO BLOCK ---- */
.m-hero {
  text-align: center;
  padding: 76px 64px 56px;
  background: var(--m-bg);
}

.m-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 26px;
}

.m-eyebrow-text {
  font-family: var(--m-font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--m-gold-mid);
}

.m-rule {
  display: inline-block;
  height: 1px;
  width: 52px;
  background: var(--m-gold-soft);
}

.m-rule--short { width: 36px; opacity: 0.6; }
.m-rule--long  { width: 80px; }

.m-hero__title {
  font-family: var(--m-font-display);
  font-size: clamp(48px, 7vw, 78px);
  font-weight: 700;
  line-height: 1.02;
  color: var(--m-text-bright);
  margin: 0;
}

.m-hero__title--italic {
  font-weight: 400;
  font-style: italic;
  color: var(--m-gold);
  margin-bottom: 28px;
}

.m-hero__divider {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin: 28px 0;
}

.m-bolt-icon {
  width: 14px;
  height: 14px;
  opacity: 0.4;
  fill: var(--m-gold);
}

.m-hero__lede {
  font-family: var(--m-font-body);
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.95;
  color: var(--m-text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

.m-hero__ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- STATS STRIP ---- */
.m-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--m-gold-line);
  border-bottom: 1px solid var(--m-gold-line);
  text-align: center;
}

.m-stat {
  padding: 26px 20px;
  border-right: 1px solid var(--m-gold-line);
}

.m-stat:last-child {
  border-right: none;
}

.m-stat__num {
  font-family: var(--m-font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--m-gold);
  line-height: 1;
}

.m-stat__label {
  font-family: var(--m-font-ui);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--m-text-faint);
  margin-top: 6px;
}

/* ---- SERVICE COLUMN (3-up grid) ---- */
.m-services {
  padding: 60px 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  text-align: center;
}

.m-service__numeral {
  width: 48px;
  height: 48px;
  border: 1px solid var(--m-gold-soft);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-family: var(--m-font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--m-gold);
}

.m-service__title {
  font-family: var(--m-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--m-text);
  margin: 0 0 10px;
}

.m-service__body {
  font-family: var(--m-font-ui);
  font-size: 13px;
  font-weight: 300;
  color: var(--m-text-muted);
  line-height: 1.85;
  margin: 0;
}

/* ---- CTA STRIP ---- */
.m-cta-strip {
  background: var(--m-bg-deep);
  border-top: 1px solid var(--m-gold-line);
  padding: 36px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.m-cta-strip__title {
  font-family: var(--m-font-display);
  font-size: 26px;
  font-weight: 400;
  font-style: italic;
  color: var(--m-text-bright);
  margin: 0 0 4px;
}

.m-cta-strip__sub {
  font-family: var(--m-font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--m-text-faint);
}

/* ---- SECTION DIVIDER (with bolt icon) ---- */
.m-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  padding: 32px 0;
}

/* ============================================================
   INNER PAGE HEADER — smaller variant of m-hero, for non-home pages
   ============================================================ */
.m-page-header {
  text-align: center;
  padding: 64px 64px 40px;
  background: var(--m-bg);
}

.m-page-header__title {
  font-family: var(--m-font-display);
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--m-text-bright);
  margin: 0;
}

.m-page-header__title--italic {
  font-weight: 400;
  font-style: italic;
  color: var(--m-gold);
}

/* ============================================================
   SECTION — generic content section wrapper
   ============================================================ */
.m-section {
  padding: 56px 64px;
  border-top: 1px solid var(--m-gold-line);
}

.m-section--tight { padding: 36px 64px; }
.m-section--deep  { background: var(--m-bg-deep); }
.m-section--no-border { border-top: none; }

.m-section-eyebrow {
  font-family: var(--m-font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--m-gold-mid);
  margin: 0 0 16px;
  text-align: center;
}

/* ============================================================
   PROSE — narrative text blocks (About page, intros)
   ============================================================ */
.m-prose {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--m-font-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.95;
  color: var(--m-text);
  text-align: center;
}

.m-prose p {
  margin: 0 0 20px;
}

.m-prose p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   SERVICE DETAIL — extended service block for the Services page
   ============================================================ */
.m-service-detail {
  padding: 52px 0;
  border-bottom: 1px solid var(--m-gold-line);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 36px;
  align-items: flex-start;
}

.m-service-detail:last-child {
  border-bottom: none;
}

.m-service-detail__numeral {
  width: 60px;
  height: 60px;
  border: 1px solid var(--m-gold-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--m-font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--m-gold);
}

.m-service-detail__title {
  font-family: var(--m-font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--m-text-bright);
  margin: 0 0 10px;
  line-height: 1.2;
}

.m-service-detail__lede {
  font-family: var(--m-font-body);
  font-style: italic;
  font-size: 16px;
  color: var(--m-gold-mid);
  margin: 0 0 18px;
  line-height: 1.7;
}

/* ============================================================
   FEATURE LIST — bulleted lists with a thin gold dash marker
   ============================================================ */
.m-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--m-font-ui);
  font-size: 14px;
  font-weight: 300;
  color: var(--m-text-muted);
  line-height: 1.8;
}

.m-feature-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}

.m-feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 12px;
  height: 1px;
  background: var(--m-gold);
}

/* ============================================================
   CREDENTIAL GRID — for About page (2x2 grid of credential cards)
   ============================================================ */
.m-credential-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--m-gold-line);
  border-top: 1px solid var(--m-gold-line);
  border-bottom: 1px solid var(--m-gold-line);
}

.m-credential {
  background: var(--m-bg);
  padding: 32px;
}

.m-credential__title {
  font-family: var(--m-font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--m-gold);
  margin: 0 0 8px;
}

.m-credential__body {
  font-family: var(--m-font-ui);
  font-size: 13px;
  font-weight: 300;
  color: var(--m-text-muted);
  line-height: 1.85;
  margin: 0;
}

/* ============================================================
   CONTACT LAYOUT & INFO
   ============================================================ */
.m-contact-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  padding: 56px 64px;
  border-top: 1px solid var(--m-gold-line);
}

.m-contact-info > div {
  margin-bottom: 28px;
}

.m-contact-info__label {
  font-family: var(--m-font-ui);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--m-gold-mid);
  margin: 0 0 6px;
}

.m-contact-info__value {
  font-family: var(--m-font-display);
  font-size: 18px;
  color: var(--m-text-bright);
  margin: 0;
  line-height: 1.4;
}

.m-contact-info__value a {
  color: var(--m-text-bright);
}

.m-contact-info__value a:hover {
  color: var(--m-gold);
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.m-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.m-form__row {
  display: flex;
  flex-direction: column;
}

.m-form__row--full,
.m-form__submit {
  grid-column: 1 / -1;
}

.m-form__submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.m-form-message {
  grid-column: 1 / -1;
  padding: 14px 20px;
  font-family: var(--m-font-ui);
  font-size: 13px;
  margin-bottom: 4px;
}

.m-form-message--success {
  background: rgba(203, 176, 106, 0.08);
  border-left: 3px solid var(--m-gold);
  color: var(--m-text);
}

.m-form-message--error {
  background: rgba(180, 60, 60, 0.10);
  border-left: 3px solid #B43C3C;
  color: var(--m-text);
}

/* Ensure submit button (any element) gets the gold treatment */
.m-form button[type="submit"],
.m-form-message button {
  background-color: var(--m-gold);
  color: var(--m-bg);
  border: none;
  font-family: var(--m-font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 36px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.m-form button[type="submit"]:hover {
  background-color: var(--m-text-bright);
}

/* ============================================================
   FOOTER
   ============================================================ */
.ct-footer {
  background: var(--m-bg-deep);
  border-top: 1px solid var(--m-gold-line);
}

.ct-footer .widget-title {
  font-family: var(--m-font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--m-gold);
  margin-bottom: 16px;
}

.ct-footer .widget {
  font-family: var(--m-font-ui);
  font-size: 13px;
  color: var(--m-text-muted);
  font-weight: 300;
}

.ct-footer a {
  color: var(--m-text-muted);
}

.ct-footer a:hover {
  color: var(--m-gold);
}

/* ============================================================
   FORMS — Contact / quote request
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
  background: var(--m-bg-elev) !important;
  border: 1px solid var(--m-gold-line) !important;
  border-radius: 0 !important;
  color: var(--m-text) !important;
  font-family: var(--m-font-ui) !important;
  font-size: 14px !important;
  padding: 14px 16px !important;
  transition: border-color 0.2s !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: var(--m-gold) !important;
  outline: none !important;
}

::placeholder {
  color: var(--m-text-faint) !important;
  font-style: italic;
}

label {
  font-family: var(--m-font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--m-gold-mid);
  display: block;
  margin-bottom: 8px;
}

/* ============================================================
   GUTENBERG BLOCKS — color tweaks for blocks the user inserts
   ============================================================ */
.wp-block-separator {
  border-color: var(--m-gold-line) !important;
  opacity: 1;
}

.wp-block-pullquote,
.wp-block-quote {
  border-color: var(--m-gold) !important;
  font-family: var(--m-font-display);
  font-style: italic;
  color: var(--m-text-bright);
}

.wp-block-cover {
  background-color: var(--m-bg-elev) !important;
}

/* ============================================================
   PWA — install banner styling
   The SuperPWA plugin renders an install button. Style it here.
   ============================================================ */
.superpwa-install-button,
.superpwa-app-banner button {
  background: var(--m-gold) !important;
  color: var(--m-bg) !important;
  border: none !important;
  font-family: var(--m-font-ui) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  padding: 12px 24px !important;
}

/* ============================================================
   RESPONSIVE — mobile breakpoints
   ============================================================ */
@media (max-width: 1024px) {
  .m-services { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .m-hero { padding: 56px 28px 40px; }
  .m-hero__title { font-size: 44px; }
  .m-hero__lede { font-size: 16px; }
  .m-services { grid-template-columns: 1fr; padding: 48px 28px; gap: 36px; }
  .m-stats { grid-template-columns: repeat(2, 1fr); }
  .m-stat:nth-child(2) { border-right: none; }
  .m-stat:nth-child(1),
  .m-stat:nth-child(2) { border-bottom: 1px solid var(--m-gold-line); }
  .m-cta-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 28px;
    text-align: left;
  }
  .m-cta-strip__title { font-size: 22px; }

  /* Inner pages */
  .m-page-header { padding: 48px 28px 32px; }
  .m-section { padding: 48px 28px; }
  .m-service-detail {
    grid-template-columns: 60px 1fr;
    gap: 20px;
    padding: 40px 0;
  }
  .m-service-detail__numeral { width: 48px; height: 48px; font-size: 14px; }
  .m-service-detail__title { font-size: 22px; }
  .m-credential-grid { grid-template-columns: 1fr; }
  .m-contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 28px;
  }
  .m-form { grid-template-columns: 1fr; }
  .m-form__submit { justify-content: flex-start; }
  .m-prose { font-size: 16px; }
}

@media (max-width: 480px) {
  .m-hero__title { font-size: 36px; }
  .m-hero__eyebrow { flex-direction: column; gap: 10px; }
  .m-hero__eyebrow .m-rule { width: 60px; }
}

/* ============================================================
   ACCESSIBILITY & MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--m-gold);
  outline-offset: 3px;
}

/* End of Monument Electrical child theme */
