/* ==========================================================================
   GLOBAL.CSS - Golden City Window Cleaning
   ========================================================================== */

/* ── 1. Design Tokens (Light Mode) ─────────────────────────────────────── */
:root,
[data-theme="light"] {
  --font-display: "Cabinet Grotesk", sans-serif;
  --font-body: "Satoshi", sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7.5rem);

  --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;

  --color-bg: oklch(0.985 0.01 95);
  --color-surface: oklch(0.995 0.005 95);
  --color-surface-2: oklch(0.96 0.015 90);
  --color-divider: oklch(0.9 0.02 85);
  --color-border: oklch(0.84 0.03 80);

  --color-text: oklch(0.24 0.03 70);
  --color-text-muted: oklch(0.48 0.03 75);
  --color-text-faint: oklch(0.68 0.02 80);
  --color-text-inverse: oklch(0.99 0.003 95);

  --color-primary: oklch(0.72 0.16 82);
  --color-primary-hover: oklch(0.64 0.15 78);
  --color-accent: oklch(0.34 0.04 55);
  --color-accent-hover: oklch(0.28 0.035 55);

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2.5rem;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px oklch(0.25 0.03 70 / 0.05);
  --shadow-md: 0 10px 28px oklch(0.22 0.03 70 / 0.08);
  --shadow-lg: 0 24px 56px oklch(0.18 0.03 70 / 0.14);

  --transition-interactive: 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── 2. Design Tokens (Dark Mode) ──────────────────────────────────────── */
[data-theme="dark"] {
  --color-bg: oklch(0.18 0.02 70);
  --color-surface: oklch(0.22 0.02 70);
  --color-surface-2: oklch(0.26 0.025 72);
  --color-divider: oklch(0.32 0.02 72);
  --color-border: oklch(0.38 0.025 75);

  --color-text: oklch(0.96 0.01 90);
  --color-text-muted: oklch(0.77 0.015 85);
  --color-text-faint: oklch(0.58 0.015 80);
  --color-text-inverse: oklch(0.18 0.02 70);

  --color-primary: oklch(0.78 0.15 82);
  --color-primary-hover: oklch(0.84 0.13 85);
  --color-accent: oklch(0.9 0.03 95);
  --color-accent-hover: oklch(0.82 0.03 90);

  --shadow-sm: 0 2px 8px oklch(0 0 0 / 0.22);
  --shadow-md: 0 8px 24px oklch(0 0 0 / 0.32);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: oklch(0.18 0.02 70);
    --color-surface: oklch(0.22 0.02 70);
    --color-surface-2: oklch(0.26 0.025 72);
    --color-divider: oklch(0.32 0.02 72);
    --color-border: oklch(0.38 0.025 75);
    --color-text: oklch(0.96 0.01 90);
    --color-text-muted: oklch(0.77 0.015 85);
    --color-text-faint: oklch(0.58 0.015 80);
    --color-text-inverse: oklch(0.18 0.02 70);
    --color-primary: oklch(0.78 0.15 82);
    --color-primary-hover: oklch(0.84 0.13 85);
    --color-accent: oklch(0.9 0.03 95);
    --color-accent-hover: oklch(0.82 0.03 90);
    --shadow-sm: 0 2px 8px oklch(0 0 0 / 0.22);
    --shadow-md: 0 8px 24px oklch(0 0 0 / 0.32);
    --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.42);
  }
}

/* ── 3. Base & Resets ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: var(--space-24);
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  text-wrap: balance;
  font-weight: 900;
}

p {
  text-wrap: pretty;
  max-width: 65ch;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a,
button {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

a,
button,
input,
select,
textarea {
  transition: all var(--transition-interactive);
}

::selection {
  background: color-mix(in oklch, var(--color-primary) 30%, transparent);
  color: var(--color-text);
}

input,
select,
textarea {
  font-size: 16px !important;
}

/* ── 4. Utility Typography ─────────────────────────────────────────────── */
.heading-display {
  font-family: var(--font-display);
  font-weight: 900;
}

.text-body {
  font-family: var(--font-body);
}

.text-balance {
  text-wrap: balance;
}

/* ── 5. Core Components ────────────────────────────────────────────────── */
.container-main {
  width: 100%;
  padding-inline: var(--space-4);
  margin-inline: auto;
}

@media (min-width: 768px) {
  .container-main {
    width: min(1180px, 95%);
    padding-inline: 0;
  }
}

.glass-panel {
  background: color-mix(in oklch, var(--color-surface) 70%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid color-mix(in oklch, var(--color-border) 40%, transparent);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-2xl);
}

.nav-glass {
  background: color-mix(in oklch, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid color-mix(in oklch, var(--color-border) 30%, transparent);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hover-card {
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive),
    border-color var(--transition-interactive);
}

.hover-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in oklch, var(--color-primary) 50%, transparent);
}

.pill {
  border-radius: var(--radius-full);
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in oklch, var(--color-border) 50%, transparent);
  background: color-mix(in oklch, var(--color-surface) 72%, transparent);
  backdrop-filter: blur(14px);
  font-size: var(--text-xs);
  font-weight: 700;
}

.logo-mark {
  width: 2.25rem !important;
  height: 2.25rem !important;
  border-radius: 0.65rem;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-mark img,
img.logo-markimg,
.logo-mark__img,
.logo-markimg {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: block;
  max-width: none;
}

/* ── 6. Buttons ────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 14px color-mix(in oklch, var(--color-primary) 40%, transparent);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px color-mix(in oklch, var(--color-primary) 50%, transparent);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-text-inverse);
}

.btn-accent:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 8px 24px color-mix(in oklch, var(--color-accent) 50%, transparent);
}

/* ── 7. Forms ──────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: var(--text-sm);
}

.form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: color-mix(in oklch, var(--color-surface) 60%, transparent);
  border: 1px solid color-mix(in oklch, var(--color-border) 80%, transparent);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--color-primary) 15%, transparent);
  background: var(--color-surface);
}

.form-input::placeholder {
  color: var(--color-text-faint);
}

/* ── 8. Choice Cards ───────────────────────────────────────────────────── */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .choice-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

.choice-label {
  cursor: pointer;
  position: relative;
  display: block;
  height: 100%;
}

.choice-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border-radius: 1.25rem;
  background: color-mix(in oklch, var(--color-surface) 60%, transparent);
  border: 1px solid color-mix(in oklch, var(--color-border) 80%, transparent);
  transition: all 0.2s ease;
  height: 100%;
}

.choice-card i {
  font-size: 1.5rem;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.choice-card span {
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1.3;
}

.choice-label:hover .choice-card {
  border-color: color-mix(in oklch, var(--color-primary) 50%, transparent);
  background: color-mix(in oklch, var(--color-surface) 90%, transparent);
  transform: translateY(-2px);
}

.choice-input:checked + .choice-card {
  border-color: var(--color-primary);
  background: color-mix(in oklch, var(--color-primary) 8%, var(--color-surface));
  box-shadow: 0 4px 12px color-mix(in oklch, var(--color-primary) 15%, transparent);
}

.choice-input:checked + .choice-card i {
  color: var(--color-primary);
}

.choice-input:focus-visible + .choice-card {
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 30%, transparent);
}

/* ── 9. Dropdown Menu ──────────────────────────────────────────────────── */
.dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 16rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 180ms ease;
  z-index: 60;
}

.dropdown-parent:hover .dropdown,
.dropdown-parent:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  top: calc(100% + 0.4rem);
}

.dropdown-menu {
  padding: 0.6rem;
  border-radius: 1.2rem;
  background: color-mix(in oklch, var(--color-surface) 78%, transparent);
  border: 1px solid color-mix(in oklch, var(--color-border) 50%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
}

.dropdown-menu a {
  display: block;
  padding: 0.95rem 1rem;
  border-radius: 0.9rem;
  font-size: var(--text-sm);
  font-weight: 700;
}

.dropdown-menu a:hover {
  background: color-mix(in oklch, var(--color-primary) 10%, transparent);
  color: var(--color-primary);
}

/* ── 10. Estimator / Details Helpers ───────────────────────────────────── */
details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

.est-option input[type="radio"],
.est-option input[type="checkbox"] {
  display: none;
}

.est-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  border-radius: 1rem;
  cursor: pointer;
  text-align: center;
  border: 2px solid transparent;
  background: oklch(0.97 0.01 240);
  transition: all 0.18s ease;
  min-height: 5rem;
}

[data-theme="dark"] .est-option label {
  background: oklch(0.22 0.04 240);
}

.est-option input:checked + label,
.est-option label:hover {
  border-color: oklch(0.65 0.15 240);
  background: oklch(0.65 0.15 240 / 0.08);
}

.est-option input:checked + label {
  background: oklch(0.65 0.15 240 / 0.12);
  box-shadow: 0 0 0 3px oklch(0.65 0.15 240 / 0.15);
}

.est-option label i {
  font-size: 1.4rem;
  color: oklch(0.65 0.15 240);
}

.est-option label span {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.est-option label small {
  font-size: 0.65rem;
  font-weight: 700;
  color: oklch(0.55 0.04 240);
}

.step-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  background: oklch(0.92 0.03 240);
  color: oklch(0.45 0.04 240);
  transition: all 0.2s;
  flex-shrink: 0;
}

.step-dot.active {
  background: oklch(0.65 0.15 240);
  color: white;
}

.step-dot.done {
  background: oklch(0.55 0.18 145);
  color: white;
}

.est-tab {
  color: oklch(0.6 0.04 240);
  border-bottom: 2px solid transparent;
}

.est-tab-active {
  color: oklch(0.65 0.15 240);
  border-bottom: 2px solid oklch(0.65 0.15 240);
}

[data-theme="dark"] .est-tab {
  color: oklch(0.7 0.04 240);
}

@keyframes pop {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

.price-pop {
  animation: pop 0.25s ease;
}

/* ── 11. Mobile Navigation ─────────────────────────────────────────────── */
.nav-mobile-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in oklch, var(--color-border) 60%, transparent);
  background: color-mix(in oklch, var(--color-surface) 60%, transparent);
  z-index: 100;
  transition: background 0.2s ease;
}

.nav-mobile-btn:hover {
  background: color-mix(in oklch, var(--color-primary) 10%, var(--color-surface));
}

.nav-mobile-btn span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav-mobile-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-mobile-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-mobile-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-mobile-btn {
    display: none;
  }
}

#mobile-menu {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
}

#mobile-menu a {
  color: var(--color-text);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
}

#mobile-menu a:hover,
#mobile-menu a.text-sky-500 {
  color: var(--color-primary);
  background: color-mix(in oklch, var(--color-primary) 8%, transparent);
}

#mobile-menu button {
  color: var(--color-text);
}

[data-theme="dark"] #mobile-menu {
  background: var(--color-surface);
  border-top-color: var(--color-divider);
}

[data-theme="dark"] #mobile-menu a {
  color: var(--color-text);
}

/* ── 12. Animation Helpers ─────────────────────────────────────────────── */
.squeegee-wipe {
  position: relative;
  overflow: hidden;
}

.squeegee-wipe::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: wipe 4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  pointer-events: none;
}

@keyframes wipe {
  0% {
    left: -100%;
  }

  20% {
    left: 200%;
  }

  100% {
    left: 200%;
  }
}

/* ── 13. Compatibility Patch For Existing HTML Class Names ─────────────── */
/* These classes appear throughout your pages and are not standard Tailwind. */

.text-9px {
  font-size: 9px !important;
}

.text-10px {
  font-size: 10px !important;
}

.text-11px {
  font-size: 11px !important;
}

.tracking-0\.2em {
  letter-spacing: 0.2em !important;
}

.tracking-0\.4em {
  letter-spacing: 0.4em !important;
}

.rounded-2rem {
  border-radius: 2rem !important;
}

.rounded-3rem {
  border-radius: 3rem !important;
}

.bg-amber-50010 {
  background-color: rgb(245 158 11 / 0.1) !important;
}

.bg-amber-5005 {
  background-color: rgb(245 158 11 / 0.05) !important;
}

.bg-stone-80010 {
  background-color: rgb(41 37 36 / 0.1) !important;
}

.bg-stone-70010 {
  background-color: rgb(68 64 60 / 0.1) !important;
}

.bg-white20 {
  background-color: rgb(255 255 255 / 0.2) !important;
}

.border-white5 {
  border-color: rgb(255 255 255 / 0.05) !important;
}

.border-white10 {
  border-color: rgb(255 255 255 / 0.1) !important;
}

.border-amber-50020 {
  border-color: rgb(245 158 11 / 0.2) !important;
}

.from-slate-90060 {
  --tw-gradient-from: rgb(15 23 42 / 0.6) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.via-slate-90010 {
  --tw-gradient-to: rgb(15 23 42 / 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from),
    rgb(15 23 42 / 0.1) var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
}

.shadow-amber-60020 {
  --tw-shadow-color: rgb(217 119 6 / 0.2) !important;
}

.shadow-stone-80020 {
  --tw-shadow-color: rgb(41 37 36 / 0.2) !important;
}

.hoverbg-amber-500:hover {
  background-color: rgb(245 158 11) !important;
}

.hoverbg-stone-700:hover {
  background-color: rgb(68 64 60) !important;
}

.hovertext-amber-500:hover {
  color: rgb(245 158 11) !important;
}

.hovertext-stone-600:hover {
  color: rgb(87 83 78) !important;
}

.hoverscale-105:hover {
  transform: scale(1.05) !important;
}

.hoverrotate-0:hover {
  transform: rotate(0deg) !important;
}

.whitespace-nowrap {
  white-space: nowrap !important;
}

/* Dark helpers matching current HTML naming */
[data-theme="dark"] .darkbg-slate-900 {
  background-color: rgb(15 23 42) !important;
}

[data-theme="dark"] .darkbg-slate-800 {
  background-color: rgb(30 41 59) !important;
}

[data-theme="dark"] .darkbg-slate-80050 {
  background-color: rgb(30 41 59 / 0.5) !important;
}

[data-theme="dark"] .darkborder-slate-700 {
  border-color: rgb(51 65 85) !important;
}

[data-theme="dark"] .darkborder-slate-800 {
  border-color: rgb(30 41 59) !important;
}

[data-theme="dark"] .darktext-slate-200 {
  color: rgb(226 232 240) !important;
}

[data-theme="dark"] .darktext-slate-300 {
  color: rgb(203 213 225) !important;
}

[data-theme="dark"] .darktext-slate-400 {
  color: rgb(148 163 184) !important;
}

/* Broken responsive-style class names present in markup */
.mdtext-left {
  text-align: center;
}

@media (min-width: 768px) {
  .mdtext-left {
    text-align: left !important;
  }

  .mdjustify-start {
    justify-content: flex-start !important;
  }

  .mdjustify-center {
    justify-content: center !important;
  }

  .mdmx-0 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .mdp-16 {
    padding: 4rem !important;
  }

  .mdgrid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mdgrid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .mdgrid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .mdflex {
    display: flex !important;
  }

  .mdhidden {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .lggrid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .lggrid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .lgdivide-y-0 > :not([hidden]) ~ :not([hidden]) {
    border-top-width: 0 !important;
  }

  .lgdivide-x > :not([hidden]) ~ :not([hidden]) {
    border-left-width: 1px !important;
  }
}