/* Services page. Uses tokens from style.css and helpers from home.css. */

.mega-trigger.is-current {
  color: var(--coral);
}

/* Hero */
.svc-hero {
  position: relative;
  padding: 88px 0 72px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 0%, rgba(250, 120, 90, 0.24), transparent 38%),
    radial-gradient(circle at 0% 100%, rgba(255, 255, 255, 0.06), transparent 40%),
    var(--green);
  color: #fff;
}

.svc-hero .eyebrow {
  color: #fff;
}

.svc-hero h1 {
  max-width: 13em;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.svc-hero-lead {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.125rem;
  line-height: 1.65;
}

.svc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.svc-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.92fr);
  gap: 36px 48px;
  align-items: center;
}

.svc-hero-grid .svc-jump {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.svc-reel {
  display: grid;
  gap: 14px;
}

.svc-reel-stage {
  padding: 22px 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 60px rgba(2, 25, 21, 0.28);
}

.svc-reel-kicker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.svc-reel-name,
.svc-reel-line {
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.svc-reel.is-swap .svc-reel-name,
.svc-reel.is-swap .svc-reel-line {
  opacity: 0;
  transform: translateY(8px);
}

.svc-reel-name {
  display: block;
  color: #fff;
  font-size: clamp(1.55rem, 2.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-decoration: none;
}

.svc-reel-name:hover {
  color: var(--coral);
}

.svc-reel-line {
  min-height: 3.1em;
  margin: 10px 0 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
  line-height: 1.5;
}

.svc-reel-bar {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.svc-reel-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
}

.svc-reel-bar span.is-go {
  animation: svc-reel-bar 3.2s linear;
}

.svc-reel.is-paused .svc-reel-bar span {
  animation-play-state: paused;
}

@keyframes svc-reel-bar {
  from { width: 0; }
  to { width: 100%; }
}

.svc-reel-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.svc-reel-list a {
  display: block;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.svc-reel-list a.is-on,
.svc-reel-list a:hover {
  border-color: #fff;
  background: #fff;
  color: var(--green);
}

.svc-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.svc-jump a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.svc-jump a:hover {
  border-color: #fff;
  background: #fff;
  color: var(--green);
}

.svc-jump .svc-jump-ai {
  border-color: rgba(250, 120, 90, 0.6);
  background: rgba(250, 120, 90, 0.14);
}

/* Intro */
.svc-intro {
  padding-bottom: 56px;
  background: var(--surface-soft);
}

.svc-intro-inner {
  max-width: 860px;
  text-align: center;
}

.svc-intro h2 {
  margin: 0 0 16px;
  color: var(--green);
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.svc-intro-inner > p:not(.eyebrow):not(.svc-pillars) {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.svc-pillars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin: 28px 0 0;
  color: var(--green);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.svc-pillars span:nth-child(4) {
  color: var(--coral-hover);
}

/* Service cards */
.svc-list {
  padding: 0 0 96px;
  background: var(--surface-soft);
}

.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.svc-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.svc-card {
  display: flex;
  flex-direction: column;
  padding: 32px 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.svc-card:hover {
  border-color: rgba(10, 70, 60, 0.2);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.svc-card:target {
  border-color: var(--coral);
}

.svc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.svc-card .service-ico {
  background: rgba(10, 70, 60, 0.07);
}

.svc-num {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.svc-name {
  margin: 0 0 8px;
  color: var(--coral-hover);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.svc-card h3 {
  margin: 0 0 12px;
  color: var(--green);
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.svc-desc {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.svc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.svc-tags li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.svc-more {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* AI Automation highlight */
.svc-ai {
  position: relative;
  overflow: hidden;
  padding: 104px 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(250, 120, 90, 0.3), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(250, 120, 90, 0.12), transparent 30%),
    var(--green-deep);
  color: #fff;
}

.svc-ai-head {
  max-width: 760px;
  margin-bottom: 56px;
}

.svc-ai-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.svc-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.svc-ai-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

.svc-ai h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.svc-ai-head > p {
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.125rem;
  line-height: 1.65;
}

.svc-ai-kicker {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.svc-ai-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.svc-ai-grid li {
  padding: 26px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.svc-ai-grid li:hover {
  border-color: rgba(250, 120, 90, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.svc-ai-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(250, 120, 90, 0.16);
  color: var(--coral);
}

.svc-ai-grid a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.svc-ai-grid h4 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.svc-ai-grid a:hover h4 {
  color: var(--coral);
}

.svc-ai-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Growth ecosystem */
.svc-eco-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}

.svc-eco-copy h2 {
  margin: 0 0 16px;
  color: var(--green);
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.svc-eco-copy > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.eco-card {
  padding: 40px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 120, 90, 0.08), transparent 50%),
    var(--surface-soft);
}

.eco {
  --node-w: 168px;
  --side-w: 96px;
  --gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.eco-row {
  position: relative;
  display: flex;
  justify-content: center;
}

.eco-row + .eco-row {
  margin-top: var(--gap);
}

.eco-row + .eco-row::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--gap) * -1 + 4px);
  width: 2px;
  height: calc(var(--gap) - 12px);
  background: rgba(10, 70, 60, 0.28);
  transform: translateX(-50%);
}

.eco-row + .eco-row::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(10, 70, 60, 0.45);
  border-bottom: 2px solid rgba(10, 70, 60, 0.45);
  transform: translateX(-50%) rotate(45deg);
}

.eco-row--split {
  display: grid;
  grid-template-columns: var(--side-w) minmax(16px, 1fr) var(--node-w) minmax(16px, 1fr) var(--side-w);
  align-items: center;
}

.eco-node,
.eco-side {
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eco-node {
  width: var(--node-w);
  border: 1px solid rgba(10, 70, 60, 0.18);
  background: #fff;
  box-shadow: 0 10px 24px rgba(6, 53, 46, 0.07);
  color: var(--green);
  font-size: 0.82rem;
}

.eco-side {
  border: 1px dashed rgba(10, 70, 60, 0.3);
  background: rgba(255, 255, 255, 0.6);
  color: var(--green);
  font-size: 0.72rem;
}

.eco-node--ai {
  border-color: var(--coral);
  background: var(--coral);
  box-shadow: 0 12px 28px rgba(250, 120, 90, 0.35);
  color: #fff;
}

.eco-node--final {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.eco-arm {
  position: relative;
  height: 2px;
  margin: 0 8px;
  background: rgba(10, 70, 60, 0.28);
}

.eco-arm::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid rgba(10, 70, 60, 0.45);
  border-left: 2px solid rgba(10, 70, 60, 0.45);
}

.eco-arm--left::before {
  left: -1px;
  transform: translateY(-50%) rotate(-45deg);
}

.eco-arm--right::before {
  right: -1px;
  transform: translateY(-50%) rotate(135deg);
}

/* Ecosystem animation: build the flow row by row, then keep it moving. */
.eco-node {
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .js .eco {
    --step: 260ms;
  }

  .js .eco .eco-node,
  .js .eco .eco-side {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
    transition:
      opacity 0.5s ease,
      transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1.2);
    transition-delay: calc(var(--i) * var(--step) + 140ms);
  }

  .js .eco .eco-side {
    transition-delay: calc(var(--i) * var(--step) + 520ms);
  }

  .js .eco .eco-row + .eco-row::before {
    transform: translateX(-50%) scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease calc(var(--i) * var(--step) - 60ms);
  }

  .js .eco .eco-row + .eco-row::after {
    opacity: 0;
    transition: opacity 0.2s ease calc(var(--i) * var(--step) + 120ms);
  }

  .js .eco .eco-arm {
    transform: scaleX(0);
    transition: transform 0.45s ease calc(var(--i) * var(--step) + 340ms);
  }

  .js .eco .eco-arm--left {
    transform-origin: right;
  }

  .js .eco .eco-arm--right {
    transform-origin: left;
  }

  .js .eco.is-in .eco-node,
  .js .eco.is-in .eco-side {
    opacity: 1;
    transform: none;
  }

  .js .eco.is-in .eco-row + .eco-row::before {
    transform: translateX(-50%) scaleY(1);
  }

  .js .eco.is-in .eco-row + .eco-row::after {
    opacity: 1;
  }

  .js .eco.is-in .eco-arm {
    transform: scaleX(1);
  }

  .eco.is-flowing .eco-row + .eco-row::before {
    background: repeating-linear-gradient(to bottom, rgba(250, 120, 90, 0.85) 0 5px, rgba(10, 70, 60, 0.2) 5px 10px);
    background-size: 2px 10px;
    animation: eco-flow-down 0.7s linear infinite;
  }

  .eco.is-flowing .eco-arm {
    background: repeating-linear-gradient(to right, rgba(250, 120, 90, 0.85) 0 5px, rgba(10, 70, 60, 0.2) 5px 10px);
    background-size: 10px 2px;
  }

  .eco.is-flowing .eco-arm--left {
    animation: eco-flow-left 0.7s linear infinite;
  }

  .eco.is-flowing .eco-arm--right {
    animation: eco-flow-right 0.7s linear infinite;
  }

  .eco.is-flowing .eco-node--ai::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(250, 120, 90, 0.5);
    animation: eco-pulse 2.2s ease-out infinite;
    pointer-events: none;
  }

  .eco.is-flowing .eco-node--final {
    animation: eco-glow 2.2s ease-in-out infinite;
  }
}

@keyframes eco-flow-down {
  to {
    background-position: 0 10px;
  }
}

@keyframes eco-flow-left {
  to {
    background-position: -10px 0;
  }
}

@keyframes eco-flow-right {
  to {
    background-position: 10px 0;
  }
}

@keyframes eco-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(250, 120, 90, 0.5);
  }

  100% {
    box-shadow: 0 0 0 16px rgba(250, 120, 90, 0);
  }
}

@keyframes eco-glow {
  0%,
  100% {
    box-shadow: 0 10px 24px rgba(6, 53, 46, 0.12);
  }

  50% {
    box-shadow: 0 12px 34px rgba(10, 70, 60, 0.38);
  }
}

/* Responsive */
@media (prefers-reduced-motion: reduce) {
  .svc-reel-bar {
    display: none;
  }

  .svc-reel-name,
  .svc-reel-line,
  .svc-reel-list a {
    transition: none;
  }
}

@media (max-width: 1040px) {
  .svc-hero-grid {
    grid-template-columns: 1fr;
  }

  .svc-ai-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .svc-eco-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 860px) {
  .svc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .svc-hero {
    padding: 56px 0 48px;
  }

  .svc-hero-actions .btn {
    flex: 1 1 100%;
  }

  .svc-jump {
    margin-top: 36px;
    padding-top: 22px;
  }

  .svc-intro {
    padding: 64px 0 40px;
  }

  .svc-list {
    padding-bottom: 64px;
  }

  .svc-card {
    padding: 24px 20px 22px;
  }

  .svc-ai {
    padding: 72px 0;
  }

  .svc-ai-head {
    margin-bottom: 40px;
  }

  .svc-ai-head .btn {
    width: 100%;
  }

  .svc-ai-grid {
    grid-template-columns: 1fr;
  }

  .eco-card {
    padding: 28px 12px;
  }

  .eco {
    --node-w: 116px;
    --side-w: 74px;
    --gap: 28px;
  }

  .eco-node {
    font-size: 0.72rem;
  }

  .eco-side {
    font-size: 0.64rem;
    letter-spacing: 0.04em;
  }

  .eco-arm {
    margin: 0 4px;
  }
}

.svc-hero :focus-visible,
.svc-ai :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.svc-card :focus-visible {
  outline: 2px solid var(--green-deep);
  outline-offset: 3px;
}
