/* ============================================================
   Layz - homepage
   ============================================================ */

/* ---------------- hero ---------------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(30px, 6vh, 70px);
  padding: var(--gutter);
  padding-top: calc(var(--header-h) + 6vh);
}

.hero-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gutter);
}
.hero-meta .label { animation: fadeUp .8s var(--ease-out) both; }
.hero-meta .label:last-child { animation-delay: .08s; }

.hero-core { margin-left: calc(var(--unit) * 2); }
.hero-title {
  font-size: clamp(2.6rem, 9.4vw, 10rem);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
/* overflow:hidden masks the slide-up on load; JS drops it once the animation
   is done so deep descenders (g, y, p) are never clipped afterwards */
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: .18em;
  margin-bottom: -.18em;
}
.hero-title.is-settled .line { overflow: visible; }
.hero-title .line > span {
  display: block;
  animation: heroLine 1.1s var(--ease) both;
}
.hero-title .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes heroLine {
  from { transform: translateY(102%); }
  to   { transform: none; }
}

/* The word that swaps typefaces.
   inline-block is needed for the transform, but an inline-block is aligned by
   its own baseline - and every typeface puts that baseline somewhere else, so
   each swap would nudge the whole headline up or down. vertical-align: top
   pins it to the top of the line box instead, making the row height depend
   only on line-height, which is font-independent. */
.morph {
  display: inline-block;
  vertical-align: top;
  line-height: inherit;
  white-space: nowrap;
  font-style: normal;
  text-transform: none;
  letter-spacing: -.03em;
}

.hero-intro {
  margin-top: clamp(20px, 3vh, 34px);
  animation: fadeUp .9s var(--ease-out) .4s both;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(20px, 3vh, 32px);
  animation: fadeUp .9s var(--ease-out) .55s both;
}

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gutter);
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  animation: fadeUp .9s var(--ease-out) .7s both;
}
.stats { display: flex; gap: var(--gutter); flex-wrap: wrap; }
.stat { min-width: var(--col); }
.stat .n {
  display: block;
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}

.scroll-cue { display: flex; align-items: center; gap: 8px; color: var(--fg-50); }
.scroll-cue i {
  display: block;
  width: 1px; height: 22px;
  background: currentColor;
  transform-origin: top;
  animation: cue 2s var(--ease-io) infinite;
}
@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------------- specimen ---------------- */
.specimen {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--gutter);
  cursor: pointer;
}
.specimen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
}
.specimen-stage {
  display: grid;
  place-items: center;
  padding-block: clamp(24px, 7vh, 80px);
  font-size: clamp(7rem, 26vw, 24rem);
  line-height: .82;
  overflow: hidden;
}
.specimen-stage span {
  display: block;
  animation: specimenIn .7s var(--ease) both;
}
@keyframes specimenIn {
  from { clip-path: inset(100% 0 0 0); transform: translateY(12%); }
  to   { clip-path: inset(0 0 0 0); transform: none; }
}
.specimen-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
}
.specimen-progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 1px;
  width: 0;
  background: var(--fg);
}
.specimen-progress.run { animation: progress 2.8s linear infinite; }
@keyframes progress { from { width: 0; } to { width: 100%; } }

/* ---------------- marquee ---------------- */
.marquee-band {
  border-bottom: 1px solid var(--line);
  padding-block: clamp(14px, 2.4vh, 26px);
  overflow: hidden;
}
.marquee {
  display: flex;
  width: max-content;
  animation: slide 62s linear infinite;
}
.marquee.reverse { animation-direction: reverse; animation-duration: 76s; }
.marquee-band:hover .marquee { animation-play-state: paused; }
.marquee-row + .marquee-row { margin-top: 10px; }
.marquee span {
  display: inline-flex;
  align-items: center;
  font-size: clamp(1.4rem, 3vw, 2.5rem);
  line-height: 1.2;
  padding-inline: 22px;
  white-space: nowrap;
  transition: opacity var(--dur-fast) var(--ease-io);
}
.marquee span::after {
  content: "";
  width: 3px; height: 3px;
  background: var(--fg-30);
  margin-left: 22px;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------------- pairing showcase ---------------- */
.showcase {
  display: flex;
  align-items: flex-start;
  gap: var(--gutter);
  flex-wrap: wrap;
  padding-inline: var(--gutter);
}
.showcase-copy { width: calc(var(--unit) * 3 - var(--gutter)); min-width: 240px; }
.showcase-main { flex: 1; min-width: 300px; }

.pair-preview { border-top: 1px solid var(--fg); }
.pair-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.pair-preview-body { padding-block: clamp(26px, 5vh, 54px); }
.pair-preview-body h3 {
  font-size: clamp(1.7rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.025em;
  margin-bottom: 16px;
}
.pair-preview-body p {
  font-size: clamp(.95rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  color: var(--fg-50);
  max-width: 60ch;
}
.pair-preview-foot {
  display: flex;
  align-items: center;
  gap: var(--gutter);
  flex-wrap: wrap;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}
.pair-slot { display: flex; flex-direction: column; gap: 4px; min-width: var(--col); }

/* ---------------- category rows ---------------- */
.cat-name {
  flex: 1;
  min-width: 0;
  font-size: clamp(1.4rem, 3.4vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.03em;
  text-transform: uppercase;
}
.cat-blurb { display: none; }
.cat-count { flex: none; }
.cat-arrow {
  flex: none;
  width: 13px; height: 13px;
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: all .4s var(--ease-out);
}
.rows-item:hover .cat-arrow { opacity: 1; transform: none; }

@media (min-width: 900px) {
  .cat-blurb { display: block; flex: none; width: calc(var(--unit) * 3 - var(--gutter)); }
}

/* ---------------- features ---------------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--gutter);
  padding-inline: var(--gutter);
}
.feature { padding-top: 12px; border-top: 1px solid var(--fg); }
.feature .num { display: block; margin-bottom: clamp(30px, 8vh, 80px); }
.feature h3 {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 400;
  letter-spacing: -.01em;
  margin-bottom: 10px;
}

/* ---------------- faq ---------------- */
.faq { border-top: 1px solid var(--line); }
.faq-item {
  display: flex;
  align-items: flex-start;
  gap: var(--gutter);
  flex-wrap: wrap;
  padding: clamp(18px, 3vh, 30px) var(--gutter);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur-fast) var(--ease-io);
}
.faq-item:hover { background: rgba(var(--fg-rgb), .03); }
.faq-item h3 {
  flex: none;
  width: calc(var(--unit) * 4 - var(--gutter));
  min-width: 220px;
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.faq-item p {
  flex: 1;
  min-width: 260px;
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--fg-50);
  max-width: 70ch;
}

@media (max-width: 760px) {
  .faq-item h3 { width: 100%; min-width: 0; }
  .faq-item p { min-width: 0; }
}

/* ---------------- support / ko-fi ---------------- */
.kofi {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-inline: var(--gutter);
  border: 1px solid var(--fg);
  flex-wrap: wrap;
}
.kofi-col {
  flex: 1 1 340px;
  min-width: 0;
  padding: clamp(20px, 3.4vh, 40px);
}
.kofi-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(20px, 3vh, 32px); }

.kofi-list {
  flex: 0 1 auto;
  width: calc(var(--unit) * 4 - var(--gutter));
  min-width: 240px;
  border-left: 1px solid var(--fg);
  display: flex;
  flex-direction: column;
}
.kofi-list li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px clamp(16px, 2vw, 26px);
  transition: background-color var(--dur-fast) var(--ease-io), color var(--dur-fast) var(--ease-io);
}
.kofi-list li + li { border-top: 1px solid var(--line); }
.kofi-list li:hover { background: var(--fg); color: var(--bg); }
.kofi-list li:hover .num { color: rgba(var(--bg-rgb), .55); }

@media (max-width: 860px) {
  .kofi-list { width: 100%; border-left: 0; border-top: 1px solid var(--fg); }
}

/* ---------------- cta ---------------- */
.cta {
  padding: var(--gutter);
  padding-block: clamp(50px, 14vh, 150px);
  border-top: 1px solid var(--line);
  text-align: center;
}
.cta h2 {
  font-size: clamp(2rem, 8vw, 8rem);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.045em;
  text-transform: uppercase;
  margin-bottom: clamp(20px, 4vh, 40px);
}
.cta .hero-cta { justify-content: center; animation: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .hero-core { margin-left: 0; }
  .showcase-copy { width: 100%; }
}

@media (max-width: 760px) {
  /* A full-height hero on a phone leaves big voids between the three blocks -
     stack it normally and let the page start scrolling sooner. */
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 34px;
    gap: 30px;
  }
  .hero-meta { flex-direction: column; gap: 6px; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 18px; }
  .scroll-cue { display: none; }
  .stats { width: 100%; row-gap: 20px; }
  .stat { flex: 1 1 40%; min-width: 0; }

  .specimen-stage { padding-block: 18px; font-size: clamp(5rem, 30vw, 9rem); }
  .marquee span { font-size: 1.35rem; padding-inline: 14px; }

  .showcase { flex-direction: column; }
  .pair-preview-body { padding-block: 24px; }
  .cat-name { font-size: 1.5rem; }
  .features { gap: 26px; }
  .kofi-actions .btn { flex: 1 1 100%; justify-content: center; }
}
