/* Landing page layout only. Tokens and components come from /ui/senpai.css. */

.wrap { width: min(1180px, 100% - 2 * var(--s-5)); margin-inline: auto; }
@media (max-width: 480px) { .wrap { width: calc(100% - 2 * var(--s-4)); } }
.landing { overflow-x: hidden; }

/* ---------- header ---------- */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-5); }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 26px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.wordmark--sm { font-size: 20px; }
.wordmark__dot {
  width: 14px; height: 18px; background: var(--coral);
  border-radius: 999px 999px 4px 4px; /* a tiny arch, echoing the hero frame */
}

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center; gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(24px, 5vw, 64px) clamp(56px, 9vw, 120px);
}
.hero__copy { display: grid; gap: var(--s-5); justify-items: start; }
.hero__title { margin-top: var(--s-2); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; } /* room for italic descenders */
.hero__title .line > span { display: inline-block; animation-name: hero-line; animation-duration: 900ms; }
.hero__title em { color: var(--coral-ink); }
.hero__actions { margin-top: var(--s-2); }
@keyframes hero-line { from { opacity: 0; transform: translateY(70%) rotate(2deg); } to { opacity: 1; transform: none; } }

.hero__stage {
  position: relative; isolation: isolate;
  width: min(100%, 440px); justify-self: center; aspect-ratio: 4 / 5;
  animation: senpai-rise 1s var(--ease) 260ms both;
}
.hero__sun {
  position: absolute; z-index: -1; width: 46%; aspect-ratio: 1; right: -6%; top: -4%;
  border-radius: 50%; background: var(--coral);
  animation: hero-sun 1.2s var(--ease) 500ms both;
}
.hero__blob { --size: 78%; left: -14%; bottom: -6%; z-index: -2; }
.hero__arch {
  position: absolute; inset: 6% 8% 0 8%;
  overflow: hidden;
  border-radius: 999px 999px var(--r-xl) var(--r-xl);
  background: linear-gradient(180deg, var(--lav-2) 0%, var(--lav) 70%);
  box-shadow: inset 0 0 0 1px rgba(36,21,43,.05);
  display: grid; place-items: end center;
}
.hero__monogram {
  align-self: center; font-family: var(--font-display); font-style: italic;
  font-size: clamp(120px, 18vw, 200px); line-height: 1; color: rgba(36,21,43,.12);
  transition: opacity var(--dur-3) var(--ease);
}
.hero__avatar {
  position: absolute; inset: auto 0 0 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 8%;
  animation: senpai-rise 800ms var(--ease) both;
}
.has-avatar .hero__monogram { opacity: 0; }
.hero__bubble {
  position: absolute; left: -12%; bottom: 14%; max-width: 250px;
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 18px; border-radius: 22px 22px 22px 6px;
  background: var(--surface); box-shadow: var(--shadow-2);
  font-size: 15px; line-height: 1.45; color: var(--ink);
  animation: hero-bubble 700ms var(--ease) 1100ms both;
}
.hero__bubble-dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--coral); animation: senpai-pulse 1.8s var(--ease) 2s infinite; }
.hero__pick {
  position: absolute; right: -4%; top: 12%;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: var(--shadow-1);
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  animation: hero-bubble 700ms var(--ease) 1400ms both;
}
.hero__faces { display: flex; }
.hero__faces img {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 20%;
  background: var(--lav); box-shadow: 0 0 0 2px var(--surface);
}
.hero__faces img + img { margin-left: -10px; }
@keyframes hero-sun { from { opacity: 0; transform: scale(.4) translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes hero-bubble { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- why ---------- */
.why { padding-block: clamp(48px, 8vw, 112px); display: grid; gap: clamp(32px, 5vw, 64px); }
.why__head { display: grid; gap: var(--s-4); max-width: 760px; }
.why__facts { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.fact { display: grid; gap: var(--s-4); padding-top: var(--s-5); border-top: 1px solid rgba(36,21,43,.18); }
.fact--offset { margin-top: clamp(0px, 8vw, 96px); }
.fact__num {
  font-family: var(--font-display); font-size: clamp(88px, 13vw, 176px); line-height: .85;
  letter-spacing: -0.05em; color: var(--ink);
}
.fact__num small { font-size: .42em; letter-spacing: 0; vertical-align: top; margin-left: .04em; }
.fact__num--coral { color: var(--coral-ink); font-style: italic; }
.fact figcaption { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 40ch; }

/* ---------- who ---------- */
.who { position: relative; isolation: isolate; overflow: hidden; background: var(--lav); border-radius: var(--r-xl); margin-inline: clamp(8px, 2vw, 24px); }
/* the blob is positioned against the full-bleed band, not the inner column, so it never shows a hard edge */
.who__inner.shape-host { position: static; overflow: visible; }
.who__inner { display: grid; gap: var(--s-5); padding-block: clamp(56px, 9vw, 120px); }
.who__blob { --size: clamp(220px, 34vw, 440px); right: -8%; top: -30%; opacity: .7; }
.who__quote {
  font-family: var(--font-display); font-size: clamp(28px, 4.2vw, 56px); line-height: 1.12; letter-spacing: -0.025em;
  max-width: 22ch; text-wrap: balance;
}

/* ---------- what it does ---------- */
.does { padding-block: clamp(64px, 10vw, 136px); display: grid; gap: clamp(32px, 5vw, 64px); }
.does__head { display: grid; gap: var(--s-4); max-width: 720px; }
.does__head em { font-style: italic; color: var(--coral-ink); }
.sequence { display: grid; gap: 0; counter-reset: beat; }
.beat {
  position: relative;
  display: grid; grid-template-columns: 88px minmax(0, 1fr) 180px; gap: clamp(16px, 3vw, 40px); align-items: center;
  padding-block: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line);
}
.beat:last-child { border-bottom: 1px solid var(--line); }
.beat--right { padding-left: clamp(0px, 8vw, 120px); }
.beat__n { font-family: var(--font-display); font-style: italic; font-size: 40px; color: var(--muted); line-height: 1; transition: color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.beat__body { display: grid; gap: var(--s-2); max-width: 54ch; }
.beat__body p { color: var(--ink-2); }
.beat__body h3 { transition: transform var(--dur-2) var(--ease); }
.beat:hover .beat__n { color: var(--coral-ink); transform: translateX(4px); }
.beat:hover .beat__body h3 { transform: translateX(6px); }
.beat:hover .beat__motif { transform: rotate(-3deg) scale(1.04); }

.beat__motif {
  justify-self: end; width: 160px; height: 96px; border-radius: var(--r-l);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--bg-2); color: var(--ink);
  transition: transform var(--dur-3) var(--ease);
}
.motif-wave i { width: 6px; border-radius: 3px; background: var(--ink); animation: wave 1.2s ease-in-out infinite; }
.motif-wave i:nth-child(1) { height: 18px; }
.motif-wave i:nth-child(2) { height: 38px; animation-delay: -.2s; }
.motif-wave i:nth-child(3) { height: 54px; animation-delay: -.4s; background: var(--coral); }
.motif-wave i:nth-child(4) { height: 30px; animation-delay: -.6s; }
.motif-wave i:nth-child(5) { height: 16px; animation-delay: -.8s; }
.motif-point { position: relative; background: var(--lav); }
.motif-point::before { content: ""; position: absolute; left: 22px; right: 22px; top: 30px; height: 8px; border-radius: 4px; background: rgba(36,21,43,.15); box-shadow: 0 18px 0 rgba(36,21,43,.15), 0 36px 0 rgba(36,21,43,.1); }
.motif-point i { position: absolute; left: 50%; top: 40px; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 8px rgba(242,107,78,.22); animation: point 3s var(--ease) infinite; }
.motif-draw { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.motif-draw svg { width: 120px; height: 60px; stroke-dasharray: 220; stroke-dashoffset: 220; }
.beat.in .motif-draw svg { animation: draw 2.4s var(--ease) 300ms forwards; }
.motif-goal { position: relative; background: var(--coral-soft); }
.motif-goal i { width: 56px; height: 56px; border-radius: 50%; border: 6px solid var(--coral); border-right-color: rgba(242,107,78,.25); border-bottom-color: rgba(242,107,78,.25); transform: rotate(-45deg); }
.motif-faces { background: var(--lav); }
.motif-faces i { display: block; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--lav-2); box-shadow: 0 0 0 3px var(--lav); }
.motif-faces i:nth-child(2) { background: var(--coral-soft); }
.motif-faces i + i { margin-left: -14px; }
.motif-faces img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
@keyframes wave { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
@keyframes point { 0%, 100% { transform: translate(-40px, -12px); } 40% { transform: translate(14px, 6px); } 70% { transform: translate(-6px, 24px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- closing ---------- */
.closing { padding-bottom: clamp(48px, 8vw, 96px); }
.closing__panel {
  display: grid; justify-items: start; gap: var(--s-5);
  padding: clamp(40px, 7vw, 96px);
  border-radius: var(--r-xl) var(--r-xl) var(--r-xl) 120px;
  background: var(--ink); color: var(--bg);
}
.closing__arch { --size: clamp(180px, 24vw, 300px); right: 6%; bottom: -30%; opacity: .95; transform: rotate(8deg); }
.closing__title { font-family: var(--font-display); color: var(--bg); font-size: clamp(36px, 5.6vw, 76px); line-height: 1; letter-spacing: -0.03em; max-width: 14ch; }
.closing__title em { font-style: italic; color: #FFB4A2; }
.closing__text { color: rgba(251,246,238,.78); font-size: 18px; max-width: 40ch; }
.closing .btn:focus-visible { outline-color: var(--bg); }

/* ---------- footer ---------- */
.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5);
  padding-block: var(--s-6) var(--s-7); border-top: 1px solid var(--line); font-size: 15px;
}
.site-foot a { margin-left: auto; color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; }
.site-foot a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__stage { width: min(78%, 360px); margin-top: var(--s-5); }
  .why__facts { grid-template-columns: 1fr; }
  .fact--offset { margin-top: 0; }
  .beat { grid-template-columns: 56px minmax(0, 1fr); }
  .beat--right { padding-left: 0; }
  .beat__motif { grid-column: 2; justify-self: start; width: 140px; height: 80px; }
  .beat__n { font-size: 32px; align-self: start; }
}
@media (max-width: 520px) {
  .hero__stage { width: 82%; margin-left: 8%; }
  .hero__bubble { left: -10%; max-width: 210px; font-size: 14px; padding: 12px 14px; }
  .hero__pick { right: -8%; top: 4%; font-size: 12px; }
  .hero__actions .btn { width: 100%; }
  .beat { grid-template-columns: 1fr; gap: var(--s-3); }
  .beat__motif { grid-column: auto; }
  .site-foot a { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title .line > span, .hero__stage, .hero__sun, .hero__bubble, .hero__pick, .hero__avatar { animation: none !important; opacity: 1; transform: none; }
  .motif-wave i, .motif-point i, .hero__bubble-dot { animation: none !important; }
  .motif-draw svg { stroke-dashoffset: 0; }
  .beat:hover .beat__n, .beat:hover .beat__body h3, .beat:hover .beat__motif { transform: none; }
}

/* Three figures in the "why" section, and the line that sums them up. */
@media (min-width: 900px) { .why__facts--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.why__sum { max-width: 62ch; }
