/* ==========================================================================
   Servicios page. One markup, two behaviours (CSS only, native radios):
   accordion on mobile and iPad, tabs on desktop (the .sa wrappers get
   display:contents so the labels line up as a tab row above the panels).
   ========================================================================== */
@media (min-width:1100px){.page-head{padding-bottom:72px}}

/* ---------- Accordion (mobile / iPad) ---------- */
.sv-wrap{padding:8px var(--gutter) 0}
.sa{border-top:1px solid var(--ink)}
.sa:last-child{border-bottom:1px solid var(--ink)}
.sa>input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.sa .hd{display:flex;align-items:center;gap:12px;padding:20px 0;cursor:pointer}
/* the closed ones are faded to 50%: 3.5:1 on the cream, over WCAG's 3:1 for big text (they were 38%, 2.5:1) */
.sa .tt{flex:1;font-size:30px;line-height:1.05;font-weight:500;letter-spacing:-.04em;opacity:.5;transition:opacity .3s,color .3s}
.sa .pl{flex:0 0 auto;width:40px;height:40px;border-radius:50%;border:1px solid var(--ink);display:flex;align-items:center;justify-content:center;transition:background .3s,color .3s,border-color .3s}
.sa .bd{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s var(--ease)}
.sa .bd>div{overflow:hidden}
.sa>input:checked~.bd{grid-template-rows:1fr}
.sa>input:not(:checked)~.bd>div{visibility:hidden;transition:visibility 0s .5s}
.sa>input:checked~.hd .tt{opacity:1;color:var(--red)}
.sa>input:checked~.hd .pl{background:var(--red);border-color:var(--red);color:#fff;--o:1} /* chevron strokes: .chev in base.css */
.sa>input:focus-visible~.hd .pl{outline:2px solid var(--red);outline-offset:3px}

/* Panel body: photos, lead, list, buttons (re-arranged per breakpoint) */
.sv-body{padding:2px 0 28px;display:flex;flex-direction:column;gap:18px}
.sv-photos{display:grid;grid-template-columns:1fr 1fr;gap:8px}
/* the photos keep the same shape at every width: proportions on mobile and iPad, a fixed size on desktop */
.sv-photos img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:12px}
.sv-photos img:first-child{grid-column:1/3;border-radius:14px}
.sv-lead{font-size:19px;line-height:1.3;letter-spacing:-.01em;color:#222}
.sv-list{list-style:none;margin:0;padding:0;border-bottom:1px solid rgba(17,17,17,.2)}
.sv-list li{display:flex;gap:12px;padding:11px 0;border-top:1px solid rgba(17,17,17,.2);font-size:16px}
.sv-list li::before{content:"—";color:var(--red)}
.sv-cta{display:flex;flex-direction:column;gap:4px;margin-top:4px}
.sv-cta .link{align-self:center}

@media (min-width:768px){
  .sv-wrap{padding-top:16px}
  .sa .hd{align-items:baseline;gap:18px;padding:26px 0}
  .sa .tt{font-size:44px;line-height:1;letter-spacing:-.045em}
  .sa .hd:hover .tt{opacity:.75}
  .sa>input:checked~.hd .tt{opacity:1}
  .sa .pl{align-self:center;width:44px;height:44px;--chev:10px}
  .sv-body{padding:4px 0 40px;display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"photos photos" "lead list" "cta list";grid-template-rows:auto auto 1fr;gap:14px 32px}
  .sv-photos{grid-area:photos;margin-bottom:10px;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:10px;aspect-ratio:20/9}
  .sv-photos img,.sv-photos img:first-child{height:100%;min-height:0;border-radius:16px}
  .sv-photos img:first-child{grid-column:auto;grid-row:1/3}
  .sv-lead{grid-area:lead;font-size:20px;line-height:1.35;letter-spacing:0;color:var(--ink-2)}
  .sv-list{grid-area:list;align-self:start;border-bottom:0}
  .sv-list li::before{display:none}
  .sv-cta{grid-area:cta;flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px 24px;margin-top:0;align-self:start}
  .sv-cta .link{align-self:auto;font-size:17px}
}

/* ---------- Tabs (desktop) ---------- */
.sv-ind{display:none} /* the gliding red line (main.js), desktop only */
@media (min-width:1100px){
  .sv{display:grid;grid-template-columns:repeat(5,1fr)}
  .sa{display:contents}
  .sa .hd{grid-row:1;align-items:flex-start;padding:28px 16px 30px;border-top:3px solid transparent;border-bottom:1px solid var(--ink);transition:border-color .25s}
  .sa .tt{font-size:30px;line-height:1.08;letter-spacing:-.045em;opacity:.5;transition:opacity .25s} /* 50%: see above (was 32%) */
  .sa .hd:hover .tt{opacity:.7}
  .sa .pl{display:none}
  .sa>input:checked~.hd{border-top-color:var(--red)}
  .sa>input:checked~.hd .tt{opacity:1;color:var(--ink)}
  .sa>input:focus-visible~.hd{outline:2px solid var(--red);outline-offset:-2px}
  /* the red line, when main.js runs: one element (.sv-ind) that glides between the tabs like the nav pill (edges in
     --l/--r: the leading edge 0.2s, the other 0.3s with a slight overshoot; .elastic = stretching toward the cursor).
     While hovering, every title is grey but the one the line is on */
  .sv{position:relative}
  .sv-ind{display:block;position:absolute;left:0;top:0;z-index:1;width:max(0px,var(--r) - var(--l));height:3px;background:var(--red);
    transform:translateX(var(--l));pointer-events:none;transition:--r .2s cubic-bezier(.25,1,.5,1),--l .3s cubic-bezier(.6,0,.3,1.3)}
  .sv.to-left .sv-ind{transition:--l .2s cubic-bezier(.25,1,.5,1),--r .3s cubic-bezier(.6,0,.3,1.3)}
  .sv.elastic .sv-ind{transition:--l .05s ease-out,--r .05s ease-out}
  .sv.has-ind .sa>input:checked~.hd{border-top-color:transparent}
  .sv.hovering .sa>input~.hd .tt{opacity:.5}
  .sv.hovering .sa>input~.hd.is-target .tt{opacity:1}
  .sa .bd{grid-row:2;grid-column:1/-1;display:none}
  .sa>input:checked~.bd{display:block}
  .sa .bd>div{overflow:visible}
  /* the photo column has a fixed width (its size at 1280px) so the photos never change shape; the text column takes the rest */
  .sv-body{padding:56px 16px 0;grid-template-columns:minmax(0,1fr) 540px;grid-template-areas:"lead photos" "list photos" "cta photos";gap:30px 72px}
  .sv-photos{margin:0;height:auto;aspect-ratio:auto;grid-template-columns:1fr 1fr;grid-template-rows:auto;gap:12px}
  .sv-photos img{height:220px;border-radius:24px}
  .sv-photos img:first-child{grid-row:auto;grid-column:1/3;height:380px;border-radius:24px}
  .sv-lead{font-size:34px;line-height:1.2;letter-spacing:-.025em;color:var(--ink)}
  .sv-list{border-bottom:1px solid rgba(17,17,17,.2)}
  .sv-list li{gap:14px;padding:14px 0;font-size:19px}
  .sv-list li::before{display:inline}
  .sv-cta{gap:28px}
  .sv-cta .link{font-size:18px}
}

/* ---------- Cómo trabajamos ---------- */
.process{padding:56px var(--gutter) 0}
.process h2,.where h2{font-size:32px;line-height:.95;font-weight:500;letter-spacing:-.045em}
.process h2{margin-bottom:24px}
.steps{list-style:none;margin:0;padding:0;border-bottom:1px solid var(--ink)}
.steps li{display:grid;grid-template-columns:52px 1fr;gap:8px;align-items:baseline;padding:20px 0;border-top:1px solid var(--ink)}
.steps .num{font-size:28px;line-height:1;font-weight:500;letter-spacing:-.04em;color:var(--red)}
.steps h3{font-size:20px;line-height:1.15;font-weight:500;letter-spacing:-.02em}
.steps p{display:none}
@media (min-width:768px){
  .process{margin-top:96px;padding:64px var(--gutter) 72px;background:var(--band)}
  .process h2{font-size:36px;margin-bottom:32px}
  .steps{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:20px;border:0}
  .steps::before{content:"";position:absolute;left:0;right:0;top:5px;height:1px;background:var(--ink)}
  .steps li{position:relative;display:block;padding:36px 0 0;border:0}
  .steps li::before{content:"";position:absolute;left:0;top:0;width:12px;height:12px;border-radius:50%;background:var(--red);
    translate:var(--dx,0px) 0;transform:translateY(var(--dy,0px))}
  /* the dots game (main.js): one red block follows the cursor and swallows the dots (.eaten hides them). The block is
     the list's own ::after while .gaming (an <ol> holds only list items), sized and placed by main.js every frame
     (--bw/--bh/--bt). At the end it splits back into the dots: .placing puts them where the block was, stacked
     (--dx/--dy, no transition), then .flying glides them home with a little overshoot */
  .steps.gaming::after{content:"";position:absolute;left:0;top:0;width:var(--bw);height:var(--bh);transform:var(--bt);background:var(--red);pointer-events:none}
  .steps li.eaten::before{opacity:0}
  .steps.placing li::before{transition:none}
  .steps.flying li::before{transition:translate var(--fly,.6s) cubic-bezier(.3,1.25,.5,1),transform var(--fly,.6s) cubic-bezier(.3,1.25,.5,1)} /* --fly: per dot, by distance (main.js) */  .steps .num{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .steps h3{margin:6px 0 10px;font-size:21px;line-height:1.1}
  .steps p{display:block;font-size:14px;line-height:1.4;color:#444}
}
@media (min-width:1100px){
  .process{margin-top:140px;padding:96px var(--gutter) 104px}
  .process h2{font-size:56px;margin-bottom:40px}
  .steps{gap:32px}
  .steps::before{top:6px}
  .steps li{padding-top:44px}
  .steps li::before{width:14px;height:14px}
  .steps h3{margin:8px 0 12px;font-size:30px}
  .steps p{font-size:17px;line-height:1.5}
}

/* ---------- Dónde trabajamos ---------- */
.where{padding:56px var(--gutter) 0;display:flex;flex-direction:column;gap:24px}
.where__text{display:flex;flex-direction:column;gap:24px}
.towns .k{font-size:13px;color:#666;margin-bottom:8px}
.towns ul{list-style:none;margin:0;padding:0;border-bottom:1px solid var(--ink)}
.towns li{padding:10px 0;border-top:1px solid var(--ink);font-size:18px;letter-spacing:-.01em}
@media (min-width:768px){
  .where{padding-top:96px;display:grid;grid-template-columns:1fr 1.6fr;gap:32px;align-items:start}
  .where h2{font-size:36px}
}
@media (min-width:1100px){
  .where{padding-top:140px;grid-template-columns:1fr 560px;gap:64px;align-items:center}
  .where__text{gap:28px}
  .where h2{font-size:56px}
  .towns .k{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .towns li{padding:12px 0;font-size:24px}
  .where .map{height:340px}
}
