/* ============================================================
   Landing v39 — Cal AI hero phone + Cal.com idea tiles
   Loaded after landing.css + v36–v38
   ============================================================ */

/* ---------- Hero: Cal AI — one big real phone ---------- */
.hero--v36 .hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 28px;
}

/* Bare device: no outer mockup card. UI fills the glass. */
.phone-frame.phone-frame--bare,
.phone-frame--bare {
  width: min(300px, 72vw);
  margin: 0 auto;
  padding: 10px;
  border-radius: 44px;
  border: 1px solid rgba(15, 15, 15, 0.12);
  background: #0f0f0f;
  /* Soft ground shadow — readable first, not heavy SaaS chrome */
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 18px 40px -18px rgba(16, 24, 40, 0.28),
    0 40px 64px -28px rgba(16, 24, 40, 0.18);
  position: relative;
}

/* Dynamic Island */
.phone-frame--bare::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 26px;
  border-radius: 999px;
  background: #0a0a0a;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.phone-frame--bare img,
.phone-frame--bare video,
.hero-phone .hero-quote-video,
.hero-phone .hero-quote-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 34px;
  border: 0;
  background: #fff;
}

/* Hero phone slightly larger on desktop */
@media (min-width: 981px) {
  .hero--v36 .phone-frame--bare.hero-phone {
    width: min(320px, 100%);
  }
}

/* ---------- How it works: Cal.com idea tiles ---------- */
/* One idea per card. UI fragment in card — NOT nested phone frames. */
.how-section--tiles .how-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 36px;
}

.how-steps--tiles {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
}

.how-step--tile {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  background: var(--canvas);
  /* Structure = 1px border + soft radius; shadow almost flat */
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  min-height: 100%;
}

.how-step--tile .how-step-copy {
  padding: 20px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.how-step--tile .how-num {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 4px;
  box-shadow: none;
  place-items: unset;
}

.how-step--tile .how-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.how-step--tile .how-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* UI fragment: large enough to read labels — crop to top idea zone */
.how-ui-tile {
  position: relative;
  margin: 0 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  /* Tall enough that UI text is readable, not a crushed full screenshot */
  height: 240px;
}

.how-ui-tile img {
  position: absolute;
  left: 50%;
  top: 0;
  width: 118%;
  max-width: none;
  height: auto;
  display: block;
  /* Center horizontally so labels aren't clipped; crop bottom chrome only */
  transform: translateX(-50%);
  object-fit: cover;
  object-position: top center;
  border: 0;
  border-radius: 0;
  pointer-events: none;
  user-select: none;
}

/* Per-step vertical bias — show the idea, not empty chrome */
.how-ui-tile--quote img {
  top: -8px;
  width: 120%;
}
.how-ui-tile--jobs img {
  top: -4px;
  width: 120%;
}
.how-ui-tile--paid img {
  top: -4px;
  width: 120%;
}

/* Soft fade at bottom of fragment so crop feels intentional */
.how-ui-tile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(to top, #fff, transparent);
  pointer-events: none;
}

/* ---------- Features: bare phone, large, light structure ---------- */
.feature-panel-visual .phone-frame--bare {
  width: min(280px, 70vw);
  padding: 9px;
  border-radius: 40px;
}

.feature-panel-visual .phone-frame--bare::before {
  top: 16px;
  width: 84px;
  height: 24px;
}

.feature-panel-visual .phone-frame--bare img {
  border-radius: 32px;
}

/* Stage stays closed-grid but quieter so product UI carries voltage */
.feature-stage {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero--v36 .phone-frame--bare.hero-phone {
    width: min(280px, 78vw);
  }

  .how-steps--tiles {
    grid-template-columns: 1fr;
    max-width: 420px;
    gap: 14px;
  }

  .how-step--tile {
    /* Override v37 row layout for old rail steps */
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
  }

  .how-ui-tile {
    height: 210px;
  }
}

@media (max-width: 720px) {
  .phone-frame--bare {
    width: min(270px, 82vw);
    padding: 9px;
    border-radius: 40px;
  }

  .phone-frame--bare::before {
    top: 16px;
    width: 80px;
    height: 24px;
  }

  .phone-frame--bare img,
  .phone-frame--bare video {
    border-radius: 31px;
  }

  .how-step--tile .how-step-copy {
    padding: 16px 16px 12px;
  }

  .how-ui-tile {
    margin: 0 12px 12px;
    height: 190px;
  }

  .how-ui-tile img,
  .how-ui-tile--quote img,
  .how-ui-tile--jobs img,
  .how-ui-tile--paid img {
    width: 112%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .how-ui-tile img {
    position: absolute;
    left: 0;
    top: 0;
    transform: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }
}
