

  /* Shared demo primitives for the inline examples */

  .demo { position: relative; flex: 1 1 0; min-height: 0; display: grid; align-content: start; gap: 10px; padding: 28px 16px 20px; text-align: left; }
  .mini { border-radius: var(--r-glass-sm); padding: 14px 14px 12px; }
  .mini-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 600 15px/1.2 var(--sans); }
  .mini-h .ex { margin-left: auto; }
  .mini .avatar { width: 28px; height: 28px; font-size: 12.5px; }
  .step { opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .6s var(--spring); }
  .step.on { opacity: 1; transform: none; }

  /* Status chips */
  .okchip svg, .src svg { width: 15px; height: 15px; flex: none; color: var(--terra-ink); }

  /* Bots */
  .okchip { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 12px; border-radius: var(--r-pill); font: 600 13.5px/1.2 var(--sans); background: var(--terra-tint); color: var(--terra-ink); }

  /* Agentes */
  .tt span { background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 0 1.5px; transition: background-size .5s var(--ease); }
  .tt.on { color: var(--ink-2); }
  .tt.on span { background-size: 100% 1.5px; }
  .st .dotspin { width: 16px; height: 16px; }
  .st .ok { display: none; width: 20px; height: 20px; color: var(--terra-ink); }
  .st.on .dotspin { display: none; }
  .st.on .ok { display: block; }

  /* Source chip */
  .src { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); font: 500 13px/1.2 var(--sans); background: var(--terra-tint); color: var(--terra-ink); }
  .src svg { fill: none; stroke: currentColor; stroke-width: 1.7; color: var(--terra-ink); }

  /* =====================================================================
     05 · Servicios page. Everything above is lifted from 04 (tokens, glass, nav, footer);
     below is only what this page adds: the page hero chips, the detail sections with their inline examples,
     the "También hacemos" tiles with animated glyphs and the process strip.
     ===================================================================== */
  .nav ul a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--terra); text-decoration-thickness: 2px; text-underline-offset: 8px; }
  .footer .foot-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }

  .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 780px; margin: 28px auto 0; padding: 0; list-style: none; }
  .chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); font: 500 15px/1.2 var(--sans); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
  .chips a:hover { transform: translateY(-2px); border-color: var(--terra-ink); color: var(--terra-ink); }
  .js .hero-copy .chips-wrap { opacity: 0; transform: translateY(14px); animation: rise .8s var(--ease) 1.05s forwards; }

  /* Detail sections: copy on one side, a live example on the other (sticky while the copy scrolls); .flip swaps the sides */
  #tres { padding-bottom: clamp(16px, 3vw, 40px); }
  .detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); grid-template-areas: "head stage" "body stage"; column-gap: clamp(32px, 5vw, 80px); align-items: start; padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); scroll-margin-top: 88px; }
  .detail.flip { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); grid-template-areas: "stage head" "stage body"; }
  .detail, .detail.flip { grid-template-rows: auto 1fr; }
  .detail-head { grid-area: head; }
  .detail-body { grid-area: body; }
  .detail-head h3 { font-size: clamp(38px, 4.4vw, 58px); line-height: 1; text-wrap: balance; }
  .detail-head .lead { margin: 16px 0 0; }
  .detail-body h4 { margin: 36px 0 10px; font: 400 27px/1.1 var(--serif); }
  .detail-body p { margin: 0 0 12px; color: var(--ink-2); max-width: 56ch; }
  .incl { list-style: none; margin: 0; padding: 0; max-width: 56ch; }
  .incl li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 16.5px; line-height: 1.45; }
  .incl li:last-child { border-bottom: 1px solid var(--line); }
  .incl svg { width: 20px; height: 20px; margin-top: 2px; color: var(--terra-ink); }
  .ex-note { margin: 32px 0 0; padding: 18px 20px; max-width: 56ch; border-radius: var(--r-glass-sm); background: var(--paper); }
  .ex-note p { margin: 10px 0 6px; color: var(--ink); }
  .ex-note small { color: var(--ink-2); font-size: 14px; }
  .detail .go { display: inline-block; margin-top: 28px; font-weight: 600; color: var(--terra-ink); }

  /* Inline example: a liquid-glass card, light palette in both themes */
  .ex-card { grid-area: stage; align-self: start; position: sticky; top: 96px; min-width: 0; color: var(--ink); --b1: var(--terra); --b2: var(--terra-tint); --b3: var(--petrol); --blob-op: .5; --frost: 48%; padding: clamp(14px, 2.2vw, 26px); border-radius: calc(var(--r-glass) + 8px); box-shadow: 0 40px 70px -50px rgba(30, 42, 47, .45); }
  /* the base stylesheet pads every <section>; the panels inside the examples are not page sections */
  .ex-card section { padding: 0; }
  .ex-card.off *, .ex-card.off *::before, .ex-card.off *::after { animation-play-state: paused !important; }
  .ex-card .stage-bar { margin-bottom: 4px; }
  .ex-replay[hidden] { display: none; }
  .ex-demo { padding: 4px 0 0; align-content: start; }
  .ex-demo .status-wrap > .pill { grid-area: 1 / 1; }
  .ex-demo .ar + .ar { border-top: 1px solid var(--glass-rim); }
  .ex-demo .agents-panel { padding-bottom: 6px; }
  .ex-chat .chat-body { min-height: 0; }
  .ex-chat .slot.out + .slot.out { margin-top: -2px; }
  .ex-chat .okchip { margin-top: 2px; }
  .mock.compact { grid-template-columns: 58px minmax(0, 1fr); }
  .mock.compact .mock-side { padding: 14px 8px; }
  .mock.compact .mock-nav li { justify-content: center; padding: 10px 0; }
  .mock.compact .mock-nav svg { width: 18px; height: 18px; }
  .mock.compact .lbl { display: none; }
  .trow.late { grid-template-rows: 0fr; opacity: 0; }
  .trow.late.on { grid-template-rows: 1fr; opacity: 1; }

  /* También hacemos: glass tiles of two widths, each with a small looping glyph */
  .also { background: var(--paper); }
  .tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 16px; }
  .also .sec-head h2 { font-size: clamp(34px, 4vw, 54px); }
  .stile { grid-column: span 6; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 24px; min-height: 236px; padding: clamp(22px, 3vw, 34px); scroll-margin-top: 96px; --frost: 58%; --b1: var(--terra-tint); --b2: var(--terra-soft); --b3: var(--paper); --blob-op: .55; box-shadow: var(--glass-shadow); transition: translate .3s var(--ease); }
  .stile:hover { translate: 0 -4px; }
  .stile:nth-child(2) { --b1: var(--terra); --b2: var(--terra-tint); }
  .stile:nth-child(3) { --b1: var(--terra-soft); --b2: var(--terra-tint); }
  .stile:nth-child(4) { --b1: var(--terra-tint); --b2: var(--terra); }
  /* titles start on one line and the link sits at the foot, whatever the title length */
  .st-text { display: flex; flex-direction: column; align-items: flex-start; }
  .st-text h3 { font-size: clamp(30px, 3.2vw, 38px); line-height: 1.04; }
  .st-text p { margin: 10px 0 14px; max-width: 34ch; color: var(--ink-2); font-size: 17px; line-height: 1.5; }
  .st-text .link { margin-top: auto; font-weight: 600; color: var(--terra-ink); }
  .glyph { align-self: start; width: 112px; height: 112px; padding: 10px; border-radius: var(--r-glass); background: var(--glass-tint-strong); border: 1px solid var(--glass-rim); box-shadow: inset 0 1px 0 var(--glass-edge); }
  .glyph .ln { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .glyph .fl { fill: var(--terra); }
  .glyph .soft { fill: color-mix(in srgb, var(--ink) 12%, transparent); }
  .glyph .tk { stroke: var(--terra-ink); }
  .glyph .dim { stroke-opacity: .35; }
  .glyph * { transform-box: fill-box; }
  .g-dot { animation: ghop 1.3s ease-in-out infinite; animation-delay: var(--d, 0s); }
  @keyframes ghop { 0%, 60%, 100% { transform: none; opacity: .55; } 30% { transform: translateY(-5px); opacity: 1; } }
  .g-check { stroke-dasharray: 14; stroke-dashoffset: 0; animation: gdraw 5.4s ease-in-out infinite backwards; animation-delay: var(--d, 0s); }
  @keyframes gdraw { 0%, 6% { stroke-dashoffset: 14; } 20%, 86% { stroke-dashoffset: 0; } 96%, 100% { stroke-dashoffset: 14; } }
  .g-pulse { animation: gtravel 2.8s var(--ease) infinite; }
  @keyframes gtravel { 0% { transform: translateX(-30px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(30px); opacity: 0; } }
  .g-blk { transform-origin: top center; animation: gbuild 5.2s var(--ease) infinite backwards; animation-delay: var(--d, 0s); }
  @keyframes gbuild { 0%, 4% { opacity: 0; transform: translateY(6px); } 14%, 84% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(6px); } }
  .stile.paused .glyph *, .stile.paused .glyph { animation-play-state: paused; }

  /* Process mention: one line and a link, the steps live on their own page */
  /* the service pages: one readable column per section, the section padding comes from landing.css */
  .svc-section { max-width: 72ch; }
  .svc-section h2 { margin: 0 0 12px; }
  .svc-section > p { margin: 0 0 20px; color: var(--ink-2); max-width: 60ch; }
  .prose-block { max-width: 72ch; }
  .prose-block p + p { margin-top: 16px; }
  .how-band { padding-block: clamp(56px, 8vw, 96px) clamp(40px, 6vw, 72px); }
  .how-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title cta" "text cta"; column-gap: 32px; row-gap: 8px; align-items: center; padding-block: clamp(28px, 4vw, 40px); border-block: 1px solid var(--line); }
  .how-band h2 { grid-area: title; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; }
  .how-band p { grid-area: text; margin: 0; color: var(--ink-2); font-size: 17px; }
  .how-band .btn { grid-area: cta; }
  .sec-head .go-in { margin: 0; }

  @media (max-width: 900px) {
    .stile { grid-column: span 12; }
  }
  @media (max-width: 640px) {
    .how-band .wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "text" "cta"; }
    .how-band .btn { justify-self: start; margin-top: 12px; }
  }
  @media (max-width: 900px) {
    .detail, .detail.flip { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "body"; row-gap: 28px; }
    .ex-card { position: relative; top: auto; }
  }
  @media (max-width: 640px) {
    .stile { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 16px; min-height: 0; }
    .stile .glyph { order: -1; width: 88px; height: 88px; }
    .chips { gap: 6px; }
    .chips a { padding: 0 14px; font-size: 14.5px; }
  }
  @media (max-width: 560px) {
    .ex-demo .kpi { padding: 10px; }
    .ex-demo .kpi b { font-size: 30px; }
    .ex-demo .kpi small { font-size: 12px; }
    .ex-demo .mock-title b { font-size: 22px; }
    .ex-demo .trow .r { grid-template-columns: 1.5fr 1fr; }
    .ex-demo .trow .r > :nth-child(2) { display: none; }
    .ex-demo .ar { padding-inline: 14px; gap: 10px; }
    .ex-demo .panel-h { padding-inline: 14px; }
    .ex-demo .res-in { padding-inline: 14px; }
    .ex-demo .file { gap: 10px; padding: 10px; }
    .ex-demo .file div { min-width: 150px; }
    .ex-demo .file b { font-size: 14.5px; overflow-wrap: normal; }
    .mock.compact { grid-template-columns: 46px minmax(0, 1fr); }
    .mock.compact .mock-side { border-right: 1px solid var(--glass-rim); border-bottom: 0; padding: 12px 5px; }
    .mock.compact .mock-nav { grid-auto-flow: row; overflow: visible; }
    .mock.compact .mock-main { padding: 14px 12px 16px; }
    .ex-card .toast { right: 8px; left: 8px; bottom: 8px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .js .hero-copy .chips-wrap { opacity: 1; transform: none; }
    .glyph *, .glyph { animation: none; }
  }

/* Liquid fields bleed past their sections; clip them so the page never scrolls sideways */
main { overflow-x: clip; }
