/* ===========================================
   Pingie — Compiled Styles (replaces Tailwind CDN)
   =========================================== */

/* --- Self-hosted Fonts --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/inter-variable.woff2) format('woff2');
}

@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url(fonts/material-symbols-outlined.woff2) format('woff2');
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background-color: #fbf9f8; color: #1b1c1c; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea { font: inherit; }
ul { list-style: none; }

/* --- Material Symbols --- */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
}

/* --- Custom Components --- */
.hero-gradient { background: linear-gradient(135deg, #0061a4 0%, #2196f3 100%); }
.ghost-border { border: 1px solid rgba(191, 199, 212, 0.15); }
.kinetic-bg { background-image: radial-gradient(circle at 2px 2px, #e4e2e1 1px, transparent 0); background-size: 40px 40px; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.plugin-grid-row { border-bottom: 1px solid rgba(112, 120, 131, 0.1); }
.plugin-grid-row:last-child { border-bottom: none; }
.badge-homebridge { background-color: #f0f4f8; color: #0061a4; }
.badge-hacs { background-color: #f0fdf4; color: #006c45; }
.form-message { margin-bottom: 1rem; padding: 0.75rem 1rem; border-radius: 0.75rem; font-size: 0.875rem; display: none; }
.form-message.success { display: block; background-color: #f0fdf4; color: #006c45; }
.form-message.error { display: block; background-color: #fef2f2; color: #ba1a1a; }

/* --- Display --- */
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }
.inline-block { display: inline-block; }
.hidden { display: none; }

/* --- Position --- */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; top: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.top-1\/2 { top: 50%; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.z-50 { z-index: 50; }
.z-10 { z-index: 10; }

/* --- Width --- */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-64 { width: 16rem; }
.w-1\/3 { width: 33.333333%; }
.w-\[300px\] { width: 300px; }
.max-w-7xl { max-width: 80rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.max-w-sm { max-width: 24rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* --- Height --- */
.h-1 { height: 0.25rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-64 { height: 16rem; }
.h-full { height: 100%; }
.h-2\/3 { height: 66.666667%; }
.min-h-\[400px\] { min-height: 400px; }
.aspect-video { aspect-ratio: 16 / 9; }

/* --- Flexbox --- */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-none { flex: none; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.shrink-0 { flex-shrink: 0; }

/* --- Gap --- */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* --- Grid --- */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* --- Space Between Children --- */
.space-x-8 > * + * { margin-left: 2rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* --- Padding --- */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pt-8 { padding-top: 2rem; }
.pt-20 { padding-top: 5rem; }
.pb-10 { padding-bottom: 2.5rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-32 { padding-bottom: 8rem; }

/* --- Margin --- */
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.-mb-16 { margin-bottom: -4rem; }
.-mr-16 { margin-right: -4rem; }

/* --- Typography --- */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-\[10px\] { font-size: 10px; }
.text-\[12rem\] { font-size: 12rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.uppercase { text-transform: uppercase; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-relaxed { line-height: 1.625; }
.leading-\[0\.9\] { line-height: 0.9; }
.text-center { text-align: center; }
.no-underline { text-decoration: none; }
.text-inherit { color: inherit; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

/* --- Text Colors --- */
.text-white { color: #ffffff; }
.text-on-surface { color: #1b1c1c; }
.text-on-surface-variant { color: #404752; }
.text-primary { color: #0061a4; }
.text-secondary { color: #006c45; }
.text-tertiary { color: #854496; }
.text-on-secondary-container { color: #00734a; }
.text-on-tertiary-container { color: #4a055d; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-900 { color: #0f172a; }

/* --- Background Colors --- */
.bg-surface { background-color: #fbf9f8; }
.bg-surface-container-low { background-color: #f6f3f2; }
.bg-surface-container-lowest { background-color: #ffffff; }
.bg-surface-container { background-color: #f0eded; }
.bg-surface-container-high { background-color: #eae8e7; }
.bg-white { background-color: #ffffff; }
.bg-white\/80 { background-color: rgba(255, 255, 255, 0.8); }
.bg-white\/60 { background-color: rgba(255, 255, 255, 0.6); }
.bg-primary { background-color: #0061a4; }
.bg-primary-fixed { background-color: #d1e4ff; }
.bg-secondary-container { background-color: #65fdb4; }
.bg-secondary-fixed { background-color: #65fdb4; }
.bg-tertiary-container { background-color: #bd77ce; }
.bg-tertiary-fixed { background-color: #fcd7ff; }
.bg-on-surface { background-color: #1b1c1c; }
.bg-slate-100 { background-color: #f1f5f9; }

/* --- Borders --- */
.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-none { border: none; }
.border-\[32px\] { border-width: 32px; border-style: solid; }
.border-outline-variant\/20 { border-color: rgba(191, 199, 212, 0.2); }
.border-outline-variant\/10 { border-color: rgba(191, 199, 212, 0.1); }
.border-primary-fixed { border-color: #d1e4ff; }
.border-slate-200 { border-color: #e2e8f0; }

/* --- Border Radius --- */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* --- Shadows --- */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.shadow-xl.shadow-primary\/20 { box-shadow: 0 20px 25px -5px rgba(0,97,164,0.2), 0 8px 10px -6px rgba(0,97,164,0.2); }

/* --- Opacity --- */
.opacity-10 { opacity: 0.1; }
.opacity-20 { opacity: 0.2; }
.opacity-80 { opacity: 0.8; }

/* --- Overflow --- */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* --- Blur & Backdrop --- */
.backdrop-blur-xl { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.blur-3xl { filter: blur(64px); }

/* --- Object Fit --- */
.object-cover { object-fit: cover; }

/* --- Scroll Snap --- */
.snap-x { scroll-snap-type: x mandatory; }
.snap-center { scroll-snap-align: center; }

/* --- Transitions --- */
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }

/* --- Hover States --- */
.hover\:text-slate-900:hover { color: #0f172a; }
.hover\:text-blue-600:hover { color: #2563eb; }
.hover\:bg-primary-container:hover { background-color: #2196f3; }
.hover\:bg-surface-container-high:hover { background-color: #eae8e7; }
.hover\:bg-surface\/50:hover { background-color: rgba(251, 249, 248, 0.5); }
.hover\:bg-white:hover { background-color: #ffffff; }
.hover\:opacity-80:hover { opacity: 0.8; }
.hover\:shadow-2xl:hover { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }

/* --- Active States --- */
.active\:scale-95:active { transform: scale(0.95); }
.active\:scale-\[0\.98\]:active { transform: scale(0.98); }

/* --- Focus States --- */
.focus\:ring-2:focus,
.focus\:ring-primary\/40:focus { outline: none; box-shadow: 0 0 0 2px rgba(0, 97, 164, 0.4); }

/* --- Group Hover --- */
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:gap-3 { gap: 0.75rem; }
.group:hover .group-hover\:shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.group:hover .group-hover\:opacity-20 { opacity: 0.2; }
.group:hover .group-hover\:bg-primary-container { background-color: #2196f3; }

/* ===========================================
   RESPONSIVE BREAKPOINTS
   =========================================== */

/* --- sm: 640px --- */
@media (min-width: 640px) {
  .sm\:w-\[350px\] { width: 350px; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:p-8 { padding: 2rem; }
  .sm\:p-12 { padding: 3rem; }
  .sm\:mb-0 { margin-bottom: 0; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
}

/* --- md: 768px --- */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:w-\[450px\] { width: 450px; }
  .md\:text-8xl { font-size: 6rem; line-height: 1; }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-left { text-align: left; }
  .md\:pt-32 { padding-top: 8rem; }
  .md\:pb-48 { padding-bottom: 12rem; }
  .md\:justify-start { justify-content: flex-start; }
  .md\:items-end { align-items: flex-end; }
}

/* --- lg: 1024px --- */
@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:gap-20 { gap: 5rem; }
}
