/* ========================================
   HejFam Landing Page
   Vanilla CSS – no frameworks
   ======================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Brand palette */
  --yellow: #EFD55F;
  --terracotta: #EAAC6D;
  --green: #AAB865;
  --lavender: #C8B7CA;
  --cream: #FAF8F0;
  --dark-gray: #4C4C47;
  --dark-green: #6B7A3C;
  --earth: #B58E59;
  --light-violet: #BFAEC4;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--cream);
  color: var(--dark-gray);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Landing wrapper ---------- */
.landing {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 3rem 1.5rem 6rem;
  text-align: center;
  overflow: hidden;
}

/* ---------- Logo ---------- */
.logo {
  width: min(380px, 70vw);
  height: auto;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

/* ---------- Typography ---------- */
.subtitle {
  font-size: clamp(0.85rem, 1.8vw, 1.15rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dark-gray);
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

.tagline {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 2;
}

.description {
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  max-width: 640px;
  line-height: 1.65;
  color: var(--dark-gray);
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 2;
}

.provider-text {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  max-width: 560px;
  line-height: 1.65;
  color: var(--dark-gray);
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
}

/* ---------- Arrow ---------- */
.arrow {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
}

.arrow svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--dark-gray);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- CTA Button ---------- */
.cta-button {
  position: relative;
  z-index: 2;
  display: inline-block;
  padding: 1.1rem 3rem;
  font-family: inherit;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 400;
  color: var(--cream);
  background-color: var(--lavender);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  letter-spacing: 0.02em;
}

.cta-button:hover {
  background-color: var(--light-violet);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 183, 202, 0.45);
}

.cta-button:active {
  transform: translateY(0);
}

/* ========================================
   Decorative organic shapes
   ======================================== */

/* Lavender blob – top right */
.blob-top-right {
  position: absolute;
  top: -5%;
  right: -8%;
  width: clamp(200px, 30vw, 420px);
  height: clamp(200px, 30vw, 420px);
  background-color: var(--lavender);
  opacity: 0.55;
  border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%;
  z-index: 0;
}

/* Green hill – bottom left */
.blob-bottom-left {
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: clamp(220px, 32vw, 460px);
  height: clamp(180px, 24vw, 340px);
  background-color: var(--green);
  opacity: 0.7;
  border-radius: 30% 70% 60% 40% / 70% 30% 60% 40%;
  z-index: 1;
}

/* Smaller green accent – bottom left overlap */
.blob-bottom-left-sm {
  position: absolute;
  bottom: -4%;
  left: 2%;
  width: clamp(120px, 18vw, 260px);
  height: clamp(120px, 16vw, 220px);
  background-color: var(--dark-green);
  opacity: 0.55;
  border-radius: 50% 50% 46% 54% / 62% 38% 56% 44%;
  z-index: 1;
}

/* Lavender wave – bottom right */
.blob-bottom-right {
  position: absolute;
  bottom: -8%;
  right: -6%;
  width: clamp(260px, 38vw, 520px);
  height: clamp(200px, 28vw, 380px);
  background-color: var(--lavender);
  opacity: 0.5;
  border-radius: 54% 46% 38% 62% / 40% 60% 44% 56%;
  z-index: 1;
}

/* Small lavender blob – top left */
.blob-top-left {
  position: absolute;
  top: 6%;
  left: -4%;
  width: clamp(90px, 12vw, 170px);
  height: clamp(90px, 12vw, 170px);
  background-color: var(--lavender);
  opacity: 0.4;
  border-radius: 44% 56% 62% 38% / 52% 48% 58% 42%;
  z-index: 0;
}

/* Yellow accent – top center-left */
.blob-yellow-top {
  position: absolute;
  top: 2%;
  left: 18%;
  width: clamp(60px, 8vw, 110px);
  height: clamp(60px, 8vw, 110px);
  background-color: var(--yellow);
  opacity: 0.4;
  border-radius: 58% 42% 50% 50% / 46% 54% 48% 52%;
  z-index: 0;
}

/* Terracotta blob – mid right */
.blob-terracotta-right {
  position: absolute;
  top: 30%;
  right: 2%;
  width: clamp(70px, 10vw, 140px);
  height: clamp(70px, 10vw, 140px);
  background-color: var(--terracotta);
  opacity: 0.35;
  border-radius: 52% 48% 40% 60% / 58% 42% 54% 46%;
  z-index: 0;
}

/* Yellow blob – mid left */
.blob-yellow-left {
  position: absolute;
  top: 55%;
  left: 1%;
  width: clamp(80px, 10vw, 150px);
  height: clamp(70px, 9vw, 130px);
  background-color: var(--yellow);
  opacity: 0.35;
  border-radius: 46% 54% 58% 42% / 50% 56% 44% 50%;
  z-index: 0;
}

/* Terracotta accent – bottom center */
.blob-terracotta-bottom {
  position: absolute;
  bottom: 4%;
  left: 38%;
  width: clamp(50px, 7vw, 100px);
  height: clamp(50px, 7vw, 100px);
  background-color: var(--terracotta);
  opacity: 0.3;
  border-radius: 56% 44% 48% 52% / 44% 58% 42% 56%;
  z-index: 0;
}

/* Small green accent – right side */
.blob-green-right {
  position: absolute;
  bottom: 22%;
  right: 4%;
  width: clamp(55px, 7vw, 100px);
  height: clamp(55px, 7vw, 100px);
  background-color: var(--green);
  opacity: 0.4;
  border-radius: 48% 52% 56% 44% / 54% 46% 50% 50%;
  z-index: 0;
}

/* ========================================
   Newsletter Modal
   ======================================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  background-color: rgba(76, 76, 71, 0.5);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  position: relative;
  background-color: var(--cream);
  border-radius: 12px;
  padding: 2.5rem 1.5rem 1.5rem;
  max-width: 700px;
  width: 92vw;
  box-shadow: 0 8px 32px rgba(76, 76, 71, 0.2);
}

.modal-iframe-wrapper {
  position: relative;
  width: 100%;
  height: 70vh;
}

.modal-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: opacity 0.3s ease;
}

.modal-iframe-wrapper.loaded .modal-loader {
  opacity: 0;
  pointer-events: none;
}

.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--lavender);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-size: 0.9rem;
  color: var(--dark-gray);
  opacity: 0.7;
}

.modal-iframe {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.8rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--dark-gray);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--terracotta);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .landing {
    padding: 2rem 1.2rem 5rem;
  }

  .logo {
    width: min(260px, 75vw);
    margin-bottom: 0.8rem;
  }

  .subtitle {
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
  }

  .description,
  .provider-text {
    max-width: 90vw;
  }

  .blob-top-right {
    width: 180px;
    height: 180px;
    top: -3%;
    right: -12%;
  }

  .blob-bottom-left {
    width: 200px;
    height: 160px;
    bottom: -5%;
    left: -15%;
  }

  .blob-bottom-left-sm {
    width: 110px;
    height: 100px;
    bottom: -2%;
    left: -4%;
  }

  .blob-bottom-right {
    width: 220px;
    height: 180px;
    bottom: -5%;
    right: -10%;
  }

  .blob-top-left {
    width: 80px;
    height: 80px;
    top: 4%;
    left: -8%;
  }

  .blob-yellow-top {
    width: 55px;
    height: 55px;
  }

  .blob-terracotta-right {
    width: 65px;
    height: 65px;
  }

  .blob-yellow-left {
    width: 70px;
    height: 60px;
  }

  .blob-terracotta-bottom {
    width: 45px;
    height: 45px;
  }

  .blob-green-right {
    width: 50px;
    height: 50px;
  }

  .modal-content {
    width: 96vw;
    padding: 2.5rem 0.75rem 0.75rem;
  }

  .modal-iframe {
    height: 75vh;
  }
}

@media (max-width: 480px) {
  .cta-button {
    padding: 0.9rem 2rem;
    font-size: 1rem;
  }

  .blob-top-right {
    width: 130px;
    height: 130px;
  }

  .blob-bottom-left {
    width: 150px;
    height: 120px;
  }

  .blob-bottom-left-sm {
    width: 80px;
    height: 75px;
  }

  .blob-bottom-right {
    width: 170px;
    height: 140px;
  }

  .blob-top-left {
    width: 60px;
    height: 60px;
  }

  .blob-yellow-top {
    width: 40px;
    height: 40px;
  }

  .blob-terracotta-right {
    width: 50px;
    height: 50px;
  }

  .blob-yellow-left {
    width: 55px;
    height: 45px;
  }

  .blob-terracotta-bottom {
    width: 35px;
    height: 35px;
  }

  .blob-green-right {
    width: 40px;
    height: 40px;
  }

  .modal-content {
    width: 98vw;
    padding: 2.2rem 0.5rem 0.5rem;
    border-radius: 8px;
  }

  .modal-iframe {
    height: 85vh;
  }
}
