/* Wild Bear · home, rebuilt from zero (2026-11-27).
   Only the brand kit (localhost:3030/branding.html) and ~/wildbear-v3/REGRAS-UI.md decide how things look. */

/* ---------- 1 · entrance ----------
   The picture fills the screen edge to edge, without corners. The moment scrolling starts to shrink
   it, it already has the kit's 18 px corners (Rui, 2026-11-27: they do not grow with the scroll).
   Scrolling first shrinks it, centred, into a card; the page stands
   still meanwhile. Then the card rests in the centre of the screen for a while, and only after that
   does the page move on. Both stretches are shares of the screen's height:
   --encolher = scroll spent shrinking, --pausa = scroll the card stays still in the centre.
   --fim = the card's final size, as a share of the screen (Rui: smaller than the first .8).
   home.js sets the scale and the corners as you scroll. */
.entrada{--encolher:.6;--pausa:.4;--fim:.62;position:relative;height:calc(100vh * (1 + var(--encolher) + var(--pausa)))}
.entrada-pin{position:sticky;top:0;height:100vh;overflow:hidden}
.entrada-pic{position:absolute;inset:0;overflow:hidden;border-radius:calc(var(--canto,18px) * var(--k));transition:--k .3s var(--ease);background:#825a3c;transform-origin:50% 50%;will-change:transform}
.entrada-pic img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:46% 50%}   /* the boy's eye stays in view on narrow screens */
/* the corners: --k goes 0 → 1 in .3 s when the picture leaves full screen (.canto); --canto is the
   18 px corrected for the scale, set by home.js. Without @property the corners simply appear. */
@property --k{syntax:"<number>";inherits:false;initial-value:0}
.entrada-pic{--k:0}
.entrada-pic.canto{--k:1}
/* the sentence and its one button, laid out after Rui's reference (Carma, 2026-11-27): the sentence at the
   bottom left in two lines, plain sentence case in the text weight (Wild Bear Regular), big and white;
   the button at the bottom right, on the same last line. Both sit on the page margins, so the sentence
   starts under the first link of the bar and the button ends under the bar's button. The button keeps
   the kit's shape (rounded rectangle, never a capsule). The photo is light skin down there (~2.9:1 for
   white), so a soft darkening rises from the bottom edge to take the words to ~6:1. As the picture starts
   to shrink, the words, the button and the darkening fade away together (home.js). */
.entrada-txt{--borda:max(var(--gut),calc((100% - var(--max)) / 2));--canto-txt:max(var(--gut),min(var(--borda),7vw));position:absolute;inset:0;z-index:1;display:flex;justify-content:space-between;align-items:center;align-content:flex-end;flex-wrap:wrap;gap:var(--s4) var(--s5);padding:var(--hd) var(--canto-txt) var(--canto-txt);background:linear-gradient(to top,rgba(25,25,25,.46),rgba(25,25,25,.3) 16%,rgba(25,25,25,0) 46%)}
.entrada-h{color:#fff;font-weight:700;font-size:clamp(30px,3.4vw,52px);line-height:1.08;letter-spacing:.05em;text-transform:uppercase;margin-bottom:-.16em}
/* Rui: caps, in the brand lettering (Wild Bear Bold: the logo's A, W, D, R); button centred on the text block.
   The sentence sits as far from the bottom edge as from the side (--canto-txt, measured to the letters'
   baseline: the -.16em takes away the space under the capitals). That distance is the page margin, so at
   1440 px the sentence still starts under the bar's first link; on very wide screens it stops at 7vw. */
.entrada-h span{display:block}
.entrada-btn{flex:none;position:relative;top:calc(clamp(30px,3.4vw,52px) * .12)}   /* centred on the capitals, not on the line boxes */
@media (max-width:640px){
  /* phones (Rui, 2026-11-30: "demasiado pequenas… encostados a um lado em vez de estarem ao centro"): the sentence
     and its button centred, the sentence a little bigger; a shorter pinned stretch and a bigger card at its end */
  .entrada{--encolher:.45;--pausa:.15;--fim:.76}
  .entrada-txt{flex-direction:column;align-items:center;justify-content:flex-end;text-align:center}
  .entrada-h{font-size:clamp(28px,8.2vw,34px);text-wrap:balance}
  .entrada-h span{display:inline}
  .entrada-btn{top:0}
}
/* on arrival the sentence rises into place, then the button (backwards: the button keeps its own press) */
@keyframes entrada-sobe{from{opacity:0;transform:translateY(16px)}}
.entrada-h{animation:entrada-sobe .6s var(--ease) .15s backwards}
.entrada-btn{animation:entrada-sobe .6s var(--ease) .25s backwards}

/* while the entrance's own button is on screen, the bar's identical button drops its white card (plain
   white words, same shape and size) so the two don't compete; it gets the card back as soon as the
   entrance's button starts to fade (home.js sets .cta-solta) */
html.over.cta-solta .hd .cta{background:transparent;color:#fff}
@media (hover:hover){html.over.cta-solta .hd .cta:hover{background:rgba(255,255,255,.2)}}

/* a soft shade under the bar so its white words read on the sky; it goes when the words turn black */
.entrada-pic::after{content:"";position:absolute;inset:0 0 auto;height:180px;background:linear-gradient(rgba(25,25,25,.34),rgba(25,25,25,0));pointer-events:none;transition:opacity .3s var(--ease)}
html:not(.over) .entrada-pic::after{opacity:0}

/* the bar: white words on the picture (.over) · black words, still see-through, while the card is
   centred below it (.clear) · the usual white bar once the page moves on */
.clear .hd{background:transparent}

/* ---------- 2 · the statement ----------
   "Bonito não chega. Tem que trazer clientes." in Wild Bear Regular, sentence case (Rui: no caps,
   not bold), as big as the content
   width allows, three lines of about the same length, each filling the width: the words keep their
   spacing and the photographs between them (Rui's four, per the kit's photography rule) stretch to close the line (Rui's reference: the Microsoft
   365 sentence). As the block crosses the screen each word takes ink, one after the other, from
   pale grey to black, and each picture comes up with it (home.js sets --k 0 → 1; without JS all is ink).
   Pictures: the kit's 18 px corners (rounded rectangles, never capsules). */
.frase{position:relative;height:200vh}   /* Rui: bigger. The sentence stays in the middle of the screen for a screen of scroll */
.frase-pin{position:sticky;top:0;height:100vh;display:flex;align-items:center}
.frase-pin>.wrap{width:100%}
.frase-t{font-weight:400;letter-spacing:-.01em;font-size:clamp(32px,8.6vw,124px);line-height:1.1}
.frase-l{display:flex;justify-content:space-between;align-items:center;gap:.3em}
.frase-p{white-space:nowrap}
.frase-b{display:block;text-wrap:balance}   /* a statement without pictures: each sentence starts its own line */
.frase-m.vazio{background:var(--wb-line)}   /* a picture still to come: a plain grey placeholder */
.frase .w{color:color-mix(in srgb,var(--wb-black) calc(var(--k,1) * 100%),#D3D8D6)}
.frase-m{display:block;flex:1 1 0;min-width:1.5em;height:.86em;border-radius:min(var(--wb-r-card),.2em);overflow:hidden;background:var(--wb-line);opacity:calc(.2 + var(--k,1) * .8);transform:scale(calc(.9 + var(--k,1) * .1))}
.frase-m picture{display:block;width:100%;height:100%}
.frase-m img{width:100%;height:100%;object-fit:cover}   /* each band is cut with its subject in the middle */
@media (max-width:640px){
  /* phones: centred and bigger, and not held on screen (it inks as it goes by, home.js) */
  .frase{height:auto;padding:var(--s7) 0}
  .frase-pin{position:static;height:auto}
  .frase-t{font-size:clamp(30px,10vw,42px);line-height:1.16;text-wrap:balance;text-align:center}
  .frase-l{display:inline}
  .frase-m{display:inline-block;vertical-align:middle;position:relative;top:-.06em;width:1.6em;height:.78em}
}

/* ---------- 3 · services (second version, Rui 2026-11-28) ----------
   After his reference: a row of four icons, one per service, with the name under each; no title (Rui removed it).
   The icons follow his second reference: soft gradient shapes (each service's kit colour field) with a symbol cut
   out (home.mjs, SVC.forma / SVC.corte). The row is spread to fill more of the screen (--cell, 220 px at 1440) and
   everything sits on one big white card (.svc-card), behind it all. Pointing at one (mouse, keyboard focus, or a first tap on a phone; home.js sets .on and .tem):
   · the other icons go soft (blurred and faded), so only that service is in focus;
   · its examples rise from behind the icon and fan out above it (they start folded behind it, so they come from
     it), the middle one highest; the icon stays in front;
   · its name grows into the title, with one line and the one button to the service's page.
   Everything that appears is centred on the icon it belongs to (Rui: "têm que estar alinhadas com o icon"): the row
   is kept narrow enough (--cell) that a fan centred on an end icon still fits the screen. Phones are too narrow for
   that: there the row slides so that the icon in focus comes to the middle of the screen.
   The section is only as tall as it needs (Rui: little information, a small section): room for the fan above the
   row, the row, room for the words below. The first version is in ~/wildbear-v3/_antigo/servicos-cores. */
.svc{--tile:clamp(64px,6.4vw,92px);--cell:clamp(150px,15.3vw,220px);--peca:clamp(130px,15vw,205px);position:relative;padding:var(--s6) 0;overflow-x:clip}
.svc-in{display:flex;flex-direction:column;align-items:center;text-align:center}
/* the one white card, behind everything (Rui, 28/11): the kit's card, pure white on the white page, no line, no
   shadow, the large-panel corner. Tall enough to hold the fan above the icons and the words below them, the icons in
   its middle; a little wider than the row, so that a fan centred on an end icon stays inside it. What slides on a
   phone is clipped at its edges. */
.svc-card{--alto:calc(var(--peca) * .85 + 32px);position:relative;isolation:isolate;display:flex;justify-content:center;width:min(100%,1160px);padding:var(--alto) 0;border-radius:var(--wb-r-panel);background:var(--wb-paper);overflow:clip}
.svc-lista{position:relative;display:grid;grid-template-columns:repeat(4,var(--cell))}
.svc-i{display:flex;justify-content:center}
.svc-tile{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;gap:12px;padding:0 4px;border-radius:var(--wb-r-s);-webkit-user-drag:none;
  transition:opacity .3s var(--ease),transform .3s var(--ease),filter .3s var(--ease)}
.svc-ic{display:block;width:var(--tile);height:var(--tile);transition:transform .3s var(--ease)}
.svc-ic svg{display:block;width:100%;height:100%;overflow:visible}
.svc-nome{font-weight:500;font-size:14px;line-height:1.25;text-wrap:balance;transition:opacity .3s var(--ease)}
.svc-tile:active .svc-ic{transform:scale(.97)}
/* the name grown into a title, a line and the button: in the name's place, centred on the icon */
.svc-info{position:absolute;z-index:3;top:calc(var(--tile) + 8px);left:calc((var(--i) + .5) * 25%);width:300px;display:flex;flex-direction:column;align-items:center;gap:8px;
  opacity:0;visibility:hidden;transform:translate(-50%,8px);transition:opacity .3s var(--ease),transform .3s var(--ease),visibility 0s .3s}
.svc-d{max-width:26em;font-weight:500;font-size:15px;line-height:1.35;text-wrap:balance}
.svc-ver{margin-top:8px}
/* the examples, folded behind the icon until it is pointed at; the fan is centred on the icon */
.svc-ex{position:absolute;z-index:1;top:calc(var(--tile) * .35);left:calc((var(--i) + .5) * 25%);width:0;height:0;pointer-events:none}   /* on the card, behind the icon: the examples rise from behind it */
.svc-p{position:absolute;bottom:0;left:0;display:block;width:var(--peca);max-width:none;height:auto;aspect-ratio:16/10;object-fit:cover;border-radius:var(--wb-r-card);background:var(--wb-line);
  box-shadow:0 24px 48px -16px rgba(25,25,25,.3);transform-origin:50% 100%;transform:translate(-50%,20%) scale(.3);opacity:0;
  transition:transform .6s var(--ease),opacity .3s var(--ease)}
.p-c{z-index:2}
.p-v{width:calc(var(--peca) * .48);aspect-ratio:9/16}
.svc-i.on .p-e{transform:translate(-106%,-4%) rotate(-8deg)}
.svc-i.on .p-c{transform:translate(-50%,-14%)}
.svc-i.on .p-d{transform:translate(6%,-4%) rotate(8deg)}
.svc-i.on .p-e2{transform:translate(-94%,-6%) rotate(-6deg)}
.svc-i.on .p-d2{z-index:2;transform:translate(-6%,-12%) rotate(5deg)}
.svc-i.on .svc-p{opacity:1}
.svc-i.on .p-c,.svc-i.on .p-d2{transition-delay:.05s}
.svc-i.on .p-d{transition-delay:.1s}
/* the agents' example: a short conversation on a glass card over the Sol field, and a booking chip */
.p-chat{overflow:hidden;font-size:calc(var(--peca) * .041);line-height:1.3;text-align:left}
.p-chat img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.p-chat .vidro{position:absolute;inset:9% 13%;display:flex;flex-direction:column;justify-content:center;gap:.5em;padding:0 .9em;border-radius:var(--wb-r-s);background:rgba(255,255,255,.7);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.msg{max-width:82%;padding:.45em .75em;border-radius:.7em;font-weight:500}
.msg.eles{align-self:flex-start;background:var(--wb-paper);color:var(--wb-black)}
.msg.nos{align-self:flex-end;background:var(--wb-black);color:var(--wb-white)}
.p-chip{z-index:3;width:auto;aspect-ratio:auto;display:flex;flex-direction:column;gap:.15em;padding:.8em 1.1em;background:var(--wb-paper);font-size:calc(var(--peca) * .045);line-height:1.25;text-align:left;white-space:nowrap}
.p-chip b{font-weight:700}
.svc-i.on .p-chip{transform:translate(-50%,-330%) rotate(-3deg)}   /* centred on the conversation's top edge, so the fan stays centred on the icon */
/* the one in focus, and everything else gone soft */
.svc-i.on .svc-ic{transform:scale(1.06)}
.svc-i.on .svc-nome{opacity:0}
.svc-i.on .svc-info{opacity:1;visibility:visible;transform:translate(-50%,0);transition-delay:0s}
.svc.tem .svc-i:not(.on) .svc-tile{opacity:.35;filter:blur(6px)}
.svc-i.on .svc-tile:active .svc-ic{transform:scale(.99)}   /* pressing still answers */
/* arriving: the icons one after the other (home.js: .espera until the row is in view) */
.svc.espera .svc-tile{opacity:0;transform:translateY(24px)}
.svc.chega .svc-tile{transition:opacity .6s var(--ease) calc(var(--i,0) * 80ms),transform .6s var(--ease) calc(var(--i,0) * 80ms),filter .3s var(--ease)}
@media (max-width:640px){
  /* phones (Rui, 2026-11-30: too small, "remove animações entre items" if needed): the four icons in two rows of two,
     bigger, with names that read; a tap opens the service's page straight away (no fan of examples, home.js) */
  .svc{--tile:88px;padding:var(--s5) 0}
  .svc-card{padding:var(--s6) var(--s3)}
  .svc-lista{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:var(--s5);width:100%}
  .svc-nome{font-size:17px}
  .svc-ex,.svc-info{display:none}
  .svc.tem .svc-i:not(.on) .svc-tile{opacity:1;filter:none}
  .svc-i.on .svc-nome{opacity:1}
}
@media (prefers-reduced-motion:reduce){
  .svc-p,.svc-info{transition:opacity .3s var(--ease),visibility 0s .3s}
}

/* ---------- 6 · affiliates (Rui, 2026-11-28, second version) ----------
   The screen stays while scrolling: at first only a small window of the picture, around "Programa de Afiliados";
   the window opens (a clip, with the kit's 18 px corners) and shows more of the picture itself (it never grows),
   until the picture is the size the entrance picture ends at, centred; meanwhile the picture slides so that the
   title, which starts in the middle of the screen, ends at its place in the picture. Inside, under the title, the
   line on what the programme is, which arrives as the window opens past it. Only when the picture is whole do the
   two buttons come (Participar black, Ver mais white) with the small print under them. home.js sets the sizes
   (--cw/--ch), the window (--it --ir --ib --il), the slide (--ty) and --d / --q for the line and the buttons.
   Words on the photo: white (Rui took the glass card away), on a darkening from the top that goes down past the
   line (measured). */
.afil{--fim:.62;--cresce:.9;--pausa:.5;position:relative;height:calc(100vh * (1 + var(--cresce) + var(--pausa)))}
.afil-pin{--cw:62vw;--ch:62vh;position:sticky;top:0;height:100vh;overflow:clip}
.afil-pic{position:absolute;left:50%;top:50%;width:var(--cw);height:var(--ch);overflow:hidden;border-radius:18px;background:#6a9cc9;
  transform:translate(-50%,calc(-50% + var(--ty,0px)));clip-path:inset(var(--it,0px) var(--ir,0px) var(--ib,0px) var(--il,0px) round 18px)}
.afil-pic img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 35%}
@media (max-width:640px){ .afil-pic img{object-position:50% 0} }   /* phones: more sky above the people, so the words sit on sky, not on a hand */
.afil-pic::after{content:"";position:absolute;inset:0;background:linear-gradient(rgba(25,25,25,.55),rgba(25,25,25,.45) 40%,rgba(25,25,25,.2) 60%,rgba(25,25,25,0) 78%);pointer-events:none}
.afil-txt{position:absolute;z-index:1;left:0;right:0;top:12%;display:flex;flex-direction:column;align-items:center;gap:var(--s3);padding:0 var(--s4);color:#fff;text-align:center}
.afil-t{max-width:9em;font-weight:700;font-size:clamp(30px,3.4vw,52px);line-height:1.04;letter-spacing:.05em;text-transform:uppercase;text-wrap:balance}
.afil-d{max-width:21em;color:#fff;font-weight:500;font-size:clamp(16px,1.4vw,20px);line-height:1.35;text-wrap:balance;opacity:var(--d,1);transform:translateY(calc((1 - var(--d,1)) * 8px))}   /* white, straight on the photo (Rui), on a deeper darkening */
.afil-baixo{position:absolute;left:0;right:0;top:calc(50% + var(--ch) / 2 + var(--s4));display:flex;flex-direction:column;align-items:center;gap:var(--s3);padding:0 var(--gut);
  opacity:var(--q,1);transform:translateY(calc((1 - var(--q,1)) * 16px));visibility:var(--qv,visible)}
.afil-btns{display:flex;justify-content:center;gap:var(--s3)}
.afil-nao{max-width:46em;font-size:13px;line-height:1.45;text-align:center;text-wrap:balance}
.afil-nao b{font-weight:700}
@media (prefers-reduced-motion:reduce){ .afil{height:auto;min-height:100vh} }
/* phones (Rui, 2026-11-30): no window opening while the screen stays; the card as it ends, the buttons and the small
   print under it, in the page's flow (home.js treats phones like reduced motion) */
@media (max-width:640px){
  .afil{height:auto;padding:var(--s6) 0}
  .afil-pin{position:static;height:auto;overflow:visible;padding:0 var(--gut)}
  .afil-pic{position:relative;left:auto;top:auto;width:100%;height:min(560px,calc(100svh - 2 * var(--hd)));transform:none;clip-path:none}
  .afil-baixo{position:static;margin-top:var(--s4);padding:0;opacity:1;transform:none;visibility:visible}
  .afil-d{opacity:1;transform:none}
}



@media (prefers-reduced-motion:reduce){
  .entrada{height:100vh}
}
