/* Takt Automation - Global Styles */
/* Import a clean, modern font for all text */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* CSS custom properties for colours and spacing
   The palette is inspired by the pre-seed pitch deck: dark backgrounds,
   crisp whites and a bright aqua accent for calls to action. */
:root {
  --dark-navy: #0A0E23;      /* header/footer background */
  --mid-slate: #1C2541;      /* hero and secondary sections */
  --steel: #3A506B;          /* neutral borders/forms */
  --aqua-accent: #5BC0BE;    /* buttons, links, highlights */
  --snow: #F5F7FA;           /* page background */
  --white: #FFFFFF;          /* cards and text on dark backgrounds */
  --gray-light: #F2F2F2;     /* subtle backgrounds */
  --spacing-unit: 1rem;      /* base spacing unit */
  --header-height: 0px;      /* updated dynamically via JS */
}

/* Dark-mode overrides: when body[data-theme="dark"] is present these
   values swap to ensure proper contrast. */
body[data-theme="dark"] {
  --dark-navy: #F5F7FA;
  --mid-slate: #3A506B;
  --steel: #FFFFFF;
  --aqua-accent: #5BC0BE;
  --snow: #0A0E23;
  --white: #1C2541;
}

/* Global resets and typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Inter', sans-serif;
}
body {
  background: var(--snow);
  color: var(--dark-navy);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* Add top margin equal to the header height so that fixed nav doesn't overlap
   the first section on interior pages. This variable is updated dynamically
   by the JavaScript. */
main {
  flex: 1;
  margin-top: var(--header-height);
}
img { max-width: 100%; display: block; }

/* Utility container for centering content and constraining width */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-unit);
}

/* =================== HEADER & NAVIGATION =================== */
header {
  background: var(--dark-navy);
  color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--spacing-unit) * 0.75) var(--spacing-unit);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
}
.logo img {
  width: 32px;
  height: 32px;
}
nav {
  position: relative;
}
nav ul {
  list-style: none;
  display: flex;
  gap: var(--spacing-unit);
}
nav a {
  color: var(--white);
  text-decoration: none;
}
.nav-link {
  padding: 0.75rem 1rem;
  display: inline-block;
}
#mode-toggle {
  background: var(--aqua-accent);
  border: none;
  color: var(--dark-navy);
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  width: 24px;
  height: 3px;
  background: var(--white);
  transition: 0.3s;
}
@media (max-width: 768px) {
  nav ul {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--dark-navy);
    flex-direction: column;
    width: 220px;
    display: none;
    padding: var(--spacing-unit);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }
  nav ul.active {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
}

/* =================== HERO SECTION =================== */
.hero {
  position: relative;
  /* Use the abstract robotics image as a backdrop. The linear-gradient overlay
     darkens the image slightly for better legibility of the heading. */
  background: var(--mid-slate);
  background-image: linear-gradient(rgba(10,14,35,0.85), rgba(10,14,35,0.85)), url('../img/hero-bg.png');
  background-size: cover;
  background-position: center;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 3rem;
  min-height: 60vh;
}
.hero h1 {
  font-size: clamp(2rem, 5vw + 1rem, 3rem);
  margin-bottom: 1rem;
}
.hero img.hero-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}
.hero .btn {
  margin-top: 1.5rem;
}
/* Decorative wave in hero */
.hero-swirl {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  color: var(--aqua-accent);
  opacity: 0.15;
  pointer-events: none;
}
.hero-swirl path {
  fill: currentColor;
}

/* =================== SECTIONS =================== */
.section {
  padding: 4rem 0;
}
.section h1,
.section h2 {
  margin-bottom: 1rem;
}
.what {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .what {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============== WHAT WE DO LIST ===================== */
/* The what-list replaces the previous two-column layout in the
   "What We Do" section. Using a list with custom bullets creates
   a more balanced composition and makes key messages easy to scan.
   We leave the original .what rules above intact for backwards
   compatibility, though they are no longer applied. */
.what-list {
  list-style: none;
  margin-top: 1rem;
  padding-left: 0;
}
.what-list li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.4;
}
.what-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--aqua-accent);
  border-radius: 50%;
}

/* Buttons */
.btn {
  background: var(--aqua-accent);
  color: var(--dark-navy);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
}
.btn:hover { opacity: 0.9; }

/* =================== ABOUT PAGE =================== */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.team-card {
  background: var(--white);
  padding: var(--spacing-unit);
  /* Use flexbox so the image and text are vertically centered and aligned */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 12px;
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
.team-card img {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  margin-bottom: 1rem;
  object-fit: cover;
}

/* =================== CAPABILITIES GRID =================== */
.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .capabilities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.capability-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  /* Use flexbox for vertical centering of icon and text */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.capability-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.cap-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--aqua-accent);
}
.capability-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--dark-navy);
}
.capability-card p {
  color: var(--steel);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* =================== CONTACT PAGE =================== */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}
form input,
form textarea {
  padding: 0.75rem;
  border: 1px solid var(--steel);
  border-radius: 4px;
  background: var(--snow);
  color: var(--dark-navy);
}
form button {
  align-self: flex-start;
}

/* =================== FOOTER =================== */
footer {
  background: var(--dark-navy);
  color: var(--white);
  text-align: center;
  padding: var(--spacing-unit) 0;
}
.socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: var(--spacing-unit);
}
.socials svg {
  width: 24px;
  height: 24px;
  fill: var(--white);
}

/* =================== ANIMATIONS =================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}