/* ==========================================================================
   outder — V2 (10 Nov 2026)
   --------------------------------------------------------------------------
   The real site (style.css, untouched) with only the top changed: the same
   opening and header as V3, then the six disciplines as an index of rows
   that fill the first screen and open in place. From Selected work down it
   is the site as it is (the Labs section is out). Built by build/make_v2.py.
   ========================================================================== */

:root { --v3-ease: cubic-bezier(0.22, 1, 0.36, 1); --v2-ease: cubic-bezier(0.22, 1, 0.36, 1); --deep: #062A23; }

/* ---------- the header ----------------------------------------------------
   At the top of the page the lockup is big, the size «outder» has in the
   opening, which flies up into it; once you scroll it settles at 22px. The
   dot is the brand's own green, not the --accent-ink of the real site. */
:root { --logo-big: clamp(28px, 2.7vw, 42px); }
#nav .logo { font-size: var(--logo-big); transition: font-size 420ms var(--v3-ease); }
#nav.is-compact .logo { font-size: 22px; }
/* every lockup on the page, the footer's and the one in flight included */
.logo__dot { background-color: #00FFD5 !important; }
@media (max-width: 768px) {
  :root { --logo-big: 26px; }
  #nav.is-compact .logo { font-size: 20px; }
  /* in the phone's capsule the lockup sits a touch right and down
     (Diogo's own composition, 11 nov 2026) */
  #nav .logo { position: relative; left: 7px; top: 1px; }
}
/* EN / PT: the words change while the page is faded out (i18n.js). The
   transition lives only on the two classes, so it never replaces the
   elements' own (the button's hover, the menu's entrance). */
html.lang-swap :is(main, footer, #nav .nav__links, #nav .nav__cta, .mobile-menu .mobile-menu__link, .mobile-menu__foot > :not(.lang)),
html.lang-back :is(main, footer, #nav .nav__links, #nav .nav__cta, .mobile-menu .mobile-menu__link, .mobile-menu__foot > :not(.lang)) {
  transition: opacity 0.2s ease;
  transition-delay: 0s;
}
html.lang-swap :is(main, footer, #nav .nav__links, #nav .nav__cta, .mobile-menu .mobile-menu__link, .mobile-menu__foot > :not(.lang)) { opacity: 0; }

/* while the opening plays, the lockup in the bar waits for the one in flight */
.opening-on #nav .logo { opacity: 0; }
.opening-on, .opening-on body { overflow: hidden; }

/* ---------- the opening ---------------------------------------------------
   The cover's green. «get your ideas,» comes letter by letter out of a blur,
   «outder» under it is the lockup itself, at the size it will have in the
   bar, in the brand's light. A beat to read it, then the line lets go, the
   green lifts and «outder» flies to the top left, darkens and opens into
   «outder.design» (v3.js). */
.opening {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
  background: #075E52 url(../assets/v2/landing-bg.webp) center / cover no-repeat;
  color: #F2FFFB;
  cursor: pointer;
  animation: o-lift 0.4s ease 3.85s forwards;
}
/* the green washes into the page's own colour, then the cover goes */
.opening::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #E9F6F2;
  opacity: 0;
  pointer-events: none;
  animation: o-wash 1.1s cubic-bezier(0.45, 0, 0.25, 1) 2.75s forwards;
}
@keyframes o-wash { to { opacity: 1; } }
.no-opening .opening { display: none; }
.opening__in { text-align: center; }
.opening__l1 {
  margin: 0;
  font-family: 'Chillax', var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 80px);
  line-height: 1;
  letter-spacing: -0.035em;
  --d0: 0.3s;
  animation: o-out 0.55s cubic-bezier(0.55, 0, 0.75, 0) 2.35s forwards;
}
.opening__l2 { margin: clamp(4px, 0.9vw, 18px) 0 0; display: flex; justify-content: center; }
.ow { display: inline-block; white-space: nowrap; }
.opening__l1 .ow:nth-child(2) { --w: 1; }
.opening__l1 .ow:nth-child(3) { --w: 2; }
.ow i {
  display: inline-block;
  font-style: normal;
  opacity: 0;
  filter: blur(14px);
  transform: translateY(0.34em);
  animation: o-ch 1s var(--v3-ease) forwards;
  animation-delay: calc(var(--d0) + var(--w, 0) * 0.16s + var(--c) * 0.04s);
}
/* «outder»: the lockup, cut before the full stop */
.ologo { font-size: calc(var(--logo-big) * 1.5); --logo-h: 0.81em; color: #00FFD5; display: block; }
.ologo__clip {
  display: block;
  overflow: hidden;
  height: var(--logo-h);
  width: calc(var(--logo-h) * 1981 / 288 * 0.488);
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.3em);
  animation: o-ch 1s var(--v3-ease) 1.05s forwards;
}
.ologo .logo__art { width: calc(var(--logo-h) * 1981 / 288); }
.ologo .logo__word { filter: drop-shadow(0 0 22px rgba(0, 255, 213, 0)); }
.ologo .logo__dot { opacity: 0; }
@keyframes o-ch { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes o-out { to { opacity: 0; filter: blur(10px); transform: translateY(-14px); } }
@keyframes o-lift { to { opacity: 0; } }
.opening.is-cut { animation: o-lift 0.4s ease 0.35s forwards; }
.opening.is-cut::before { animation: o-wash 0.45s ease forwards; }
.opening.is-cut .opening__in { animation: o-out 0.35s ease forwards; }
/* in flight it is taken out of the green, which lifts underneath it */
.ologo.is-flying { position: fixed; z-index: 1001; margin: 0; pointer-events: none; }
.ologo.is-flying .ologo__clip { animation: none; opacity: 1; filter: none; transform: none; }


/* ---------- 3. the first screen is the six rows -------------------------- */
.intro {
  padding: var(--head-h, var(--nav-h)) 0 0;
  background: var(--bg);
}
/* one line on who we are, before the rows */
.intro__lead {
  margin: 0;
  padding: clamp(10px, 2.2vh, 28px) 0 clamp(18px, 3.4vh, 40px);
  max-width: 34ch;
  font-family: 'Chillax', var(--font-display);
  font-weight: 400;
  font-size: clamp(22px, 2.1vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
@media (max-width: 768px) {
  /* on the phone: 7px in, to the logo's edge, and 4px lower; the rows stay */
  .intro__lead {
    margin-left: 7px;
    padding-top: calc(clamp(10px, 2.2vh, 28px) + 4px);
    padding-bottom: calc(clamp(18px, 3.4vh, 40px) - 4px);
  }
}
.js .intro__lead { opacity: 0; filter: blur(8px); transform: translateY(12px); }
.js.is-ready .intro__lead {
  opacity: 1;
  filter: none;
  transform: none;
  transition: opacity 0.8s var(--v2-ease), filter 1s var(--v2-ease), transform 1.1s var(--v2-ease);
}
/* The second opening: when the green lifts, the line on who we are is
   waiting low on the page, a little bigger, with only the logo in the bar.
   Then it rises into its place and brings the rows up with it (v2.js sets
   the distances in --intro-y, --intro-s and --index-y). */
.intro-hold, .intro-hold body { overflow: hidden; }
.js .intro__lead { transform-origin: 0 0; }
.intro-hold .intro__lead { transform: translateY(calc(var(--intro-y, 40vh) + 12px)) scale(var(--intro-s, 1)); }
.js.is-ready.intro-hold .intro__lead { transform: translateY(var(--intro-y, 40vh)) scale(var(--intro-s, 1)); }
.js .index { transition: transform 1.2s var(--v2-ease); }
.intro-hold .index { transform: translateY(var(--index-y, 100vh)); }
.js.is-ready .intro__lead { transition: opacity 0.9s var(--v2-ease), filter 0.9s var(--v2-ease), transform 1.2s var(--v2-ease); }
/* the rest of the bar comes back once the line has started to rise */
.intro-out #nav .nav__links,
.intro-out #nav .nav__actions { transition: opacity 0.6s var(--v2-ease) 0.5s; }
.intro-hold #nav .nav__links,
.intro-hold #nav .nav__actions { opacity: 0; visibility: hidden; transition: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 4. the index ------------------------------------------------- */
.index {
  position: relative;
  padding-bottom: clamp(56px, 9vh, 120px);
  overflow-x: clip;
}
.index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.disc { position: relative; border-bottom: 1px solid var(--line); --n: 0; }
.disc:nth-child(2) { --n: 1; }
.disc:nth-child(3) { --n: 2; }
.disc:nth-child(4) { --n: 3; }
.disc:nth-child(5) { --n: 4; }
.disc:nth-child(6) { --n: 5; }
/* the rows come in after the line, one after the other: the content rises,
   the rule under it draws from the left */
.js .disc { border-bottom-color: transparent; }
.js .disc::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}
.js .disc > .disc__h { opacity: 0; transform: translateY(16px); }
.js.is-ready:not(.intro-hold) .disc::after {
  transform: none;
  transition: transform 1.1s var(--v2-ease) calc(0.3s + var(--n) * 0.07s);
}
.js.is-ready:not(.intro-hold) .disc > .disc__h {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--v2-ease) calc(0.35s + var(--n) * 0.07s), transform 0.9s var(--v2-ease) calc(0.35s + var(--n) * 0.07s);
}

.disc__h { margin: 0; font: inherit; letter-spacing: 0; text-transform: none; }

.index {
  --rowh: max(92px, calc((100svh - var(--head-h, var(--nav-h)) - var(--lead-h, 96px) - 7px) / 6));
  --fs: clamp(34px, min(3.6vw, calc(var(--rowh) * 0.42)), 96px);
}
.disc__row {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3.4fr) auto;
  align-items: center;
  column-gap: clamp(20px, 2.2vw, 36px);
  width: 100%;
  height: var(--rowh);
  min-height: 0;
  margin: 0;
  padding: 12px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* the tint runs to the edges of the page, not the edges of the column */
.disc__row::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--gutter));
  z-index: -1;
  background: rgba(11, 31, 26, 0.035);
  opacity: 0;
  transition: opacity 0.45s var(--v2-ease);
}
.disc__row:focus-visible { outline: none; }
.disc__row:focus-visible::before { opacity: 1; box-shadow: inset 0 0 0 2px var(--accent-ink); }

.disc__name {
  position: relative;
  justify-self: start;
  display: block;
  font-family: 'Chillax', var(--font-display);
  font-weight: 500;
  font-size: var(--fs);
  line-height: 1;
  letter-spacing: -0.026em;
}
.disc__desc {
  font-size: clamp(15px, 1.08vw, 17px);
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 32ch;
}
/* with a pointer, the line waits for it: it shows on the row under it (and
   stays on the open one) */
@media (hover: hover) and (min-width: 769px) {
  .disc__desc {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.45s var(--v2-ease), transform 0.6s var(--v2-ease);
  }
  .disc__row:hover .disc__desc,
  .disc__row:focus-visible .disc__desc,
  .disc.is-open .disc__desc { opacity: 1; transform: none; transition-delay: 0.05s; }
}
.disc__thumbs {
  display: flex;
  justify-content: flex-end;
  gap: clamp(8px, 0.9vw, 14px);
  height: min(calc(var(--rowh) - 26px), 9.4vw);
}
.disc__thumbs > * {
  display: block;
  width: auto;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-sunken);
  box-shadow: 0 0 0 1px rgba(11, 31, 26, 0.05);
  transition: transform 0.6s var(--v2-ease), opacity 0.45s var(--v2-ease), box-shadow 0.6s var(--v2-ease);
}
.disc__thumbs > :nth-child(2) { transition-delay: 0.04s; }
.disc__thumbs > :nth-child(3) { transition-delay: 0.08s; }

@media (hover: hover) {
  .disc__row:hover::before { opacity: 1; }
  .disc__row:hover .disc__thumbs > * { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(11, 31, 26, 0.05), 0 14px 26px -16px rgba(11, 31, 26, 0.35); }
}

/* open: the thumbnails make way for the work at size */
.disc.is-open .disc__thumbs > * { opacity: 0; transform: translateY(10px); }

.disc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.75s var(--v2-ease);
}
.disc.is-open .disc__panel { grid-template-rows: 1fr; }
.disc.no-anim .disc__panel,
.disc.no-anim .disc__thumbs > * { transition: none; }
.disc__inner { min-height: 0; overflow: hidden; }

.disc__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(12px, 1.2vw, 18px);
  padding-top: 6px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--v2-ease), transform 0.8s var(--v2-ease);
}
.disc.is-open .disc__grid { opacity: 1; transform: none; transition-delay: 0.12s; }
.disc__fig--big { grid-row: span 2; }

.disc__fig {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
}
.disc__media {
  position: relative;
  flex: 1;
  min-height: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-sunken);
}
.disc__fig--big .disc__media { aspect-ratio: auto; min-height: 100%; }
.disc__media img,
.disc__media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--v2-ease);
}
@media (hover: hover) {
  .disc__fig:hover .disc__media img,
  .disc__fig:hover .disc__media video { transform: scale(1.025); }
}
.disc__link { position: absolute; inset: 0; display: block; }
.disc__fig figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  padding: 12px 2px 0;
  font-size: 15px;
  line-height: 1.3;
}
.disc__fig figcaption b { font-weight: 500; color: var(--ink); }
.disc__fig figcaption span { color: var(--ink-mute); }

.disc__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: clamp(26px, 2.6vw, 36px) 0 clamp(36px, 3.6vw, 52px);
}
.disc__inside {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  color: var(--ink-soft);
}
.disc__inside li { display: inline-flex; align-items: center; gap: 10px; }
.disc__inside li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(8, 122, 108, 0.25);
}
.disc__go { flex: none; }



/* ---------- 7. tablet and phone ------------------------------------------ */
@media (max-width: 1100px) and (min-width: 769px) {
  .disc__row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name thumbs" "desc thumbs";
    row-gap: 6px;
    padding: 12px 0;
  }
  .disc__thumbs { height: calc(var(--rowh) - 26px); }
  .disc__name { grid-area: name; align-self: end; }
  .disc__desc { grid-area: desc; align-self: start; font-size: 15px; }
  .disc__thumbs { grid-area: thumbs; }
}
/* tablet with a pointer: no room for the line beside the name, so the name
   sits in the middle and the line shows once the row is open */
@media (max-width: 1100px) and (min-width: 769px) and (hover: hover) {
  .disc__row { grid-template-areas: "name thumbs" "name thumbs"; }
  .disc__name { align-self: center; }
  .disc__desc { display: none; }
  .disc.is-open .disc__row { grid-template-areas: "name thumbs" "desc thumbs"; }
  .disc.is-open .disc__name { align-self: end; }
  .disc.is-open .disc__desc { display: block; }
}

@media (max-width: 768px) {

  .index { --rowh: auto; }
  .disc__row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "name" "thumbs" "desc";
    row-gap: 8px;
    height: auto;
    min-height: calc((100svh - var(--head-h, 78px) - var(--lead-h, 80px) - 7px) / 6);
    padding: 11px 0 12px;
    align-content: center;
  }
  .disc__thumbs { height: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .disc__thumbs > * { width: 100%; height: auto; }
  /* on the phone the line under the name waits for the row to open */
  .disc__desc { display: none; }
  .disc.is-open .disc__desc { display: block; }
  .disc__name { grid-area: name; font-size: 30px; }
  .disc__desc { grid-area: desc; font-size: 15px; max-width: none; }
  .disc__thumbs { grid-area: thumbs; margin-top: 0; gap: 8px; }
  .disc__thumbs > * { border-radius: 6px; }
  /* on the phone the thumbnails close up rather than fade in place */
  .disc.is-open .disc__thumbs { display: none; }

  /* the work at size becomes one strip you swipe */
  .disc__grid {
    display: flex;
    gap: 12px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .disc__grid::-webkit-scrollbar { display: none; }
  .disc__fig,
  .disc__fig--big { flex: 0 0 86%; scroll-snap-align: start; }
  .disc__fig--big .disc__media { aspect-ratio: 16 / 10; min-height: 0; }
  .disc__media { border-radius: 10px; }
  .disc__fig figcaption { font-size: 14px; }
  .disc__foot { flex-direction: column; align-items: stretch; padding: 22px 0 30px; }
  .disc__inside { gap: 8px 18px; font-size: 15px; }
  .disc__go { justify-content: center; }

}



/* ---------- 8. motion off, script off ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .js .disc > .disc__h, .js .intro__lead { transform: none; opacity: 1; filter: none; transition: none; }
  .js .disc::after { transform: none; transition: none; }
  .disc__panel,
  .disc__grid,
  .disc__row,
  .disc__thumbs,
  .disc__thumbs > * { transition: none; }
}
@media (scripting: none) {
  .js .intro__lead, .js .disc > .disc__h { opacity: 1; filter: none; transform: none; }
  .js .disc::after { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .opening { display: none; }
  .opening-on #nav .logo { opacity: 1; }
}
@media (scripting: none) {
  .opening { display: none; }
}
