/* ==========================================================================
   CloudReliever Pricing Hub Stylesheet (pricing.css)
   Requires: styles.css (for base tokens, fonts, buttons, forms, and footer)
   ========================================================================== */

:root {
  --flow-stage-gap: 80vh;        /* Generous scroll separation ensuring elements appear one-by-one */
  --flow-stage-min-height: 100vh; /* Viewport focus height per scroll step */
}

body .container,
.container {
  max-width: 1240px;
}

/* ==========================================================================
   Scroll Flow Stage Architecture (Scroll-Reveal Staging)
   ========================================================================== */
.flow-stage {
  min-height: var(--flow-stage-min-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--flow-stage-gap);
  position: relative;
  z-index: 1;
  padding: 60px 0;
  box-sizing: border-box;
  width: 100%;
}

.flow-stage > .container {
  width: 100%;
}

.flow-stage--hero {
  min-height: calc(100vh - 100px);
  margin-bottom: var(--flow-stage-gap);
  padding-top: 20px;
}

.flow-stage--problem,
.flow-stage--solution {
  min-height: var(--flow-stage-min-height);
}

.staircase-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.staircase-line {
  font-size: clamp(20px, 2.3vw, 30px);
  font-weight: 500;
  line-height: 1.35;
  min-height: 1.35em;
  letter-spacing: -0.02em;
  color: #c4c4c8;
  white-space: nowrap;
  display: block;
}

.staircase-line .text-highlight {
  color: #ffffff;
  font-weight: 700;
}

/* Stepped indentation matching user reference */
.staircase-line--step-0 { margin-left: 0%; }
.staircase-line--step-1 { margin-left: 10%; }
.staircase-line--step-2 { margin-left: 20%; }
.staircase-line--step-3 { margin-left: 30%; }

.flow-stage--calculator {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
}

.flow-stage--matrix {
  min-height: var(--flow-stage-min-height);
}

.flow-stage--problems {
  min-height: var(--flow-stage-min-height);
  padding: 60px 0;
}

.problems-desktop-view {
  display: block;
}

.problems-mobile-view {
  display: none;
}

.flow-stage--waitlist {
  min-height: var(--flow-stage-min-height);
  margin-bottom: 80px;
  padding: 60px 0 80px;
}

/* Subpage Hero & Navigation */
.subpage-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

.subpage-brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.subpage-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-grey);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.subpage-back-btn:hover {
  color: var(--text-white);
  border-color: var(--border-active);
  background: var(--bg-surface-card);
}

.subpage-hero {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 56px;
}

.subpage-title {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text-white);
}

.desktop-hero-line {
  display: block;
}

.mobile-hero-line {
  display: none;
}

/* React Bits StrokeText Styles */
.stroke-text {
  display: block;
  width: 100%;
  line-height: 0;
}

.stroke-text--hover {
  cursor: pointer;
}

.stroke-text__svg {
  display: block;
  width: 100%;
  height: var(--stroke-text-height, 160px);
}

.stroke-text__stroke,
.stroke-text__fill {
  user-select: none;
}

.subpage-stroke-heading {
  width: 100%;
  max-width: 960px;
  margin: 0 auto 24px;
}

.subpage-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: var(--text-grey);
  max-width: 680px;
  margin: 0 auto;
}

/* Interactive Pricing Calculator */
.pricing-calculator-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  box-shadow: none;
  will-change: clip-path, transform, opacity;
}

.calc-header {
  text-align: center;
  margin-bottom: 32px;
}

.calc-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 0;
}

/* Side-by-Side Main Calculator Layout */
.calc-main-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
}

/* Dual Rotary Knobs Layout (Left) */
.dual-knobs-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin: 0;
  justify-items: center;
}

.knob-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: none;
}

.knob-panel:hover {
  border: none;
  box-shadow: none;
}

/* Calculator Stats Grid (Right) */
.calc-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 0;
  align-items: stretch;
}

.calc-stat-box {
  background: #0A0A0C;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 24px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 160px;
  transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1), border-color 200ms ease, box-shadow 200ms ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .calc-stat-box:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.6);
  }
}

.calc-stat-box:active {
  transform: scale(0.98);
}

.calc-stat-tag {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #A9A9A9;
  margin-bottom: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.calc-stat-number {
  font-size: clamp(16.5px, 2.4vw, 22.5px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.calc-stat-sub {
  display: block;
  font-size: 14.5px;
  color: #A9A9A9;
  line-height: 1.4;
  margin-top: 4px;
}

.calc-stat-box.highlight .calc-stat-sub strong {
  color: #FFFFFF;
  font-weight: 700;
}

/* Feature Problem Cards (Transparent background) */
.features-grid .feature-card {
  background: transparent;
  border: none;
  box-shadow: none;
}

.features-grid .feature-card:hover {
  background: transparent;
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

/* Comparison Matrix Table */
.pricing-matrix-wrap {
  max-width: 960px;
  margin: 0 auto 70px;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-active);
  background: var(--bg-surface);
  -webkit-overflow-scrolling: touch;
}

.pricing-matrix {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14.5px;
}

.pricing-matrix th,
.pricing-matrix td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.pricing-matrix th {
  background: #0f0e15;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.pricing-matrix tr:last-child td {
  border-bottom: none;
}

.pricing-matrix tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.pricing-matrix .col-feature {
  width: 32%;
  font-weight: 600;
  color: #f0f0f4;
}

.pricing-matrix .col-cr {
  background: #121214;
  font-weight: 700;
  color: #ffffff;
}

.pricing-matrix th.col-cr {
  background: #121214;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.pricing-matrix td.col-cr {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.pricing-matrix .matrix-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 600;
}

.pricing-matrix .matrix-cross {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}

/* Cursor Grid Animation */
.cursor-grid {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cursor-grid__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Mobile & Tablet Responsiveness for Pricing Page */
@media (max-width: 1040px) {
  .calc-main-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .dual-knobs-wrapper {
    max-width: 440px;
    margin: 0 auto;
  }
}

@media (max-width: 820px) {
  :root {
    --flow-stage-gap: 65vh;
    --flow-stage-min-height: 80dvh;
  }
  .flow-stage {
    min-height: var(--flow-stage-min-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
    margin-bottom: var(--flow-stage-gap);
    box-sizing: border-box;
    width: 100%;
  }
  .flow-stage--hero {
    min-height: calc(100dvh - 85px);
    min-height: calc(100vh - 85px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-bottom: var(--flow-stage-gap);
  }
  .subpage-nav-wrap {
    justify-content: center !important;
    padding: 20px 0 16px;
    margin-bottom: 0;
  }
  .subpage-back-btn {
    display: none !important;
  }
  .subpage-brand-logo {
    height: 26px;
    width: auto;
    margin: 0 auto;
    display: block;
  }
  .desktop-hero-line {
    display: none !important;
  }
  .mobile-hero-line {
    display: block !important;
    text-align: center;
    width: 100%;
  }
  .mobile-hero-line--large {
    font-size: clamp(44px, 12vw, 68px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
  }
  .mobile-hero-line--medium {
    font-size: clamp(32px, 8.8vw, 50px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  .subpage-title {
    margin: 0 auto;
    text-align: center;
    width: 100%;
    max-width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
  }
  .subpage-hero {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 0 4px;
    box-sizing: border-box;
    min-height: clamp(240px, 64vw, 360px);
  }
  #stroke-text-root {
    width: 100% !important;
    display: block !important;
  }
  .subpage-stroke-heading {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
  }
  .subpage-stroke-heading--mobile {
    width: 100%;
    max-width: 100%;
  }
  .stroke-text {
    line-height: normal;
    display: block;
    width: 100%;
  }
  .stroke-text__svg {
    height: auto !important;
    width: 100%;
    display: block;
    max-height: none;
  }
  .flow-stage--problem,
  .flow-stage--solution {
    min-height: var(--flow-stage-min-height);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .flow-stage--calculator {
    min-height: 100dvh;
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 115vh;
  }
  .staircase-text {
    gap: 16px;
    text-align: center;
    padding: 0 12px;
  }
  .staircase-line {
    font-size: clamp(16px, 4.2vw, 20px);
    font-weight: 500;
    line-height: 1.5;
    white-space: normal !important;
    display: block !important;
    margin-left: 0 !important;
    text-align: center;
    min-height: auto;
    letter-spacing: -0.01em;
    word-break: normal;
    overflow-wrap: break-word;
  }
  .staircase-line .text-highlight {
    display: inline;
    color: #ffffff;
    font-weight: 700;
  }
  .flow-stage--matrix {
    min-height: auto;
    padding: 40px 0;
    margin-bottom: 115vh;
  }
  .problems-desktop-view {
    display: none !important;
  }
  .problems-mobile-view {
    display: block !important;
  }
  .flow-stage--problems {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 115vh;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
  }
  .problems-pinned-wrapper {
    max-width: 100%;
    padding: 50vh 4px 0 4px;
    box-sizing: border-box;
  }
  .problems-split-title-container {
    margin-bottom: 20px;
    transform: translateY(-50%);
  }
  .problems-main-title {
    font-size: clamp(22px, 6.5vw, 28px);
    line-height: 1.2;
    padding: 0 4px;
    font-weight: 800;
  }
  .problems-points-list {
    gap: 20px;
    max-width: 100%;
  }
  .problem-point-item {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0;
  }
  .problem-point-title {
    font-size: 18px;
    margin-bottom: 6px;
    line-height: 1.25;
    font-weight: 700;
    color: #FFFFFF;
  }
  .problem-point-desc {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-grey, #A9A9A9);
  }
  .flow-stage--waitlist {
    min-height: auto;
    padding: 40px 0 60px;
    margin-bottom: 40px;
  }
  .calc-header {
    margin-top: -40px;
    margin-bottom: 52px;
  }
  .calc-title {
    font-size: clamp(26px, 7.5vw, 34px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.02em;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
  }
  .calc-main-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    width: 100%;
  }
  .dual-knobs-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
    max-width: 360px;
    margin: 0 auto !important;
    width: 100%;
    justify-items: center;
  }
  .pricing-calculator-card {
    padding: 0;
    margin-bottom: 0;
    width: 100%;
    max-width: 480px;
  }
  .calc-stats-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100%;
    max-width: 100% !important;
    margin: 18px auto 0 !important;
  }
  .calc-stat-box {
    min-height: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .calc-stat-tag {
    font-size: clamp(16px, 4.4vw, 18.5px) !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    color: #A9A9A9 !important;
    margin-bottom: 4px !important;
    white-space: normal;
  }
  .calc-stat-number {
    font-size: clamp(38px, 10.5vw, 45px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    color: #FFFFFF !important;
    margin-bottom: 4px !important;
    line-height: 1.08 !important;
  }
  .calc-stat-sub {
    font-size: clamp(18.5px, 5vw, 22px) !important;
    color: #A9A9A9 !important;
    margin-top: 0 !important;
    white-space: normal;
    line-height: 1.25 !important;
  }
  .calc-stat-box.highlight .calc-stat-sub strong {
    color: #FFFFFF;
    font-weight: 700;
  }
}

@media (max-width: 540px) {
  :root {
    --flow-stage-gap: 60vh;
  }
  .container {
    padding: 0 16px;
  }
  .subpage-nav-wrap {
    padding: 18px 0 14px;
  }
  .calc-header {
    margin-top: -40px;
    margin-bottom: 52px;
  }
  .calc-title {
    font-size: clamp(24px, 7vw, 30px);
    max-width: 360px;
  }
  .dual-knobs-wrapper {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    max-width: 345px;
  }
  .calc-stats-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
    max-width: 100% !important;
    margin-top: 14px !important;
  }
  .calc-stat-box {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .calc-stat-tag {
    font-size: clamp(15px, 4.2vw, 17.5px) !important;
    margin-bottom: 4px !important;
  }
  .calc-stat-number {
    font-size: clamp(34px, 9.5vw, 42px) !important;
    margin-bottom: 4px !important;
  }
  .calc-stat-sub {
    font-size: clamp(17.5px, 4.8vw, 20.5px) !important;
  }
}
