/* Helderberg Tech - NOS-inspired layout, brand colours */

:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: #DBEAFE;
  --primary-mid: #BFDBFE;
  --secondary: #0F172A;
  --secondary-800: #1E293B;
  --secondary-700: #334155;
  --bg: #FFFFFF;
  --neutral: #F3F4F6;
  --text: #111827;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1), 0 20px 25px -5px rgba(0, 0, 0, 0.04);
  --font: Inter, "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --max: 80rem;
  --header-h: 80px;
  /* Single offset: sticky nav height only (measured in JS) */
  --scroll-offset: var(--header-h);
  --whatsapp: #25D366;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Use ONE mechanism only — double offset showed previous section under the nav */
  scroll-padding-top: 0;
}

/* Land section top flush under sticky white nav */
section[id] {
  scroll-margin-top: var(--scroll-offset);
}

#top {
  scroll-margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

@media (min-width: 640px) {
  .container {
    width: min(100% - 3rem, var(--max));
  }
}

@media (min-width: 1024px) {
  .container {
    width: min(100% - 4rem, var(--max));
  }
}

/* Main header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.75rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--secondary);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.45rem;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  /* Soft glow so the dark logo reads on white nav */
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12), 0 2px 8px rgba(15, 23, 42, 0.12);
}

.logo-text {
  line-height: 1.1;
}

.site-nav {
  display: none;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--secondary-700);
  border-radius: 0.5rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: var(--primary);
}

.site-nav .nav-cta {
  background: var(--primary);
  color: #fff !important;
  margin-left: 0.5rem;
  font-weight: 600;
}

.site-nav .nav-cta:hover {
  background: var(--primary-hover);
  color: #fff !important;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--secondary-700);
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
  }
}

@media (max-width: 1023px) {
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
    padding: 0.75rem 1rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    padding: 0.75rem 0.5rem;
  }

  .site-nav .nav-cta {
    margin-left: 0;
    margin-top: 0.35rem;
    justify-content: center;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background: transparent;
  color: var(--secondary);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--secondary);
  background: var(--neutral);
}

.btn-secondary-on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-secondary-on-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero: full first viewport, image stage + stats docked at bottom */
.hero {
  position: relative;
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-height: 18rem;
}

.hero-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-color: #1e293b;
}

.hero-carousel-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.72) 0%,
    rgba(15, 23, 42, 0.48) 48%,
    rgba(15, 23, 42, 0.35) 100%
  );
  pointer-events: none;
}

.hero-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}

.hero-dot {
  width: 0.6rem;
  height: 0.6rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
  transform: scale(1.15);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 0;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  width: min(100% - 2rem, var(--max));
}

@media (min-width: 640px) {
  .hero-content {
    width: min(100% - 3rem, var(--max));
  }
}

@media (min-width: 1024px) {
  .hero-content {
    width: min(100% - 4rem, var(--max));
    margin-left: max(calc((100% - var(--max)) / 2 + 2rem), 2rem);
    margin-right: auto;
  }
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  margin: 0 0 1rem;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #fff;
  max-width: 16ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 36rem;
  line-height: 1.6;
}

.btn-on-hero {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}

.btn-on-hero:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
  color: #fff;
}

/* Stats bar - docks to bottom of first viewport */
.stats {
  background: var(--secondary);
  color: #fff;
  flex-shrink: 0;
  margin-top: auto;
}

.stats-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.35rem 0;
}

@media (min-width: 640px) {
  .stats-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1.5rem 0;
  }
}

.stat {
  text-align: center;
  padding: 0.5rem;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 0.35rem;
}

.stat-value {
  display: block;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.stat-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.875rem;
  color: #9ca3af;
}

/* Default sections (about, why, area, etc.) — normal tight spacing */
.section {
  padding: 4rem 0;
}

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

/*
 * Only home + business fill the viewport under the sticky nav for nav jumps.
 * Why / area / contact keep normal compact section height.
 */
#homes,
#business {
  min-height: calc(100dvh - var(--header-h));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

#homes > .container,
#business > .container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

@media (min-width: 640px) {
  #homes > .container,
  #business > .container {
    width: min(100% - 3rem, var(--max));
  }
}

@media (min-width: 1024px) {
  #homes > .container,
  #business > .container {
    width: min(100% - 4rem, var(--max));
  }
}

#homes .split,
#business .split {
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  #homes .split,
  #business .split {
    gap: 2rem;
  }
}

#homes .split-content .lead,
#business .split-content .lead {
  margin-bottom: 0.85rem;
  font-size: 0.98rem;
}

#homes .service-list,
#business .service-list {
  margin-bottom: 1rem;
  gap: 0.25rem;
}

#homes .service-list li,
#business .service-list li {
  padding: 0.65rem 0.85rem;
  font-size: 0.92rem;
}

#homes .split-media,
#business .split-media {
  min-height: 0;
  align-self: stretch;
  max-height: min(360px, 42vh);
}

#homes .media-panel,
#business .media-panel {
  min-height: 200px;
  height: 100%;
  max-height: min(360px, 42vh);
}

#homes > .container > .split-content > .btn,
#business > .container > .split-content > .btn {
  margin-top: 0.15rem;
}

.section-muted {
  background: var(--neutral);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--secondary);
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Split layouts */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }

  .split-reverse .split-media {
    order: 2;
  }

  .split-reverse .split-content {
    order: 1;
  }
}

.split-media {
  border-radius: var(--radius-lg);
  min-height: 220px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.media-panel {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  position: relative;
  background: var(--secondary);
}

.media-panel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.media-panel-caption {
  position: relative;
  z-index: 1;
  padding: 1.75rem;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(15, 23, 42, 0.45) 65%,
    transparent 100%
  );
}

.media-panel-caption h3 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.media-panel-caption p {
  margin: 0;
  color: #e5e7eb;
  font-size: 0.95rem;
  max-width: 32ch;
}

.split-content h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--secondary);
}

.split-content .lead {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.split-content .lead + .lead {
  margin-bottom: 1.5rem;
}

/* Service lists (NOS style) */
.service-list {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1.75rem;
}

.service-list a,
.service-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--secondary-700);
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.service-list a:hover {
  border-color: var(--primary-mid);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.service-list .chev {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Differentiators */
.diff-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .diff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .diff-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.diff-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.diff-card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--neutral);
}

.diff-card-body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.diff-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
}

.diff-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.925rem;
}

/* Reviews */
.reviews-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .reviews-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-stars {
  color: var(--warning);
  letter-spacing: 0.1em;
  font-size: 0.95rem;
}

.review-card blockquote {
  margin: 0;
  color: var(--secondary-700);
  font-size: 0.975rem;
  line-height: 1.55;
  flex: 1;
}

.review-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.review-meta strong {
  display: block;
  color: var(--secondary);
  font-weight: 700;
}

/* Area chips */
.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.area-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary-700);
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

.contact-card,
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.contact-card h3,
.form-card h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: var(--secondary);
}

.channel {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.channel:last-of-type {
  border-bottom: 0;
}

.channel .label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.channel a {
  font-weight: 700;
  color: var(--secondary);
  font-size: 1.05rem;
}

.channel a:hover {
  color: var(--primary);
}

.channel p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--secondary-700);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--text);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form-error {
  margin: 0;
  color: var(--error);
  font-size: 0.9rem;
}

.form-success {
  margin: 0;
  color: var(--success);
  font-size: 0.9rem;
}

/* CTA band */
.cta-band {
  background: var(--secondary);
  color: #fff;
  padding: 3.5rem 0;
}

.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-band p {
  margin: 0;
  color: #9ca3af;
  max-width: 36rem;
}

/* Footer */
.site-footer {
  background: var(--secondary-800);
  color: #9ca3af;
  padding: 3rem 0 1.75rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.footer-grid h4 {
  margin: 0 0 0.85rem;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-grid a {
  display: block;
  padding: 0.25rem 0;
  color: #9ca3af;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom strong {
  color: #e5e7eb;
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: var(--whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.whatsapp-float:hover {
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-float-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transform: none;
}

.whatsapp-float-icon svg {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  transform: none;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .whatsapp-float {
    right: 1rem;
    bottom: 1rem;
  }
}
