/* Reset */

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

/* Smooth scrolling for the Services / Projects links */

html {
  scroll-behavior: smooth;
}

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

/* Body
   Flex column keeps the tree line and footer at the bottom of the window
   on short pages (no gray gap under the footer). */

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f6f9;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */

header {
  background: white;
  color: #0d1b2a;
  padding: 20px 50px;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 28px;
}

/* Navigation */

nav a {
  display: inline-block;

  background: #0077cc;
  color: white;

  text-decoration: none;

  padding: 10px 18px;
  margin-left: 12px;

  border-radius: 5px;

  transition: 0.3s ease;
}

nav a:hover {
  background: #4ea8de;
  transform: translateY(-2px);
}

nav a:focus-visible,
.btn:focus-visible {
  outline: 3px solid #4ea8de;
  outline-offset: 3px;
}

/* Hero Section
   Solid dark navy background so the white text is easy to read.
   On wide screens the text sits inside a hexagon like the logo, with the
   logo's tree line filling the bottom point. */

.hero {
  min-height: 90vh;
  padding: 40px 20px;

  background: linear-gradient(180deg, #0d1b2a 0%, #08121d 100%);

  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  padding: 40px 0 130px;
}

.hero-content > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.hero p {
  font-size: 20px;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 30px;
  color: #e6edf5;
}

/* Small screens: no hexagon, just a simple tree line under the text */
.hero-content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  pointer-events: none;

  background: url("hero-trees.svg") repeat-x center bottom / auto 70px;
}

/* Wide screens: hexagon + logo trees */
@media (min-width: 901px) {

  .hero-content {
    flex-shrink: 0;
    width: 760px;
    height: 800px;
    max-width: none;

    /* text area sits between the top slopes and the trees */
    padding: 236px 70px 308px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* Hexagon outline (regular hexagon, same blue as the logo) */
  .hero-content::before {
    content: "";
    position: absolute;
    inset: -3px;
    pointer-events: none;

    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 766 806'%3E%3Cpolygon points='383,3 763,222.4 763,583.6 383,803 3,583.6 3,222.4' fill='none' stroke='%230F74FF' stroke-width='6' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 100% 100% no-repeat;
  }

  /* The logo's tree line, filling the bottom point of the hexagon */
  .hero-content::after {
    left: 20px;
    right: 20px;
    bottom: 14px;
    height: auto;
    aspect-ratio: 218.22 / 83.31;

    background: url("hero-trees-v.svg") center / 100% 100% no-repeat;
  }

  .hero h2 {
    font-size: 38px;
    margin-bottom: 16px;
  }

  .hero p {
    font-size: 17px;
    margin-bottom: 26px;
  }

}

/* Buttons */

.btn {
  display: inline-block;
  padding: 14px 28px;

  background: #0077cc;
  color: white;

  text-decoration: none;
  border-radius: 5px;

  /* makes <button class="btn"> look the same as <a class="btn"> */
  border: none;
  font-family: inherit;
  font-size: 1rem;
  line-height: inherit;
  cursor: pointer;

  transition: 0.3s;
}

.btn:hover {
  background: #005fa3;
}

/* General Sections */

section {
  padding: 80px 50px;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h3 {
  font-size: 36px;
  color: #0d1b2a;
}

/* Services */

.services {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(250px, 1fr));

  gap: 30px;
}

.service-card {
  background: white;
  padding: 30px;

  border-radius: 10px;

  box-shadow:
    0 4px 10px rgba(0,0,0,0.1);

  transition: 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card h4 {
  margin-bottom: 15px;
  color: #0077cc;
}

/* Project types */

.project-types {
  list-style: none;
  max-width: 1100px;
  margin: 0 auto;

  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.project-types li {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 80px;
  padding: 20px;

  background: white;
  color: #0d1b2a;
  font-weight: bold;
  text-align: center;

  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);

  transition: 0.3s;
}

.project-types li:hover {
  transform: translateY(-5px);
}

/* About */

.about {
  background: white;
  text-align: center;
}

.about p {
  max-width: 900px;
  margin: auto;
  font-size: 18px;
}

/* Stats */

.stats {
  background: #0d1b2a;
  color: white;

  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;

  text-align: center;
}

.stat {
  margin: 20px;
}

.stat h2 {
  font-size: 48px;
  color: #4ea8de;
}

/* Contact */

.contact {
  text-align: center;
}

.contact p {
  margin-bottom: 25px;
}

/* Tree line (trees from the logo, sits on top of the footer)
   margin-top: auto pushes it and the footer to the bottom of short pages. */

.tree-line {
  height: 100px;                      /* make taller or shorter to taste */
  background: url("treeline.png") repeat-x center bottom / auto 100%;
  margin-top: auto;
  margin-bottom: -1px;                /* hides any hairline gap above the footer */
  flex-shrink: 0;
}

/* Pages where the section above the trees is white: match it */
.about + .tree-line {
  background-color: #fff;
}

/* Footer */

footer {
  background: #08121d;
  color: white;

  text-align: center;
  padding: 20px;
}

/* Forms */

form {
  max-width: 600px;
  margin: auto;
}

input,
textarea {
  width: 100%;
  padding: 14px;

  border: 1px solid #ccc;
  border-radius: 5px;

  font-size: 16px;
}

textarea {
  resize: vertical;
}

/* Honeypot: visually hidden, kept off-screen rather than display:none so
   bots that skip hidden fields still see and fill it. */

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Contact form status message */

.form-status {
  min-height: 1.6em;
  margin-top: 18px;
  font-weight: bold;
}

.form-status.is-sending {
  color: #0d1b2a;
}

.form-status.is-success {
  color: #1b7f3b;
}

.form-status.is-error {
  color: #c0392b;
}

button.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Logo */

.logo img {
  height: 120px;
  transition: 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

/* Responsive Design */

@media (max-width: 768px) {

  header {
    flex-direction: column;
    padding: 20px;
  }

  nav {
    margin-top: 15px;
    text-align: center;
  }

  nav a {
    margin: 4px;
  }

  section {
    padding: 60px 20px;
  }

  .hero h2 {
    font-size: 38px;
  }

  .hero p {
    font-size: 18px;
  }

  .tree-line {
    height: 70px;
  }

}