/* ============================================================
   PRIMETOUCH CLEANING — BASE
   Reset, typography, global elements
   ============================================================ */

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.display-xl {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; }
.h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
.h3 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); font-weight: 600; }
.h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }

.body-xl  { font-size: 1.2rem; line-height: 1.7; }
.body-lg  { font-size: 1.05rem; line-height: 1.75; }
.body-md  { font-size: 0.95rem; line-height: 1.7; }
.body-sm  { font-size: 0.85rem; line-height: 1.65; }
.caption  { font-size: 0.75rem; line-height: 1.5; }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-gold      { color: var(--gold); }
.text-success   { color: var(--success); }
.text-error     { color: var(--error); }
.text-warning   { color: var(--warning); }

.text-center { text-align: center; }
.text-right  { text-align: right; }

.font-display { font-family: var(--font-display); }
.mono         { font-family: 'Courier New', monospace; font-size: 0.85em; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-md);
}

em { font-style: italic; color: var(--gold); }

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-sm { max-width: 640px; }
.container-md { max-width: 860px; }

.section {
  padding: var(--space-3xl) 0;
}

.section-sm {
  padding: var(--space-2xl) 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-2xl);
}

.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Grid System ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }
}

/* ── Spacing Utilities ──────────────────────────────────────── */
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-lg) 0;
}

/* ── Back to top ────────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--navy);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--trans-base), transform var(--trans-base);
  z-index: 900;
  border: none;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Page Header (breadcrumb pages) ─────────────────────────── */
.page-header {
  padding: calc(var(--navbar-h) + var(--space-2xl)) 0 var(--space-2xl);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(201,168,76,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.page-header-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.page-header-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.breadcrumb a {
  color: var(--gold);
  transition: opacity var(--trans-fast);
}

.breadcrumb a:hover {
  opacity: 0.7;
}

.breadcrumb-sep {
  opacity: 0.4;
}

/* ── Data reveal animations ─────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Noise texture overlay (visual depth) ───────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

[data-theme="light"] body::after {
  opacity: 0.012;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: rgba(201,168,76,0.25);
  color: var(--text-primary);
}
