/* WE Control — solution/detail page styles (owner consolidation round).
   Extends the shared styles.css. */

/* ---------- function hero system: muted flowing ribbons on a light field ----------
   LAYER 1  off-white / mist-grey base with two soft ribbon bands
   LAYER 2  inline SVG ribbons + small restrained glyphs per function
   LAYER 3  dark-ink copy + crisp bright proof panel (real screenshot)
   Motion: very slow ribbon drift + subtle light travel; transform/opacity only.
   Reduced motion respected throughout. */

.hero-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.fx-field { position: absolute; will-change: transform, opacity; }
.fx-a {
  left: -12%; right: -12%; top: -38%; height: 120%;
  background: linear-gradient(178deg, rgba(125, 190, 220, 0.34) 0%, rgba(125, 190, 220, 0.10) 45%, rgba(125, 190, 220, 0) 75%);
  transform: skewY(-4deg);
}
.fx-b {
  left: -12%; right: -12%; bottom: -46%; height: 110%;
  background: linear-gradient(2deg, rgba(90, 140, 170, 0.20) 0%, rgba(90, 140, 170, 0) 60%);
  transform: skewY(3deg);
}
.fx-c {
  width: 44vw; height: 44vw; max-width: 640px; max-height: 640px;
  top: -16%; right: -6%; border-radius: 50%;
  background: radial-gradient(circle, rgba(150, 205, 230, 0.35) 0%, rgba(150, 205, 230, 0) 65%);
}

/* per-function inline SVG ribbons */
.fx-art { position: absolute; inset: 0; width: 100%; height: 100%; }

/* readability is handled by dark-ink copy on light; no scrim needed */
.fx-scrim { display: none; }
.page-hero {
  position: relative;
  padding: clamp(48px, 6vw, 80px) clamp(20px, 3vw, 40px) clamp(48px, 6vw, 76px);
  border-bottom: 1px solid #DCE3E9;
  overflow: hidden;
  background: linear-gradient(180deg, #F7FAFC 0%, #EEF3F6 55%, #E6EDF1 100%);
}
.page-hero .inner {
  max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 64px); align-items: center;
  position: relative; z-index: 2;
}
.fn-name {
  margin: 0 0 14px; color: var(--brand-deep);
  font-size: clamp(14px, 1.2vw, 16px); font-weight: 750;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.page-hero h1 { color: #16202A; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.1; }
.page-hero .outcome { margin: 18px 0 0; font-size: clamp(16px, 1.5vw, 19px); color: #42505B; max-width: 48ch; }
.page-hero .hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.page-hero .btn-book { border-color: rgba(22, 32, 42, 0.35); color: #16202A; }
.page-hero .btn-book:hover { border-color: var(--brand); color: var(--brand-deep); }

/* entry choreography (once, on load) */
@media (prefers-reduced-motion: no-preference) {
  .page-hero .hero-copy > * { animation: heroCopyIn 700ms cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  .page-hero .hero-copy .fn-name { animation-delay: 60ms; }
  .page-hero .hero-copy h1 { animation-delay: 160ms; }
  .page-hero .hero-copy .outcome { animation-delay: 280ms; }
  .page-hero .hero-copy .hero-actions { animation-delay: 400ms; }
  .page-hero .hero-proof { animation: proofIn 900ms cubic-bezier(0.2, 0.6, 0.2, 1) 260ms both; }
  .page-hero .hero-proof.hero-proof-wide { animation-name: proofInWide; }
  /* gentle continuous float on the proof panel */
  .page-hero .proof-panel { animation: proofFloat 10s ease-in-out infinite alternate; will-change: transform; }
}
@keyframes heroCopyIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes proofIn {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes proofInWide {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes proofFloat {
  from { transform: translateY(0); }
  to   { transform: translateY(-7px); }
}

/* ---------- product proof panel: light frame, screenshot stays bright ---------- */
.hero-proof { position: relative; z-index: 2; margin: 0; max-width: 440px; justify-self: end; width: 100%; }
.proof-panel {
  position: relative;
  border-radius: 12px;
  padding: 8px;
  background: #10161D;
  border: 1px solid #D5DDE3;
  box-shadow:
    0 24px 56px rgba(22, 32, 42, 0.18),
    0 2px 8px rgba(22, 32, 42, 0.10);
  overflow: hidden;
}
.proof-panel::before {
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, rgba(0, 167, 225, 0) 0%, rgba(0, 167, 225, 0.55) 50%, rgba(0, 167, 225, 0) 100%);
}
.proof-panel img { width: 100%; display: block; border-radius: 6px; }
.hero-proof .media-cap { padding: 10px 6px 2px; font-size: 12px; color: #5A6772; }
.hero-proof.hero-proof-wide { max-width: 1240px; justify-self: center; margin-top: clamp(28px, 4vw, 48px); }

/* ribbon field motion — very slow, calm drift */
@media (prefers-reduced-motion: no-preference) {
  .fn-forecast .fx-a { animation: ribbonDrift 46s ease-in-out infinite alternate; }
  .fn-forecast .fx-c { animation: ribbonGlow 38s ease-in-out infinite alternate; }
  .fn-incident .fx-a { animation: ribbonDrift 54s ease-in-out infinite alternate-reverse; }
  .fn-incident .fx-c { animation: ribbonGlow 44s ease-in-out infinite alternate; }
  .fn-maintenance .fx-a { animation: ribbonDrift 50s ease-in-out infinite alternate; }
  .fn-maintenance .fx-b { animation: ribbonDrift 60s ease-in-out infinite alternate-reverse; }
  .fn-energy .fx-a { animation: ribbonDrift 44s ease-in-out infinite alternate-reverse; }
  .fn-energy .fx-b { animation: ribbonDrift 58s ease-in-out infinite alternate; }
}
@keyframes ribbonDrift {
  from { transform: translate3d(0, 0, 0) skewY(-4deg); }
  to   { transform: translate3d(2.5%, 12px, 0) skewY(-4deg); }
}
@keyframes ribbonGlow {
  from { transform: translate3d(0, 0, 0) scale(0.98); opacity: 0.7; }
  to   { transform: translate3d(-3%, 14px, 0) scale(1.05); opacity: 1; }
}

/* SVG ribbon motion: slow light travel along each ribbon */
@media (prefers-reduced-motion: no-preference) {
  .fx-art .ribbon-flow { animation: ribbonFlow 30s linear infinite; }
  .fx-art .ribbon-flow-slow { animation: ribbonFlow 52s linear infinite reverse; }
  .fx-art .ink-dot { animation: inkDrift 16s ease-in-out infinite alternate; }
}
@keyframes ribbonFlow {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -420; }
}
@keyframes inkDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(10px, -8px, 0); }
}

@media (max-width: 1024px) {
  .fx-scrim {
    background: linear-gradient(180deg, rgba(8, 18, 28, 0.80) 0%, rgba(8, 18, 28, 0.30) 55%, rgba(8, 18, 28, 0) 100%);
  }
}

.hero-visual {
  position: relative; z-index: 2;
  border: 1px solid var(--line-dark); border-radius: var(--radius-m);
  background: var(--ink-850); overflow: hidden;
}
.hero-visual img { width: 100%; height: auto; }
.hero-visual.portrait { max-width: 420px; justify-self: end; width: 100%; }
.hero-visual.wide { grid-column: 1 / -1; max-width: 100%; }

.band { padding: clamp(56px, 7vw, 96px) clamp(20px, 3vw, 40px); }
.band.dark { background: var(--ink-950); border-bottom: 1px solid var(--line-dark); }
.band.tint { background: var(--ink-900); border-bottom: 1px solid var(--line-dark); }
.band.light { background: var(--paper); color: var(--text-light-bg); }
.band .inner { max-width: 1440px; margin: 0 auto; }
.band h2 { color: var(--text-dark-bg); }
.band.light h2 { color: var(--text-light-bg); }
.band .lead { margin: 14px 0 0; font-size: clamp(15.5px, 1.4vw, 17.5px); max-width: 68ch; color: var(--text-dark-mute); }
.band.light .lead { color: var(--text-light-mute); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.split .media-frame { min-width: 0; }
/* text-dominant split: media column ~37% on desktop */
.split-media-narrow { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1024px) {
  .split-media-narrow { grid-template-columns: 1fr; }
}

.media-frame {
  background: var(--ink-950);
  border: 1px solid var(--line-dark); border-radius: var(--radius-m);
  overflow: hidden; position: relative;
}
.media-frame img { width: 100%; height: 100%; object-fit: contain; display: block; max-width: 100%; }
.media-frame.r-wide { aspect-ratio: 16 / 9; }
.media-frame.r-std { aspect-ratio: 4 / 3; }
.media-frame.r-panel { aspect-ratio: 2 / 3; }
.media-frame.r-auto img { object-fit: cover; }
.media-frame.contain img { object-fit: contain; padding: 10px; }
.forecast-subtitle { margin: 10px 0 0; font-size: 20px; line-height: 1.25; color: var(--text-light-bg); }
.media-frame.contain .forecast-weather-thumb {
  position: absolute; right: 14px; bottom: 14px;
  width: 30%; height: auto; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.34); border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.38);
}
/* natural-ratio frame: the frame follows the image, so no letterbox bars ever */
.media-frame.r-natural { aspect-ratio: auto; line-height: 0; }
.media-frame.r-natural img { width: 100%; height: auto; object-fit: initial; padding: 0; }
.media-cap { margin: 10px 2px 0; font-size: 12px; color: var(--text-dark-mute); }
.band.light .media-cap { color: var(--text-light-mute); }
.band.light .media-frame { border-color: var(--line-light); }

/* how-it-works: light three-step flow — number node + hairline connector, no boxes */
.steps {
  margin-top: clamp(28px, 4vw, 48px);
  counter-reset: step;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: clamp(24px, 3vw, 44px);
}
.step {
  position: relative;
  counter-increment: step;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 clamp(8px, 1.5vw, 20px) 0 0;
  display: block;
  min-width: 0;
}
.step::before {
  content: counter(step);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--brand); color: var(--brand);
  font-weight: 750; font-size: 14px;
}
/* restrained hairline connector between nodes */
.step:not(:last-child)::after {
  content: "";
  position: absolute; top: 15px; left: 46px; right: clamp(10px, 1.5vw, 24px);
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}
.band.light .step:not(:last-child)::after { background: var(--line-light); }
.step h3 { font-size: 16.5px; margin: 14px 0 7px; }
.step p { margin: 0; color: var(--text-dark-mute); font-size: 14.5px; max-width: 30ch; }
.band.light .step p { color: var(--text-light-mute); }

@media (max-width: 1024px) {
  .steps { grid-auto-flow: row; grid-auto-columns: auto; }
  .step { padding: 0 0 0 46px; }
  .step::before { position: absolute; left: 0; top: 0; }
  .step:not(:last-child)::after {
    top: 34px; bottom: -14px; left: 15px; right: auto;
    width: 1px; height: auto;
  }
}

/* capability list: three concise benefit blocks */
.cap-list { margin-top: clamp(24px, 3vw, 40px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-dark); }
.band.light .cap-list { border-top-color: var(--line-light); }
.cap-item { padding: 22px 26px 22px 0; border-bottom: 1px solid var(--line-dark); }
.band.light .cap-item { border-bottom-color: var(--line-light); }
.cap-item:not(:nth-child(3n)) { border-right: 1px solid var(--line-dark); }
.band.light .cap-item:not(:nth-child(3n)) { border-right-color: var(--line-light); }
.cap-item:nth-child(3n+2), .cap-item:nth-child(3n) { padding-left: 26px; }
.cap-item h3 { font-size: 15px; margin: 0 0 6px; color: var(--text-dark-bg); }
.band.light .cap-item h3 { color: var(--text-light-bg); }
.cap-item p { margin: 0; font-size: 14.5px; color: var(--text-dark-mute); }
.band.light .cap-item p { color: var(--text-light-mute); }
.cap-item .cap-tag { display: inline-block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: var(--brand); }

/* proof band: large media stack */
.proof-stack { margin-top: clamp(28px, 4vw, 48px); display: grid; gap: clamp(20px, 2.6vw, 32px); }
.proof-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 2.6vw, 32px); align-items: start; }
.proof-row .media-frame + .media-cap, .proof-row figure { margin: 0; }

.next-action { padding: clamp(72px, 9vw, 120px) 24px; text-align: center; }
.next-action h2 { font-size: clamp(26px, 3vw, 40px); }
.next-action p { color: var(--text-dark-mute); margin: 14px 0 0; }
.next-action .closing-actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* flow strip (platform) */
.flow-strip { margin-top: clamp(28px, 4vw, 44px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.flow-node { border: 1px solid var(--line-dark); border-radius: var(--radius-m); padding: 18px; background: var(--ink-850); }
.flow-node .fn { font-size: 12px; color: var(--brand); font-weight: 750; letter-spacing: 0.04em; }
.flow-node p { margin: 6px 0 0; font-size: 13.5px; color: var(--text-dark-mute); }

/* ---------- responsive: fluid function pages ---------- */
@media (max-width: 1024px) {
  .page-hero .inner { grid-template-columns: 1fr; gap: clamp(28px, 5vw, 44px); }
  .hero-proof { justify-self: start; max-width: min(440px, 100%); }
  .hero-proof.hero-proof-wide { justify-self: stretch; max-width: 100%; }
  .split { grid-template-columns: 1fr; }
  .cap-list { grid-template-columns: 1fr; }
  .cap-item:not(:nth-child(3n)) { border-right: 0; padding-right: 0; }
  .cap-item:nth-child(3n+2), .cap-item:nth-child(3n) { padding-left: 0; }
  .proof-row { grid-template-columns: 1fr; }
  .flow-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .flow-strip { grid-template-columns: 1fr; }
  .page-hero { padding-top: 40px; padding-bottom: 40px; }
  .proof-panel { padding: 6px; border-radius: 10px; }
  .page-hero .hero-actions .btn { width: 100%; text-align: center; }
  .page-hero .hero-actions .btn-lg { padding: 13px 20px; }
  .steps { gap: 22px; }
  .split .media-frame { max-width: 100% !important; justify-self: stretch !important; }
  .media-frame { margin-left: 0; margin-right: 0; }
}
@media (max-height: 700px) and (min-width: 1025px) {
  .page-hero { padding-top: 40px; padding-bottom: 44px; }
}
