
/* ==================================================
   1. Global settings
   ================================================== */

:root {
  --color-text: #333333;
  --color-heading: #222222;
  --color-background: #ffffff;
  --color-muted: #f5f5f5;
  --color-border: #e5e5e5;
  --color-link: #1769aa;

  --content-width: 1100px;
  --header-height: 120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

h1,
h2,
h3 {
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.25;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 1.25rem;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 1.5rem;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1.2rem;
}

.container {
  width: min(
    var(--content-width),
    calc(100% - 48px)
  );
  margin-inline: auto;
}

.section {
  padding: 64px 0;
  background: #fff;
  scroll-margin-top: calc(var(--header-height) + 12px);
}

.section--muted {
  background: var(--color-muted);
}


/* ==================================================
   2. Header
   ================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  width: min(1500px, calc(100% - 48px));
  min-height: var(--header-height);
  margin-inline: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}


/* ==================================================
   3. Logo and tagline
   ================================================== */

.brand {
  display: flex;
  align-items: center;
  gap: 18px;

  flex: 0 1 auto;
  min-width: 0;
  color: var(--color-heading);
  line-height: 1;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 312px;
  height: 77px;
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-tagline {
  font-size: 16px;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--color-heading);
}


/* ==================================================
   4. Navigation
   ================================================== */

.site-nav {
  flex: 0 0 auto;
}

.site-nav ul {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 28px;

  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav li {
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 12px 0;

  color: var(--color-heading);
  font-size: 0.95rem;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--color-link);
}


/* Hide the tagline before it crowds navigation.
   Adjust this breakpoint after checking the actual layout. */

@media (max-width: 1250px) {
  .brand-tagline {
    display: none;
  }
}


/* ==================================================
   5. Home section
   ================================================== */

.hero-intro {
  padding: 36px 0 24px;
  background: #fff;
  position: relative;
  z-index: 1;
}

.hero-intro h1 {
  margin-top: 0;
}

.image-window {
  min-height: 600px;
  padding: 48px 0;
  background-image: url("agile_pcb.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  scroll-margin-top: 120px;
}

.home-content {
  position: relative;
  z-index: 1;
  color: #222;
}

.home-content h2 {
  margin-top: 0;
}

.hero p {
  max-width: 760px;
  font-size: 1.1rem;
}

.hero .intro {
  font-size: 1.25rem;
  color: #555555;
}


/* ==================================================
   6. Services
   ================================================== */

.section-intro {
  max-width: 760px;
  margin-bottom: 32px;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 44px;

  list-style: none;
  margin: 0;
  padding: 0;
}

.service-list li {
  position: relative;
  padding: 17px 0 17px 24px;
  border-bottom: 1px solid var(--color-border);
}

.service-list li::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 2px;

  width: 7px;
  height: 7px;

  background: var(--color-link);
  border-radius: 50%;
}


/* ==================================================
   7. Experience
   ================================================== */

.experience-list {
  columns: 2;
  column-gap: 60px;

  padding-left: 22px;
  margin: 0;
}

.experience-list li {
  break-inside: avoid;
  padding: 0 0 13px 4px;
}


/* ==================================================
   8. Contact
   ================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-details {
  font-style: normal;
}

.contact-details p {
  margin-bottom: 24px;
}

.contact-label {
  display: block;
  margin-bottom: 4px;

  font-weight: 700;
  color: var(--color-heading);
}


/* ==================================================
   9. Footer
   ================================================== */

.site-footer {
  padding: 32px 0;
  background: #222222;
  color: #eeeeee;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #ffffff;
}


/* ==================================================
   10. Back-to-top link
   ================================================== */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 5;

  padding: 8px 14px;

  border: 1px solid var(--color-border);
  border-radius: 3px;

  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}


/* ==================================================
   11. Tablet and mobile layout
   ================================================== */

@media (max-width: 760px) {
  :root {
    --header-height: 0px;
  }

@media (max-width: 760px) {
  .image-window {
    background-attachment: scroll;
    height: 280px;
  }
  
  .header-inner {
    width: calc(100% - 32px);
    min-height: 0;
    padding: 12px 0;

    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand-logo {
    width: min(312px, 100%);
    height: auto;
    max-height: 77px;
  }

  .brand-tagline {
    display: block;
    white-space: normal;
    line-height: 1.4;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    flex-wrap: wrap;
    gap: 6px 20px;
  }

  .site-nav a {
    padding: 4px 0;
  }

  .section,
  .hero {
    padding: 56px 0;
  }

  .service-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .experience-list {
    columns: 1;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ==================================================
   12. Reduced motion accessibility
   ================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
