/* The light lives below the frame. The book remains the brightest object. */
.hero {
  position: relative;
  isolation: isolate;
  height: auto;
  min-height: max(780px, 100svh);
  overflow: hidden;
  background: var(--dark);
  color: var(--dark-ink);
}
.hearth-atmosphere, .hearth-fallback, #hearth-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hearth-atmosphere { z-index: -1; overflow: hidden; }
.hearth-fallback {
  background:
    radial-gradient(ellipse 48% 20% at 73% 110%, #e8b15cd4 0%, #d952246b 40%, transparent 80%),
    radial-gradient(ellipse 70% 55% at 74% 115%, #e34d364d 0%, #e34d3612 55%, transparent 90%);
}
#hearth-canvas { opacity: 0; transition: opacity 1s; }
.hearth-ready #hearth-canvas { opacity: 1; }
.hero-inner.wrap {
  position: relative;
  width: min(1240px, calc(100% - 112px));
  min-height: inherit;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 70px;
  padding: 120px 0 80px;
  text-align: left;
}
.hero-copy { position: relative; z-index: 2; padding-bottom: 16px; }
.hero h1 {
  font-size: clamp(72px, 6.75vw, 98px);
  line-height: 1.01;
  letter-spacing: -.045em;
  font-weight: 400;
  margin: 0 0 30px;
  text-wrap: balance;
}
.hero h1 .hero-accent { color: var(--dark-ember); }
.hero-description {
  max-width: 445px;
  color: #bdc3cc;
  font-size: 20px;
  line-height: 1.7;
  text-wrap: pretty;
}
.hero .store-buttons { justify-content: flex-start; margin-top: 34px; gap: 14px; }
.hero-product {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-bottom: 28px;
}
.hero-device {
  position: relative;
  aspect-ratio: 1470 / 3000;
  height: clamp(552px, calc(100svh - 230px), 780px);
  max-width: 100%;
  transform: none;
  filter: drop-shadow(12px 24px 18px #0005) drop-shadow(0 50px 40px #0005);
  /* Contain overlays without flattening the genuine hardware artwork. */
  isolation: isolate;
}
.hero-device-screen {
  position: absolute;
  left: 5.10204082%;
  top: 2.2%;
  width: 89.79591837%;
  height: 95.6%;
  background: #15181d;
  mask-image: url('assets/iphone-17-pro-max-mask.png');
  mask-size: 100% 100%;
  mask-mode: luminance;
  border-radius: 10% / 4.6%;
  overflow: hidden;
  -webkit-mask-image: url('assets/iphone-17-pro-max-mask.png');
  -webkit-mask-size: 100% 100%;
}
#hero-video { display: block; width: 100%; height: 100%; object-fit: fill; }
.hero-device-frame, .hero-device-reflection {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
}
.hero-device-frame { z-index: 1; }
.hero-device-reflection {
  z-index: 2;
  filter: sepia(1) saturate(3) hue-rotate(342deg) brightness(1.1);
  mask-image: linear-gradient(transparent 48%, #0009 78%, #000 100%);
  -webkit-mask-image: linear-gradient(transparent 48%, #0009 78%, #000 100%);
  opacity: .8;
}
.hero-motion {
  position: absolute;
  bottom: -28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 17px;
  border: 1px solid #ffffff29;
  border-radius: 24px;
  color: #e5d9d1;
  background: #15181d60;
  backdrop-filter: blur(12px);
  font-size: 13px;
  line-height: 1.4;
  transition: background .2s, border-color .2s;
}
.hero-motion:hover { background: #15181da6; border-color: #ffffff60; }
.hero-motion svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-motion .resume-symbol { display: none; }
.hero-motion[aria-pressed=true] .resume-symbol { display: block; }
.hero-motion[aria-pressed=true] .pause-symbol { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 1700px) {
  .hero-inner.wrap { width: min(1440px, calc(100% - 160px)); gap: 120px; }
  .hero h1 { font-size: 114px; }
  .hero-description { font-size: 22px; max-width: 495px; }
}
@media (max-width: 1100px) {
  .hero-inner.wrap { width: calc(100% - 72px); gap: 36px; }
  .hero h1 { font-size: 75px; }
  .hero-description { font-size: 19px; }

}
@media (max-width: 800px) {
  .hero { min-height: 0; }
  .hero-inner.wrap {
    width: calc(100% - 48px);
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 46px;
    padding: 132px 0 100px;
    text-align: center;
  }
  .hero-copy { padding: 0; margin-inline: auto; }
  .hero h1 { font-size: clamp(57px, 10vw, 80px); margin-bottom: 22px; }
  .hero-description { max-width: 470px; margin-inline: auto; font-size: 19px; line-height: 1.65; }
  .hero .store-buttons { justify-content: center; gap: 12px; margin-top: 27px; }
  .hero-device { height: auto; width: min(290px, 70vw); transform: none; }
  .hero-product { padding-bottom: 22px; }
  .hearth-fallback { background: radial-gradient(ellipse 85% 35% at 50% 105%, #e8b15cb3, #e34d3640 45%, transparent 90%); }
}
@media (max-width: 420px) {
  .hero-inner.wrap { width: calc(100% - 40px); padding-top: 120px; gap: 38px; }
  .hero h1 { font-size: 56px; }
  .hero-description { font-size: 18px; }
  .hero .store-buttons { gap: 9px; }
  .hero .store-badge.apple, .hero .store-badge.apple img { width: 148px; height: 50px; }
  .hero .store-badge.google { width: 166px; height: 50px; }
  .hero .store-badge.google img { width: 192px; }
}
@media (max-width: 350px) {
  .hero h1 { font-size: 47px; }
  .hero-description { font-size: 17px; }
  .hero .store-buttons { gap: 6px; }
  .hero .store-badge.apple, .hero .store-badge.apple img { width: 129px; height: 44px; }
  .hero .store-badge.google { width: 147px; height: 44px; }
  .hero .store-badge.google img { width: 168px; }
}

.hero-preview-controls { position: absolute; bottom: -28px; display: flex; gap: 10px; }
.hero-preview-controls .hero-motion { position: static; }
.preview-dialog { padding: 0; width: auto; max-width: calc(100vw - 32px); max-height: calc(100svh - 32px); border: 1px solid #ffffff30; border-radius: 18px; background: var(--dark); color: var(--dark-ink); overflow: hidden; }
.preview-dialog::backdrop { background: #0d1013e6; backdrop-filter: blur(18px); }
.preview-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 16px; font-size: 14px; }
.preview-dialog-close { border: 0; color: inherit; background: #ffffff10; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; }
.preview-dialog video { display: block; width: auto; height: min(1050px, calc(100svh - 94px)); max-width: calc(100vw - 34px); object-fit: contain; margin: auto; }
