/* ==========================================================================
   Kim Kenny: design system
   Strong. Soft. Couture.  Palette and type per Kim_Kenny_Brand_Guide.docx
   ========================================================================== */

/* ---- tokens ------------------------------------------------------------ */
:root {
  /* foundation */
  --onyx:#0E0B0A; --espresso:#2A1E17; --cocoa:#4A3426; --caramel:#A87A55;
  --nude:#D9B898; --linen:#CDBFB4; --cream:#F6EFE6; --pearl:#FFFCF8;
  /* gold */
  --gold:#B8923F; --champagne:#DCC48E; --deep-gold:#7E6026;
  /* accents, used sparingly: one red per screen */
  --rouge:#8E1B22; --rose:#B9757E; --blush:#E8C9C6;

  /* surface roles, re-pointed per section by [data-tone] */
  --bg:var(--cream); --ink:var(--onyx); --muted:#5A4A3E;
  --rule:color-mix(in oklab, var(--gold) 45%, transparent);
  --label:var(--deep-gold);

  --sans:"Jost",system-ui,-apple-system,"Segoe UI",sans-serif;
  --serif:"Bodoni Moda",Didot,Georgia,serif;
  --quote:"Cormorant Garamond",Garamond,Georgia,serif;

  --gutter:clamp(1.25rem,5vw,6rem);
  --measure:62ch;
  --ease:cubic-bezier(.22,.61,.36,1);
  --ease-out:cubic-bezier(.16,1,.3,1);
}

[data-tone="dark"]{ --bg:var(--onyx);     --ink:var(--cream); --muted:#B3A496; --label:var(--champagne); }
[data-tone="cocoa"]{ --bg:var(--cocoa);   --ink:var(--cream); --muted:#D7C6B7; --label:var(--champagne); }
[data-tone="nude"]{ --bg:var(--nude);     --ink:var(--onyx);  --muted:#4C3B2C; --label:var(--deep-gold); }
[data-tone="blush"]{ --bg:var(--blush);   --ink:var(--onyx);  --muted:#5A4048; --label:var(--deep-gold); }
[data-tone="pearl"]{ --bg:var(--pearl);   --ink:var(--onyx);  --muted:#5A4A3E; --label:var(--deep-gold); }

/* ---- reset ------------------------------------------------------------- */
*,*::before,*::after{ box-sizing:border-box }
html{ -webkit-text-size-adjust:100% }
body{
  margin:0; background:var(--cream); color:var(--onyx);
  font:400 clamp(1rem,.95rem + .25vw,1.0625rem)/1.7 var(--sans);
  font-synthesis-weight:none;            /* never fake a weight we did not load */
  -webkit-font-smoothing:antialiased;
  overflow-x:clip;
}
img,svg,video{ display:block; max-width:100% }
img{ height:auto }
a{ color:inherit }
button{ font:inherit; color:inherit }
:focus-visible{ outline:2px solid var(--gold); outline-offset:3px; border-radius:1px }
::selection{ background:var(--gold); color:var(--onyx) }

/* ---- type -------------------------------------------------------------- */
/* Bodoni Moda carries an optical-size axis. Left on auto the browser asks for
   opsz = font-size, and at display sizes that means hairline thins that break
   up on screen. We cap it: moderate for headlines, low for numerals. */
h1,h2{ font-family:var(--serif); font-weight:400; margin:0; text-wrap:balance;
  font-variation-settings:"opsz" 22 }
/* h3 sits around 20px, where Bodoni at a high optical size goes hairline:
   drop the axis right down and add a weight step so the thins survive */
h3{ font-family:var(--serif); font-weight:400; margin:0; text-wrap:balance;
  font-variation-settings:"opsz" 9,"wght" 500 }
h1{ font-size:clamp(2.75rem,1.5rem + 5.6vw,7rem); line-height:.94; letter-spacing:-.035em }
h2{ font-size:clamp(2rem,1.2rem + 3.4vw,4.25rem); line-height:1.02; letter-spacing:-.03em }
h3{ font-size:clamp(1.25rem,1.05rem + .9vw,1.75rem); line-height:1.15; letter-spacing:-.015em }
h1 em,h2 em,h3 em{ font-style:italic }   /* real italic, the ital axis is loaded */
p{ margin:0 0 1.1em; max-width:var(--measure); text-wrap:pretty }
p:last-child{ margin-bottom:0 }

.label{
  font:500 clamp(.625rem,.6rem + .1vw,.6875rem)/1.4 var(--sans);
  letter-spacing:.26em; text-transform:uppercase; color:var(--label); margin:0;
}
.lead{ font-size:clamp(1.0625rem,1rem + .5vw,1.375rem); line-height:1.55; color:var(--muted) }
.pull{
  font:italic 600 clamp(1.4rem,1.1rem + 1.6vw,2.25rem)/1.35 var(--quote);
  max-width:24ch; margin:0;
}
.muted{ color:var(--muted) }

/* ---- the accent mark ---------------------------------------------------
   The chevron in the logo is also a musical accent: "play this note with
   emphasis". It is the one motif that repeats across the whole site.      */
.accent{
  display:inline-block; width:.62em; height:.62em; flex:none;
  background:currentColor; color:var(--gold);
  clip-path:polygon(0 0,42% 0,100% 50%,42% 100%,0 100%,58% 50%);
}

/* ---- gold ---------------------------------------------------------------
   Gold is light on metal, not a flat fill. A sheen crosses it once, when the
   element arrives. @property makes the gradient position animatable.       */
@property --sheen { syntax:"<percentage>"; inherits:false; initial-value:-40% }

.gold-text{
  color:var(--deep-gold);
  background:linear-gradient(100deg,
    var(--deep-gold) calc(var(--sheen) - 18%),
    var(--champagne) var(--sheen),
    var(--deep-gold) calc(var(--sheen) + 18%));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
[data-tone="dark"] .gold-text,[data-tone="cocoa"] .gold-text{
  background-image:linear-gradient(100deg,
    var(--gold) calc(var(--sheen) - 18%),
    #F1E3C0 var(--sheen),
    var(--gold) calc(var(--sheen) + 18%));
}

.hairline{ height:1px; border:0; margin:0; background:var(--rule) }
.hairline-grow{ transform-origin:left; scale:0 1 }

/* ---- the lockup ---------------------------------------------------------
   Ships as a flat <img>; app.js swaps in the same file inline so the mark can
   answer to arrival and to the pointer. CSS set on the originals inside <defs>
   is inherited by each <use> clone, which is how the glint reaches the art. */
.lockup{ width:100%; height:auto; display:block }

/* entrance: chevrons first, then the name letter by letter, then the light */
.lockup-live .kk-mono > .c,
.lockup-live .kk-word > path{ opacity:0 }
.lockup-live.kk-in .kk-mono > .c{ animation:kk-rise .72s var(--ease-out) forwards }
.lockup-live.kk-in .kk-mono > .c:nth-child(1){ animation-delay:40ms }
.lockup-live.kk-in .kk-mono > .c:nth-child(2){ animation-delay:130ms }
.lockup-live.kk-in .kk-mono > .c:nth-child(3){ animation-delay:220ms }
.lockup-live.kk-in .kk-word > path{
  animation:kk-rise .5s var(--ease-out) forwards;
  animation-delay:calc(360ms + var(--n,0) * 38ms);
}
@keyframes kk-rise{ from{ opacity:0; translate:0 7px } to{ opacity:1; translate:0 0 } }

/* the light passing over the metal */
.lockup-live .kk-glint{ opacity:1; translate:-160px 0; pointer-events:none }
.lockup-live.kk-glint-run .kk-glint{ animation:kk-glint 1.5s var(--ease-out) }
@keyframes kk-glint{ from{ translate:-160px 0 } to{ translate:560px 0 } }

/* the three chevrons sit on slightly different planes under the pointer */
.lockup-live .kk-mono > .c{ transition:transform .55s var(--ease-out) }
.lockup-live .kk-mono > .c:nth-child(1){ transform:translate(calc(var(--px,0) * 1.6px), calc(var(--py,0) * 1.1px)) }
.lockup-live .kk-mono > .c:nth-child(2){ transform:translate(calc(var(--px,0) * 3.2px), calc(var(--py,0) * 2.2px)) }
.lockup-live .kk-mono > .c:nth-child(3){ transform:translate(calc(var(--px,0) * 4.8px), calc(var(--py,0) * 3.3px)) }

@media (prefers-reduced-motion:reduce){
  .lockup-live .kk-mono > .c,.lockup-live .kk-word > path{ opacity:1; animation:none }
  .lockup-live .kk-mono > .c{ transform:none }
  .lockup-live .kk-glint{ display:none }
}

/* ---- layout ------------------------------------------------------------ */
.section{ background:var(--bg); color:var(--ink); padding:clamp(4rem,9vw,9.5rem) var(--gutter); position:relative }
.section + .section{ border-top:1px solid color-mix(in oklab,var(--rule) 60%,transparent) }
.wrap{ max-width:84rem; margin-inline:auto }
.split{ display:grid; gap:clamp(2rem,5vw,6rem); align-items:center }
@media (min-width:52rem){ .split{ grid-template-columns:1fr 1fr } .split.wide-right{ grid-template-columns:5fr 7fr } }

.eyebrow-row{ display:flex; align-items:center; gap:.9rem; margin-bottom:clamp(2rem,4vw,3.5rem) }
.eyebrow-row::after{ content:""; flex:1; height:1px; background:var(--rule) }

/* ---- figures ----------------------------------------------------------- */
figure{ margin:0 }
/* max-width is load-bearing. A framed figure can carry a min-height, and with
   an aspect-ratio the box then derives its WIDTH from that height: on a narrow
   phone bio.html came out 491px wide inside a 390px column and the whole page
   scrolled sideways. Capped here, the height wins and object-fit keeps the
   photograph undistorted. */
.frame{ position:relative; overflow:hidden; background:var(--cocoa); max-width:100% }
.frame img{ width:100%; height:100%; object-fit:cover }
.frame.arch{ border-radius:999px 999px 2px 2px }       /* the guide's arched top */
.frame.tall{ aspect-ratio:2/3 }

/* NO TABLET EM PE A MOLDURA ESTREITA, em vez de a foto ser recortada. Uma
   moldura 2:3 ocupando a largura inteira tem altura de uma vez e meia essa
   largura, entao quanto maior o aparelho, mais alta ela fica: medido a 820px
   de largura, 1230px de altura, ou 104% da tela. O leitor atravessava uma tela
   cheia de fotografia entre dois paragrafos.

   Limitar a LARGURA resolve sem tocar no enquadramento: a proporcao continua
   2:3 e a foto continua inteira. `calc(62svh / 1.5)` e a largura em que a
   altura bate 62% da tela. Vale so na faixa de tablet; no celular, onde a
   largura ja e pequena, a moldura continua sangrando de ponta a ponta.

   Preferi isto a cortar porque recortar cada retrato para o tablet pedia medir
   a cabeca dela foto por foto, e a conta erra sem avisar.

   O `width:100%` nao e enfeite. Sem ele, `margin-inline:auto` num item de
   GRADE faz a largura virar shrink-to-fit, e a imagem dentro pede `width:100%`
   da moldura: a conta fica circular e resolve em zero. O retrato da pagina de
   media, que vive dentro de um `.split`, sumiu exatamente assim. Com a largura
   definida, a porcentagem da imagem tem de que ser porcentagem. */
@media (min-width:46rem) and (max-width:55.99rem){
  .frame.tall{
    width:100%; max-width:min(100%, calc(62svh / 1.5));
    margin-inline:auto; justify-self:center;
  }
}
.frame.wide{ aspect-ratio:16/9 }
.frame.square{ aspect-ratio:1 }

/* ---- controls ---------------------------------------------------------- */
.btn{
  --btn-bg:var(--rouge); --btn-fg:#fff;
  display:inline-flex; align-items:center; gap:1.4rem;
  padding:1rem 1.6rem; border:0; border-radius:2px;
  background:var(--btn-bg); color:var(--btn-fg); cursor:pointer;
  font:500 .6875rem/1 var(--sans); letter-spacing:.2em; text-transform:uppercase;
  text-decoration:none; position:relative; overflow:hidden;
  transition:transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.btn::after{ content:"↗"; font-size:.9rem; letter-spacing:0; transition:transform .4s var(--ease-out) }
.btn:hover{ transform:translateY(-2px); box-shadow:0 10px 24px -14px rgb(0 0 0/.55) }
.btn:hover::after{ transform:translate(3px,-3px) }
.btn.ghost{ --btn-bg:transparent; --btn-fg:var(--ink); box-shadow:inset 0 0 0 1px var(--rule) }
/* over photography the ghost button needs its own ground to stay legible */
.hero .btn.ghost{ --btn-fg:var(--cream); background:rgb(14 11 10/.34); backdrop-filter:blur(8px);
  box-shadow:inset 0 0 0 1px color-mix(in oklab,var(--champagne) 55%,transparent) }
.hero .btn.ghost:hover{ background:rgb(14 11 10/.55) }
.btn.gold{ --btn-bg:var(--gold); --btn-fg:var(--onyx) }

/* A SETA SUBSTITUI O RISCO PARADO. Na pagina de press sao tres cartoes com
   cinco links de download cada: quinze riscos lado a lado na mesma faixa da
   tela, que era o que mais pesava ali. Tirar o risco e nao pos nada no lugar
   nao servia: "SVG, ONYX" nao se anuncia como link do jeito que um e-mail se
   anuncia, e a cor sozinha nao resolve, medida em 1.44 contra o texto do
   cartao quando o minimo para cor como unico sinal e 3.

   A seta e a mesma do `.btn`, entao nao e simbolo novo no site, e e sinal que
   nao depende de cor nem some no celular, onde hover nao existe.

   O `gap` sempre foi feito para ela: este flex anima de 0.7 para 1.1rem no
   hover, ou seja foi desenhado para empurrar alguma coisa depois do texto.
   Essa coisa nunca tinha sido colocada.

   A borda fica transparente em vez de ausente para o texto nao pular um pixel
   quando ela acende.

   DEIXOU DE SER `inline-flex`, e isso importa. Como flex, a seta virava um
   item ao lado do texto; quando o rotulo quebrava em duas linhas no celular,
   o item de texto ocupava a largura toda e a seta ia parar encostada na borda
   direita, centralizada entre as duas linhas, solta da ultima palavra. Visto
   em "PNG 2000PX CREAM, FOR DARK GROUNDS" a 390px. Em fluxo normal ela segue
   a ultima palavra, que e onde uma seta de link pertence. O afastamento que
   antes vinha do `gap` agora vem da margem dela, e anima igual. */
.tlink{
  display:inline; text-decoration:none;
  font:500 .6875rem/1 var(--sans); letter-spacing:.2em; text-transform:uppercase;
  color:var(--label); padding-bottom:.55rem; border-bottom:1px solid transparent;
  transition:border-color .35s var(--ease);
}
.tlink::after{
  content:"↗"; font-size:.95em; letter-spacing:0; line-height:1;
  display:inline-block; margin-left:.7rem;
  transition:margin-left .35s var(--ease);
}
.tlink:hover,
.tlink:focus-visible{ border-color:currentColor }
.tlink:hover::after,
.tlink:focus-visible::after{ margin-left:1.1rem }

/* ---- header ------------------------------------------------------------ */
/* Altura renderizada deste cabeçalho. Ele é sticky e continua no fluxo, então o
   hero começa logo abaixo dele; o hero usa este valor para centralizar o texto
   na parte VISÍVEL da janela. A altura vem do conteúdo (padding + lockup), então
   se o cabeçalho mudar de tamanho, este número tem que mudar junto. Conferido
   por medição: 74px. */
:root{ --head-h:4.6rem }
.site-head{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:.85rem var(--gutter);
  background:color-mix(in oklab,var(--cream) 86%,transparent);
  backdrop-filter:blur(14px) saturate(1.3);
  border-bottom:1px solid transparent;
  transition:border-color .4s var(--ease), background .4s var(--ease);
  view-transition-name:site-head;
}
.site-head[data-stuck]{ border-bottom-color:var(--rule) }
.brand{ display:block; width:clamp(104px,10vw,132px); flex:none }
.brand svg{ width:100%; height:auto; overflow:visible }

.nav{ display:flex; align-items:center; gap:clamp(1.1rem,2.4vw,2.4rem) }
.nav a{
  font:400 .75rem/1 var(--sans); letter-spacing:.18em; text-transform:uppercase;
  text-decoration:none; position:relative; padding:.4rem 0;
}
.nav a::after{
  content:""; position:absolute; inset:auto 0 0; height:1px; background:currentColor;
  scale:0 1; transform-origin:right; transition:scale .4s var(--ease-out);
}
.nav a:hover::after,.nav a[aria-current="page"]::after{ scale:1 1; transform-origin:left }
.nav a[aria-current="page"]{ color:var(--deep-gold) }
.nav .btn{ padding:.7rem 1.1rem }

.menu-btn{ display:none; background:none; border:0; cursor:pointer; padding:.5rem;
  font:500 .6875rem/1 var(--sans); letter-spacing:.2em; text-transform:uppercase }

@media (max-width:63rem){
  .menu-btn{ display:block }
  .nav{
    position:fixed; inset:3.9rem 0 auto; flex-direction:column; align-items:flex-start;
    gap:1.6rem; padding:2rem var(--gutter) 2.6rem; background:var(--cream);
    border-bottom:1px solid var(--rule);
    clip-path:inset(0 0 100% 0); transition:clip-path .5s var(--ease-out);
  }
  .nav[data-open]{ clip-path:inset(0 0 0 0) }
  .nav a{ font-size:1.05rem; letter-spacing:.12em }
}

/* ---- footer ------------------------------------------------------------ */
.site-foot{ background:var(--onyx); color:var(--cream); padding:clamp(3.5rem,7vw,6rem) var(--gutter) 2.5rem }
.site-foot a{ text-decoration:none }
.foot-grid{ display:grid; gap:2.5rem; max-width:84rem; margin-inline:auto }
@media (min-width:52rem){ .foot-grid{ grid-template-columns:1.3fr 1fr 1fr } }
.foot-grid h4{ font:500 .6875rem/1 var(--sans); letter-spacing:.26em; text-transform:uppercase;
  color:var(--champagne); margin:0 0 1.1rem }
.foot-list{ list-style:none; margin:0; padding:0; display:grid; gap:.7rem; font-size:.9rem }
.foot-list a:hover{ color:var(--champagne) }
.foot-base{ max-width:84rem; margin:3.5rem auto 0; padding-top:1.5rem; border-top:1px solid #2a2320;
  display:flex; flex-wrap:wrap; gap:1rem; justify-content:space-between;
  font-size:.75rem; color:#9A8C80 }

/* ---- motion -------------------------------------------------------------
   Scroll-driven where the browser supports it: the compositor runs these,
   so they stay smooth with no scroll listener.                             */
.reveal{ opacity:0; translate:0 1.6rem }
@supports (animation-timeline:view()){
  /* Termina em `contain 0%`, que é o instante em que o elemento está INTEIRO na
     tela (ou, se for maior que ela, em que passa a cobri-la toda). Antes
     terminava em `cover 26%`, que exige rolagem: quem chegava na página via o que
     estava na metade de baixo da primeira tela desbotado, parado em 11% de
     opacidade, e só acertava se rolasse. `contain` resolve os dois casos, o
     elemento pequeno e o maior que a janela. */
  .reveal{
    animation:reveal linear both;
    animation-timeline:view();
    animation-range:entry 8% contain 0%;
  }
  .hairline-grow{
    animation:grow linear both; animation-timeline:view(); animation-range:entry 20% cover 34%;
  }
  .sheen{ animation:sheen 1.6s var(--ease-out) both; animation-timeline:view(); animation-range:entry 30% cover 55% }
  .rise{ animation:rise linear both; animation-timeline:view(); animation-range:entry 0% cover 40% }
  .par-slow{ animation:par linear both; animation-timeline:view(); animation-range:cover }
}
@supports not (animation-timeline:view()){
  .reveal{ opacity:1; translate:none }   /* no JS fallback needed: just show it */
}
@keyframes reveal{ to{ opacity:1; translate:0 0 } }
@keyframes grow{ to{ scale:1 1 } }
@keyframes sheen{ from{ --sheen:-40% } to{ --sheen:140% } }
@keyframes rise{ from{ opacity:0; translate:0 2.5rem } to{ opacity:1; translate:0 0 } }
@keyframes par{ from{ translate:0 -3% } to{ translate:0 3% } }

.stagger > *{ animation-delay:calc(var(--i,0) * 70ms) }

/* cross-document page transitions */
@view-transition{ navigation:auto }
::view-transition-old(root){ animation:vt-out .32s var(--ease) both }
::view-transition-new(root){ animation:vt-in .46s var(--ease-out) both }
@keyframes vt-out{ to{ opacity:0 } }
@keyframes vt-in{ from{ opacity:0; translate:0 1.2rem } }

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important;
    transition-duration:.001ms !important; scroll-behavior:auto !important }
  .reveal{ opacity:1; translate:none }
  @view-transition{ navigation:none }
}

/* ---- affiliations -------------------------------------------------------
   Four marks from four sources, at four resolutions, in four colour schemes.
   One ink colour and per-mark optical sizing is what makes them read as a set. */
.affil{ display:flex; flex-wrap:wrap; align-items:center; justify-content:center;
  gap:clamp(1.8rem,5vw,4.5rem); padding-block:.5rem }
.affil a{ display:block; line-height:0 }
.affil img{
  width:auto; height:var(--h,34px); opacity:.55;
  /* grayscale, not brightness(0): these are four different kinds of mark and
     flattening them to silhouettes destroys the seals' inner artwork */
  filter:grayscale(1) contrast(1.08);
  transition:opacity .45s var(--ease), filter .45s var(--ease);
}
.affil a:hover img,.affil a:focus-visible img{ opacity:1; filter:none }
[data-tone="dark"] .affil img,[data-tone="cocoa"] .affil img{ filter:grayscale(1) invert(1) contrast(1.08) }
.affil-note{ text-align:center; margin:1.6rem auto 0; max-width:none }

/* ---- utilities --------------------------------------------------------- */
.skip{ position:absolute; left:-9999px; top:0; z-index:100; padding:.8rem 1.2rem; background:var(--onyx); color:var(--cream) }
.skip:focus{ left:1rem; top:1rem }
.vh{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap }
.note{ font-size:.8rem; color:var(--muted) }
