/* ============================================================
   Top Hat Maintenance — app.css
   The Top Hat app: the phone that plays real app footage, the
   home hero's split layout, the home teaser, and the /app page.
   ============================================================ */

/* ---------- Device --------------------------------------------------
   A screen recording (video or image) under a real device frame.
   The frame PNG is transparent in its screen hole; its body hides
   the video's square corners. Numbers come from the frame geometry
   (body 1288 x 2704, screen 1206 x 2622 at 41,41, corner radius 162),
   so they must change together with /img/app/phone-frame.png.
   -------------------------------------------------------------------- */
.device {
  position: relative; margin: 0;
  width: var(--device-w, 340px);
  aspect-ratio: 1288 / 2704;
  filter: drop-shadow(0 50px 70px rgba(0,0,0,0.55)) drop-shadow(0 10px 24px rgba(0,0,0,0.35));
}
.device-screen {
  position: absolute; left: 3.183%; top: 1.516%; width: 93.634%; height: 96.967%;
  overflow: hidden; border-radius: 13.43% / 6.18%; background: #07111b;
}
.device-screen video, .device-screen img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.device-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none;
}
/* A soft pool of gold behind a device, so it sits in light rather than on flat navy. */
.device-glow { position: relative; display: grid; place-items: center; }
.device-glow::before {
  content: ""; position: absolute; inset: -12% -30%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(199,154,78,0.22), rgba(199,154,78,0.06) 55%, transparent 75%);
  filter: blur(10px);
}
.device-float { animation: deviceFloat 7s ease-in-out infinite alternate; }
@keyframes deviceFloat {
  from { transform: translate3d(0, -6px, 0); }
  to   { transform: translate3d(0, 8px, 0); }
}

/* Small caption under a device: what the loop is showing. */
.device-caption {
  margin-top: 26px; text-align: center; color: var(--text-dim); font-size: 0.86rem; font-weight: 300;
  letter-spacing: 0.02em;
}
.device-caption b { color: var(--text); font-weight: 500; }

/* ---------- "New" pill ---------- */
.pill-new {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 7px 16px 7px 8px; border-radius: 999px;
  background: rgba(17,36,54,0.72); border: 1px solid var(--line-gold);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--text); font-size: 0.86rem; font-weight: 400;
  transition: border-color .3s var(--ease), transform .4s var(--ease);
}
.pill-new:hover { border-color: var(--gold); transform: translateY(-2px); }
.pill-new .tag {
  background: var(--gold); color: #1a1204; font-weight: 600; font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
}
.pill-new .arrow { color: var(--gold); transition: transform .3s var(--ease); }
.pill-new { max-width: 100%; }
@media (max-width: 480px) { .pill-new .long { display: none; } }
.pill-new:hover .arrow { transform: translateX(3px); }

/* ---------- Home hero, split ----------------------------------------
   Desktop: the pitch on the left, the app live on the right. Below
   1024px it goes back to the centred stack and the phone follows the
   buttons.
   -------------------------------------------------------------------- */
.hero--split .container { text-align: left; }
.hero-split {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center; gap: clamp(40px, 5vw, 88px);
}
.hero--split .hero-crest { margin: 0 0 22px; height: 92px; }
.hero--split .hero-title { margin: 0 0 22px; max-width: 13ch; font-size: clamp(2.8rem, 5.4vw, 5.4rem); }
.hero--split .lead { margin: 0 0 34px; text-align: left; max-width: 560px; }
.hero--split .hero-actions { justify-content: flex-start; }
.hero-device { display: flex; flex-direction: column; align-items: center; }
.hero-device .device { --device-w: min(350px, calc((100svh - 230px) * 0.4763)); }
.hero--home .pill-new { animation-delay: 0.1s; }
.hero--home .hero-device { animation-delay: 0.7s; }

@media (max-width: 1023px) {
  .hero--split .container { text-align: center; }
  .hero-split { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .hero--split .hero-crest { margin: 0 auto 20px; }
  .hero--split .hero-title { margin: 0 auto 20px; max-width: 16ch; }
  .hero--split .lead { margin: 0 auto 30px; text-align: center; }
  .hero--split .hero-actions { justify-content: center; }
  .hero-device .device { --device-w: min(300px, 72vw); }
}

/* ---------- Home: app teaser ---------- */
.app-teaser { position: relative; overflow: hidden; }
.app-teaser::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 480px at 50% 100%, rgba(199,154,78,0.10), transparent 65%);
}
.app-teaser .container { position: relative; }
.teaser-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 70px;
  align-items: end;
}
.teaser-row .teaser-item { display: flex; flex-direction: column; align-items: center; }
.teaser-row .device { --device-w: min(270px, 100%); }
.teaser-row .teaser-item:nth-child(2) .device { --device-w: min(300px, 100%); }
.teaser-item h3 { font-size: 1.12rem; margin-top: 30px; margin-bottom: 8px; text-align: center; }
.teaser-item p { color: var(--text-dim); font-size: 0.94rem; font-weight: 300; text-align: center; max-width: 30ch; }
@media (max-width: 900px) {
  .teaser-row { grid-template-columns: 1fr; gap: 72px; }
  .teaser-row .device, .teaser-row .teaser-item:nth-child(2) .device { --device-w: min(270px, 70vw); }
}

/* ---------- /app page ---------- */
.app-hero { position: relative; overflow: hidden; padding: 72px 0 110px; }
.app-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(760px 460px at 72% 30%, rgba(199,154,78,0.14), transparent 64%),
    radial-gradient(640px 420px at 12% 0%, rgba(199,154,78,0.07), transparent 62%);
}
.app-hero .container { position: relative; }
.app-hero h1 { font-size: clamp(2.7rem, 5.2vw, 5rem); letter-spacing: -0.04em; line-height: 1.0; margin-bottom: 22px; max-width: 12ch; }
.app-hero .lead { margin-bottom: 34px; }
.app-hero .hero-actions { justify-content: flex-start; }
.app-hero .fine { margin-top: 22px; color: var(--text-dimmer); font-size: 0.86rem; font-weight: 300; }
.app-hero .fine a { color: var(--gold); }

.checks { list-style: none; margin: 30px 0 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; color: var(--text-dim); font-weight: 300; font-size: 1rem; line-height: 1.6; }
.checks li b { color: var(--text); font-weight: 500; }
.checks svg { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--gold); }

/* A feature row: copy on one side, the app on the other, alternating. */
.app-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 7vw, 120px);
  align-items: center;
}
.app-row + .app-row { margin-top: 150px; }
.app-row.flip .app-copy { order: 2; }
.app-row .app-media { display: flex; justify-content: center; }
.app-row .device { --device-w: min(340px, 78vw); }
.app-copy h2 { margin-bottom: 20px; max-width: 16ch; }
.app-copy > p { color: var(--text-dim); font-size: 1.08rem; font-weight: 300; line-height: 1.75; max-width: 520px; }

/* Everything included */
.included { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 60px; }
.included .inc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px;
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}
.included .inc:hover { transform: translateY(-4px); border-color: var(--line-gold); }
.inc .inc-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(199,154,78,0.1); color: var(--gold); margin-bottom: 18px; }
.inc .inc-ico svg { width: 22px; height: 22px; }
.inc h3 { font-size: 1.06rem; margin-bottom: 8px; }
.inc p { color: var(--text-dim); font-size: 0.93rem; font-weight: 300; }

/* The film */
.film { position: relative; margin: 60px auto 0; max-width: 1180px; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line-gold); background: #000; aspect-ratio: 16 / 9;
  box-shadow: 0 60px 120px rgba(0,0,0,0.5); }
.film video, .film img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.film-play {
  position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; border: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.45)); color: var(--text);
  font-family: var(--font);
  align-content: end; padding-bottom: 8%;   /* below the poster's title, not on it */
}
.film-play .disc {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(199,154,78,0.92); color: #1a1204; box-shadow: 0 18px 50px rgba(0,0,0,0.45);
  transition: transform .4s var(--ease), background .3s var(--ease);
}
.film-play:hover .disc { transform: scale(1.07); background: var(--gold-bright); }
.film-play .disc svg { width: 34px; height: 34px; margin-left: 5px; }
.film-play .film-label { position: absolute; left: 32px; bottom: 26px; text-align: left; }
.film-play .film-label b { display: block; font-size: 1.2rem; font-weight: 600; }
.film-play .film-label span { color: var(--text-dim); font-size: 0.9rem; font-weight: 300; }
.film.playing .film-play { display: none; }

/* Questions */
.faq { max-width: 860px; margin: 56px auto 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 26px 4px; font-size: 1.1rem; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.5rem; font-weight: 300; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-dim); font-weight: 300; line-height: 1.75; padding: 0 4px 26px; max-width: 70ch; }
.faq details p a { color: var(--gold); }

@media (max-width: 1023px) {
  .app-hero { padding-top: 40px; text-align: center; }
  .app-hero h1, .app-hero .lead { margin-left: auto; margin-right: auto; }
  .app-hero .hero-actions { justify-content: center; }
  .app-hero .checks { max-width: 520px; margin-left: auto; margin-right: auto; text-align: left; }
  .app-row, .app-row.flip { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .app-row.flip .app-copy { order: 0; }
  .app-row + .app-row { margin-top: 110px; }
  .app-copy { text-align: center; }
  .app-copy h2, .app-copy > p { margin-left: auto; margin-right: auto; }
  .app-copy .checks { max-width: 520px; margin-left: auto; margin-right: auto; text-align: left; }
  .included { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .included { grid-template-columns: 1fr; }
  .film { border-radius: 14px; }
  .film-play .disc { width: 70px; height: 70px; }
  .film-play .film-label { left: 18px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .device-float { animation: none; }
}
