/**
 * ProSolarSystems — shared site styles.
 *
 * Consolidates the per-page <style> blocks that had drifted apart. Loaded by all
 * six pages. Tailwind's Play CDN injects its own stylesheet into <head> at
 * runtime, which lands after this file — so Tailwind utilities still win over
 * the component classes below, and `class="btn-primary w-full"` behaves.
 *
 * The hexes below mirror the brand-* tokens in assets/js/tailwind-config.js.
 * Change both together.
 */

:root {
  --brand-primary: #964900;
  --brand-primary-hover: #b75b00;
  --brand-dark: #0c192c;
  --brand-grid: #253145;
  --brand-outline-variant: rgba(138, 114, 100, 0.2);
}

/* --------------------------------------------------------------------------
   Material Symbols
   --------------------------------------------------------------------------
   Was defined three different ways: FILL 0 on about/contact/solar-installation,
   FILL 1 on home/battery, and not at all on services (which used inline
   font-variation-settings on every icon instead).

   Unfilled is the default here; opt into the filled variant with either
   `class="icon-fill"` or `data-weight="fill"` — both spellings were already in
   use across the pages, so both are supported.
   -------------------------------------------------------------------------- */

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.icon-fill,
.material-symbols-outlined[data-weight="fill"] {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* --------------------------------------------------------------------------
   Grid pattern (dark section / footer texture)
   --------------------------------------------------------------------------
   The brief specifies one pattern in #253145 for all footers. It had drifted
   into five implementations across two class names (.grid-pattern and
   .bg-grid-pattern), three sizes (20px / 24px / 30px) and two colours (#253145
   or a white 5% overlay). Unified here at the brief's colour and 30px.

   .bg-grid-pattern is kept as an alias because two pages used that spelling.
   -------------------------------------------------------------------------- */

.grid-pattern,
.bg-grid-pattern {
  background-image:
    linear-gradient(to right, var(--brand-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--brand-grid) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */

/* Frosted panel used for cards on the Services page. */
.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--brand-outline-variant);
  box-shadow: 0 20px 40px rgba(12, 25, 44, 0.05);
}

/* Soft lift for floating elements. */
.shadow-floating {
  box-shadow: 0 10px 30px -10px rgba(83, 95, 117, 0.1);
}

/* Focus ring for wrapped form fields. */
.input-glow:focus-within {
  box-shadow: 0 0 0 2px rgba(150, 73, 0, 0.2);
  border-color: var(--brand-primary);
}

/* --------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------
   These were written with Tailwind's @apply inside a plain <style> block, which
   the Play CDN does not process (it only compiles <style type="text/tailwindcss">).
   The rules were therefore inert: .btn-primary rendered as unstyled body text
   with a transparent background and no padding.

   Rewritten as plain CSS, matching the shared CTA vocabulary used across all six
   pages (16px Montserrat bold, px-8 py-3). The original @apply used `hover:bg-surface-tint`,
   which resolves to the same #964900 as the base once `primary` is corrected —
   i.e. no visible hover. Uses --brand-primary-hover instead, matching the rest
   of the site.
   -------------------------------------------------------------------------- */

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 0.125rem;
  font-family: Montserrat, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #ffffff;
  border: 2px solid transparent;
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary);
}

.btn-secondary:hover {
  background-color: var(--brand-primary);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   FAQ accordion
   --------------------------------------------------------------------------
   Native <details>/<summary> — no JS. Per the project brief's "static HTML
   without complex JavaScript" constraint, and it maps directly onto Divi's
   Toggle module (also a plain open/closed disclosure) when this migrates.

   Markup shape:
     <details class="faq-item">
       <summary class="faq-item__question">...<span class="faq-item__icon material-symbols-outlined">expand_more</span></summary>
       <div class="faq-item__answer">...</div>
     </details>
   -------------------------------------------------------------------------- */

.faq-item {
  border: 1px solid var(--brand-outline-variant);
  border-radius: 0.25rem;
  background: #ffffff;
}

.faq-item + .faq-item {
  margin-top: 1rem;
}

.faq-item__question {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-family: Montserrat, ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--brand-dark);
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__icon {
  flex-shrink: 0;
  transition: transform 0.2s ease-in-out;
  color: var(--brand-primary);
}

.faq-item[open] .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__answer {
  padding: 0 1.5rem 1.25rem;
  color: #574336; /* on-surface-variant */
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

/* Keep keyboard focus visible; the nav and cards are all interactive. */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

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