/* ========================================
   SierraBay Health App — landing section (#app) + app.html page
   Self-contained: delete this file, app.html and the APP-marked blocks in index.html to revert.
   ======================================== */

/* --- Store buttons --- */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 18px;
  background: var(--gray-900);
  color: var(--white);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.store-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.store-btn i {
  font-size: 1.7rem;
}

.store-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-btn small {
  font-size: 0.68rem;
  opacity: 0.75;
}

.store-btn strong {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 700;
}

/* ========================================
   DEVICE MOCKUPS (pure CSS, no images)
   ======================================== */
.phone {
  position: relative;
  width: 260px;
  height: 536px;
  border-radius: 42px;
  background: var(--gray-900);
  padding: 10px;
  box-shadow: 0 30px 70px rgba(12, 45, 72, 0.35), inset 0 0 0 2px #334155;
  flex-shrink: 0;
}

.phone::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 22px;
  border-radius: 20px;
  background: var(--gray-900);
  z-index: 3;
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 33px;
  overflow: hidden;
  background: var(--gray-50);
  font-family: var(--font-body);
  color: var(--gray-800);
  display: flex;
  flex-direction: column;
}

.scr-status {
  display: flex;
  justify-content: space-between;
  padding: 14px 22px 0;
  font-size: 0.66rem;
  font-weight: 600;
  height: 40px;
}

.scr-status i {
  margin-left: 4px;
}

.scr-head {
  padding: 6px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scr-head h5 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--blue-900);
}

.scr-head i {
  color: var(--gray-400);
  font-size: 0.9rem;
}

.scr-body {
  flex: 1;
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.scr-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 10px 6px 16px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  font-size: 0.95rem;
  color: var(--gray-400);
}

.scr-tabbar .on {
  color: var(--accent);
}

/* SOS screen */
.scr-sos .scr-map {
  position: relative;
  height: 150px;
  border-radius: 16px;
  background:
    linear-gradient(rgba(33, 150, 243, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgba(33, 150, 243, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(135deg, var(--blue-100), #e0f7f4);
  display: grid;
  place-items: center;
}

.scr-pin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 0 6px rgba(33, 150, 243, 0.25), 0 0 0 14px rgba(33, 150, 243, 0.1);
}

.scr-loc {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 0.62rem;
  font-weight: 600;
  background: var(--white);
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.scr-loc i {
  color: var(--blue-500);
  margin-right: 4px;
}

.scr-sos-btn {
  align-self: center;
  width: 104px;
  height: 104px;
  margin: 6px 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  background: radial-gradient(circle at 35% 30%, #f87171, var(--danger));
  box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.15), 0 0 0 20px rgba(239, 68, 68, 0.07), 0 10px 25px rgba(239, 68, 68, 0.45);
  animation: appSosPulse 2s infinite;
}

@keyframes appSosPulse {

  0%,
  100% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.15), 0 0 0 20px rgba(239, 68, 68, 0.07), 0 10px 25px rgba(239, 68, 68, 0.45);
  }

  50% {
    box-shadow: 0 0 0 14px rgba(239, 68, 68, 0.12), 0 0 0 28px rgba(239, 68, 68, 0.04), 0 10px 25px rgba(239, 68, 68, 0.45);
  }
}

.scr-chips {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.scr-chips span {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
}

.scr-chips .sel {
  background: #fef3c7;
  border-color: var(--warning);
  color: #92400e;
}

.scr-track {
  background: var(--white);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}

.scr-track p {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.scr-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.scr-steps::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 66%, var(--gray-200) 66%);
}

.scr-steps span {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.5rem;
  font-weight: 600;
  color: var(--gray-400);
  width: 25%;
}

.scr-steps span::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray-200);
  border: 2px solid var(--white);
}

.scr-steps .done {
  color: var(--accent-dark);
}

.scr-steps .done::before {
  background: var(--accent);
}

.scr-steps .now::before {
  background: var(--white);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.25);
}

/* Hospitals screen */
.scr-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  font-size: 0.68rem;
  color: var(--gray-400);
}

.scr-hosp {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.scr-hosp-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.scr-hosp div {
  flex: 1;
  min-width: 0;
}

.scr-hosp strong {
  display: block;
  font-size: 0.7rem;
  color: var(--blue-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scr-hosp small {
  font-size: 0.58rem;
  color: var(--gray-500);
}

.scr-tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.scr-tags em {
  font-style: normal;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 191, 166, 0.12);
  color: var(--accent-dark);
}

.scr-tags em.icu {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.scr-hosp-act {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scr-hosp-act i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.55rem;
  background: var(--gray-100);
  color: var(--blue-600);
}

/* Membership card screen */
.scr-card {
  position: relative;
  border-radius: 18px;
  padding: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-900), var(--blue-600) 60%, var(--accent));
  box-shadow: 0 12px 25px rgba(12, 45, 72, 0.35);
  overflow: hidden;
  min-height: 150px;
}

.scr-card::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.scr-card img {
  height: 18px;
  width: auto;
  margin-bottom: 18px;
}

.scr-card small {
  display: block;
  font-size: 0.5rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.7;
}

.scr-card b {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.scr-card-row {
  display: flex;
  justify-content: space-between;
}

.scr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  font-size: 0.66rem;
  font-weight: 600;
}

.scr-row i {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.scr-row span {
  flex: 1;
}

.scr-row em {
  font-style: normal;
  font-size: 0.56rem;
  color: var(--success);
}

/* Watch */
.watch {
  position: relative;
  width: 138px;
  height: 166px;
  border-radius: 40px;
  background: var(--gray-900);
  padding: 9px;
  box-shadow: 0 20px 45px rgba(12, 45, 72, 0.4), inset 0 0 0 2px #334155;
  flex-shrink: 0;
}

.watch::before,
.watch::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 34px;
  background: #1e293b;
  z-index: -1;
}

.watch::before {
  top: -26px;
  border-radius: 14px 14px 0 0;
}

.watch::after {
  bottom: -26px;
  border-radius: 0 0 14px 14px;
}

.watch-crown {
  position: absolute;
  right: -6px;
  top: 46px;
  width: 7px;
  height: 22px;
  border-radius: 3px;
  background: #475569;
}

.watch-screen {
  height: 100%;
  border-radius: 32px;
  background: #000;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-heading);
}

.watch-sos {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.95rem;
  background: radial-gradient(circle at 35% 30%, #f87171, var(--danger));
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.2);
  animation: appSosPulse 2s infinite;
}

.watch-vitals {
  display: flex;
  gap: 10px;
  font-size: 0.6rem;
  font-weight: 700;
}

.watch-vitals i {
  color: var(--danger);
  margin-right: 3px;
}

.watch-vitals span + span i {
  color: var(--blue-400);
}

/* ========================================
   LANDING SECTION (#app in index.html)
   ======================================== */
.app-promo {
  background:
    radial-gradient(circle at 15% 50%, rgba(0, 191, 166, 0.1), transparent 45%),
    linear-gradient(180deg, var(--white), var(--gray-50));
  overflow: hidden;
}

.app-promo-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.app-devices {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 20px 0 40px;
}

.app-devices::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-200), var(--accent-light));
  opacity: 0.55;
}

.app-devices .watch {
  position: absolute;
  bottom: 30px;
  left: calc(50% + 70px);
}

.app-promo-content h2 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.app-promo-content h2 span {
  color: var(--accent);
}

.app-promo-content > p {
  font-size: 1.08rem;
  color: var(--gray-500);
  margin-bottom: 28px;
}

.app-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.app-point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.app-point i {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(0, 191, 166, 0.1);
  color: var(--accent-dark);
}

.app-point.sos i {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.app-point p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.app-point strong {
  display: block;
  font-family: var(--font-heading);
  color: var(--blue-900);
  font-size: 0.95rem;
}

.app-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--blue-700);
}

.app-more i {
  transition: transform var(--transition-fast);
}

.app-more:hover i {
  transform: translateX(5px);
}

/* ========================================
   APP PAGE (app.html)
   ======================================== */
.app-hero {
  position: relative;
  padding: 150px 0 110px;
  background:
    radial-gradient(circle at 80% 30%, rgba(0, 191, 166, 0.25), transparent 40%),
    linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 100%);
  color: var(--white);
  overflow: hidden;
}

.app-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
  align-items: center;
}

.app-hero .section-label {
  color: var(--accent-light);
  background: rgba(0, 191, 166, 0.15);
}

.app-hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 20px;
}

.app-hero h1 span {
  color: var(--accent);
}

.app-hero-content > p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 32px;
  max-width: 540px;
}

.app-hero .store-btn {
  background: var(--white);
  color: var(--gray-900);
}

.app-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 28px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
}

.app-hero-meta i {
  color: var(--accent);
  margin-right: 6px;
}

.app-hero .app-devices::before {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

/* Features */
.app-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.app-feature {
  padding: 32px 28px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.app-feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.app-feature-ic {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 20px;
  background: rgba(0, 191, 166, 0.1);
  color: var(--accent-dark);
}

.app-feature.sos .app-feature-ic {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.app-feature h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

.app-feature p {
  font-size: 0.93rem;
  color: var(--gray-500);
  line-height: 1.65;
}

/* Screens showcase */
.app-screens {
  background: var(--gray-50);
}

.app-screens-row {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.app-screen-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.app-screen-item h4 {
  margin-top: 26px;
  font-size: 1.05rem;
}

.app-screen-item > p {
  font-size: 0.9rem;
  color: var(--gray-500);
  max-width: 260px;
}

/* Watch band */
.app-watch {
  background: linear-gradient(135deg, var(--gray-900), var(--blue-900));
  color: var(--white);
}

.app-watch-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 80px;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.app-watch .watch {
  transform: scale(1.35);
  margin: 40px 30px;
}

.app-watch h2 {
  color: var(--white);
  font-size: 2.3rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.app-watch-grid > div > p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
}

.app-watch .section-label {
  color: var(--accent-light);
  background: rgba(0, 191, 166, 0.15);
}

.app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.app-chips span {
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.app-chips i {
  margin-right: 6px;
  color: var(--accent);
}

/* Steps */
.app-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  counter-reset: appstep;
  list-style: none;
}

.app-step {
  position: relative;
  padding: 34px 28px 28px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.app-step::before {
  counter-increment: appstep;
  content: counter(appstep);
  position: absolute;
  top: -22px;
  left: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 6px 18px rgba(0, 191, 166, 0.4);
}

.app-step h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.app-step p {
  font-size: 0.93rem;
  color: var(--gray-500);
}

/* Security */
.app-security {
  background: var(--gray-50);
}

.app-security-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.app-sec {
  text-align: center;
  padding: 28px 20px;
}

.app-sec i {
  font-size: 1.6rem;
  color: var(--blue-600);
  margin-bottom: 14px;
}

.app-sec h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.app-sec p {
  font-size: 0.88rem;
  color: var(--gray-500);
}

/* Final CTA */
.app-cta {
  padding: 0 0 100px;
  background: var(--gray-50);
}

.app-cta-box {
  border-radius: var(--radius-xl);
  padding: 56px;
  text-align: center;
  color: var(--white);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.15), transparent 35%),
    linear-gradient(135deg, var(--accent-dark), var(--blue-700));
}

.app-cta-box h2 {
  color: var(--white);
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.app-cta-box p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 28px;
}

.app-cta-box .store-buttons {
  justify-content: center;
}

.app-cta-box .store-btn {
  background: var(--white);
  color: var(--gray-900);
}

.nav a.nav-app i {
  margin-right: 6px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {

  .app-promo-grid,
  .app-hero-grid {
    grid-template-columns: 1fr;
  }

  .app-promo-content,
  .app-hero-content {
    text-align: center;
  }

  .app-promo-content .store-buttons,
  .app-hero .store-buttons,
  .app-hero-meta {
    justify-content: center;
  }

  .app-hero-content > p {
    margin-left: auto;
    margin-right: auto;
  }

  .app-points {
    text-align: left;
  }

  .app-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-security-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-screens-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .app-promo-content h2 {
    font-size: 2rem;
  }

  .app-hero {
    padding: 120px 0 80px;
  }

  .app-hero h1 {
    font-size: 2.3rem;
  }

  .app-points,
  .app-features,
  .app-steps {
    grid-template-columns: 1fr;
  }

  .app-steps {
    gap: 40px;
  }

  .app-watch-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .app-watch .watch {
    margin: 50px auto;
  }

  .app-chips {
    justify-content: center;
  }

  .app-screens-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -24px;
    padding: 0 24px 20px;
    gap: 24px;
  }

  .app-screen-item {
    scroll-snap-align: center;
  }

  .app-cta-box {
    padding: 40px 24px;
  }

  .app-cta-box h2 {
    font-size: 1.7rem;
  }
}

@media (max-width: 480px) {
  .app-devices .watch {
    left: auto;
    right: 0;
    transform: scale(0.85);
    transform-origin: bottom right;
  }

  .app-devices::before {
    width: 300px;
    height: 300px;
  }

  .app-security-grid {
    grid-template-columns: 1fr;
  }

  .store-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {

  .scr-sos-btn,
  .watch-sos {
    animation: none;
  }
}

/* REGISTER: account links */
.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.app-cta-box .reg-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

@media (max-width: 1024px) {
  .app-links {
    justify-content: center;
  }
}
