/**
 * XEYROX Homepage — Section: GROW WITHOUT LOSING CONTROL
 * "Scalable today. Stronger tomorrow."
 * CSS — Desktop + Tablet + Mobile
 */

/* ==========================================================================
   1. SECTION WRAPPER & ATMOSPHERIC BACKGROUND
   ========================================================================== */
.gc-section {
  position: relative;
  background-color: var(--x-white);
  min-height: 800px;
  overflow: hidden;
}

/* Background image layer */
.gc-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.gc-bg-image {
  position: absolute;
  inset: 0;
  background-image: url("/storage/images/sections/grow-without-control/growth-control-background.webp");
  background-repeat: no-repeat;
  background-position: center right;
  background-size: cover;
  opacity: 0.55;
}

/* Very soft blue drift right-side overlay */
.gc-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0)   0%,
    rgba(255, 255, 255, 0)   35%,
    rgba(232, 241, 255, 0.25) 65%,
    rgba(220, 234, 255, 0.38) 100%
  );
}

/* ==========================================================================
   2. MAIN LAYOUT CONTAINER
   ========================================================================== */
.gc-container {
  position: relative;
  z-index: 2;
  width: min(1380px, calc(100% - 0px));
  margin-inline: auto;
  padding-inline: clamp(24px, 4vw, 60px);
  display: flex;
  align-items: center;
  min-height: 800px;
  padding-top: 72px;
  padding-bottom: 0;
  gap: 0;
}

/* ==========================================================================
   3. LEFT TEXT COLUMN (~42%)
   ========================================================================== */
.gc-text-col {
  flex: 0 0 42%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-bottom: 80px;
  padding-top: 20px;
  z-index: 3;
}

/* Eyebrow */
.gc-eyebrow {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6177A2;
  display: inline-block;
  margin-bottom: 20px;
}

/* Main Heading */
.gc-heading {
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: clamp(48px, 5.2vw, 72px);
  line-height: 0.97;
  letter-spacing: -0.022em;
  margin-bottom: 24px;
}

.gc-heading-line1 {
  display: block;
  color: var(--x-navy-900);
}

.gc-heading-line2 {
  display: block;
  color: var(--x-blue-700);
}

/* Supporting Paragraph */
.gc-body {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.55;
  color: #61718F;
  max-width: 500px;
  margin-bottom: 40px;
}

/* ==========================================================================
   4. VALUE POINTS GRID
   ========================================================================== */
.gc-values {
  display: flex;
  flex-direction: row;
  gap: 36px;
  align-items: flex-start;
}

.gc-value-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 130px;
}

/* Icon Circle */
.gc-value-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid #B9EDE4;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--x-blue-700);
  transition: border-color 240ms ease, background 240ms ease;
}

.gc-value-item:hover .gc-value-icon-wrap {
  background: rgba(21, 94, 239, 0.04);
  border-color: #27C8F5;
}

.gc-value-icon {
  width: 26px;
  height: 26px;
  display: block;
  stroke: var(--x-blue-700);
}

/* Value Title */
.gc-value-title {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  color: var(--x-navy-900);
  margin: 0;
}

/* Value Description */
.gc-value-desc {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  color: #61718F;
  margin: 0;
}

/* ==========================================================================
   5. RIGHT VISUAL COLUMN (~58%)
   ========================================================================== */
.gc-visual-col {
  flex: 1 1 58%;
  position: relative;
  min-height: 760px;
  height: 800px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

/* ── Hero Image ── */
.gc-image-wrap {
  position: absolute;
  bottom: 0;
  right: -40px;
  width: 100%;
  max-width: 820px;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.gc-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Soft left-fade to merge image into section */
.gc-image-fade-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 1)   0%,
    rgba(255, 255, 255, 0.6) 40%,
    rgba(255, 255, 255, 0)   100%
  );
  pointer-events: none;
}

.gc-image-fade-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 1)   0%,
    rgba(255, 255, 255, 0)   100%
  );
  pointer-events: none;
}

/* ==========================================================================
   6. SVG GROWTH PATH LINE
   ========================================================================== */
.gc-growth-path-svg {
  position: absolute;
  left: 2%;
  bottom: 90px;
  width: 92%;
  height: 340px;
  pointer-events: none;
  z-index: 4;
}

/* Path stroke-dasharray animation */
.gc-path-line {
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  transition: stroke-dashoffset 0.01s;
}

.gc-section.gc-path-revealed .gc-path-line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

/* ==========================================================================
   7. FLOATING GROWTH MILESTONE CARDS
   ========================================================================== */
.gc-cards-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* Base card styles */
.gc-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid rgba(130, 160, 200, 0.16);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(30, 70, 120, 0.07);
  padding: 14px 18px;
  pointer-events: auto;
  transition: box-shadow 240ms ease, border-color 240ms ease;
  will-change: transform;
}

.gc-card:hover {
  border-color: rgba(21, 94, 239, 0.3);
  box-shadow: 0 18px 40px rgba(21, 94, 239, 0.12);
}

/* Card Icon Box */
.gc-card-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(21, 94, 239, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--x-blue-700);
}

.gc-card-icon-box svg {
  width: 18px;
  height: 18px;
  stroke: var(--x-blue-700);
}

/* Card 03 & 04 use mint/teal icon accent */
.gc-card-opportunities .gc-card-icon-box,
.gc-card-stronger .gc-card-icon-box,
.gc-card-progress .gc-card-icon-box {
  background: rgba(40, 217, 176, 0.08);
  color: var(--x-mint-500);
}

.gc-card-opportunities .gc-card-icon-box svg,
.gc-card-stronger .gc-card-icon-box svg,
.gc-card-progress .gc-card-icon-box svg {
  stroke: var(--x-mint-500);
}

/* Card Text */
.gc-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gc-card-title {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--x-navy-900);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.gc-card-desc {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 12px;
  color: #61718F;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
}

/* ── Card Positions (desktop, ascending lower-left → upper-right) ── */
.gc-card-today {
  bottom: 220px;
  left: 4%;
  z-index: 6;
}

.gc-card-expanding {
  bottom: 320px;
  left: 24%;
  z-index: 6;
}

.gc-card-opportunities {
  top: 140px;
  left: 36%;
  z-index: 6;
}

.gc-card-stronger {
  top: 52px;
  right: 14%;
  z-index: 6;
}

/* Card 05: Progress — hide on desktop (annotation covers this) */
.gc-card-progress {
  display: none;
}

/* ==========================================================================
   8. HANDWRITTEN ANNOTATION
   ========================================================================== */
.gc-annotation {
  position: absolute;
  bottom: 160px;
  right: 3%;
  z-index: 7;
  pointer-events: none;
  transform: rotate(-5deg);
}

.gc-annotation-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gc-note-line {
  font-family: var(--font-handwritten);
  font-size: 21px;
  color: #536581;
  line-height: 1.5;
  display: block;
}

.gc-note-underlined {
  position: relative;
  display: inline-block;
}

.gc-note-underline-svg {
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 14px;
  display: block;
}

/* ==========================================================================
   9. BOTTOM BRAND LINE
   ========================================================================== */
.gc-brand-line {
  position: relative;
  z-index: 3;
  border-top: 1px solid rgba(185, 210, 240, 0.4);
  padding: 14px clamp(24px, 4vw, 60px);
}

.gc-brand-line-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1380px;
  margin-inline: auto;
}

.gc-brand-text {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #A2B8D4;
  white-space: nowrap;
}

.gc-brand-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(180, 210, 240, 0.5) 0%,
    rgba(180, 210, 240, 0.25) 50%,
    rgba(180, 210, 240, 0.5) 100%
  );
}

/* ==========================================================================
   10. REVEAL ANIMATIONS (scroll-triggered via JS)
   ========================================================================== */
.gc-text-col,
.gc-eyebrow,
.gc-heading,
.gc-body,
.gc-values,
.gc-image-wrap,
.gc-card,
.gc-annotation {
  transition: opacity 500ms ease, transform 500ms ease;
}

/* Initial hidden state for JS-driven reveal */
.gc-animate-ready .gc-eyebrow,
.gc-animate-ready .gc-heading,
.gc-animate-ready .gc-body,
.gc-animate-ready .gc-values {
  opacity: 0;
  transform: translateY(20px);
}

.gc-animate-ready .gc-image-wrap {
  opacity: 0;
  transform: translateX(24px);
}

.gc-animate-ready .gc-card {
  opacity: 0;
  transform: translateY(14px);
}

.gc-animate-ready .gc-annotation {
  opacity: 0;
}

/* Revealed states */
.gc-animate-ready .gc-eyebrow.gc-revealed       { opacity: 1; transform: none; }
.gc-animate-ready .gc-heading.gc-revealed        { opacity: 1; transform: none; }
.gc-animate-ready .gc-body.gc-revealed           { opacity: 1; transform: none; }
.gc-animate-ready .gc-values.gc-revealed         { opacity: 1; transform: none; }
.gc-animate-ready .gc-image-wrap.gc-revealed     { opacity: 1; transform: none; }
.gc-animate-ready .gc-card.gc-revealed           { opacity: 1; transform: none; }
.gc-animate-ready .gc-annotation.gc-revealed     { opacity: 1; }

/* Float animation for cards */
@keyframes gc-float-1 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-3px); }
}
@keyframes gc-float-2 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-4px); }
}
@keyframes gc-float-3 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-2.5px); }
}

.gc-card.gc-floating[data-float="1"] { animation: gc-float-1 4.2s ease-in-out infinite; }
.gc-card.gc-floating[data-float="2"] { animation: gc-float-2 5.0s ease-in-out infinite; }
.gc-card.gc-floating[data-float="3"] { animation: gc-float-3 3.8s ease-in-out infinite; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .gc-card.gc-floating { animation: none !important; }
  .gc-path-line        { stroke-dashoffset: 0 !important; transition: none !important; }
  .gc-animate-ready .gc-eyebrow,
  .gc-animate-ready .gc-heading,
  .gc-animate-ready .gc-body,
  .gc-animate-ready .gc-values,
  .gc-animate-ready .gc-image-wrap,
  .gc-animate-ready .gc-card,
  .gc-animate-ready .gc-annotation { opacity: 1; transform: none; }
}

/* ==========================================================================
   11. TABLET (769px – 1024px)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .gc-section {
    min-height: 700px;
  }

  .gc-container {
    min-height: 700px;
    padding-top: 60px;
    gap: 16px;
  }

  .gc-text-col {
    flex: 0 0 46%;
    max-width: 420px;
    padding-bottom: 60px;
  }

  .gc-heading {
    font-size: clamp(40px, 4.5vw, 58px);
  }

  .gc-body {
    font-size: 17px;
  }

  .gc-values {
    gap: 24px;
  }

  .gc-value-item {
    max-width: 110px;
  }

  .gc-visual-col {
    flex: 1;
    min-height: 660px;
    height: 700px;
  }

  .gc-image-wrap {
    right: -20px;
    max-width: 680px;
  }

  /* Reposition cards for tablet */
  .gc-card-today        { bottom: 180px; left: 2%; }
  .gc-card-expanding    { bottom: 260px; left: 18%; }
  .gc-card-opportunities { top: 120px; left: 28%; }
  .gc-card-stronger     { top: 44px; right: 8%; }
  .gc-annotation        { bottom: 120px; right: 2%; }
}

/* ==========================================================================
   12. MOBILE (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* ── Section ── */
  .gc-section {
    min-height: auto;
    overflow: visible;
  }

  /* ── Container: Stack vertically ── */
  .gc-container {
    flex-direction: column;
    align-items: center;
    min-height: auto;
    padding-top: 48px;
    padding-bottom: 0;
    padding-inline: 24px;
    gap: 0;
    width: 100%;
  }

  /* ── Left (text) column: full-width, centered ── */
  .gc-text-col {
    flex: none;
    width: 100%;
    max-width: 100%;
    align-items: center;
    text-align: center;
    padding-bottom: 36px;
    padding-top: 0;
  }

  .gc-eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-align: center;
  }

  .gc-heading {
    font-size: clamp(38px, 10vw, 52px);
    text-align: center;
    margin-bottom: 18px;
  }

  .gc-body {
    font-size: 17px;
    text-align: center;
    max-width: 100%;
    margin-bottom: 32px;
  }

  .gc-body-br {
    display: none;
  }

  /* ── Value Points: 3-column compact ── */
  .gc-values {
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    width: 100%;
  }

  .gc-value-item {
    align-items: center;
    text-align: center;
    max-width: 90px;
    flex: 1;
  }

  .gc-value-icon-wrap {
    width: 56px;
    height: 56px;
  }

  .gc-value-icon {
    width: 22px;
    height: 22px;
  }

  .gc-value-title {
    font-size: 13px;
    text-align: center;
  }

  .gc-value-desc {
    font-size: 12px;
    text-align: center;
  }

  /* ── Right (visual) column: full-width, below text ── */
  .gc-visual-col {
    flex: none;
    width: 100%;
    position: relative;
    min-height: auto;
    height: auto;
    margin-top: 32px;
  }

  /* ── Hero Image: full-width responsive ── */
  .gc-image-wrap {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 280px;
  }

  .gc-image {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: cover;
    object-position: center center;
    border-radius: 16px;
  }

  .gc-image-fade-left {
    display: none;
  }

  .gc-image-fade-bottom {
    height: 60px;
    border-radius: 0 0 16px 16px;
  }

  /* ── Growth Path SVG: hide on mobile (too small) ── */
  .gc-growth-path-svg {
    display: none;
  }

  /* ── Cards: reposition around image, stacked horizontal ── */
  .gc-cards-container {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 20px 0 8px;
    pointer-events: auto;
  }

  .gc-card {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex: 0 0 auto;
    max-width: 170px;
  }

  .gc-card-progress {
    display: flex;
  }

  /* ── Handwritten Note: below cards, centered ── */
  .gc-annotation {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    text-align: center;
    margin-top: 24px;
    margin-bottom: 8px;
    transform: rotate(-3deg);
  }

  .gc-annotation-text {
    align-items: center;
  }

  .gc-note-line {
    font-size: 18px;
  }

  /* ── Bottom Brand Line: stacked ── */
  .gc-brand-line-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .gc-brand-rule {
    width: 60px;
    height: 1px;
    flex: none;
  }

  .gc-brand-text {
    font-size: 11px;
  }
}
