/*
 * Landing page styles (main/index.html). Shared tokens and components come
 * from /shared/theme.css; this file only holds what is unique to the home page.
 */

/* Utilities toggled by the page script (store badges in the hero) */
.hidden { display: none !important; }
.flex { display: flex; }

/* ---------- Hero ---------- */
.home-hero {
  position: relative;
  padding-bottom: 0;
  overflow: hidden; /* the animation's SVG intentionally overhangs the viewport */
}

.store-cta {
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.store-cta img,
.store-badges img {
  display: block;
  height: 52px;
  width: auto;
}

.store-cta a,
.store-badges a {
  transition: transform 140ms ease, opacity 140ms ease;
}

.store-cta a:hover,
.store-badges a:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* Full-bleed waveform -> transcript animation (driven by hero-motion.js) */
.hero-motion {
  width: 100vw;
  margin: 24px calc(50% - 50vw) 0;
}

.secondanim {
  position: relative;
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.secondanim .stream-region {
  position: absolute;
  top: 50%;
  height: 300px;
  overflow: visible;
  transform: translateY(-50%);
}

.secondanim .left-stream {
  left: 0;
  width: 40%;
  overflow: visible;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 82%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 82%, transparent 100%);
}

.secondanim .right-stream {
  right: 0;
  width: 60%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 18%, black 92%, transparent 100%);
}

.secondanim .waveform-stream {
  position: absolute;
  top: 50%;
  left: 0;
  width: calc(100% + 84px);
  height: 66px;
  display: flex;
  align-items: center;
  overflow: hidden;
  transform: translateY(-50%);
}

.secondanim .waveform-track {
  display: flex;
  align-items: center;
  gap: 3px;
  will-change: transform;
}

.secondanim .waveform-bar {
  width: 4px;
  flex: 0 0 4px;
  border-radius: 2px;
  background: #c9c8c4;
}

.secondanim .stream-svg {
  width: calc(100% + 84px);
  height: 300px;
  max-width: none;
  display: block;
  overflow: visible;
}

.secondanim .curve-path {
  fill: none;
}

.secondanim .processed-ribbon {
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 25px;
}

.secondanim .stream-text {
  font-size: 0.85rem;
  letter-spacing: 0;
}

.secondanim .processed-text {
  fill: #1d4f86;
  font-weight: 500;
}

/* ---------- Stats ---------- */
.stats {
  margin-top: 56px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  text-align: center;
}

.stat__value {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat__value .material-symbols-outlined {
  font-size: 1.6rem;
  color: var(--accent);
}

.stat__label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Showcase carousel ---------- */
.showcase-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.showcase-head .section-head {
  margin: 0;
}

.carousel-controls {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 120ms ease;
}

.icon-btn:hover {
  background: var(--bg-hover);
}

.showcase-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 max(24px, calc((100vw - var(--container)) / 2)) 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.showcase-track::-webkit-scrollbar {
  display: none;
}

.showcase-card {
  flex: 0 0 300px;
  padding: 14px 14px 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  scroll-snap-align: center;
}

.showcase-card > h3 {
  margin: 20px 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.showcase-card > p {
  margin: 6px 8px 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

/* Dark app screen mock-ups: they depict the app UI, so they keep its palette */
.device {
  --d-bg: #242e3a;
  --d-raised: #1c232c;
  --d-text: #f1f5f9;
  --d-muted: #94a3b8;
  --d-accent: #9dc6e8;
  --d-line: rgba(51, 65, 85, 0.6);

  position: relative;
  aspect-ratio: 9 / 19;
  overflow: hidden;
  border-radius: 14px;
  background: var(--d-bg);
  color: var(--d-text);
  box-shadow: 0 1px 2px rgba(15, 15, 15, 0.08), 0 12px 32px rgba(15, 15, 15, 0.12);
}

.device .material-symbols-outlined {
  color: inherit;
}

.device__fill {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.device__pad {
  padding: 24px;
}

/* Card 1: recording */
.rec-wave {
  margin-top: auto;
  overflow: hidden;
  border-radius: 2rem;
  background: var(--d-raised);
}

.rec-wave img {
  display: block;
  width: 100%;
  height: auto;
}

.rec-timer {
  margin-top: 32px;
  padding: 0 24px;
  text-align: center;
  font-size: 3.1rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.rec-controls {
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding: 0 24px 40px;
}

.rec-button {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #ff5a54;
  box-shadow: 0 0 32px rgba(255, 90, 84, 0.22);
  animation: record-dim 1.4s ease-in-out infinite;
}

.pause-bars {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pause-bars span {
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: #6a0f12;
}

@keyframes record-dim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.96); }
}

/* Card 2: transcription */
.transcript {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bubble {
  padding: 12px;
  border: 1px solid var(--d-line);
  border-radius: 8px;
  background: var(--d-raised);
}

.bubble__meta {
  margin-bottom: 4px;
  color: var(--d-accent);
  font-size: 0.75rem;
}

.bubble__text {
  font-size: 0.875rem;
  line-height: 1.45;
}

.bubble--live {
  border-color: rgba(157, 198, 232, 0.4);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.bubble--live .bubble__meta {
  color: #7f8ea3;
}

.skeleton {
  height: 12px;
  border-radius: 4px;
  background: rgba(157, 198, 232, 0.2);
}

.skeleton + .skeleton {
  margin-top: 8px;
}

@keyframes pulse {
  50% { opacity: 0.5; }
}

/* Card 3: AI note */
.note {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 700;
}

.note__head .material-symbols-outlined {
  color: var(--d-accent);
}

.note__title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.note__body {
  font-size: 0.75rem;
  line-height: 1.6;
}

.note__bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.75rem;
}

.note__bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.note__bullet::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 6px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--d-accent);
}

.note__actions {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(75, 91, 113, 0.3);
  border-radius: 8px;
  background: #222a35;
}

.note__actions-label {
  margin-bottom: 8px;
  color: var(--d-accent);
  font-size: 10px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.note__task {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
  font-size: 0.75rem;
}

.note__task + .note__task {
  margin-top: 8px;
}

.note__task .material-symbols-outlined {
  font-size: 0.875rem;
  color: var(--d-accent);
}

.note__task--done span:last-child {
  text-decoration: line-through;
  opacity: 0.8;
}

/* Card 4: editor */
.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.time-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 16px;
  background: var(--d-raised);
  font-size: 0.875rem;
  font-weight: 500;
}

.time-pill b {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
}

.editor-wave img {
  display: block;
  width: 100%;
  height: auto;
}

.editor-progress {
  margin-top: 24px;
  padding: 0 12px;
}

.editor-progress__bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(75, 91, 113, 0.6);
}

.editor-progress__bar span {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: 999px;
  background: #8ec5ff;
}

.editor-progress__times {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--d-muted);
  font-size: 0.875rem;
}

.editor-controls {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 16px;
}

.editor-tool {
  width: 80px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 1.75rem;
  background: rgba(75, 91, 113, 0.7);
  color: var(--d-text);
}

.editor-play {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  margin: 0 24px;
  border: 0;
  border-radius: 999px;
  background: #8ec5ff;
  box-shadow: 0 0 32px rgba(142, 197, 255, 0.18);
}

.editor-play .pause-bars span {
  width: 10px;
  height: 32px;
  background: #12345a;
}

/* ---------- Feature bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.bento__main {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
  padding: 40px;
}

.bento__side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bento__side .card {
  flex: 1;
}

.bento__wide {
  grid-column: span 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.feature .icon-tile {
  margin-bottom: 20px;
}

.feature h3 {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.feature p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.6;
}

.bento__main h3 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.bento__main p {
  max-width: 620px;
  margin-top: 12px;
  font-size: 1.1rem;
  line-height: 1.65;
}

.bento__main .chip-row {
  margin-top: 32px;
}

.bento__main .chip {
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ---------- Use cases ---------- */
.use-case {
  padding: 28px;
}

.use-case__emoji {
  margin-bottom: 16px;
  font-size: 2rem;
  line-height: 1;
}

.use-case h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.use-case p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Reviews marquee ---------- */
.reviews-marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.reviews-track {
  display: flex;
  width: max-content;
  gap: 20px;
  padding: 4px 0 8px;
  animation: reviews-marquee 60s linear infinite;
  will-change: transform;
}

.reviews-marquee:hover .reviews-track {
  animation-play-state: paused;
}

.review-card {
  width: min(22rem, calc(100vw - 4rem));
  min-height: 13rem;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.review-stars {
  color: #e9a23b;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.review-quote {
  color: var(--text-2);
  font-size: 0.98rem;
  line-height: 1.65;
}

.review-meta {
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 500;
}

@keyframes reviews-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 10px)); }
}

/* ---------- Ask AI ---------- */
.ai-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.ai-actions .btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ---------- Download box ---------- */
.download-box {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 56px;
  padding: 48px;
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
}

.qr {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr__code {
  width: 100%;
  max-width: 200px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.qr__code img {
  display: block;
  width: 100%;
  height: auto;
}

.qr__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.qr__hint .material-symbols-outlined {
  font-size: 1.1rem;
}

.download-box h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.download-box p {
  max-width: 520px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .bento {
    grid-template-columns: 1fr;
  }

  .bento__main,
  .bento__wide {
    grid-column: auto;
  }

  .bento__main {
    min-height: 0;
    padding: 28px;
  }

  .download-box {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 24px;
    text-align: center;
  }

  .download-box p {
    margin-inline: auto;
  }

  .store-badges {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }

  .showcase-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .bento__wide {
    grid-template-columns: 1fr;
  }

  .store-cta img,
  .store-badges img {
    height: 48px;
  }
}
