:root {
  color-scheme: dark;
  --bg: #030405;
  --surface: rgba(255, 255, 255, 0.07);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f5f7;
  --muted: #aab0b8;
  --accent: #6fc7ff;
  --accent-strong: #7de3ff;
  --border: rgba(255, 255, 255, 0.12);
  --radius: 24px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(111, 199, 255, 0.12),
      transparent 25%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(180, 95, 255, 0.12),
      transparent 25%
    ),
    var(--bg);
  color: var(--text);
}

body.page-home {
  background: linear-gradient(180deg, #04060a 0%, #06090f 100%);
}

body.page-sahara {
  background: linear-gradient(180deg, #050812 0%, #08131f 100%);
}

body.page-homelens {
  background: linear-gradient(180deg, #08110f 0%, #131b23 100%);
}

body.page-align {
  background: linear-gradient(180deg, #0b1120 0%, #141b2c 100%);
}

.shell {
  width: min(1200px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #6fc7ff, #7de3ff);
  display: grid;
  place-items: center;
  color: #030405;
  font-weight: 800;
}

.brand-name,
.brand-subtitle,
.eyebrow,
.project-hero h1,
.project-section h2 {
  margin: 0;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
}

.hero,
.project-hero,
.project-section,
.project-grid,
.page-footer {
  margin-bottom: 3rem;
}

.hero {
  max-width: 720px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  color: var(--accent-strong);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(3rem, 4vw, 4.4rem);
  line-height: 0.98;
  max-width: 12ch;
  overflow-wrap: anywhere;
}

.hero-copy,
.project-section p,
.detail-card p,
.detail-card ul,
.page-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.project-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card,
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  min-height: 260px;
}

.project-card h2,
.detail-card h3 {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.65rem;
}

.project-card p,
.detail-card p,
.detail-card ul {
  margin: 0;
}

.project-card p + .button,
.detail-card p + .button,
.project-section .button {
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
}

.button-primary {
  background: linear-gradient(135deg, #6fc7ff, #7de3ff);
  color: #030405;
  border-color: transparent;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 3rem;
}

.section-heading {
  margin-bottom: 1.75rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  max-width: 12ch;
  margin-top: 0.5rem;
}

.project-carousel {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.carousel-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 2rem;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.carousel-card h3 {
  margin: 0.75rem 0 1rem;
  font-size: 1.55rem;
}

.project-meta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(111, 199, 255, 0.12);
  color: var(--accent-strong);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.upcoming-card {
  background: rgba(122, 87, 255, 0.08);
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.project-hero {
  display: grid;
  gap: 2rem;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.project-mark {
  width: 5rem;
  height: 5rem;
  border-radius: 1.5rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.project-mark-sahara {
  background: linear-gradient(135deg, #70c8ff, #3475ff);
}

.project-mark-homelens {
  background: linear-gradient(135deg, #a17cff, #3f86ff);
}

.project-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  max-width: none;
  width: 100%;
}

/* Image-led hero for product pages */
.hero-image {
  background-image:
    linear-gradient(180deg, rgba(3, 4, 5, 0.48), rgba(3, 4, 5, 0.28)),
    url("https://images.unsplash.com/photo-1505691723518-36a1b18b49c7?auto=format&fit=crop&w=1600&q=80&s=placeholder");
  background-size: cover;
  background-position: center center;
  border-radius: var(--radius);
  padding: 4rem 2rem;
  margin-bottom: 2rem;
}

.hero-image .hero-overlay {
  max-width: 880px;
  color: var(--text);
}

.hero-image .hero-copy {
  color: rgba(255, 255, 255, 0.9);
  margin-top: 1rem;
}

.hero-ctas {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.8rem;
}

.hero-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.hero-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.project-detail-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-summary-grid,
.steps-grid,
.service-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.summary-card,
.step-card,
.service-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 2rem;
}

.summary-card h3,
.step-card h3,
.service-card h3 {
  margin-top: 0;
}

.service-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.service-card img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  border-radius: 1rem;
}

.service-items-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

.service-item-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.25rem;
}

.service-item-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.service-item-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* Add spacing between stacked service sections and around How it works */
.service-section + .service-section {
  margin-top: 2.5rem;
}

.how-it-works {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

/* Add spacing between How it works heading and step cards */
.how-it-works .steps-grid {
  margin-top: 1.75rem;
  gap: 1.75rem;
}
.step-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-card ul {
  padding-left: 1.2rem;
  margin: 0.75rem 0 0;
}

.detail-card li {
  margin-bottom: 0.75rem;
}

.contact-panel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 2rem;
}

.page-footer {
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 840px) {
  .project-hero {
    grid-template-columns: 1fr;
  }

  .service-card {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
  }

  .service-card > div {
    width: 100%;
  }

  .service-card img {
    width: 100%;
    height: auto;
    max-height: 280px;
    min-height: 0;
    margin-bottom: 1rem;
  }

  .hero-image {
    padding: 2.5rem 1.25rem;
  }

  .hero-image .hero-overlay {
    width: 100%;
  }

  .hero-image .hero-copy {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .shell {
    width: min(100%, calc(100% - 1.25rem));
    padding: 1.5rem 0 3rem;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
    line-height: 1.08;
  }

  .section-heading h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .project-card,
  .detail-card,
  .contact-panel,
  .service-card,
  .step-card {
    padding: 1.25rem;
  }

  .hero-image {
    padding: 2rem 1rem;
  }

  .hero-image .hero-overlay .eyebrow {
    font-size: 0.95rem;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .hero-ctas .button {
    width: 100%;
  }

  .section-heading {
    width: 100%;
    margin-bottom: 1rem;
  }

  .service-items-grid {
    grid-template-columns: 1fr;
  }

  .service-item-card {
    padding: 1rem;
  }

  .contact-panel {
    padding: 1.25rem;
  }
}

body.page-align .service-items-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.page-align .service-item-card {
  min-height: 100%;
}

@media (max-width: 700px) {
  body.page-align .service-items-grid {
    grid-template-columns: 1fr;
  }
}

/* Product hero adjustments: center overlay and use full laptop width for headlines */
.hero-image {
  display: grid;
  place-items: center;
}

.project-hero.hero-image {
  grid-template-columns: 1fr;
}

.hero-image .hero-overlay {
  width: min(100%, calc(100% - 4rem));
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Larger eyebrow in hero with a subtle shimmer effect */
.hero-image .hero-overlay .eyebrow {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  background: linear-gradient(
    90deg,
    rgba(127, 224, 255, 1),
    rgba(255, 255, 255, 0.95),
    rgba(127, 224, 255, 0.85)
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3.2s linear infinite;
  animation-direction: normal;
}

@keyframes shimmer {
  0% {
    background-position: -150% 0;
  }
  100% {
    background-position: 150% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image .hero-overlay .eyebrow {
    animation: none;
  }
}

.project-hero.hero-image h1,
.project-hero h1,
.section-heading h2 {
  max-width: none !important;
  width: min(100%, 110ch) !important;
  margin-left: 0;
  margin-right: 0;
}

.hero-image .hero-copy {
  max-width: 70ch;
  margin: 0 auto;
}

.hero-ctas {
  justify-content: center;
}

.section-heading {
  width: min(100%, calc(100% - 4rem));
  margin: 0 auto 1.75rem;
}
