/* Home page layout only. Component looks live in components/. */

/* ---------- the landing card: fixed in place while it morphs into the top bar ---------- */
.hero {
  height: 100svh; /* the scroll the morph takes */
}
.hero-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.hero-stage > * { grid-area: 1 / 1; }

/* carries the card's drop shadow while the card is clipped (positioned from script) */
.morph-shadow {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform-origin: 0 0;
  will-change: transform, opacity;
  box-shadow:
    0 1px 2px rgba(30, 28, 34, 0.04),
    0 30px 70px -34px rgba(30, 28, 34, 0.28);
}

.home-card {
  width: 90vw;
  height: 88dvh;
  container-type: size;
  pointer-events: auto;
  /* finger drags scroll the page (a tap still turns the flower toward it) */
  touch-action: pan-y;
  will-change: transform, clip-path;
  /* soft brand-coloured light falling on the paper */
  --card-bg:
    radial-gradient(ellipse 42% 38% at 50% 34%, rgba(242, 170, 182, 0.30), transparent 70%),
    radial-gradient(ellipse 45% 40% at 0% 100%, rgba(79, 196, 198, 0.13), transparent 70%),
    radial-gradient(ellipse 45% 40% at 100% 0%, rgba(240, 216, 112, 0.18), transparent 70%),
    var(--color-paper);
}

/* the name is the focal point: on narrow screens it spans ~90% of the card, the flower sits above */
.home-card ss-logo {
  --logo-size: min(88cqh, 125cqw);
  --brand-size: min(calc(var(--logo-size) * 0.19), 15.5cqw);
}

/* phones: the name is stacked on two lines (see logo.js), so each word can be much larger */
@media (max-width: 600px) {
  .home-card ss-logo {
    --logo-size: min(70cqh, 118cqw);
    --brand-size: min(24.5cqw, 12.5cqh);
  }
}

/* ---------- the top bar (hidden until the card has become it) ---------- */
ss-topbar.home-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  padding: 12px 0 0;
  --topbar-width: min(1120px, 90vw); /* exactly the card's width on phones, so the morph lines up */
  opacity: 0;
}

/* the nav inside the bar is the shared <ss-sitenav> (components/sitenav) */

/* ---------- the sections below ---------- */
/* everything below the landing card; while the card morphs, this follows its bottom edge */
.sheet {
  position: relative;
  z-index: 1;
  will-change: transform;
}
.home-main {
  display: grid;
  gap: clamp(64px, 10vw, 120px);
  padding: 8px 0 clamp(64px, 10vw, 120px);
}

/* the ticker's washi tape runs edge to edge */
body { overflow-x: clip; }
