/* Hero: greeting + flip calendar on the left, cut-out portrait on the right, status line at the bottom. */

.hero {
  --portrait-h: 27rem;
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100svh;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  background: radial-gradient(120% 90% at 62% 30%, var(--hero-from) 0%, var(--hero-mid) 48%, var(--hero-to) 100%);
  box-shadow: 0 1px 0 rgba(26, 24, 24, .1), 0 1.75rem 3rem -1.5rem rgba(26, 24, 24, .3);
}
html[data-mode="dark"] .hero {
  box-shadow: 0 1px 0 rgba(232, 228, 224, .08), 0 1.75rem 3rem -1.25rem rgba(0, 0, 0, .85);
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .hero { --portrait-h: 43rem; }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(120% 90% at 62% 30%, #2A2525 0%, #1F1C1C 48%, #141212 100%);
}
html[data-mode="dark"] .hero::before { opacity: 1; }
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--vignette), transparent, var(--vignette));
}

/* the portrait: a black & white cut-out, painted in colour wherever the cursor passes */
.hero__stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.portrait {
  position: absolute;
  bottom: var(--status-h);
  left: 50%;
  height: var(--portrait-h);
  aspect-ratio: 801 / 1033;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, 2.5rem);
  transition: opacity 1.1s var(--ease-soft) 120ms, transform 1.3s var(--ease-soft) 120ms;
}
body.ready .portrait { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1024px) {
  .portrait {
    right: calc(max(0px, (100% - var(--shell)) / 2) + var(--gutter-lg));
    left: auto;
    height: min(calc(100% - var(--status-h) - 6rem), 58rem,
      calc((min(100vw, var(--shell)) - 2 * var(--gutter-lg)) * .44 * 1033 / 801));
    transform: translateY(2.5rem);
  }
  body.ready .portrait { transform: none; }
}
.portrait img,
.portrait canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
}
.portrait img { filter: var(--portrait-filter, none); }
.portrait canvas { pointer-events: none; }

/* the ability-card tag on the photo */
.portrait__tag {
  position: absolute;
  bottom: 16%;
  left: 8%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(26, 24, 24, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #F3EEEC;
  font: 600 .8125rem/1 var(--font);
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6);
  transition: transform .35s var(--ease-soft), background .25s;
}
@media (max-width: 1023.98px) {
  .portrait__tag { bottom: 7%; left: 4%; }
}
.portrait:hover .portrait__tag,
.portrait__tag:focus-visible {
  background: rgba(26, 24, 24, .88);
  transform: translateY(-3px);
}

/* ---------- the words ---------- */
.hero__content {
  position: relative;
  z-index: 20;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2rem;
  padding-top: 7rem;
  padding-bottom: calc(var(--portrait-h) + 1.25rem);
  pointer-events: none;
}
.hero__content a,
.hero__content button,
.hero__content .flipcal,
.hero__content [data-spring] { pointer-events: auto; }
@media (min-width: 1024px) {
  .hero__content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-content: center;
    gap: 2.5rem;
    min-height: calc(100lvh - var(--status-h));
    padding-top: 7rem;
    padding-bottom: 4rem;
  }
}
.hero__left {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
}
@media (min-width: 1024px) {
  .hero__left { grid-column: 1 / span 7; }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .hero__left { padding-left: 1.5rem; }
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: rgba(var(--fg-rgb), .7);
  font-size: .875rem;
  font-weight: 500;
}
.kicker::before {
  content: "";
  width: .375rem;
  height: .375rem;
  border-radius: 9999px;
  background: rgba(var(--fg-rgb), .5);
}
.headline {
  font-size: 2.625rem;
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.02em;
  text-wrap: balance;
}
@media (min-width: 640px) { .headline { font-size: 3.5rem; } }
@media (min-width: 768px) { .headline { font-size: 4.25rem; } }
@media (min-width: 1024px) { .headline { font-size: 4.75rem; } }
.headline .soft { color: rgba(var(--fg-rgb), .5); }

/* ---------- the flip calendar: a desk calendar whose pages flip through the roles ---------- */
.flipcal-line {
  display: block;
  margin-top: .1em;
  padding-top: .34em;
  padding-bottom: .42em;
}
.flipcal {
  --cal-w: 7em;
  --from: translateY(.5em) rotateX(-18deg);
  --ease: var(--ease-soft);
  position: relative;
  display: inline-block;
  vertical-align: top;
  font-size: .9em;
  perspective: 14em;
  perspective-origin: 30% 0;
}
.flipcal.reveal { transition-duration: 1.1s; }
.flipcal__body {
  position: relative;
  display: block;
  width: var(--cal-w);
  height: 1.72em;
  transform: rotateX(10deg) rotateY(-9deg);
  transform-style: preserve-3d;
  transition: width .5s var(--ease-soft);
}
.flipcal__stand {
  position: absolute;
  top: .28em;
  right: -.14em;
  bottom: -.4em;
  left: .2em;
  border-radius: .26em;
  background: linear-gradient(165deg, #3a3a3a 0%, #141414 40%, #050505 100%);
  box-shadow: 0 .5em .9em -.35em rgba(0, 0, 0, .55), inset 0 .02em 0 rgba(255, 255, 255, .12);
  transform: translateZ(-.12em);
}
.flipcal__stack { position: absolute; inset: 0; transform-style: preserve-3d; }
.flipcal__page,
.flipcal__face,
.flipcal__rear {
  position: absolute;
  inset: 0;
  border-radius: .2em;
}
.flipcal__page {
  background: linear-gradient(180deg, #fbfaf7 0%, #f2f0eb 100%);
  box-shadow: 0 .045em 0 #d8d4cb, 0 .08em 0 #f6f4ef, 0 .115em 0 #d0cbc1, 0 .15em 0 #f2f0ea,
    0 .185em 0 #c8c3b8, 0 .22em 0 #e9e6df, 0 .255em 0 #aaa498, 0 .45em .6em -.2em rgba(0, 0, 0, .35);
}
.flipcal__leaf {
  position: absolute;
  inset: 0;
  transform: translateZ(.004em);
  transform-origin: 50% 0;
  transform-style: preserve-3d;
}
.flipcal__face {
  background: linear-gradient(180deg, #fdfcf9 0%, #f3f1ec 100%);
  box-shadow: inset 0 -.015em 0 rgba(0, 0, 0, .06);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flipcal__back {
  position: absolute;
  inset: 0;
  border-radius: .2em;
  background: linear-gradient(0deg, #e9e6df 0%, #d9d5cc 100%);
  filter: brightness(.86);
  transform: translateZ(-.004em) rotateX(352deg) translateY(50%) rotateX(180deg) translateY(-50%);
  transform-origin: 50% 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flipcal__rear {
  background: linear-gradient(0deg, #e9e6df 0%, #d9d5cc 100%);
  transform: rotateX(180deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flipcal__word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: .2em .4em 0;
  color: #0a0a0a;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.flipcal__no {
  position: absolute;
  right: .42em;
  bottom: .2em;
  color: rgba(10, 10, 10, .42);
  font-size: .15em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}
.flipcal__holes {
  position: absolute;
  top: .09em;
  right: .32em;
  left: .32em;
  display: flex;
  justify-content: space-between;
  height: .07em;
}
.flipcal__holes i {
  display: block;
  width: .075em;
  height: .075em;
  border-radius: 50%;
  background: #1b1b1b;
  box-shadow: inset 0 .01em .01em rgba(255, 255, 255, .3);
}
.flipcal__shade {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .08) 70%, rgba(0, 0, 0, 0) 100%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flipcal__rings {
  position: absolute;
  top: -.27em;
  right: .32em;
  left: .32em;
  display: flex;
  justify-content: space-between;
  height: .42em;
  pointer-events: none;
  transform: translateZ(.05em);
}
.flipcal__rings i {
  position: relative;
  display: block;
  width: .075em;
  height: .42em;
}
.flipcal__rings i::before {
  content: "";
  position: absolute;
  top: 0;
  right: -.065em;
  bottom: 0;
  left: -.065em;
  border: .04em solid #a9a9a9;
  border-top-color: #f6f6f6;
  border-right-color: #6f6f6f;
  border-bottom-color: #8a8a8a;
  border-left-color: #ededed;
  border-radius: .2em;
  filter: drop-shadow(.01em .025em .015em rgba(0, 0, 0, .35));
}
.flipcal__measure {
  position: absolute;
  visibility: hidden;
  font-weight: 700;
  letter-spacing: -.035em;
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { display: inline-block; border-radius: 9999px; }
.btn__in {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1.75rem;
  border-radius: 9999px;
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
}
.btn--arrow .btn__in { padding: .375rem .375rem .375rem 1.5rem; }
.btn--solid .btn__in { background: var(--btn-bg); color: var(--btn-fg); }
.btn--ghost .btn__in {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--foreground);
}
.btn--ghost:hover .btn__in { background: var(--outline-h); }
.btn__badge {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: var(--btn-badge-bg);
  color: var(--btn-badge-fg);
  font-size: 1rem;
}

/* ---------- status line along the bottom ---------- */
.hero__status {
  --from: none;
  --delay: 900ms;
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  height: var(--status-h);
  border-top: 1px solid rgba(var(--fg-rgb), .1);
  color: rgba(var(--fg-rgb), .72);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.hero__status .mid { display: none; }
@media (min-width: 640px) { .hero__status .mid { display: inline; } }
.hero__status .scroll { display: inline-flex; align-items: center; gap: .5rem; }
.hero__status .scroll i {
  display: inline-block;
  font-style: normal;
  animation: nudge 1.8s var(--ease-snap) infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
