/*
 * Theme Name:   Maintenance Magicians
 * Theme URI:    https://maintenancemagicians.ca
 * Description:  Custom theme for Maintenance Magicians, a premium residential
 *               property maintenance company based in Ottawa, Ontario.
 * Author:       Maintenance Magicians
 * Author URI:   https://maintenancemagicians.ca
 * Version:      1.0.0
 * License:      GNU General Public License v2 or later
 * License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:  maintenance-magicians
 * Tags:         property-maintenance, ottawa, lawn-care, driveway-sealing
 */

/* ==========================================================================
   MAINTENANCE MAGICIANS THEME GLOBAL STYLES
   Shared styles for custom templates and classic fallback templates.
   Homepage-specific styles live in assets/css/homepage.css
   ========================================================================== */

/* ---- Google Fonts are enqueued via functions.php (Sora + Inter) ---- */

/* ---- Custom Properties (Design Tokens) ---- */
:root {
  /* Brand palette */
  --mm-purple:        #5a2f7f;
  --mm-purple-dark:   #3d1f58;
  --mm-purple-deeper: #2a1040;
  --mm-purple-light:  #7a4fa0;
  --mm-purple-pale:   #f0ebf7;
  --mm-purple-glow:   rgba(90, 47, 127, 0.18);

  /* Accent */
  --mm-gold:          #d4a017;
  --mm-gold-light:    #f0c040;
  --mm-green:         #2d8653;

  /* Backgrounds */
  --mm-dark:          #0d0818;
  --mm-dark-2:        #150e28;
  --mm-dark-card:     #1e1438;
  --mm-light:         #fafafa;
  --mm-off-white:     #f6f3fb;

  /* Text */
  --mm-text:          #1a1a2e;
  --mm-text-muted:    #6b7280;
  --mm-text-light:    #f8f6ff;
  --mm-text-dim:      rgba(248, 246, 255, 0.68);

  /* UI */
  --mm-border:        #e5e7eb;
  --mm-border-dark:   rgba(255,255,255,0.1);
  --mm-radius-sm:     6px;
  --mm-radius:        12px;
  --mm-radius-lg:     20px;
  --mm-radius-xl:     32px;

  /* Shadows */
  --mm-shadow-sm:     0 2px 8px rgba(0,0,0,0.06);
  --mm-shadow:        0 8px 32px rgba(0,0,0,0.10);
  --mm-shadow-lg:     0 20px 60px rgba(0,0,0,0.14);
  --mm-shadow-purple: 0 8px 32px rgba(90,47,127,0.22);

  /* Transitions */
  --mm-ease:          cubic-bezier(0.22, 1, 0.36, 1);
  --mm-ease-fast:     cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --mm-font-head:  'Sora', 'Plus Jakarta Sans', system-ui, sans-serif;
  --mm-font-body:  'Inter', system-ui, sans-serif;

  /* Spacing scale */
  --mm-section-py:     100px;
  --mm-section-py-sm:  64px;
  --mm-container:      1220px;
}

/* ---- Base resets ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---- Global typography ---- */
body {
  font-family: var(--mm-font-body);
  color: var(--mm-text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mm-font-head);
}

/* ---- Theme primary colour ---- */
:root {
  --theme-palette-color-1: #5a2f7f;
}

/* ---- Fallback classic templates ---- */
.mm-site-header,
.mm-site-footer,
.mm-fallback-content {
  width: min(100% - 2rem, var(--mm-container));
  margin-inline: auto;
}

.mm-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.mm-site-brand {
  color: var(--mm-purple-deeper);
  font-family: var(--mm-font-head);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 800;
  text-decoration: none;
}

.custom-logo-link {
  display: inline-flex;
}

.mm-site-logo,
.custom-logo {
  display: block;
  max-width: 220px;
  height: auto;
}

.mm-site-nav .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mm-site-nav a {
  color: var(--mm-text);
  font-weight: 600;
  text-decoration: none;
}

.mm-fallback-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(90, 47, 127, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--mm-off-white) 100%);
}

.mm-fallback-content {
  padding: 2rem 0 4rem;
}

.mm-fallback-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(90, 47, 127, 0.08);
  border-radius: var(--mm-radius-lg);
  box-shadow: var(--mm-shadow);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.mm-fallback-title {
  margin: 0 0 0.75rem;
  color: var(--mm-purple-deeper);
}

.mm-fallback-meta {
  margin: 0 0 1rem;
  color: var(--mm-text-muted);
  font-size: 0.95rem;
}

.mm-fallback-content .post,
.mm-fallback-content .page {
  margin-bottom: 1.5rem;
}

.mm-fallback-content a {
  color: var(--mm-purple);
}

.mm-fallback-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.mm-site-footer {
  padding: 0 0 2rem;
  color: var(--mm-text-muted);
  font-size: 0.95rem;
}

.mm-site-footer__inner {
  border-top: 1px solid rgba(90, 47, 127, 0.12);
  padding-top: 1.5rem;
}

/* ---- Focus styles (accessibility) ---- */
:focus-visible {
  outline: 3px solid var(--mm-purple-light);
  outline-offset: 3px;
}

/* ---- Utility: visually-hidden (screen reader only) ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
