/* ============================================================
   HomeView.css — Premium home page styles
   ============================================================ */

.home-container {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem calc(5rem + env(safe-area-inset-bottom));
  gap: 2.5rem;
  animation: fadeInUp 0.7s ease-out;
}

/* ── Header ─────────────────────────────────────────────── */
.home-header {
  text-align: center;
  max-width: 34rem;
}

.home-logo {
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.9rem;
}

.home-logo::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin: 0.85rem auto 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  border-radius: 2px;
}

.home-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.55;
}

/* ── Card Grid ──────────────────────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  width: 100%;
  max-width: 54rem;
}

/* ── Base Card ──────────────────────────────────────────── */
.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 2rem 1.75rem 1.6rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.home-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
  pointer-events: none;
}

.home-card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow:
    0 16px 40px rgba(28, 25, 23, 0.14),
    0 4px 12px rgba(28, 25, 23, 0.08);
}

.home-card:hover::before {
  opacity: 1;
}

.home-card:active {
  transform: translateY(-2px) scale(1.005);
}

/* ── Scan Card Accent ───────────────────────────────────── */
.scan-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(240, 253, 250, 0.97) 100%
  );
  border-color: rgba(15, 118, 110, 0.22);
}

.scan-card::before {
  background: radial-gradient(
    ellipse at top left,
    rgba(15, 118, 110, 0.08) 0%,
    transparent 70%
  );
}

.scan-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow:
    0 16px 40px rgba(15, 118, 110, 0.18),
    0 4px 12px rgba(15, 118, 110, 0.12);
}

/* ── Search Card Accent ─────────────────────────────────── */
.search-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(245, 245, 244, 0.97) 100%
  );
}

.search-card:hover {
  border-color: rgba(71, 85, 105, 0.35);
  box-shadow:
    0 16px 40px rgba(28, 25, 23, 0.12),
    0 4px 12px rgba(28, 25, 23, 0.06);
}

/* ── Badge ──────────────────────────────────────────────── */
.card-badge {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
}

/* ── Icon Container ─────────────────────────────────────── */
.card-icon-container {
  position: relative;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon {
  font-size: 2.4rem;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.home-card:hover .card-icon {
  transform: scale(1.18) rotate(-4deg);
}

/* Pulse rings on the Scan card */
.pulse-ring,
.pulse-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(15, 118, 110, 0.4);
  animation: pulse-ring 2.2s ease-out infinite;
  pointer-events: none;
}

.pulse-ring-outer {
  animation-delay: 0.7s;
  border-color: rgba(15, 118, 110, 0.2);
}

@keyframes pulse-ring {
  0%   { transform: scale(0.85); opacity: 0.7; }
  70%  { transform: scale(1.6);  opacity: 0; }
  100% { transform: scale(1.6);  opacity: 0; }
}

/* ── Card Content ───────────────────────────────────────── */
.card-content h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.card-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Card Action Footer ─────────────────────────────────── */
.card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.scan-card .card-action {
  color: var(--primary);
}

.search-card .card-action {
  color: var(--text-muted);
}

.search-card:hover .card-action {
  color: var(--text-main);
}

.action-arrow {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 1.1rem;
}

.home-card:hover .action-arrow {
  transform: translateX(5px);
}

/* ── Footer ─────────────────────────────────────────────── */
.home-footer {
  max-width: 40rem;
  text-align: center;
}

.home-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  opacity: 0.8;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .home-container {
    padding: 1.5rem 1rem calc(6rem + env(safe-area-inset-bottom));
    gap: 1.75rem;
    justify-content: flex-start;
    padding-top: 2.5rem;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-card {
    padding: 1.5rem 1.4rem 1.3rem;
    gap: 0.9rem;
  }

  .card-content h3 {
    font-size: 1.25rem;
  }

  .card-content p {
    font-size: 0.88rem;
  }
}
