/* App hub — Meditation Treks */

.mt-main.mt-app {
  overflow-x: clip;
}

.mt-nav__link--active {
  color: var(--mt-gold-light);
  box-shadow: inset 0 -2px 0 var(--mt-gold);
}

.mt-hero--app .mt-hero__atmosphere-img--app {
  object-position: center 42%;
}

.mt-hero--app .mt-hero__grid,
.mt-hero--app .mt-hero__copy,
.mt-hero--app .mt-hero__device {
  min-width: 0;
}

.mt-hero--app .mt-hero__copy h1,
.mt-hero--app .mt-hero__copy .mt-lead,
.mt-hero--app .mt-hero__copy .mt-proof {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mt-hero--app .mt-hero__actions {
  max-width: 100%;
}

.mt-hero--app .mt-device-frame {
  max-width: min(100%, 260px);
  margin-inline: auto;
}

.mt-hero--app.mt-hero--has-art .mt-hero__atmosphere-scrim--app {
  background:
    linear-gradient(
      90deg,
      rgba(12, 11, 10, 0.92) 0%,
      rgba(12, 11, 10, 0.72) 30%,
      rgba(12, 11, 10, 0.2) 48%,
      rgba(12, 11, 10, 0.35) 70%,
      rgba(12, 11, 10, 0.75) 100%
    ),
    linear-gradient(180deg, rgba(12, 11, 10, 0.4) 0%, transparent 45%, rgba(12, 11, 10, 0.35) 100%);
}

.mt-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/*
 * Hero CTA row: primary + outline store pills must share identical box metrics.
 * Shared class beats homepage `.mt-hero__cta` margin and any badge-like overrides.
 */
.mt-hero__actions .mt-hero__action-btn.mt-btn {
  margin: 0 !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 2.75rem !important;
  min-height: 2.75rem !important;
  max-height: 2.75rem !important;
  padding: 0 1.35rem !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
  letter-spacing: 0.08em !important;
  font-weight: 600 !important;
  border-width: 1px !important;
  border-style: solid !important;
  vertical-align: middle;
}

.mt-hero__actions .mt-hero__action-btn.mt-btn--primary {
  /* Same border width as outline so filled/outline pills share one chrome box. */
  border-color: var(--mt-gold) !important;
  background: linear-gradient(135deg, var(--mt-gold-light), var(--mt-gold)) !important;
  color: var(--mt-bg) !important;
}

.mt-hero__actions .mt-hero__action-btn.mt-btn--outline {
  border-color: var(--mt-gold) !important;
  background: transparent !important;
  color: var(--mt-gold-light) !important;
}

.mt-hero__actions .mt-hero__action-btn.mt-btn--outline:hover,
.mt-hero__actions .mt-hero__action-btn.mt-btn--outline:focus-visible {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: 0 0 0 2px var(--mt-bg), 0 0 0 4px var(--mt-gold);
}

.mt-hero__secondary {
  margin: 0;
}

.mt-store-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* Feature bento */
.mt-app-features {
  padding-block: clamp(3rem, 8vw, 5rem);
  background: linear-gradient(180deg, #0f0e0c, var(--mt-bg));
}

.mt-bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.mt-bento__card {
  background: var(--mt-panel);
  border: 1px solid var(--mt-border);
  border-radius: 1rem;
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.mt-bento__card h3 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.mt-bento__card--large {
  border-color: rgba(212, 181, 106, 0.55);
  min-height: 12rem;
}

.mt-bento__card-body {
  flex: 1;
}

.mt-layer-list {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.mt-layer-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.mt-layer-list__icon {
  flex-shrink: 0;
  display: inline-flex;
  color: var(--mt-gold);
  margin-top: 0.15rem;
}

.mt-layer-list__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.mt-layer-list__label {
  font-size: 0.98rem;
  color: var(--mt-text);
  font-weight: 600;
}

.mt-layer-list__desc {
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--mt-muted);
}

.mt-bento__card-art--waves {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  color: var(--mt-gold);
  opacity: 0.45;
  margin-top: 0.5rem;
}

.mt-bento__crop {
  margin-top: auto;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid rgba(212, 181, 106, 0.2);
  max-height: 140px;
  background: #0a0908;
}

.mt-bento__crop-img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.mt-bento__crop-img--levels {
  object-position: 50% 38%;
}

.mt-bento__crop--guidance {
  max-height: 152px;
}

.mt-bento__crop-img--guidance {
  height: 152px;
  object-fit: cover;
  object-position: center center;
}

.mt-bento__crop--continue {
  max-height: 152px;
}

.mt-bento__crop-img--continue {
  height: 152px;
  object-fit: cover;
  object-position: center center;
}

@media (min-width: 768px) {
  .mt-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
  }

  .mt-bento__card--large {
    grid-row: span 2;
  }

  .mt-bento__crop {
    max-height: 120px;
  }

  .mt-bento__crop-img {
    height: 120px;
  }
}

@media (min-width: 1024px) {
  .mt-bento {
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .mt-bento__card--large {
    grid-row: span 2;
    grid-column: 1;
  }

  .mt-bento__card:nth-child(2) {
    grid-column: 2;
  }

  .mt-bento__card:nth-child(3) {
    grid-column: 3;
  }

  .mt-bento__card:nth-child(4) {
    grid-column: 2 / span 2;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
  }

  .mt-bento__card:nth-child(4) .mt-bento__crop {
    flex: 0 0 min(42%, 200px);
    max-height: none;
    margin-top: 0;
  }

  .mt-bento__card:nth-child(4) .mt-bento__crop-img {
    height: 100px;
  }
}

/* Showcase / comparison */
.mt-app-showcase {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 5.5rem);
  overflow-x: clip;
}

.mt-app-showcase__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(212, 181, 106, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 30%, rgba(22, 20, 18, 0.9), transparent 50%),
    linear-gradient(180deg, var(--mt-bg), #12100e);
  opacity: 0.95;
  pointer-events: none;
}

.mt-app-showcase__grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: center;
  min-width: 0;
}

.mt-app-showcase__device,
.mt-app-showcase__copy {
  min-width: 0;
  max-width: 100%;
}

.mt-app-showcase__copy h2,
.mt-app-comparison__deck {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mt-device-frame--showcase {
  width: min(100%, 280px);
  max-width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}

.mt-app-comparison__deck {
  margin-top: 0.85rem;
  max-width: 48ch;
}

.mt-comparison-table-wrap {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.mt-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: fixed;
}

.mt-comparison-table th,
.mt-comparison-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(212, 181, 106, 0.18);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mt-comparison-table thead th {
  font-family: var(--mt-font-serif);
  font-weight: 500;
  font-size: 1rem;
  color: var(--mt-gold-light);
  border-bottom-color: rgba(212, 181, 106, 0.4);
}

.mt-comparison-table__head-short {
  display: none;
}

.mt-comparison-table tbody th {
  font-weight: 600;
  color: var(--mt-text);
  white-space: nowrap;
}

.mt-comparison-table td {
  color: var(--mt-muted);
}

.mt-comparison-table tbody td:last-child {
  color: var(--mt-text);
}

/* Narrow phones: restack comparison into readable cards (no horizontal overflow). */
@media (max-width: 767px) {
  .mt-comparison-table {
    table-layout: auto;
    font-size: 0.92rem;
  }

  .mt-comparison-table thead {
    display: none;
  }

  .mt-comparison-table tbody,
  .mt-comparison-table tr,
  .mt-comparison-table th,
  .mt-comparison-table td {
    display: block;
    width: 100%;
  }

  .mt-comparison-table tbody tr {
    margin: 0 0 0.85rem;
    padding: 1rem 1.05rem 1.05rem;
    border: 1px solid rgba(212, 181, 106, 0.28);
    border-radius: 0.85rem;
    background: rgba(22, 20, 18, 0.72);
    box-sizing: border-box;
  }

  .mt-comparison-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .mt-comparison-table tbody th {
    white-space: normal;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid rgba(212, 181, 106, 0.22);
    font-family: var(--mt-font-serif);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--mt-gold-light);
  }

  .mt-comparison-table tbody td {
    padding: 0.7rem 0 0;
    border-bottom: none;
  }

  .mt-comparison-table tbody td + td {
    margin-top: 0.55rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(212, 181, 106, 0.12);
  }

  .mt-comparison-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-family: var(--mt-font-sans, inherit);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mt-muted);
  }

  .mt-comparison-table tbody td:last-child {
    color: var(--mt-text);
  }

  .mt-comparison-table tbody td:last-child::before {
    color: var(--mt-gold);
  }
}

/* Compact tablet: keep table, allow wrapping, shorter header. */
@media (min-width: 768px) and (max-width: 1099px) {
  .mt-comparison-table__head-full {
    display: none;
  }

  .mt-comparison-table__head-short {
    display: inline;
  }

  .mt-comparison-table tbody th {
    white-space: normal;
  }

  .mt-comparison-table th,
  .mt-comparison-table td {
    padding: 0.75rem 0.65rem;
    font-size: 0.9rem;
  }
}

.mt-feature-rows {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mt-feature-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.mt-feature-row__icon {
  flex-shrink: 0;
  color: var(--mt-gold);
  display: inline-flex;
}

.mt-feature-row h3 {
  margin-bottom: 0.35rem;
  font-size: 1.25rem;
}

.lucide-icon,
.mt-icon {
  display: block;
  color: inherit;
}

.mt-icon--decorative {
  opacity: 0.55;
}

@media (min-width: 900px) {
  .mt-app-showcase__grid {
    grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 4vw, 3.5rem);
  }

  .mt-device-frame--showcase {
    width: min(100%, 320px);
    margin-inline: 0;
  }
}

/* Principles */
.mt-app-principles {
  position: relative;
  padding-block: clamp(3rem, 8vw, 5rem);
  overflow-x: clip;
}

.mt-app-principles__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(212, 181, 106, 0.12), transparent 55%),
    linear-gradient(180deg, #12100e, var(--mt-bg));
  opacity: 0.85;
  pointer-events: none;
}

.mt-app-principles .mt-container {
  position: relative;
}

.mt-principles {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.mt-principles__item {
  text-align: center;
  padding: 1.25rem 1rem;
}

.mt-principles__icon {
  display: inline-flex;
  color: var(--mt-gold);
  margin-bottom: 0.75rem;
}

.mt-principles__item h3 {
  font-size: 1.35rem;
}

@media (min-width: 768px) {
  .mt-principles {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

/* Interstitial */
.mt-app-interstitial {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  border-block: 1px solid rgba(212, 181, 106, 0.12);
  background: rgba(22, 20, 18, 0.45);
}

.mt-app-interstitial__quote {
  margin: 0;
  font-family: var(--mt-font-serif);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-weight: 500;
  color: var(--mt-text);
  max-width: 28ch;
  margin-inline: auto;
  line-height: 1.25;
}

/* Final CTA */
.mt-app-cta {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 5.5rem);
  overflow-x: clip;
  scroll-margin-top: 5rem;
}

.mt-app-cta:focus {
  outline: none;
}

.mt-app-cta__glow {
  position: absolute;
  left: 10%;
  top: 20%;
  width: min(70vw, 420px);
  height: min(70vw, 420px);
  background: radial-gradient(circle, rgba(240, 217, 160, 0.22), transparent 68%);
  filter: blur(40px);
  pointer-events: none;
}

.mt-app-cta__grid {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
}

.mt-device-frame--compact {
  width: min(100%, 200px);
  margin-inline: auto;
}

.mt-app-cta__copy {
  text-align: center;
}

.mt-app-cta__store-ctas {
  margin-top: 1.25rem;
  justify-content: center;
}

.mt-app-cta__btn {
  margin-top: 1.25rem;
}

.mt-app-cta__soon,
.mt-app-cta__note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--mt-muted);
  max-width: 36ch;
}

@media (min-width: 900px) {
  .mt-app-cta__grid {
    grid-template-columns: minmax(200px, 0.45fr) minmax(0, 1fr);
    gap: 3rem;
  }

  .mt-app-cta__copy {
    text-align: left;
  }

  .mt-app-cta__store-ctas {
    justify-content: flex-start;
  }

  .mt-device-frame--compact {
    margin-inline: 0;
  }
}
