/* Custom styles for Ecoprism Alpine.js Homepage */

/* Hero Section Styles */
.hero-gradient {
  background: linear-gradient(178deg, rgba(249, 212, 35, 0.1) 14.96%, rgba(249, 212, 35, 0.5) 47.06%, rgba(111, 134, 100, 0.8) 74.16%, #407775 98.04%);
}

.hero-title {
  color: #407775;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* Custom CSS Variables */
:root {
  --ecoprism-primary: #407775;
  --ecoprism-secondary: #588885;
  --ecoprism-accent: #9dbdb8;
  --ecoprism-yellow: #fbbf24;
  --ecoprism-dark: #1f2937;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* Ensure header blends properly with background */
header {
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
}

/* Poppins for Headings and Buttons */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
}

button,
.btn,
.btn-primary,
.btn-secondary,
a.button,
input[type="submit"],
input[type="button"] {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
}

/* 3D Card Flip Styles */
.perspective-1000 {
  perspective: 1000px;
}

.transform-style-preserve-3d {
  transform-style: preserve-3d;
}

.backface-hidden {
  backface-visibility: hidden;
}

.rotate-y-180 {
  transform: rotateY(180deg);
}

/* Custom Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--ecoprism-primary), var(--ecoprism-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--ecoprism-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ecoprism-secondary);
}

/* Loading Animation */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--ecoprism-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Button Hover Effects */
.btn-primary {
  background: linear-gradient(135deg, var(--ecoprism-primary), var(--ecoprism-secondary));
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ecoprism-secondary), var(--ecoprism-accent));
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(64, 119, 117, 0.3);
}

.btn-secondary {
  background: var(--ecoprism-yellow);
  transition: all 0.3s ease;
  font-family: "Poppins", sans-serif !important;
}

.btn-secondary:hover {
  background: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
}

/* All CTA buttons use Poppins font */
a[class*="bg-"],
button[class*="bg-"],
.cta-button,
a[href*="contact"],
a[href*="demo"],
a[href*="explore"] {
  font-family: "Poppins", sans-serif !important;
}

/* Card Styles */
.card {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Navigation Styles */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ecoprism-yellow);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Navigation menu items font */
nav .nav-link,
nav button,
nav a,
header nav button,
header nav a,
header button,
header a {
  font-family: "Poppins", sans-serif !important;
  font-weight: 500;
}

/* Smaller chevron icons */
.chevron-icon {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px;
  min-height: 12px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.chevron-icon path {
  stroke-width: 3 !important;
}

.chevron-icon.rotate-180 {
  transform: rotate(180deg);
}

/* Video Play Button */
.video-play-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.video-play-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.video-play-button::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Section Spacing */
.section-padding {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 3rem 0;
  }
}

/* Text Selection */
::selection {
  background: rgb(121 160 158) !important;
  color: #fff;
}

::-moz-selection {
  background: rgb(121 160 158) !important;
  color: #fff;
}

/* Focus Styles - Remove yellow outline */
button:focus,
a:focus {
  outline: none;
  box-shadow: none;
}

/* Remove focus outline from navigation buttons specifically */
nav button:focus,
nav a:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Alpine.js x-cloak */
[x-cloak] {
  display: none !important;
}

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

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1f2937;
    --text-primary: #f9fafb;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--ecoprism-primary);
  }

  .btn-primary {
    border: 2px solid var(--ecoprism-primary);
  }
}

/* Custom Utilities */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
  backdrop-filter: blur(10px);
}

.bg-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 2rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.5rem;
    line-height: 1.4;
  }
}

/* Container Max Width */
.container {
  max-width: 1400px !important;
}

/* Grid Improvements */
.grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid {
    gap: 2rem;
  }
}

/* Flexbox Utilities */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Spacing Utilities */
.space-y > * + * {
  margin-top: 1rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-y-8 > * + * {
  margin-top: 2rem;
}

/* -------------------------------------------------------------------------- */
/* Shared ecoGRID CTA buttons: solid fill by default, brand gradient on hover */
/* (Used by index, ecogrid, case studies, whitepapers — keep in sync visually.) */
/* -------------------------------------------------------------------------- */

.ecogrid-btn-primary {
  background: #2f7f75;
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 119, 117, 0.28);
}

.ecogrid-btn-primary:hover {
  background: linear-gradient(165deg, #3a7d6e 0%, #2f6f64 55%, #285a50 100%);
  box-shadow: 0 10px 28px rgba(47, 111, 100, 0.42);
}

.ecogrid-btn-header {
  background: #407775;
  color: #fff;
  box-shadow: 0 4px 12px rgba(32, 90, 84, 0.32);
}

.ecogrid-btn-header:hover {
  background: linear-gradient(165deg, #4d8f82 0%, #407775 50%, #356963 100%);
  box-shadow: 0 8px 22px rgba(32, 90, 84, 0.48);
}

.ecogrid-btn-cta-gold {
  background: #f4b940;
  color: #0b2e26;
  box-shadow: 0 6px 18px rgba(244, 185, 64, 0.32);
}

.ecogrid-btn-cta-gold:hover {
  background: linear-gradient(165deg, #fce089 0%, #f4b940 45%, #e0a32a 100%);
  box-shadow: 0 12px 34px rgba(244, 185, 64, 0.5);
}

/* ==========================================================================
   v3 landing pages — shared (teams, csrd, csrd-adoption, california)
   ========================================================================== */

/* Inter body when Tailwind font-sans is on <body> */
body.font-sans {
  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    sans-serif;
}

.teams-page,
.csrd-page,
.caad-page,
.ca-page {
  overflow-x: clip;
}

/* Section headings — teams + csrd (same scale) */
.teams-h2,
.csrd-h2 {
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: #343f52;
}

@media (min-width: 640px) {
  .teams-h2,
  .csrd-h2 {
    font-size: 1.875rem;
  }
}

@media (min-width: 1024px) {
  .teams-h2,
  .csrd-h2 {
    font-size: 2.25rem;
    line-height: 1.2;
  }
}

.teams-h2--center {
  text-align: center;
}

/* Subheadings — teams + csrd-adoption */
.teams-h3,
.caad-h3 {
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: #343f52;
}

@media (min-width: 1024px) {
  .teams-h3,
  .caad-h3 {
    font-size: 1.5rem;
  }
}

.teams-h4,
.caad-h4 {
  font-family: Poppins, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #343f52;
}

@media (min-width: 1024px) {
  .teams-h4,
  .caad-h4 {
    font-size: 1.125rem;
  }
}

/* Section padding — teams + csrd-adoption */
.teams-section-pad,
.caad-section-pad {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .teams-section-pad,
  .caad-section-pad {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
}

/* ecoGRID section backgrounds — csrd + csrd-adoption */
.csrd-bg-white,
.caad-bg-white {
  background-color: #ffffff;
}

.csrd-bg-mint,
.csrd-bg-mist,
.caad-bg-mint {
  background-color: #f3f8f2;
}

.csrd-bg-gold-rise,
.csrd-bg-soft,
.caad-bg-gold-rise {
  background: linear-gradient(0deg, rgba(249, 212, 35, 0.4) 0%, #ffffff 100%);
}

.csrd-bg-gold-wash,
.caad-bg-gold-wash {
  background: linear-gradient(91deg, rgba(249, 212, 35, 0.4) -31.19%, #ffffff 68.98%);
}

/* Pretitle eyebrow pill — shared base */
.csrd-pretitle,
.caad-pretitle {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.csrd-pretitle--on-white,
.caad-pretitle--on-white {
  background-color: #f3f8f2;
  color: #407775;
}

.csrd-pretitle--on-gold,
.caad-pretitle--on-gold {
  background-color: rgba(255, 255, 255, 0.92);
  color: #105447;
  border: 1px solid rgba(250, 180, 48, 0.25);
}

/* Hero entrance + scroll reveal (csrd, california) */
@keyframes ecoprism-hero-in {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.hero-reveal {
  opacity: 0;
  animation: ecoprism-hero-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-reveal-delay-img,
.hero-reveal-delay-visual {
  animation-delay: 0.05s;
}

.hero-reveal-delay-h1 {
  animation-delay: 0.4s;
}

.hero-reveal-delay-lead {
  animation-delay: 0.65s;
}

.hero-reveal-delay-cta {
  animation-delay: 0.9s;
}

.hero-reveal-delay-badges {
  animation-delay: 1.1s;
}

/* California hero uses slightly later h1/lead/cta delays */
.ca-page .hero-reveal-delay-h1 {
  animation-delay: 0.45s;
}

.ca-page .hero-reveal-delay-lead {
  animation-delay: 0.7s;
}

.ca-page .hero-reveal-delay-cta {
  animation-delay: 0.95s;
}

.js-reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.js-reveal-delay-1 {
  transition-delay: 0.06s;
}

.js-reveal-delay-2 {
  transition-delay: 0.12s;
}

.js-reveal-delay-3 {
  transition-delay: 0.18s;
}

.js-reveal-delay-4 {
  transition-delay: 0.24s;
}

.cta-bg {
  background: linear-gradient(109deg, #0b2e26 0%, #407775 100%);
}

.ecogrid-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    filter 0.2s ease;
}

.ecogrid-btn:hover {
  transform: translateY(-2px);
}

.ecogrid-btn:active {
  transform: translateY(0) scale(0.98);
}

.ecogrid-btn:focus-visible {
  outline: 2px solid #fab430;
  outline-offset: 3px;
}

.ecogrid-btn-outline {
  background: rgba(255, 255, 255, 0.65);
  border: 2px solid #2f6f64;
  color: #2f6f64;
  box-shadow: 0 2px 8px rgba(47, 111, 100, 0.08);
}

.ecogrid-btn-outline:hover {
  background: rgba(47, 111, 100, 0.1);
  border-color: #245548;
  color: #1a3d36;
  box-shadow: 0 6px 18px rgba(47, 111, 100, 0.16);
}

.ecogrid-btn-outline-light {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: #fff !important;
}

.ecogrid-btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.65);
}

.ca-page .ecogrid-btn-outline-light {
  background: #fff !important;
}

.ca-page .ecogrid-btn-outline-light:hover {
  background: rgba(47, 111, 100, 0.08) !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero-reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .js-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .ecogrid-btn:hover,
  .ecogrid-btn:active {
    transform: none;
  }

  .ecogrid-btn {
    transition:
      background 0.2s ease,
      border-color 0.2s ease,
      box-shadow 0.2s ease;
  }
}
