/*
Theme Name: ClearEdge Services
Theme URI: https://clearedgeservicesottawa.base44.app
Author: ClearEdge Services
Description: Custom theme for ClearEdge Services, Ottawa's home exterior cleaning company. Built around a "window-pane spec sheet" visual language — hairline grids, mono readouts, and a glass/sunlight palette that matches the brand's "Standard of Clarity" positioning.
Version: 1.0
Requires PHP: 7.4
Text Domain: clearedge
*/

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ===== Tokens ===== */
:root {
  --ink: #0F1B22;
  --ink-soft: #3A4A50;
  --paper: #F6F7F4;
  --paper-dim: #ECEEEA;
  --white: #FFFFFF;
  --pane: #1C6E8C;
  --pane-bright: #2F9FC4;
  --concrete: #6E7672;
  --sunline: #E2A33E;
  --line: rgba(15, 27, 34, 0.12);
  --line-soft: rgba(15, 27, 34, 0.07);

  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --container: 1180px;
  --radius: 3px;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; padding: 96px 0; }
@media (max-width: 700px) { section { padding: 64px 0; } }

/* ===== Typography ===== */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; color: var(--ink); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: 1.4rem; }
p { color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pane);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--sunline);
}

.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--pane); color: var(--white); }
.btn-primary:hover { background: var(--pane-bright); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(28,110,140,0.28); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--pane); color: var(--pane); }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sunline);
  outline-offset: 2px;
}

/* ===== Window-pane grid utility (signature motif) ===== */
.pane-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 247, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.logo .mark { width: 6px; height: 24px; background: var(--pane); border-radius: 2px; transform: skewX(-12deg); }
.primary-nav { display: flex; align-items: center; gap: 36px; }
.primary-nav a { font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); transition: color 0.15s ease; }
.primary-nav a:hover { color: var(--pane); }
.header-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; background: none; border: none; padding: 8px; }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ''; display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: 0.2s ease; }

@media (max-width: 860px) {
  .primary-nav { position: fixed; top: 76px; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 24px; gap: 20px; border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s; pointer-events: none; }
  .primary-nav.open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
  .nav-toggle { display: block; }
  .header-cta .btn span.btn-label-full { display: none; }
}

/* ===== Hero ===== */
.hero { overflow: hidden; padding-top: 88px; padding-bottom: 88px; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-headline { font-size: clamp(2.6rem, 6.2vw, 4.6rem); text-transform: uppercase; }
.hero-headline span { display: block; }
.hero-headline span.accent { color: var(--pane); }
.hero-sub { max-width: 480px; margin: 24px 0 32px; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-art { position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(226,163,62,0.18) 50%, transparent 60%);
  background-size: 220% 220%;
  background-position: -40% -40%;
  animation: clarity-sweep 7s ease-in-out infinite;
}
@keyframes clarity-sweep {
  0%, 20% { background-position: -40% -40%; }
  50%, 70% { background-position: 100% 100%; }
  100% { background-position: 100% 100%; }
}
@media (prefers-reduced-motion: reduce) { .hero-art::after { animation: none; } }

.stat-bar { display: flex; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { flex: 1; padding: 20px 0 20px 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.stat .stat-label { font-family: var(--font-mono); font-size: 0.74rem; color: var(--concrete); text-transform: uppercase; letter-spacing: 0.06em; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { aspect-ratio: 16/10; }
  .stat-bar { flex-direction: column; }
  .stat { border-right: none; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: none; }
}

/* ===== Services / Surface Matrix ===== */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 28px; }
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-photo { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.service-photo img { width: 100%; height: 100%; object-fit: cover; }
.service-photo .photo-tag {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(15,27,34,0.72); color: var(--white); padding: 5px 10px; border-radius: 2px;
}
.service-body { padding: 32px; display: flex; flex-direction: column; flex: 1; }
.service-body h3 { margin-bottom: 12px; }
.service-body > p { margin-bottom: 22px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-bottom: 28px; }
.spec-item { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); display: flex; align-items: baseline; gap: 8px; }
.spec-item::before { content: '—'; color: var(--sunline); }
.service-body .btn { margin-top: auto; align-self: flex-start; }

.addon-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 28px 32px;
}
.addon-card .service-photo { aspect-ratio: 1/1; border-radius: var(--radius); }
.addon-price { font-family: var(--font-mono); font-size: 1.6rem; color: var(--pane); white-space: nowrap; }
.addon-price small { display: block; font-size: 0.7rem; color: var(--concrete); letter-spacing: 0.06em; text-transform: uppercase; }

@media (max-width: 860px) {
  .services-grid { grid-template-columns: 1fr; }
  .addon-card { grid-template-columns: 1fr; text-align: left; }
  .addon-card .service-photo { aspect-ratio: 16/9; }
}

/* ===== Process ===== */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.process-step { border-top: 2px solid var(--pane); padding-top: 22px; }
.process-step .step-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--sunline); display: block; margin-bottom: 14px; }
@media (max-width: 860px) { .process-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .process-grid { grid-template-columns: 1fr; } }

/* ===== Testimonials ===== */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.testimonial-card p { color: var(--ink); font-size: 1rem; margin-bottom: 20px; }
.testimonial-attrib { font-family: var(--font-mono); font-size: 0.78rem; color: var(--concrete); }
@media (max-width: 860px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* ===== Quote builder ===== */
.quote-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px; max-width: 760px; margin: 0 auto; }
.quote-progress { display: flex; gap: 8px; margin-bottom: 32px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--concrete); }
.quote-progress span { flex: 1; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.quote-progress span.active { color: var(--pane); border-color: var(--pane); }
.quote-step { display: none; }
.quote-step.active { display: block; }
.service-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 32px; }
.service-option { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.service-option input { position: absolute; opacity: 0; pointer-events: none; }
.service-option .opt-name { font-weight: 600; }
.service-option .opt-price { font-family: var(--font-mono); font-size: 0.8rem; color: var(--concrete); }
.service-option:has(input:checked) { border-color: var(--pane); background: rgba(28,110,140,0.06); }
.service-option:has(input:checked) .opt-price { color: var(--pane); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.82rem; font-weight: 600; }
.field input, .field textarea {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--paper);
}
.quote-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; }
.quote-confirm { text-align: center; padding: 24px 0; }
.quote-confirm .eyebrow { justify-content: center; }
.form-msg { font-size: 0.85rem; margin-top: 12px; }
.form-msg.error { color: #B3402A; }

@media (max-width: 600px) {
  .quote-panel { padding: 28px; }
  .service-options, .field-row { grid-template-columns: 1fr; }
}

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.78); padding: 72px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 56px; }
.site-footer h4 { color: var(--white); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer .logo { color: var(--white); margin-bottom: 16px; }
.footer-grid p { color: rgba(255,255,255,0.6); max-width: 280px; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: rgba(255,255,255,0.72); font-size: 0.92rem; transition: color 0.15s ease; }
.footer-grid a:hover { color: var(--sunline); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.footer-bottom .badges { font-family: var(--font-mono); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== Generic page content (Privacy Policy, Terms, etc.) ===== */
.page-content p { margin-bottom: 18px; }
.page-content h2 { font-size: 1.5rem; margin: 36px 0 14px; }
.page-content ul { list-style: disc; padding-left: 22px; margin-bottom: 18px; }
.page-content li { margin-bottom: 8px; color: var(--ink-soft); }

/* ===== Misc ===== */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white); padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 12px; top: 12px; }
