@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Syne:wght@400;500;600;700;800&display=swap");

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

:root {
  --primary-red: #d00000;
  --secondary-red: #9d0208;
  --text-dark: #111827;
  --text-light: #4B5563;
  --text-lighter: #343434;
  --shadow-color: rgba(55, 6, 23, 0.1);
}

html, body {
  overscroll-behavior: none;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  position: relative;
  width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(
    to bottom,
    hsl(200deg, 80%, 55%),
    hsl(200deg, 80%, 80%),
    hsl(240deg, 70%, 80%),
    hsl(340deg, 90%, 60%),
    hsl(350deg, 100%, 50%),
    hsl(355deg, 100%, 40%),
    hsl(358deg, 100%, 30%) 100%
  );
  background-attachment: fixed;
  color: var(--text-dark);
  font-size: 16px;
}

/* Background Elements */
#cloud, #sun {
  visibility: visible !important;
  overflow: hidden;
  pointer-events: none;
}

#cloud div::before,
#cloud div::after {
  content: "";
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url(/img/cloud_X.png);
  background-repeat: repeat-x;
  animation: cloud var(--duration) linear infinite forwards;
  
  --posX: right;
  --duration: 15s;
  --lowHeight: 20vh;
  --highHeight: 90vh;
  --layerNum: 4;
  --index: 0;
  --opacity: 0.5;
  --moveX: 300px;
  animation-delay: calc(
    (var(--duration) / var(--layerNum)) * var(--index) * -1
  );
  opacity: 0;
  z-index: 5;
}

#cloud div::before {
  --index: 0;
}

#cloud div::after {
  --index: 2;
  transform: scale3d(-1, 1, 1);
}

#cloud div#cloud_layer2::before,
#cloud div#cloud_layer2::after {
  background-image: url(/img/cloud.png);
}

#cloud div#cloud_layer2::before {
  --index: 3;
}

#cloud div#cloud_layer2::after {
  --index: 1;
}

#sun div {
  content: "";
  display: block;
  position: fixed;
  bottom: 0;
  left: 38vw;
  width: 100vw;
  height: 100vh;
  --sunPos: 50vw -10vmin;
  transform-origin: var(--sunPos);
  animation: sun 3.5s linear infinite alternate;

  -webkit-mask-image: radial-gradient(
    circle at var(--sunPos),
    white 0%,
    transparent 80%
  );
  mask-image: radial-gradient(
    circle at var(--sunPos),
    white 0%,
    transparent 80%
  );
  z-index: 3;
  pointer-events: none;
}

#sun #sun_layer1 {
  background: conic-gradient(
    from 135deg at var(--sunPos),
    transparent 10.5%,
    rgba(255, 255, 255, 0.15) 11%,
    transparent 11.5%,
    transparent 15%,
    rgba(128, 128, 128, 0.1) 16%,
    transparent 17%,
    transparent 18%,
    rgba(255, 255, 255, 0.1) 19%,
    transparent 20%
  );
}

#sun #sun_layer2 {
  animation-delay: -1s;
  animation-duration: 7s;
  background: conic-gradient(
    from 140deg at var(--sunPos),
    transparent 10%,
    rgba(255, 255, 255, 0.1) 11%,
    transparent 12%,
    transparent 15.5%,
    rgba(255, 255, 255, 0.1) 16%,
    transparent 16.5%,
    transparent 17%,
    rgba(144, 144, 144, 0.1) 18%,
    transparent 19%
  );
}

#sun #sun_layer3 {
  animation-delay: -2s;
  animation-duration: 6.5s;
  background: conic-gradient(
    from 145deg at var(--sunPos),
    transparent 10%,
    rgba(144, 144, 144, 0.1) 11%,
    transparent 12%,
    transparent 14%,
    rgba(255, 255, 255, 0.1) 15%,
    transparent 16%,
    transparent 17%,
    rgba(255, 255, 255, 0.1) 18%,
    transparent 19%
  );
}

main {
  position: relative;
}

/* Header */
header {
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-dark);
}

.nav-menu a:hover {
  color: var(--primary-red);
}

.nav-menu a::after {
  background: linear-gradient(90deg, var(--primary-red), var(--secondary-red));
}

/* Common Elements */
.cta-button {
  background: linear-gradient(120deg, var(--primary-red), var(--secondary-red));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 0, 0, 0.2);
  text-decoration: none;
  display: inline-block;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 0, 0, 0.3);
}

section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  scroll-margin-top: 80px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 3rem 2rem;
  box-shadow: 0 10px 30px var(--shadow-color);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: shine 8s infinite linear;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

.hero-content {
  max-width: 600px;
}

h1, h2, h3 {
  font-family: "Syne", sans-serif;
  color: var(--text-dark);
}

h4 {
  color: #fff;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.highlight {
  color: var(--primary-red);
}

p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: var(--text-lighter);
}

.hero-image {
  position: absolute;
  top: 50%;
  right: 4%;
  transform: translateY(-50%);
  max-width: 40%;
  z-index: 2;
}

/* Sections */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px var(--shadow-color);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: linear-gradient(120deg, var(--primary-red), var(--secondary-red));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  padding: 3rem 0;
  color: white;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-logo {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: white;
  display: flex;
  align-items: center;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: linear-gradient(120deg, var(--primary-red), var(--secondary-red));
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  margin-top: 3rem;
  color: #fff;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

/* Animations */
@keyframes cloud {
  0% {
    opacity: 0;
    background-position: var(--posX) var(--moveX) bottom
      calc(-1 * var(--lowHeight));
    background-size: calc(1 * var(--lowHeight)) var(--lowHeight);
  }
  5% {
    opacity: var(--opacity);
  }
  80% {
    opacity: var(--opacity);
  }
  100% {
    opacity: 0;
    background-position: var(--posX) bottom;
    background-size: calc(3 * var(--highHeight)) var(--highHeight);
  }
}

@keyframes sun {
  to {
    transform: skew(-15deg);
  }
}

@keyframes shine {
  0% {
    left: -150%;
  }
  50%, 100% {
    left: 150%;
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .hero {
    text-align: center;
    align-items: center;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .hero-image {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    max-width: 100%;
    margin-top: 2rem;
    z-index: 2;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  /* Mobile background fixes */
  #cloud div::before,
  #cloud div::after {
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 5 !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  #sun div {
    position: absolute;
    z-index: 3 !important;
    opacity: 0.8;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  
  body {
    min-height: -webkit-fill-available;
  }
  
  html {
    height: -webkit-fill-available;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  #cloud div::before,
  #cloud div::after,
  #sun div {
    position: absolute;
    height: 100%;
    -webkit-transform: translateZ(0);
  }
  
  body {
    min-height: -webkit-fill-available;
  }
  
  html {
    height: -webkit-fill-available;
  }
}