/*
Theme Name: MSS Next
Theme URI: https://mastservicestation.com
Author: Mast Service Station
Author URI: https://mastservicestation.com
Description: Clean, conversion-focused theme for Mast Service Station — Patiala's trusted tyre, wheel, and vehicle service specialist.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: Private
Text Domain: mss-next
Tags: automotive, local-business, mobile-first, dark
*/

/* ═══════════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS — CSS Custom Properties
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Palette ─────────────────────────────────────── */
  --mss-black:        #080808;
  --mss-dark:         #111111;
  --mss-dark-2:       #181818;
  --mss-dark-3:       #222222;
  --mss-border:       #2a2a2a;
  --mss-muted:        #555555;
  --mss-grey:         #888888;
  --mss-light-grey:   #b8b8b8;
  --mss-off-white:    #e8e8e8;
  --mss-white:        #ffffff;

  /* ── Brand Red ───────────────────────────────────── */
  --mss-red:          #C8102E;
  --mss-red-dark:     #a00d24;
  --mss-red-light:    #e8253f;
  --mss-red-glow:     rgba(200, 16, 46, 0.15);
  --mss-red-border:   rgba(200, 16, 46, 0.3);

  /* ── Accent ──────────────────────────────────────── */
  --mss-gold:         #c49a2a;
  --mss-gold-light:   #e8c050;
  --mss-green:        #22c55e;  /* online / available indicators */

  /* ── Typography ──────────────────────────────────── */
  --font-display:     'Barlow Condensed', sans-serif;
  --font-body:        'Barlow', sans-serif;

  --text-xs:          0.75rem;
  --text-sm:          0.875rem;
  --text-base:        1rem;
  --text-lg:          1.125rem;
  --text-xl:          1.25rem;
  --text-2xl:         1.5rem;
  --text-3xl:         2rem;
  --text-4xl:         2.75rem;
  --text-5xl:         3.75rem;
  --text-6xl:         5rem;
  --text-hero:        clamp(3rem, 7vw, 6rem);

  /* ── Spacing ─────────────────────────────────────── */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* ── Layout ──────────────────────────────────────── */
  --container:        1200px;
  --container-narrow: 800px;
  --container-wide:   1400px;
  --radius-sm:        4px;
  --radius:           8px;
  --radius-lg:        12px;
  --radius-xl:        20px;
  --radius-full:      9999px;

  /* ── Transitions ─────────────────────────────────── */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:    150ms;
  --dur-base:    250ms;
  --dur-slow:    400ms;

  /* ── Shadows ─────────────────────────────────────── */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
  --shadow-red:  0 4px 24px rgba(200, 16, 46, 0.25);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);

  /* ── Z-index scale ───────────────────────────────── */
  --z-base:       1;
  --z-dropdown:   100;
  --z-sticky:     200;
  --z-overlay:    300;
  --z-modal:      400;
  --z-toast:      500;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: #616368;
  background-color: #f6f6f6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--mss-red);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--mss-red-dark);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

/* ─── Typography Scale ────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: #121212;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-5xl); font-weight: 800; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl);  }
h6 { font-size: var(--text-lg);  }

p {
  line-height: 1.65;
  color: #616368;
}

strong { font-weight: 600; color: #121212; }
em     { font-style: italic; }

/* ─── Selection ───────────────────────────────────────────────────────────── */

::selection {
  background-color: var(--mss-red);
  color: var(--mss-white);
}

/* ─── Focus styles ────────────────────────────────────────────────────────── */

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

/* ─── Scrollbar ───────────────────────────────────────────────────────────── */

::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #e8e8e8; }
::-webkit-scrollbar-thumb { background: #bbbbbb; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999999; }

/* ═══════════════════════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
   ═══════════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--space-20);
}

.section--lg {
  padding-block: var(--space-32);
}

.section--sm {
  padding-block: var(--space-12);
}

/* ─── Section Headers ─────────────────────────────────────────────────────── */

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mss-red);
  margin-bottom: var(--space-4);
}

.section-header__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #121212;
  margin-bottom: var(--space-4);
}

.section-header__subtitle {
  font-size: var(--text-lg);
  color: #616368;
  max-width: 600px;
  margin-inline: auto;
  line-height: 1.7;
}

/* ─── Grid ────────────────────────────────────────────────────────────────── */

.grid { display: grid; }
.grid--2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid--3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid--4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ─── Screen reader only ──────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ─── Responsive helpers ──────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* ─── Animated reveal ─────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }
