/* ==========================================================================
   Protostar Development - Unified Stylesheet (v3.2)
   ========================================================================== */

/* --- 1. Modern Design Tokens & CSS Variables --- */
:root {
  /* Colors - Core Palette */
  --bg-dark: #070a12; /* Deep slate background */
  --panel-bg: #0f172a; /* Navbar/Footer/Section background */
  --card-bg: #1e293b; /* Default card background */
  --border-color: #334155; /* Low-contrast border */

  /* Colors - Text & Accents */
  --text-main: #f8fafc; /* Near-white titles */
  --text-muted: #94a3b8; /* Muted body text */
  --cyan-accent: #38bdf8; /* Primary call-to-action/logos */
  --cyan-hover: #7dd3fc; /* Lighter cyan for hover */
  --indigo-accent: #818cf8; /* Subtle secondary accent */
  --green-status: #4ade80; /* Operational/Uptime green */

  /* UI Effects & Interactions */
  --focus-ring:
    0 0 0 3px rgba(56, 189, 248, 0.4), 0 0 15px rgba(56, 189, 248, 0.6);
  --card-glow-border: linear-gradient(
    135deg,
    var(--cyan-accent),
    transparent 60%
  );
  --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* src/styles/global.css */
body {
  font-family: "Inter", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Plus Jakarta Sans", sans-serif;
}

/* --- 2. Accessibility & Screen Reader Utilities --- */
.skip-link {
  position: absolute;
  top: -80px;
  left: 1rem;
  background: var(--cyan-accent);
  color: #000;
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  border-radius: 6px;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid #fff;
}

.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;
}

a:focus-visible,
button:focus-visible,
article:focus-visible,
div[tabindex="0"]:focus-visible {
  outline: none !important;
  box-shadow: var(--focus-ring) !important;
  border-color: var(--cyan-accent) !important;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
article:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* --- 3. Base Reset & Typography --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-muted);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* --- 4. Atmospheric Layout Components & Scoped Hero --- */
.hero-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 5rem 0 4rem;
  background-color: var(--bg-dark);
  border-bottom: 1px solid var(--border-color);
}

#hero-canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

.glow-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(56, 189, 248, 0.18) 0%,
    rgba(7, 10, 18, 0) 75%
  );
  pointer-events: none;
  z-index: 2;
}

.hero-wrapper .container {
  position: relative;
  z-index: 3;
}

/* --- 5. Navigation Landmark --- */
header.navbar {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.brand span {
  color: var(--cyan-accent);
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

nav a:hover {
  color: #fff;
}

nav a.active {
  color: var(--cyan-accent);
}

/* --- 6. Headings & Typography --- */
.hero-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.pricing-hero {
  text-align: center;
  padding: 3.5rem 0 2rem;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.hero-section h1,
.pricing-hero h1 {
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1.25rem;
  font-size: clamp(2rem, 5vw + 1rem, 3.2rem);
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.5vw + 0.8rem, 1.15rem);
  max-width: 680px;
  margin: 0 auto;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw + 1rem, 2.1rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

/* --- 7. Feature & Philosophy Cards --- */
.philosophy-section {
  padding: 4rem 0 3rem;
}

.philosophy-section h2,
#philosophy-title {
  text-align: center;
  font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 780px;
  margin: 0 auto 3rem;
  color: #ffffff;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  margin: 3rem 0;
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  transition: var(--transition-smooth);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1.5px;
  background: var(--card-glow-border);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

.card:hover::before,
.card:focus-within::before {
  opacity: 1;
}

/* SVG Icon Stencils */
.icon-wrapper {
  width: 48px;
  height: 48px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--cyan-accent);
}

.icon-wrapper:empty {
  display: none;
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.95rem;
}

/* --- 8. Pricing Grid & PriceCard Component --- */
/* .pricing-grid { */
/*   display: grid; */
/*   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
/*   gap: 2rem; */
/*   align-items: stretch; */
/*   max-width: 1100px; */
/*   margin: 2rem auto 5rem; */
/* } */

.pricing-grid {
  display: grid;
  /* Reduced from 300px to 260px to allow multi-column placement on narrower viewports */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto 5rem;
}

/* Mapped to PriceCard.astro element classes */
.price-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 2rem;
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  /* height: 100%; */
  position: relative;
  transition: var(--transition-smooth);
}

.price-card.featured {
  border-color: var(--cyan-accent);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.15);
}

.price-card .badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--cyan-accent);
  color: #070a12;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-card .card-header {
  margin-bottom: 1.5rem;
  text-align: left;
}

.price-card .card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.price-card .card-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 1.25rem;
  min-height: 2.7rem;
}

.price-container {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.price-container .price {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--cyan-accent);
  line-height: 1;
}

.price-container .period {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.setup-fee {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.25rem;
}

.contract-notice {
  font-size: 0.8rem;
  color: var(--indigo-accent);
  font-weight: 600;
  margin-top: 0.25rem;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.features-list li {
  font-size: 0.92rem;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.features-list li::before {
  content: "✓";
  color: var(--cyan-accent);
  font-weight: 800;
}

.features-list li.disabled {
  color: #475569;
  text-decoration: line-through;
}

.features-list li.disabled::before {
  content: "✕";
  color: #475569;
}

.card-footer {
  margin-top: auto;
}

.card-footer .btn {
  width: 100%;
}

/* --- 9. Home & About Utilities --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan-accent);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green-status);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green-status);
  position: relative;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.7;
  animation: pulseStatus 2s infinite ease-out;
}

@keyframes pulseStatus {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.about-section {
  padding: 4rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 3rem;
  align-items: start;
}

.about-content h2 {
  margin-bottom: 1.25rem;
}

.about-content p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.about-content strong {
  color: #fff;
}

.highlight-box {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--cyan-accent);
  border-radius: 8px;
  padding: 2rem;
}

.highlight-box h3 {
  margin-bottom: 1rem;
}

.highlight-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.stat-callout {
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-number {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--cyan-accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- 10. Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition-smooth);
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--cyan-accent);
  color: #070a12;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  background: var(--cyan-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.45);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  background: #283548;
  transform: translateY(-2px);
}

.btn-inline {
  margin-top: 1rem;
}

/* --- 11. CTA & Contact Form Sections --- */
.cta-section {
  padding: 4rem 0 6rem;
  margin-top: 4rem;
  scroll-margin-top: 5rem;
}

.cta-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
}

.cta-card p {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0.5rem auto 2.5rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Pricing Contact Section Styling */
.contact-section {
  max-width: 680px;
  margin: 0 auto 6rem;
  scroll-margin-top: 5rem;
}

.contact-card {
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-card h2 {
  margin-bottom: 0.5rem;
  text-align: center;
}

.contact-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-group textarea {
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--cyan-accent);
}

/* --- 12. Footer Landmark --- */
footer {
  background-color: var(--panel-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}

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

footer nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

footer a:hover,
footer a[aria-current="page"] {
  color: var(--cyan-accent);
}

/* --- 13. Responsive Adjustments --- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

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

  .hero-actions,
  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .contact-card {
    padding: 1.75rem;
  }

  .cta-section {
    margin-top: 3rem;
    scroll-margin-top: 6rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
    gap: 1rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* --- Fix Target Scroll Overlap --- */
#contact-form,
section[id] {
  scroll-margin-top: 120px; /* Pushes the scroll target below the mobile header */
}

/* Enable smooth scrolling across anchor links */
html {
  scroll-behavior: smooth;
}
