/* Tokengrove Electrical - Main Stylesheet */

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */

:root {
  /* Colours */
  --color-primary: #0a0a0a;
  --color-secondary: #1f1f1f;
  --color-accent: #7b2d8b;
  --color-accent-hover: #5e2268;
  --color-accent-light: #a855c8;
  --color-text: #333333;
  --color-text-light: #f0f0f0;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-lg: 1.25rem;
  --font-size-h1: clamp(2rem, 5vw, 3.5rem);
  --font-size-h2: clamp(1.5rem, 3vw, 2.5rem);
  --font-size-h3: clamp(1.25rem, 2.5vw, 1.75rem);
  --font-size-h4: 1.25rem;
  --line-height: 1.6;

  /* Spacing */
  --section-padding: 60px;
  --container-max: 1200px;
  --grid-gap: 24px;
  --card-padding: 24px;

  /* Transitions */
  --transition-fast: 200ms ease;
  --transition-medium: 400ms ease;

  /* Shadows */
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ========================================
   CSS Reset / Normalize
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

/* ========================================
   Base Typography
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

h3 {
  font-size: var(--font-size-h3);
}

h4 {
  font-size: var(--font-size-h4);
}

p {
  margin-bottom: 1rem;
}

/* ========================================
   Utility Classes
   ======================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--grid-gap);
  padding-right: var(--grid-gap);
}

/* ========================================
   Section Defaults
   ======================================== */

section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

/* ========================================
   Button Styles
   ======================================== */

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--accent {
  background-color: var(--color-accent);
  color: #ffffff;
}

.btn--accent:hover {
  background-color: var(--color-accent-hover);
  color: #ffffff;
}

.btn--lg {
  padding: 16px 32px;
  font-size: var(--font-size-lg);
}

/* ========================================
   Responsive Grid Utilities
   ======================================== */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  width: 100%;
}

.grid--2col {
  grid-template-columns: 1fr;
}

.grid--3col {
  grid-template-columns: 1fr;
}

/* ========================================
   Mobile Touch Targets & Base Layout
   ======================================== */

a,
button,
input,
select,
textarea,
[role="button"] {
  min-height: 44px;
  min-width: 44px;
}

input,
textarea,
select {
  width: 100%;
  font-size: var(--font-size-base);
}

/* Ensure minimum font size of 14px at all widths */
body {
  font-size: max(var(--font-size-base), 14px);
}

small,
.text-sm {
  font-size: max(var(--font-size-sm), 14px);
}

/* Image scaling within containers */
img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   Media Queries - Tablet (768px)
   ======================================== */

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

  .grid--3col {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Remove touch target constraint on larger viewports */
  a,
  button,
  input,
  select,
  textarea,
  [role="button"] {
    min-height: auto;
    min-width: auto;
  }
}

/* ========================================
   Media Queries - Desktop (1024px)
   ======================================== */

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

/* ========================================
   Hero Section
   ======================================== */

.hero {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  padding-bottom: var(--section-padding);
  padding-left: var(--grid-gap);
  padding-right: var(--grid-gap);
}

.hero__content {
  max-width: var(--container-max);
  width: 100%;
}

.hero__logo {
  width: 360px;
  height: auto;
  margin: 0 auto 2rem;
  margin-top: -100px;
}

.hero__title {
  font-size: var(--font-size-h1);
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.hero__keyword {
  display: inline-block;
  color: var(--color-accent-light);
  opacity: 1;
  transition: opacity var(--transition-medium);
}

.hero__keyword--fading {
  opacity: 0;
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  opacity: 0.85;
  margin-bottom: 2rem;
}

.hero .btn--accent {
  color: #ffffff;
}

/* ========================================
   Navigation Bar
   ======================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #e8e8e8;
  z-index: 1000;
  padding: 0;
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 8px var(--grid-gap);
}

.navbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar__logo img {
  height: 60px;
  width: auto;
}

/* Hamburger toggle button */
.navbar__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.navbar__toggle-bar {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* Nav menu - mobile first (hidden by default) */
.navbar__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #e8e8e8;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 0;
  box-shadow: none;
  border: none;
  outline: none;
}

.navbar__menu--open {
  display: flex;
}

.navbar__link {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px var(--grid-gap);
  color: var(--color-text);
  font-weight: 500;
  font-size: var(--font-size-base);
  border: none;
  outline: none;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.navbar__link:hover,
.navbar__link:focus {
  color: var(--color-accent);
  background-color: rgba(0, 0, 0, 0.03);
}

/* CTA button in navbar */
.navbar__cta {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: var(--font-size-sm);
  white-space: nowrap;
  position: relative;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   Navigation Bar - Tablet+ (768px)
   ======================================== */

@media (min-width: 768px) {
  .navbar__toggle {
    display: none;
  }

  .navbar__menu {
    display: flex;
    position: static;
    width: auto;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 4px;
    background-color: transparent;
    box-shadow: none;
    border: none;
    min-height: auto;
  }

  .navbar__link {
    width: auto;
    padding: 8px 12px;
    font-size: var(--font-size-sm);
  }

  .navbar__cta {
    margin-left: 16px;
  }
}

/* ========================================
   Navigation Bar - Desktop (1024px)
   ======================================== */

@media (min-width: 1024px) {
  .navbar__link {
    padding: 8px 16px;
    font-size: var(--font-size-base);
  }

  .navbar__cta {
    padding: 12px 24px;
    font-size: var(--font-size-base);
  }
}

/* ========================================
   About Section
   ======================================== */

.about {
  text-align: center;
}

.about h2 {
  margin-bottom: 1.5rem;
}

.about__text {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

.about__certs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--grid-gap);
  margin-top: 32px;
}

.about__certs img {
  height: 80px;
  width: auto;
  object-fit: contain;
  background-color: var(--color-bg-alt);
}

/* ========================================
   Services Section
   ======================================== */

.services-section {
  background-color: var(--color-bg-alt);
}

.services-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.service-card {
  padding: var(--card-padding);
  background-color: var(--color-bg);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: box-shadow var(--transition-fast);
}

.service-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 8px;
}

.service-card__icon img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.service-card__title {
  font-size: var(--font-size-h3);
  margin-bottom: 0.75rem;
}

.service-card__desc {
  font-size: var(--font-size-base);
  color: var(--color-text);
  margin-bottom: 0;
}


/* ========================================
   Projects Section
   ======================================== */

#projects h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.project-card {
  background-color: var(--color-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-fast);
}

.project-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.project-card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background-color: var(--color-bg-alt);
}

.project-card__content {
  padding: var(--card-padding);
}

.project-card__title {
  font-size: var(--font-size-h3);
  margin-bottom: 0.75rem;
}

.project-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-card__list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: 1.5;
}

.project-card__list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.project-card__list li:last-child {
  margin-bottom: 0;
}


/* ========================================
   Clients Section
   ======================================== */

.clients {
  text-align: center;
}

.clients h2 {
  margin-bottom: 2rem;
}

.clients__grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--grid-gap);
  align-items: center;
}

.clients__item {
  flex: 0 0 calc(33.333% - var(--grid-gap));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  min-height: 80px;
  background-color: var(--color-bg-alt);
}

.clients__item img {
  height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

@media (min-width: 768px) {
  .clients__item {
    flex: 0 0 calc(16.666% - var(--grid-gap));
  }

  .clients__item img {
    height: 70px;
  }
}


/* ========================================
   Testimonial Section
   ======================================== */

.testimonial {
  background-color: var(--color-secondary);
  padding-top: 80px;
  padding-bottom: 80px;
}

.testimonial__quote {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  border: none;
  padding: 0;
}

.testimonial__quote p {
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.7;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.testimonial__attribution {
  text-align: center;
}

.testimonial__attribution cite {
  font-style: normal;
  font-size: 1rem;
  color: var(--color-text-light);
  opacity: 0.8;
}


/* ========================================
   Contact Section
   ======================================== */

.contact-section {
  background-color: var(--color-bg-alt);
}

.contact-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-section__wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
}

.contact-section__info {
  text-align: center;
}

.contact-section__info p {
  font-size: var(--font-size-lg);
  color: var(--color-text);
}

.contact-section__link {
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--font-size-lg);
}

.contact-section__link:hover {
  color: var(--color-accent-hover);
}

/* Contact Form */

.contact-form {
  width: 100%;
}

.contact-form__group {
  margin-bottom: 0.75rem;
}

.contact-form__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: var(--font-size-base);
  color: var(--color-text);
}

.contact-form__input {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--font-size-base);
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(210, 52, 77, 0.15);
}

.contact-form__input--error {
  border-color: #d32f2f;
}

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

.contact-form__error {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--font-size-sm);
  color: #d32f2f;
  min-height: 1.25rem;
}

.contact-form__submit {
  width: 100%;
  margin-top: 0.5rem;
}

.contact-form__status {
  margin-top: 1rem;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: var(--font-size-base);
  text-align: center;
  display: none;
}

.contact-form__status--success {
  display: block;
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.contact-form__status--error {
  display: block;
  background-color: #fbe9e7;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* Contact Section - Mobile compact */

@media (max-width: 767px) {
  .contact-section {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .contact-section h2 {
    margin-bottom: 1rem;
  }

  .contact-section__info p {
    font-size: var(--font-size-base);
    margin-bottom: 0.5rem;
  }

  .contact-form__group {
    margin-bottom: 0.5rem;
  }

  .contact-form__label {
    margin-bottom: 0.15rem;
    font-size: var(--font-size-sm);
  }

  .contact-form__input {
    padding: 8px 12px;
  }

  textarea.contact-form__input {
    min-height: 80px;
  }

  .contact-form__error {
    min-height: 0;
    margin-top: 0.15rem;
  }
}

/* Contact Section - Tablet+ (768px) */

@media (min-width: 768px) {
  .contact-section__wrapper {
    flex-direction: row;
    align-items: flex-start;
  }

  .contact-section__info {
    flex: 0 0 35%;
    text-align: left;
    padding-top: 0.5rem;
  }

  .contact-form {
    flex: 1;
  }

  .contact-form__submit {
    width: auto;
  }
}


/* ========================================
   Footer Section
   ======================================== */

.footer {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  padding-top: 30px;
  padding-bottom: 0;
}

.footer__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  padding-bottom: var(--section-padding);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__logo {
  width: 150px;
  height: auto;
}

.footer__desc {
  color: var(--color-text-light);
  opacity: 0.85;
  margin-bottom: 0;
  font-size: var(--font-size-sm);
}

.footer h4 {
  color: var(--color-text-light);
  margin-bottom: 12px;
  font-size: var(--font-size-h4);
}

.footer__links nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__links nav a {
  color: var(--color-text-light);
  opacity: 0.85;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.footer__links nav a:hover,
.footer__links nav a:focus {
  color: var(--color-accent-light);
  opacity: 1;
}

.footer__contact a {
  color: var(--color-text-light);
  opacity: 0.85;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

.footer__contact a:hover,
.footer__contact a:focus {
  color: var(--color-accent-light);
  opacity: 1;
}

.footer__contact p {
  margin-bottom: 8px;
}

.footer__cert-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer__cert-logos img {
  height: 50px;
  width: auto;
  object-fit: contain;
  background-color: var(--color-bg-alt);
}

.footer__bottom {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 16px 0;
  text-align: center;
}

.footer__bottom p {
  margin-bottom: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  opacity: 0.7;
}

/* Footer - Tablet (768px) */
@media (min-width: 768px) {
  .footer__container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Footer - Desktop (1024px) */
@media (min-width: 1024px) {
  .footer__container {
    grid-template-columns: repeat(4, 1fr);
  }
}
