/* Tiago Aleixo home hero. Everything is scoped under .ta-hero / .ta-info so it can sit inside a WordPress theme.
   Paths are relative to this file: keep hero.css, hero.js and assets/ together in the child theme. */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(assets/fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(assets/fonts/poppins-500.woff2) format("woff2"); }

.ta-hero, .ta-info {
  --ground: #110e0c;   /* his dark paper scan, average tone */
  --white: #f4f1ea;
  --blue: #6694d1;     /* from the troll painting */
  color: var(--white);
  font-family: "Poppins", system-ui, sans-serif;
}
.ta-hero, .ta-hero *, .ta-info, .ta-info * { box-sizing: border-box; }

/* the paper is on the hero too, so no bare strip shows when the iOS address bar collapses */
.ta-hero { position: relative; z-index: 0; isolation: isolate; height: 250vh; background: url(assets/conn/tone-dark.webp) center top / 1700px auto, url(assets/conn/grain-dark.jpg) center top / 600px auto var(--ground); background-image: url(assets/conn/tone-dark.webp), image-set(url(assets/conn/grain-dark-1x.jpg) 1x, url(assets/conn/grain-dark.jpg) 2x); background-blend-mode: overlay, normal; }
.ta-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: url(assets/conn/tone-dark.webp) center top / 1700px auto, url(assets/conn/grain-dark.jpg) center top / 600px auto var(--ground); background-image: url(assets/conn/tone-dark.webp), image-set(url(assets/conn/grain-dark-1x.jpg) 1x, url(assets/conn/grain-dark.jpg) 2x); background-blend-mode: overlay, normal;
}
/* never put opacity, filter or overflow on .ta-world: it would flatten the 3D */
.ta-world { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 50% 0; }
.ta-item {
  position: absolute; left: 50%; top: 50%; display: block; margin: 0;
  transform-origin: 0 0; opacity: 0; will-change: transform, opacity;
  user-select: none; -webkit-user-select: none; pointer-events: none;
}
img.ta-item { height: auto; max-width: none; }
/* his sketch under the paint, seen only through a soft round window that follows the cursor (hero.js sets --lx --ly --lr) */
.ta-sketch { -webkit-mask-image: radial-gradient(circle var(--lr, 100px) at var(--lx, 50%) var(--ly, 45%), #000 84%, transparent 100%);
  mask-image: radial-gradient(circle var(--lr, 100px) at var(--lx, 50%) var(--ly, 45%), #000 84%, transparent 100%); }
.ta-capline { font-weight: 500; line-height: 1.12; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }
.ta-capline span { display: block; }
.ta-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the composed name as one still picture: shows without JS and as the first paint; JS hides it when the pieces are ready */
.ta-static { position: absolute; left: 50%; top: 50%; width: min(70vw, 1000px); height: auto; transform: translate(-54%, -48%); }
.ta-static[hidden] { display: none; }

/* who he is and how to reach him: under the hero on a phone, over the last screen on desktop */
.ta-info { position: relative; z-index: 5; background: transparent; padding: 48px 16px 32px; display: grid; gap: 22px; }
.ta-info p { margin: 0; }
.ta-info .ta-who { font-weight: 500; font-size: 21px; line-height: 1.35; max-width: 30em; }
.ta-info .ta-mail { font-weight: 500; font-size: 19px; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; justify-self: start; }
.ta-info .ta-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, max-content); column-gap: 28px; row-gap: 8px; font-size: 16px; }
.ta-info .ta-links a { color: inherit; text-decoration: none; }
.ta-info .ta-links a:hover, .ta-info .ta-mail:hover { text-decoration-thickness: 2px; }
.ta-info .ta-logo { width: 92px; height: auto; margin-top: 40px; display: block; }

/* desktop and landscape tablets: same query as hero.js (phone = max-width 699px or taller than wide) */
.ta-hero.is-phone { height: 220vh; }
@media (min-width: 700px) and (min-aspect-ratio: 85/100) {
  .ta-info {
    --in: 0;
    height: 100vh; margin-top: -100vh; padding: 0 4vw 40px; pointer-events: none;
    grid-template-columns: minmax(0, 460px) 1fr; align-content: end; column-gap: 40px;
    opacity: var(--in); transform: translateY(calc((1 - var(--in)) * 16px));
  }
  .ta-info > * { pointer-events: auto; grid-column: 1; }
  .ta-info .ta-who { font-size: clamp(20px, 1.7vw, 27px); line-height: 1.3; }
  .ta-info .ta-mail { font-size: clamp(18px, 1.3vw, 21px); }
  .ta-info .ta-logo { grid-column: 2; grid-row: 1 / span 3; align-self: end; justify-self: end; width: 104px; margin: 0; }
}
/* keyboard: "Next character" shows only when it has focus */
.ta-next { position: absolute; z-index: 6; left: 50%; bottom: 24px; translate: -50% 0; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap;
  border: 0; padding: 10px 16px; font: 600 16px/1 "Courier Prime", ui-monospace, monospace; color: #15120f; background: #efe9dc; }
.ta-next:focus-visible { clip-path: none; width: auto; height: auto; overflow: visible; outline: 2px solid #f4f1ea; outline-offset: 3px; }
