/* =========================================================
   CLOUD RESCUE — HOMEPAGE COMPOSITION
   Revision 003

   Purpose:
   Homepage-specific layout, atmosphere, section rhythm,
   hero composition, method sequence, Institute connection,
   client pathway, and closing contact scene.
   ========================================================= */


/* =========================================================
   1. HERO
   ========================================================= */

.hero {
  position: relative;
  display: grid;
  min-height: 68svh;
  align-items: center;
  overflow: hidden;
  padding-block:
  clamp(3rem, 6vw, 5rem)
  clamp(3.5rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--color-border);
  isolation: isolate;
}

.hero::before {
  position: absolute;
  top: -22rem;
  right: -16rem;
  z-index: -2;
  width: 48rem;
  height: 48rem;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(102, 217, 255, 0.11) 0%,
      rgba(102, 217, 255, 0.045) 34%,
      transparent 69%
    );
  content: "";
  filter: blur(8px);
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(15, 23, 34, 0.98) 0%,
      rgba(15, 23, 34, 0.92) 52%,
      rgba(15, 23, 34, 0.68) 100%
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(10% - 1px),
      rgba(255, 255, 255, 0.018) 10%
    );
  content: "";
  pointer-events: none;
}

.hero__inner {
  display: grid;
  justify-items: start;
  gap: var(--space-8);
}

.hero .eyebrow {
  max-width: 52ch;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(3rem, 5.4vw, 5.35rem);
  line-height: 1.02;
  text-wrap: balance;
}

.hero__statement {
  max-width: 61ch;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-3);
}

.hero__client-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.hero__client-link span {
  color: var(--color-crystal);
  transition: transform var(--transition-fast);
}

.hero__client-link:hover {
  color: var(--color-text);
}

.hero__client-link:hover span {
  transform: translateX(0.3rem);
}


/* =========================================================
   2. SERVICES
   ========================================================= */

.services {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.008),
      transparent 30%
    );
}

.services .section-heading h2 {
  max-width: 20ch;
}

.service-card {
  min-height: 22rem;
}

.service-card:nth-child(2) {
  transform: translateY(1.5rem);
}

.service-card:nth-child(2):hover {
  transform: translateY(calc(1.5rem - 4px));
}


/* =========================================================
   3. METHOD
   ========================================================= */

.method {
  overflow: hidden;
  background:
    linear-gradient(
      135deg,
      rgba(102, 217, 255, 0.025),
      transparent 45%
    ),
    var(--color-background-deep);
}

.method::after {
  position: absolute;
  top: 0;
  right: 8%;
  width: 1px;
  height: 100%;
  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(102, 217, 255, 0.18),
      transparent
    );
  content: "";
  pointer-events: none;
}

.method__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(4rem, 10vw, 8rem);
}

.method .section-heading {
  position: sticky;
  top: 8.5rem;
  margin-bottom: 0;
}

.method-list {
  display: grid;
  list-style: none;
}

.method-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-6);
  padding-block: var(--space-10);
  border-top: 1px solid var(--color-border);
}

.method-list li:last-child {
  border-bottom: 1px solid var(--color-border);
}

.method-list > li > span {
  color: var(--color-crystal);
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: 750;
  letter-spacing: 0.12em;
}

.method-list div {
  display: grid;
  gap: var(--space-4);
}

.method-list h3 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.method-list p {
  max-width: 48ch;
  color: var(--color-text-muted);
}


/* =========================================================
   4. WORKSHOP PREVIEW
   ========================================================= */

.workshop-preview {
  background:
    radial-gradient(
      circle at 15% 85%,
      rgba(214, 180, 90, 0.045),
      transparent 25rem
    );
}

.workshop-preview .section-heading h2 {
  max-width: 19ch;
}

.workshop-card {
  min-height: 26rem;
}

.workshop-card:nth-child(2) {
  background:
    linear-gradient(
      145deg,
      rgba(102, 217, 255, 0.055),
      rgba(255, 255, 255, 0.015)
    );
}

.workshop-card:nth-child(3) {
  background:
    linear-gradient(
      145deg,
      rgba(214, 180, 90, 0.045),
      rgba(255, 255, 255, 0.015)
    );
}


/* =========================================================
   5. INSTITUTE CONNECTION
   ========================================================= */

.institute {
  overflow: hidden;
  background: var(--color-background-deep);
}

.institute::before {
  position: absolute;
  top: 50%;
  left: -9rem;
  width: 25rem;
  height: 25rem;
  border: 1px solid rgba(214, 180, 90, 0.08);
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.institute::after {
  position: absolute;
  top: 50%;
  left: -3rem;
  width: 13rem;
  height: 13rem;
  border: 1px solid rgba(102, 217, 255, 0.09);
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.institute__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
  padding:
    clamp(2.25rem, 5vw, 4rem)
    clamp(1.5rem, 5vw, 4rem);

  border: 1px solid rgba(214, 180, 90, 0.14);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      120deg,
      rgba(214, 180, 90, 0.055),
      rgba(255, 255, 255, 0.018) 50%,
      rgba(102, 217, 255, 0.035)
    );
}

.institute__inner > div {
  display: grid;
  gap: var(--space-5);
}

.institute__inner h2 {
  max-width: 20ch;
}

.institute__inner p:not(.eyebrow) {
  max-width: 60ch;
  font-size: var(--font-size-md);
}


/* =========================================================
   6. CLIENT PAYMENT PATH
   ========================================================= */

.client-path {
  background:
    linear-gradient(
      180deg,
      rgba(102, 217, 255, 0.02),
      transparent
    );
}

.client-path__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(3rem, 8vw, 6rem);
}

.client-path__inner > div {
  display: grid;
  gap: var(--space-5);
}

.client-path__inner h2 {
  max-width: 19ch;
}

.client-path__inner p:not(.eyebrow) {
  max-width: 62ch;
  font-size: var(--font-size-md);
}


/* =========================================================
   7. CLOSING CONTACT SCENE
   ========================================================= */

.contact-callout {
  min-height: 72vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 115%,
      rgba(102, 217, 255, 0.09),
      transparent 32rem
    ),
    linear-gradient(
      180deg,
      var(--color-background),
      var(--color-background-deep)
    );
}

.contact-callout::before {
  position: absolute;
  right: 50%;
  bottom: -12rem;
  width: 38rem;
  height: 38rem;
  border: 1px solid rgba(102, 217, 255, 0.07);
  border-radius: 50%;
  content: "";
  transform: translateX(50%);
}

.contact-callout::after {
  position: absolute;
  right: 50%;
  bottom: -4rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(214, 180, 90, 0.07);
  border-radius: 50%;
  content: "";
  transform: translateX(50%);
}

.contact-callout__inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: var(--space-6);
  max-width: 850px;
  text-align: center;
}

.contact-callout h2 {
  max-width: 18ch;
}

.contact-callout p:not(.eyebrow) {
  max-width: 58ch;
  font-size: var(--font-size-md);
}

.contact-callout .button {
  margin-top: var(--space-3);
}


/* =========================================================
   8. SUBTLE ENTRANCE MOTION
   ========================================================= */

@media (prefers-reduced-motion: no-preference) {
  .hero__inner > *,
  .service-card,
  .method-list li,
  .workshop-card,
  .institute__inner,
  .client-path__inner,
  .contact-callout__inner > * {
    animation: reveal-up 700ms ease both;
  }

  .hero__inner > :nth-child(1) {
    animation-delay: 70ms;
  }

  .hero__inner > :nth-child(2) {
    animation-delay: 130ms;
  }

  .hero__inner > :nth-child(3) {
    animation-delay: 190ms;
  }

  .hero__inner > :nth-child(4) {
    animation-delay: 250ms;
  }

  .hero__inner > :nth-child(5) {
    animation-delay: 310ms;
  }

  .service-card:nth-child(2),
  .workshop-card:nth-child(2) {
    animation-delay: 100ms;
  }

  .service-card:nth-child(3),
  .workshop-card:nth-child(3) {
    animation-delay: 180ms;
  }

  @keyframes reveal-up {
    from {
      opacity: 0;
      transform: translateY(24px);
    }

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


/* =========================================================
   9. RESPONSIVE COMPOSITION
   ========================================================= */

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-block: 7rem;
  }

  .service-card:nth-child(2),
  .service-card:nth-child(2):hover {
    transform: none;
  }

  .method__layout {
    grid-template-columns: 1fr;
    gap: var(--space-16);
  }

  .method .section-heading {
    position: static;
  }

  .institute__inner,
  .client-path__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .institute__inner .button,
  .client-path__inner .button {
    width: fit-content;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-block:
      clamp(5.5rem, 20vw, 7rem)
      clamp(5rem, 18vw, 6.5rem);
  }

  .hero::before {
    top: -11rem;
    right: -16rem;
    width: 34rem;
    height: 34rem;
  }

  .hero::after {
    background:
      linear-gradient(
        180deg,
        rgba(15, 23, 34, 0.96),
        rgba(15, 23, 34, 0.82)
      ),
      repeating-linear-gradient(
        90deg,
        transparent 0,
        transparent calc(25% - 1px),
        rgba(255, 255, 255, 0.016) 25%
      );
  }

  .hero__actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .hero__client-link {
    align-items: flex-start;
    line-height: 1.5;
  }

  .service-card,
  .workshop-card {
    min-height: auto;
  }

  .method-list li {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .institute::before,
  .institute::after {
    display: none;
  }

  .institute__inner {
    padding: 1.5rem;
  }

  .institute__inner .button,
  .client-path__inner .button {
    width: 100%;
  }

  .contact-callout {
    min-height: auto;
  }

  .contact-callout::before {
    width: 28rem;
    height: 28rem;
  }

  .contact-callout::after {
    width: 16rem;
    height: 16rem;
  }
}