/* ============================================================
   TDAC Pro — Landing Page Stylesheet
   Brand: Racefab Ltd t/a TDAC
   Design: Brochure-matched — teal/grey alternating sections
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --teal:        #3aada8;
  --teal-dark:   #2e9a95;
  --grey:        #636669;
  --grey-dark:   #4a4d50;
  --footer-bg:   #3a3d40;
  --white:       #ffffff;
  --text-body:   rgba(255, 255, 255, 0.88);
  --text-muted:  rgba(255, 255, 255, 0.55);
  --nav-height:  70px;
  --transition:  0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  background-color: var(--grey);
  color: var(--white);
  font-family: 'Inter', Calibri, Candara, 'Segoe UI', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

a { color: var(--white); text-decoration: none; }
a:hover { opacity: 0.85; }

img { max-width: 100%; height: auto; }

/* ---------- Typography ---------- */
.section-heading {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.section-subheading {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

/* Grey sections: teal headings */
#overview .section-heading,
#overview .section-subheading,
#technology .section-heading,
#technology .section-subheading,
#specs .section-heading,
#specs .section-subheading {
  color: var(--teal);
}

/* Teal sections: white headings */
#hero .section-heading,
#contact .section-heading {
  color: var(--white);
}

/* Teal sections: grey headings (matching PDF) */
#industries .section-heading,
#products .section-heading {
  color: var(--grey);
}

p {
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.75;
}

strong {
  color: var(--white);
  font-weight: 700;
}

/* ---------- Section backgrounds ---------- */
#hero,
#industries,
#products,
#contact {
  background: var(--teal);
}

#overview,
#technology,
#specs {
  background: var(--grey);
}

#overview,
#industries,
#technology,
#products,
#specs,
#contact {
  padding: 80px 0;
}

/* ---------- Navbar ---------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: var(--nav-height);
  background: var(--grey-dark);
  transition: box-shadow var(--transition);
  display: flex;
  align-items: center;
}

#navbar.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

#navbar .navbar-brand img {
  height: 52px;
  width: auto;
}

#navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

#navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.9rem !important;
  transition: color var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white) !important;
}

.nav-cta {
  background: var(--teal) !important;
  color: var(--white) !important;
  border-radius: 6px;
  padding: 0.38rem 1.1rem !important;
  margin-left: 0.5rem;
  font-weight: 600;
  transition: background var(--transition) !important;
}

.nav-cta:hover {
  background: var(--teal-dark) !important;
  color: var(--white) !important;
  opacity: 1;
}

/* ---------- Hero — Split Layout ---------- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-top: var(--nav-height);
}

.hero-split {
  display: flex;
  width: 100%;
  min-height: calc(100vh - var(--nav-height));
}

.hero-image-side {
  flex: 0 0 40%;
  position: relative;
  overflow: hidden;
}

.hero-image-side .hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-text-side {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  padding: 4rem 5rem;
  background: var(--teal);
  overflow: hidden;
}

.sunburst {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-headline {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-headline .evolved {
  font-family: 'Permanent Marker', cursive;
  font-weight: 400;
  font-size: 1.05em;
  letter-spacing: 0.02em;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 550px;
  line-height: 1.65;
}

/* ---------- Photo Dividers ---------- */
.photo-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  max-height: 420px;
}

.photo-divider img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* ---------- Buttons ---------- */
.btn-cta {
  background: var(--white);
  color: var(--teal);
  border: 2px solid var(--white);
  border-radius: 6px;
  padding: 0.7rem 1.8rem;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-block;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}

.btn-cta:hover {
  opacity: 0.92;
  color: var(--teal);
  transform: translateY(-1px);
}

.btn-cta-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 6px;
  padding: 0.7rem 1.8rem;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-block;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn-cta-outline:hover {
  background: var(--white);
  color: var(--teal);
  opacity: 1;
  transform: translateY(-1px);
}

/* ---------- Industries — Stacked Images ---------- */
.industry-images {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 0;
  overflow: hidden;
  height: 100%;
}

.industry-images img {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  display: block;
}

/* ---------- Technology features ---------- */
.tech-feature {
  margin-bottom: 1.2rem;
}

.tech-feature p {
  margin-bottom: 0;
}

/* ---------- Product Showcase — Triptych ---------- */
.product-showcase {
  background: var(--grey-dark);
  overflow: hidden;
}

.product-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  background: var(--teal);
}

.product-showcase-item {
  overflow: hidden;
  line-height: 0;
}

.product-showcase-item img {
  width: 100%;
  height: 700px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.product-showcase-item:last-child img {
  object-position: 50% 40%;
}

.product-showcase-item:hover img {
  transform: scale(1.03);
}

/* ---------- Products ---------- */
.product-block-divider {
  margin-top: 4rem;
  padding-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Connectivity Modes — Grid with SVG diagrams */
.connectivity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.conn-mode {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.2rem 1rem 0.8rem;
  text-align: center;
}

.conn-mode svg {
  width: 100%;
  max-width: 160px;
  height: auto;
  margin-bottom: 0.5rem;
}

.conn-mode span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  display: block;
}

.bluetooth-badge {
  height: auto;
  max-width: 180px;
}

/* App Section */
.app-tablet-frame {
  position: relative;
  max-width: 320px;
}

.app-tablet-frame img {
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.app-store-img {
  max-width: 320px;
  height: auto;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition);
}

.store-badge:hover {
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
  opacity: 1;
}

.store-badge i {
  font-size: 1.2rem;
}

/* ---------- Wave Divider ---------- */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: #000;
}

.wave-divider img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.85;
}

/* ---------- Specs ---------- */
.specs-table-wrapper {
  border-radius: 8px;
  overflow: hidden;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.specs-table thead tr {
  background: var(--teal);
}

.specs-table thead th {
  padding: 0.85rem 1.1rem;
  color: var(--white);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
}

.specs-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background var(--transition);
}

.specs-table tbody tr:hover {
  background: rgba(58, 173, 168, 0.1);
}

.specs-table tbody tr:last-child {
  border-bottom: none;
}

.specs-table tbody td {
  padding: 0.8rem 1.1rem;
  vertical-align: top;
  color: var(--text-body);
}

.specs-table tbody td:first-child {
  color: var(--white);
  font-weight: 600;
  width: 30%;
}

.wireframe-wrapper {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2em;
}

.wireframe-img {
  width: 180%;
  max-width: none;
  transform: rotate(90deg);
}

.cert-logos {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  align-self: stretch !important;
}

.cert-logos img {
  min-width: 0;
  height: auto;
  object-fit: contain;
}

.cert-logos img:nth-child(1) { flex: 3.965; }
.cert-logos img:nth-child(2) { flex: 1.438; }
.cert-logos img:nth-child(3) { flex: 1.258; }
.cert-logos img:nth-child(4) { flex: 1; }

@media (max-width: 575.98px) {
  .specs-table tbody td:first-child {
    white-space: normal;
  }
}

/* ---------- Contact ---------- */
.lead-text {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.body-text {
  font-size: 1rem;
  color: var(--text-body);
}

.contact-form-wrap {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 2rem;
}

.contact-form-wrap label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.4rem;
  display: block;
}

.required { color: #ffcccc; }
.optional { font-weight: 400; color: var(--text-muted); }

.contact-form-wrap .form-control {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form-wrap .form-control:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--white);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
  color: var(--white);
  outline: none;
}

.contact-form-wrap .form-control::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact-form-wrap .form-control.is-invalid {
  border-color: #ffaaaa;
}

.contact-form-wrap .invalid-feedback {
  font-size: 0.8rem;
  color: #ffcccc;
}

.contact-form-wrap textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

.contact-submit-btn {
  width: 100%;
  padding: 0.8rem;
  font-size: 1rem;
}

.form-success-banner {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--white);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  margin-top: 1rem;
}

.contact-details p {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.contact-details a {
  color: var(--white);
}

.contact-details a:hover {
  text-decoration: underline;
  opacity: 1;
}

.about-tdac h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.8rem;
}

.about-tdac p {
  font-size: 0.9rem;
  line-height: 1.65;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-size: 1.1rem;
  transition: background var(--transition);
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.3);
  opacity: 1;
}

/* ---------- Footer ---------- */
#footer {
  background: var(--footer-bg);
  padding: 2rem 0;
}

.footer-logo {
  height: 34px;
  width: auto;
}

.footer-text {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.footer-links li a {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

.footer-links li a:hover {
  color: var(--white);
  opacity: 1;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero-split {
    flex-direction: column;
  }

  .hero-image-side {
    flex: 0 0 auto;
    height: 300px;
  }

  .hero-text-side {
    padding: 3rem 2rem;
  }

  .connectivity-grid {
    grid-template-columns: 1fr 1fr;
  }

  .product-showcase-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .product-showcase-item img {
    height: 500px;
  }
}

@media (max-width: 767.98px) {
  #overview, #industries, #technology, #products, #specs, #contact {
    padding: 60px 0;
  }

  .contact-form-wrap {
    padding: 1.4rem;
  }

  .product-block-divider {
    margin-top: 3rem;
    padding-top: 3rem;
  }

  .photo-divider,
  .photo-divider img {
    height: 250px;
    max-height: 250px;
  }

  .industry-images {
    margin-top: 2rem;
  }

  .industry-images img {
    flex: 0 0 auto;
    height: 200px;
  }
}

@media (max-width: 575.98px) {
  .hero-headline {
    font-size: 2.4rem;
  }

  .hero-text-side {
    padding: 2.5rem 1.5rem;
  }

  .section-heading {
    font-size: 1.6rem;
  }

  .footer-links {
    justify-content: center;
  }

  .connectivity-grid {
    grid-template-columns: 1fr;
  }

  .photo-divider,
  .photo-divider img {
    height: 180px;
    max-height: 180px;
  }
}
