/* ============================================================
   Skyfield showcase page — phone frame + features, on the
   Atsumi paper theme (inherits styles.css variables).
   ============================================================ */

.sky-hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 9vh, 6rem) clamp(1.2rem, 5vw, 3rem) clamp(2rem, 6vh, 4rem);
  display: grid; grid-template-columns: 1fr 0.96fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.crumb { color: var(--ink-3); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.crumb:hover { color: var(--shu-deep); border-color: var(--shu-deep); }

.sky-hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3rem, 8vw, 5.4rem); line-height: 1; letter-spacing: -0.03em;
  margin: 0.6rem 0 0.8rem;
}
.sky-tagline {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.25; letter-spacing: -0.01em;
  color: var(--ink); max-width: 22ch; margin-bottom: 1.2rem;
}
.sky-lede { color: var(--ink-2); font-size: clamp(1rem, 1.5vw, 1.12rem); max-width: 50ch; }

.sky-cta { margin: 1.8rem 0 1.6rem; }
.badge-soon {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em;
  color: var(--shu-deep); background: var(--shu-soft);
  border: 1px solid rgba(216,71,43,0.3); border-radius: 999px;
  padding: 0.5rem 1rem;
}
.badge-soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--shu); box-shadow: 0 0 0 0 rgba(216,71,43,0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(216,71,43,0.45);} 70% { box-shadow: 0 0 0 8px rgba(216,71,43,0);} 100% { box-shadow: 0 0 0 0 rgba(216,71,43,0);} }

.badge-live {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em;
  color: #2f7d4f; background: rgba(47,125,79,0.1);
  border: 1px solid rgba(47,125,79,0.34); border-radius: 999px;
  padding: 0.5rem 1rem;
}
.badge-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34d27b; box-shadow: 0 0 0 0 rgba(52,210,123,0.6); animation: pulse-live 2s infinite; }
@keyframes pulse-live { 0% { box-shadow: 0 0 0 0 rgba(52,210,123,0.5);} 70% { box-shadow: 0 0 0 8px rgba(52,210,123,0);} 100% { box-shadow: 0 0 0 0 rgba(52,210,123,0);} }

.sky-points { list-style: none; display: grid; gap: 0.7rem; margin-top: 0.5rem; }
.sky-points li { position: relative; padding-left: 1.5rem; color: var(--ink-2); }
.sky-points li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; background: var(--shu); border-radius: 2px; transform: rotate(45deg);
}
.sky-points b { color: var(--ink); font-weight: 700; }

/* ── phone frame ── */
.phone-wrap { position: relative; display: grid; place-items: center; }
.phone {
  position: relative; z-index: 2;
  width: clamp(280px, 38vw, 396px); aspect-ratio: 9 / 19;
  background: #0a0e1a;
  border-radius: 44px;
  padding: 10px;
  border: 1px solid rgba(33,27,22,0.25);
  box-shadow:
    0 2px 4px rgba(33,27,22,0.4) inset,
    0 34px 70px -28px rgba(10,14,26,0.7),
    0 12px 30px -18px rgba(33,27,22,0.5);
  transform: rotate(1.5deg);
  transition: transform 0.5s cubic-bezier(.2,.7,.3,1);
}
.phone:hover { transform: rotate(0deg) translateY(-6px); }
.phone-notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 36%; height: 26px; background: #0a0e1a; border-radius: 0 0 16px 16px; z-index: 3;
}
.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 34px; overflow: hidden; background: #0a0e1a;
  /* force a compositing layer so the rounded corners clip the <iframe>
     from the start (otherwise the iframe's square corners poke out until
     a repaint is triggered, e.g. on hover). */
  transform: translateZ(0);
  isolation: isolate;
}
.screen-poster { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.screen-fade {
  position: absolute; inset: auto 0 0 0; height: 22%; z-index: 2;
  background: linear-gradient(to top, #0a0e1a 8%, rgba(10,14,26,0.0));
  transition: opacity 0.6s ease;
}
/* live app iframe — sits above the poster, fades in once loaded */
.screen-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; border-radius: 34px; z-index: 1; opacity: 0; transition: opacity 0.7s ease;
  background: #0a0e1a;
}
.phone-screen.is-live .screen-frame { opacity: 1; z-index: 3; }
.phone-screen.is-live .screen-poster { opacity: 0; }
.phone-screen.is-live .screen-fade { opacity: 0; }

/* "live" indicator pill */
.live-pill {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: rgba(10,14,26,0.55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 999px;
  padding: 0.25rem 0.55rem; opacity: 0; transform: translateY(-4px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s; pointer-events: none;
}
.phone-screen.is-live .live-pill { opacity: 1; transform: none; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #34d27b; box-shadow: 0 0 0 0 rgba(52,210,123,0.6); animation: livedot 1.8s infinite; }
@keyframes livedot { 0% { box-shadow: 0 0 0 0 rgba(52,210,123,0.5);} 70% { box-shadow: 0 0 0 6px rgba(52,210,123,0);} 100% { box-shadow: 0 0 0 0 rgba(52,210,123,0);} }
.phone-glow {
  position: absolute; z-index: 1; width: 78%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(216,71,43,0.22), transparent 68%);
  filter: blur(20px);
}

/* ── nowcast spotlight (dark band that echoes the app) ── */
.sky-spotlight {
  max-width: var(--maxw); margin: clamp(1rem, 4vh, 3rem) auto;
  padding: 0 clamp(1.2rem, 5vw, 3rem);
}
.spot-inner {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(216,71,43,0.16), transparent 55%),
    radial-gradient(90% 90% at 0% 100%, rgba(54,120,210,0.18), transparent 60%),
    #0a0e1a;
  color: #eaf0ff;
  border-radius: 26px;
  padding: clamp(2rem, 5vw, 3.6rem);
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  box-shadow: 0 30px 70px -34px rgba(10,14,26,0.7);
}
.spot-eyebrow {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #ff7a5e;
}
.sky-spotlight h2 {
  font-family: var(--serif); font-weight: 500; color: #fff;
  font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.04; letter-spacing: -0.02em;
  margin: 0.7rem 0 1.1rem;
}
.spot-copy p { color: rgba(234,240,255,0.74); max-width: 52ch; margin-bottom: 0.9rem; }
.spot-copy strong { color: #fff; font-weight: 600; }
.spot-quote {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: #9fd0ff !important; max-width: none !important;
}
.spot-foot { font-size: 0.92rem; }

/* radar motif */
.radar {
  position: relative; justify-self: center;
  width: clamp(180px, 22vw, 250px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(54,120,210,0.12), rgba(10,14,26,0) 70%);
}
.radar-rings span {
  position: absolute; inset: 0; margin: auto; border: 1px solid rgba(159,208,255,0.22); border-radius: 50%;
}
.radar-rings span:nth-child(1) { width: 100%; height: 100%; }
.radar-rings span:nth-child(2) { width: 66%; height: 66%; }
.radar-rings span:nth-child(3) { width: 33%; height: 33%; }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(95,184,255,0.35), rgba(95,184,255,0) 55%);
  -webkit-mask: radial-gradient(circle, transparent 12%, #000 13%);
          mask: radial-gradient(circle, transparent 12%, #000 13%);
  animation: sweep 4.5s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }
/* a storm cell drifting toward the centre (you), with a motion trail */
.radar-cell {
  position: absolute; top: 22%; left: 70%;
  width: 16%; height: 16%; border-radius: 50%;
  background: radial-gradient(circle, #ff7a5e, rgba(255,122,94,0) 70%);
  animation: drift 6s ease-in-out infinite;
}
.radar-motion {
  position: absolute; top: 28%; left: 58%; width: 26%; height: 2px;
  background: linear-gradient(90deg, rgba(255,122,94,0), #ff7a5e);
  transform: rotate(33deg); transform-origin: left center; opacity: 0.7;
  animation: drift 6s ease-in-out infinite;
}
.radar-dot {
  position: absolute; inset: 0; margin: auto; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.15), 0 0 12px rgba(159,208,255,0.8);
}
@keyframes drift {
  0%   { top: 22%; left: 70%; opacity: 0.5; }
  60%  { opacity: 1; }
  100% { top: 44%; left: 50%; opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) {
  .radar-sweep, .radar-cell, .radar-motion { animation: none; }
}

/* ── features ── */
.sky-features {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) clamp(1.2rem, 5vw, 3rem) clamp(3rem, 8vh, 6rem);
}
.feat-grid {
  margin-top: 2.6rem;
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feat {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 1.6rem 1.5rem;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), border-color .3s;
}
.feat:hover { transform: translateY(-4px); border-color: rgba(216,71,43,0.35); }
.feat-mark {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border-radius: 10px; background: var(--shu-soft); color: var(--shu-deep);
  font-size: 1.25rem; margin-bottom: 0.9rem;
}
.feat h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; margin-bottom: 0.35rem; letter-spacing: -0.01em; }
.feat p { color: var(--ink-2); font-size: 0.95rem; }

.sky-attribution {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 0.85rem; max-width: 60ch;
}

/* ── footer ── */
.sky-foot {
  border-top: 1px solid var(--line);
  max-width: var(--maxw); margin: 0 auto;
  padding: 2.4rem clamp(1.2rem, 5vw, 3rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
}
.sky-foot-brand { display: flex; align-items: center; gap: 0.7rem; }
.sky-foot-brand .seal { font-size: 1.1rem; }
.sky-foot-brand strong { font-family: var(--serif); font-size: 1.05rem; display: block; }
.sky-foot-brand span { font-size: 0.82rem; color: var(--ink-3); }
.sky-foot-nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.sky-foot-nav a { font-size: 0.9rem; color: var(--ink-2); transition: color .2s; }
.sky-foot-nav a:hover { color: var(--shu-deep); }
.sky-foot .copy { width: 100%; font-size: 0.8rem; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 1.2rem; margin-top: 0.4rem; }

@media (max-width: 860px) {
  .sky-hero { grid-template-columns: 1fr; }
  .phone-wrap { order: -1; margin-bottom: 1rem; }
  .spot-inner { grid-template-columns: 1fr; }
  .radar { order: -1; }
}
