@import "https://unpkg.com/open-props";
@import "https://unpkg.com/open-props/normalize.min.css";
@import "https://unpkg.com/open-props/buttons.min.css";

:root {
  /* Brand Colors */
  --brand-primary: var(--lime-8);
  --brand-secondary: var(--lime-9);
  --surface-1: var(--gray-9);
  --surface-2: var(--gray-8);
  --surface-3: var(--gray-7);
  --text-1: var(--gray-0);
  --text-2: var(--gray-3);

  /* Layout */
  --nav-height: 80px;
}

body {
  background-color: var(--surface-1);
  color: var(--text-1);
  font-family: 'Inter', sans-serif;
  line-height: var(--font-lineheight-3);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-9);
  line-height: var(--font-lineheight-0);
}

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

h2 {
  font-size: var(--font-size-6);
  color: var(--brand-primary);
}

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

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Components */
.container {
  max-width: var(--size-lg);
  margin-inline: auto;
  padding-inline: var(--size-3);
}

/* Header */
header {
  height: var(--nav-height);
  background-color: var(--surface-2);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-2);
}


header .container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--size-2);
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--text-1);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  nav ul {
    position: fixed;
    top: var(--nav-height);
    left: 100%;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background-color: var(--surface-2);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease-in-out;
    padding: var(--size-5);
  }

  nav ul.active {
    transform: translateX(-100%);
  }

  nav a {
    font-size: var(--font-size-4);
    display: block;
    width: 100%;
  }

  /* Mobile Submenu */
  .submenu {
    display: flex;
    flex-direction: column;
    gap: var(--size-3);
    padding-left: var(--size-4);
    margin-top: var(--size-3);
    border-left: 1px solid var(--surface-3);
  }

  .submenu a {
    font-size: var(--font-size-3);
    color: var(--text-2);
  }

  /* Animate burger icon */
  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}

@media (min-width: 769px) {
  nav ul {
    display: flex;
    gap: var(--size-4);
    list-style: none;
    padding: 0;
    align-items: center;
  }

  nav ul li {
    position: relative;
    padding-block: var(--size-2);
    /* Increase hit area */
  }

  /* Desktop Submenu */
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--surface-2);
    min-width: 220px;
    box-shadow: var(--shadow-3);
    border-radius: var(--radius-2);
    padding: var(--size-3);
    display: none;
    flex-direction: column;
    gap: var(--size-2);
    border: 1px solid var(--surface-3);
    z-index: 1000;
  }

  /* Show submenu on hover */
  .has-submenu:hover .submenu,
  .has-submenu:focus-within .submenu {
    display: flex;
    animation: fade-in 0.2s ease-out;
  }

  /* Submenu links */
  .submenu a {
    font-size: var(--font-size-1);
    color: var(--text-2);
    padding: var(--size-2);
    border-radius: var(--radius-2);
    text-transform: none;
    /* Override parent styles */
    display: block;
    font-weight: var(--font-weight-4);
  }

  .submenu a:hover {
    background-color: var(--surface-3);
    color: var(--brand-primary);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav a {
  color: var(--text-1);
  font-weight: var(--font-weight-6);
  text-transform: uppercase;
  font-size: var(--font-size-1);
}

nav a:hover {
  color: var(--brand-primary);
  text-decoration: none;
}

/* Hero Section */
.hero {
  height: 80vh;
  display: grid;
  place-items: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('ilustrace/homepage.jpg');
  background-size: cover;
  background-position: top center;
  text-align: center;
}

/* Hero Text Animation */
.gooey-container {
  display: grid;
  place-items: center;
  position: relative;
  /* Filter needed for the gooey effect */
  filter: blur(10px) contrast(30);
  background: #000;
  /* Black background required for contrast filter to work on alpha edges */
  mix-blend-mode: screen;
  /* Blend black away, keeping white text */
  /* Animation for the container (blur/contrast pulses) */
  animation: goo-pulse 9s linear infinite;
}

.gooey-container h1 {
  grid-area: 1 / 1;
  font-size: var(--font-size-8);
  /* Match previous size */
  color: white;
  /* Ensure text is white */
  text-transform: uppercase;
  margin-bottom: var(--size-3);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  /* Default hidden */
  animation: text-cycle 9s linear infinite;
}

/* Stagger animations */
.gooey-container h1:nth-child(1) {
  animation-delay: 0s;
}

.gooey-container h1:nth-child(2) {
  animation-delay: 3s;
}

.gooey-container h1:nth-child(3) {
  animation-delay: 6s;
}

@keyframes text-cycle {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  5% {
    opacity: 1;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(0);
  }

  35% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 0;
  }
}

@keyframes goo-pulse {
  /* 
     Cycle is 9s total.
     Switches happen roughly at:
     0s (Item 1 in) -> No extra blur needed yet?
     3s (Item 1 out, Item 2 in) -> BLUR
     6s (Item 2 out, Item 3 in) -> BLUR
     9s (Item 3 out, Item 1 in) -> BLUR
  */

  /* Nominal state: crisp text */
  0%,
  28%,
  38%,
  61%,
  71%,
  95% {
    filter: blur(0px) contrast(1);
  }

  /* Blurry state during transitions */
  33%,
  66%,
  100% {
    filter: blur(10px) contrast(30);
  }
}


.hero-content p {
  font-size: var(--font-size-4);
  color: var(--text-2);
  max-width: 60ch;
  margin-inline: auto;
  margin-bottom: var(--size-7);
}

/* Services Grid */
.services {
  padding-block: var(--size-10);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--size-5);
  margin-top: var(--size-7);
}

.card {
  background: var(--surface-2);
  padding: var(--size-5);
  border-radius: var(--radius-3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--surface-3);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-4);
  border-color: var(--brand-primary);
}

.card h3 {
  color: var(--brand-primary);
  margin-bottom: var(--size-3);
}

a.card {
  text-decoration: none;
}

a.card:hover {
  text-decoration: none;
}

/* Footer */
footer {
  background-color: var(--surface-3);
  padding-block: var(--size-8);
  margin-top: auto;
  border-top: 1px solid var(--surface-2);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--size-8);
}

.footer-col h4 {
  color: var(--text-1);
  margin-bottom: var(--size-3);
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: var(--size-2);
}

.footer-col a {
  color: var(--text-2);
}

.footer-col a:hover {
  color: var(--brand-primary);
}

/* Utilities */
.btn {
  display: inline-block;
  background: var(--brand-primary);
  color: white;
  padding: var(--size-3) var(--size-6);
  border-radius: var(--radius-2);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  background: var(--brand-secondary);
  text-decoration: none;
}

.section-header {
  text-align: center;
  margin-bottom: var(--size-8);
}

.section-header h2 {
  font-size: var(--font-size-8);
  text-transform: uppercase;
}