/* ==========================================================================
   MNHS — Midsalip National High School Attendance Monitoring System
   LIGHT MODE — Color palette from logo (red, gold, green, white, black)
   ========================================================================== */

:root {
  /* Logo palette */
  --mnhs-red: #b91c1c;
  --mnhs-red-dark: #991b1b;
  --mnhs-red-light: rgba(185, 28, 28, 0.12);
  --mnhs-gold: #d4af37;
  --mnhs-gold-light: rgba(212, 175, 55, 0.15);
  --mnhs-green: #166534;
  --mnhs-green-light: rgba(22, 101, 52, 0.12);
  --mnhs-white: #ffffff;
  --mnhs-dark: #1a1a1a;
  --mnhs-text: #374151;
  --mnhs-text-muted: #6b7280;
  --mnhs-bg: #fafafa;
  --mnhs-bg-card: #ffffff;
  --mnhs-border: rgba(0, 0, 0, 0.08);

  /* Fluid typography — uniform scale for all modules (better view across devices) */
  --text-base: clamp(0.8125rem, 0.8rem + 0.18vw, 0.875rem);
  --text-sm: clamp(0.75rem, 0.72rem + 0.12vw, 0.8125rem);
  --text-xs: clamp(0.6875rem, 0.65rem + 0.12vw, 0.75rem);
  --text-lg: clamp(0.9375rem, 0.9rem + 0.3vw, 1.0625rem);
  --text-xl: clamp(1.0625rem, 1rem + 0.5vw, 1.25rem);
  --text-2xl: clamp(1.25rem, 1.1rem + 1vw, 1.5rem);
  --text-3xl: clamp(1.375rem, 1.2rem + 1.25vw, 2.25rem);
  --text-hero: clamp(1.375rem, 3.5vw + 0.85rem, 2.5rem);
  /* Table/cell content — same as xs for uniform density */
  --text-table: var(--text-xs);

  /* Spacing — flexible */
  --space-page: clamp(1rem, 4vw, 2.5rem);
  --space-section: clamp(2rem, 6vw, 4rem);
  --space-page-x: clamp(1.5rem, 5vw, 4rem);
  --content-max: 1200px;

  /* Breakpoints — iPad Pro 1024×1366: tablets (768px–1366px) use same desktop layout */
  --breakpoint-tablet: 1024px;
  --breakpoint-mobile: 767px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  margin: 0;
  color: var(--mnhs-text);
  background: var(--mnhs-bg);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  background: var(--mnhs-bg);
  color: var(--mnhs-text);
  overflow-x: hidden;
}

/* Eyebrow */
.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: clamp(0.5625rem, 1.35vw, 0.65rem);
  font-weight: 600;
  color: var(--mnhs-red) !important;
}

.section-header .eyebrow {
  color: var(--mnhs-red) !important;
}

/* --------------------------------------------------------------------------
   Header — Light
   -------------------------------------------------------------------------- */
.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  padding: 1rem 0;
  z-index: 1000;
  width: 100%;
  transition: background 0.35s ease, border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.header.scrolled {
  position: fixed;
  background: var(--mnhs-white);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid var(--mnhs-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 2vw, 2rem);
  margin: 0 auto;
  padding: 0 var(--space-page-x);
  max-width: var(--content-max);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--mnhs-dark);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.brand:hover {
  opacity: 0.9;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand p {
  margin: 0;
  font-weight: 700;
  font-size: clamp(0.75rem, 0.7rem + 0.35vw, 0.875rem);
  line-height: 1.2;
  color: var(--mnhs-dark);
}

.brand .eyebrow {
  font-size: clamp(0.4375rem, 0.45rem + 0.2vw, 0.5rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--mnhs-red);
  margin-bottom: 0.125rem;
  display: block;
}

.nav-menu-wrapper {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  font-weight: 500;
}

.nav-links a,
.nav-link {
  color: var(--mnhs-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-link:hover {
  color: var(--mnhs-red);
}

.nav-links a.active,
.nav-link.active {
  color: var(--mnhs-red);
  font-weight: 600;
  background: rgba(185, 28, 28, 0.08);
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.5rem, 1vw, 0.625rem) clamp(1rem, 2vw, 1.5rem);
  background: var(--mnhs-red);
  border: 1px solid var(--mnhs-red);
  border-radius: 0.5rem;
  color: var(--mnhs-white);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.login-btn:hover {
  background: var(--mnhs-red-dark);
  border-color: var(--mnhs-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(185, 28, 28, 0.3);
}

.nav-toggle {
  display: none;
}
.nav-overlay {
  display: none;
}

/* --------------------------------------------------------------------------
   Hero — Light + logo palette
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: calc(3rem + 56px) 0 2.5rem;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--mnhs-border);
  background: transparent;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
}

/* Hero background image — clean, visible, balanced */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../img/hero-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  filter: brightness(0.88) contrast(1.08) saturate(1.05);
}

/* Clean overlay — soft fade left (readable text) to transparent right (image visible) */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 255, 255, 0.42) 35%,
    rgba(255, 255, 255, 0.18) 60%,
    rgba(255, 255, 255, 0.04) 85%,
    transparent 100%
  );
}

.hero-bg-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(
      circle at 18% 25%,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 45%
    ),
    radial-gradient(
      circle at 85% 75%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(185, 28, 28, 0.04) 0%,
      transparent 55%
    );
  opacity: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(0.5rem, 1.5vw, 1rem) var(--space-page-x);
  width: 100%;
}

/* Hero main content — upgraded design */
.hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 380px;
}

.hero-main-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 34rem;
}

/* Hero copy block — eyebrow, heading, description */
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-eyebrow {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  font-size: clamp(0.5375rem, 1.05vw, 0.625rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mnhs-red);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(185, 28, 28, 0.25);
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 0.25rem;
  box-shadow: 0 2px 8px rgba(185, 28, 28, 0.08);
}

.hero-content h1,
.hero-heading {
  font-size: var(--text-hero);
  margin: 0;
  color: var(--mnhs-dark);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.hero-heading {
  display: inline-block;
}

.hero-heading .text-accent {
  color: var(--mnhs-red);
  font-weight: 800;
}

.hero-heading-end {
  white-space: nowrap;
  display: inline;
}

.hero-heading .hero-heading-icon {
  display: inline-block;
  vertical-align: middle;
  white-space: normal;
  margin-left: 0.5rem;
  color: var(--mnhs-red);
  width: clamp(2rem, 4vw, 3rem);
  height: clamp(2rem, 4vw, 3rem);
  animation: speedPulse 2s ease-in-out infinite;
}

@keyframes speedPulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.1) rotate(5deg);
    opacity: 0.9;
  }
}

/* Hero description block — upgraded card */
.hero-description-block {
  margin: 0;
  padding: 1.25rem 1.5rem;
  max-width: min(30rem, 100%);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(185, 28, 28, 0.06);
  position: relative;
  overflow: hidden;
}

.hero-description-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--mnhs-red), var(--mnhs-gold));
  border-radius: 4px 0 0 4px;
  opacity: 0.9;
}

.hero-description-lead {
  margin: 0 0 0.5rem;
  padding-left: 0.75rem;
  font-size: clamp(0.8125rem, 0.9vw + 0.35rem, 0.9375rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--mnhs-dark);
  letter-spacing: 0.01em;
}

.hero-description-support {
  margin: 0;
  padding-left: 0.75rem;
  font-size: clamp(0.75rem, 0.8vw + 0.2rem, 0.875rem);
  line-height: 1.65;
  color: var(--mnhs-text-muted);
  letter-spacing: 0.01em;
}

/* Legacy description (if used elsewhere) */
.hero-description,
.hero-content .description {
  margin: 0 0 1.5rem;
  max-width: 28rem;
  font-size: clamp(0.9375rem, 1.35vw + 0.35rem, 1rem);
  line-height: 1.7;
  color: var(--mnhs-text-muted);
  padding-left: 1.25rem;
  position: relative;
}

.hero-description::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  bottom: 0.4em;
  width: 3px;
  background: linear-gradient(180deg, var(--mnhs-red), var(--mnhs-gold));
  border-radius: 2px;
  opacity: 0.7;
}

.hero-content .description {
  padding-left: 1.25rem;
}

/* Hero CTA — upgraded spacing and hierarchy */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.25rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(0.75rem, 1.5vw, 1.25rem);
}

.btn {
  padding: clamp(0.75rem, 1.5vw, 0.9rem) clamp(1.25rem, 2.5vw, 1.8rem);
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: "Poppins", sans-serif;
}

.btn.primary {
  background: var(--mnhs-red);
  color: var(--mnhs-white);
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.3);
}

.btn.primary .btn-icon {
  transition: transform 0.25s ease;
}

.btn.primary:hover {
  transform: translateY(-3px);
  background: var(--mnhs-red-dark);
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.35);
}

.btn.primary:hover .btn-icon {
  transform: translateX(4px);
}

.btn.primary:focus-visible {
  outline: 2px solid var(--mnhs-red-dark);
  outline-offset: 2px;
}

.btn.ghost {
  border-color: var(--mnhs-text);
  color: var(--mnhs-text);
  background: transparent;
}

.btn.ghost:hover {
  background: var(--mnhs-red-light);
  border-color: var(--mnhs-red);
  color: var(--mnhs-red);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.btn-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.btn.primary .btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn.ghost:hover .btn-icon {
  transform: translateX(3px);
}

/* Hero card (phone mockup) — Light frame */
.hero-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: radial-gradient(
    circle at center,
    rgba(185, 28, 28, 0.08) 0%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: -1;
  opacity: 0.8;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
}

.hero-card-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(
    circle,
    rgba(185, 28, 28, 0.1) 0%,
    transparent 60%
  );
  border-radius: 50%;
  z-index: 0;
}

/* Phone mockup — normal size, premium frame */
.hero-phone-mockup {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 400px;
  background: linear-gradient(165deg, #4b5563 0%, #1f2937 35%, #111827 100%);
  border-radius: 28px;
  padding: 10px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06), 0 0 0 3px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 48px -12px rgba(0, 0, 0, 0.35), 0 0 40px rgba(185, 28, 28, 0.12);
}

.hero-phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
  border-radius: 0 0 14px 14px;
  z-index: 2;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.hero-phone-screen {
  width: 100%;
  height: 100%;
  background: #fafbfc;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   Skeleton UI — base
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-avatar {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-text {
  display: block;
  height: 0.75em;
  border-radius: 4px;
}

.skeleton-pill {
  display: inline-block;
  width: 56px;
  height: 18px;
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Phone app — Refined + skeleton theme
   -------------------------------------------------------------------------- */
.phone-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px 14px;
  font-size: 7px;
  font-family: "Poppins", sans-serif;
}

.phone-app.skeleton-theme {
  position: relative;
}

.phone-app-header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid rgba(185, 28, 28, 0.2);
}

.skeleton-theme .phone-app-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 2s ease-in-out infinite;
  border-radius: 4px;
  opacity: 0.5;
  z-index: 0;
}

.phone-app-header .phone-app-title,
.phone-app-header .phone-app-date {
  position: relative;
  z-index: 1;
}

.phone-app-title {
  font-weight: 700;
  font-size: 10px;
  color: var(--mnhs-red);
  letter-spacing: 0.02em;
}

.phone-app-date {
  font-size: 7px;
  color: var(--mnhs-text-muted);
  font-weight: 500;
}

.phone-app-stats {
  position: relative;
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.skeleton-theme .phone-app-stats::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 52px;
  height: 18px;
  background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 2s ease-in-out infinite 0.3s;
  border-radius: 999px;
  opacity: 0.4;
}

.phone-app-stat {
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 7px;
  position: relative;
  z-index: 1;
}

.phone-app-stat.present {
  background: var(--mnhs-green-light);
  color: var(--mnhs-green);
}

.phone-app-stat.absent {
  background: var(--mnhs-red-light);
  color: var(--mnhs-red);
}

.phone-app-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.phone-app-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--mnhs-white);
  border-radius: 8px;
  border: 1px solid var(--mnhs-border);
  min-height: 36px;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.phone-app-row.present {
  border-left: 3px solid var(--mnhs-green);
}

.phone-app-row.absent {
  border-left: 3px solid var(--mnhs-red);
  background: #fef2f2;
}

.phone-app-row .skeleton-avatar {
  flex-shrink: 0;
}

.phone-app-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%);
  color: #6b7280;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.phone-app-row.present .phone-app-avatar {
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%);
  color: var(--mnhs-green);
}

.phone-app-row.absent .phone-app-avatar {
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  color: var(--mnhs-red);
}

.phone-app-avatar svg {
  width: 18px;
  height: 18px;
}

.phone-app-name {
  flex: 1;
  font-weight: 600;
  color: var(--mnhs-dark);
  font-size: 7px;
  min-width: 0;
}

.phone-app-check {
  flex-shrink: 0;
  color: var(--mnhs-green);
}

.phone-app-badge {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mnhs-red);
}

/* Phone app — QR scanner layout (clean) */
.phone-app-scanner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px 14px;
  gap: 0;
  font-family: "Poppins", sans-serif;
}

.phone-app-scanner .phone-app-header {
  flex-shrink: 0;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.phone-app-scanner .phone-app-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--mnhs-dark);
  letter-spacing: 0.01em;
  line-height: 1.3;
  display: block;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-app-scanner .phone-app-date {
  font-size: 7px;
  font-weight: 500;
  color: var(--mnhs-text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Scanner viewfinder area */
.phone-app-scanner-view {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
  border: 2px dashed rgba(185, 28, 28, 0.25);
  margin-bottom: 10px;
}

.scanner-viewfinder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
}

.scanner-qr-icon {
  color: var(--mnhs-red);
  opacity: 0.85;
  flex-shrink: 0;
}

.scanner-hint {
  font-size: 7px;
  font-weight: 500;
  color: var(--mnhs-text-muted);
  text-align: center;
  max-width: 90px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Last scanned section */
.phone-app-recent {
  flex-shrink: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.phone-app-recent-label {
  display: block;
  font-size: 7px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mnhs-text-muted);
  margin-bottom: 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.phone-app-scanner .phone-app-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
}

.phone-app-row.scanned {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  min-height: 36px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.phone-app-row.scanned .phone-app-avatar {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ecfdf5;
  color: var(--mnhs-green);
  flex-shrink: 0;
}

.phone-app-row.scanned .phone-app-avatar svg {
  width: 14px;
  height: 14px;
}

.phone-app-row.scanned .phone-app-name {
  flex: 1;
  font-size: 7px;
  font-weight: 600;
  color: var(--mnhs-dark);
  min-width: 0;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-app-time {
  flex-shrink: 0;
  font-size: 7px;
  font-weight: 600;
  color: var(--mnhs-text-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Main / Section — Upgraded UX/UI
   -------------------------------------------------------------------------- */
main {
  padding: 0 var(--space-page-x) 5rem;
}

.section {
  margin: 0 auto;
  max-width: min(var(--content-max), 100%);
  position: relative;
}

/* Features section — distinct block with backdrop */
.section.features {
  margin-top: 0;
  margin-bottom: 0;
  padding: clamp(4rem, 10vw, 6rem) var(--space-page-x);
  position: relative;
}

/* Section header — stronger hierarchy */
.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  position: relative;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-header-line {
  display: block;
  width: 48px;
  height: 4px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(90deg, var(--mnhs-red), var(--mnhs-gold));
  border-radius: 2px;
}

.section-header .eyebrow {
  margin-bottom: 0.5rem;
  display: inline-block;
}

.section-header h2 {
  margin: 0.25rem 0 1rem;
  font-size: var(--text-3xl);
  color: var(--mnhs-dark);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-header-desc,
.section-header p {
  color: var(--mnhs-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
  font-size: var(--text-lg);
}

/* --------------------------------------------------------------------------
   Features — Upgraded cards, numbers, premium feel
   -------------------------------------------------------------------------- */
.features-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
}

.features-card {
  position: relative;
  background: var(--mnhs-bg-card);
  border: 1px solid var(--mnhs-border);
  border-radius: 1.5rem;
  padding: clamp(2rem, 4vw, 2.75rem) clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-height: 340px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.06);
}

/* Card number badge */
.features-card-number {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.6875rem;
  font-weight: 800;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: rgba(185, 28, 28, 0.15);
  letter-spacing: 0.02em;
  line-height: 1;
}

.features-card:hover .features-card-number {
  color: rgba(185, 28, 28, 0.3);
}

.features-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    var(--mnhs-red-light) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Top accent bar — visible by default, stronger on hover */
.features-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--mnhs-red), var(--mnhs-gold));
  opacity: 0.35;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.features-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 24px 48px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(185, 28, 28, 0.12);
  border-color: rgba(185, 28, 28, 0.2);
}

.features-card:hover::before,
.features-card:hover::after {
  opacity: 1;
}

.features-icon-wrapper {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.features-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--mnhs-red-light) 0%,
    rgba(212, 175, 55, 0.08) 100%
  );
  border: 2px solid rgba(185, 28, 28, 0.25);
  border-radius: 1rem;
  color: var(--mnhs-red);
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.08);
}

.features-card:hover .features-icon {
  background: linear-gradient(
    135deg,
    rgba(185, 28, 28, 0.15) 0%,
    var(--mnhs-gold-light) 100%
  );
  border-color: var(--mnhs-red);
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 8px 20px rgba(185, 28, 28, 0.15);
}

.features-icon svg {
  width: 28px;
  height: 28px;
  transition: transform 0.4s ease;
}

.features-card:hover .features-icon svg {
  transform: scale(1.08);
}

.features-icon-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  background: radial-gradient(
    circle,
    var(--mnhs-red-light) 0%,
    transparent 70%
  );
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.features-card:hover .features-icon-glow {
  opacity: 1;
}

.features-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

.features-content h3 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--mnhs-dark);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.features-content p {
  margin: 0;
  color: var(--mnhs-text-muted);
  line-height: 1.65;
  font-size: var(--text-sm);
}

.features-benefits {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.features-benefits li {
  color: var(--mnhs-text);
  font-size: var(--text-sm);
  line-height: 1.5;
  padding-left: 1.5rem;
  position: relative;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.features-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  background: var(--mnhs-green);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(22, 101, 52, 0.2);
}

.features-card:hover .features-benefits li {
  color: var(--mnhs-dark);
  padding-left: 1.65rem;
}

.features-decoration {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0.4;
  z-index: 0;
}

.features-decoration-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mnhs-red);
  animation: featuresDotPulse 2s ease-in-out infinite;
}

.features-decoration-dot:nth-child(2) {
  animation-delay: 0.3s;
}
.features-decoration-dot:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes featuresDotPulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.2);
  }
}

.features-card:hover .features-decoration {
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Footer — Aligned to hero, polished design
   -------------------------------------------------------------------------- */
.footer {
  background: linear-gradient(180deg, #fef2f2 0%, #fafafa 50%, #f5f5f5 100%);
  border-top: 1px solid var(--mnhs-border);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--mnhs-red), var(--mnhs-gold));
  opacity: 0.9;
}

.footer-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 5rem) var(--space-page-x) clamp(2rem, 5vw, 3rem);
  display: grid;
  grid-template-columns: 1.2fr repeat(2, minmax(160px, 1fr));
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: start;
}

.footer-column h4 {
  color: var(--mnhs-red);
  font-size: var(--text-sm);
  font-weight: 700;
  margin: 0 0 1.25rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-column ul li {
  color: var(--mnhs-text);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.footer-column a {
  color: var(--mnhs-text);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-column a:hover {
  color: var(--mnhs-red);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.footer-brand p {
  margin: 0;
  color: var(--mnhs-dark);
  font-weight: 700;
  font-size: var(--text-lg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.3;
}

.footer-tagline {
  color: var(--mnhs-text-muted) !important;
  font-size: var(--text-sm) !important;
  font-weight: 400 !important;
  line-height: 1.6;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif !important;
  max-width: 280px;
}

.footer-bottom {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 1.75rem) var(--space-page-x);
  border-top: 1px solid var(--mnhs-border);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: var(--mnhs-text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Responsive — iPad Pro 1024×1366 reference layout
   Tablets (768px–1366px): same desktop layout as iPad Pro
   Phones (≤767px): stacked/mobile layout
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  /* Hero — stacked layout for phones */
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-main {
    min-height: auto;
  }

  .hero-main-inner {
    max-width: 100%;
    align-items: center;
    text-align: center;
  }

  .hero-copy {
    align-items: center;
  }

  .hero-eyebrow {
    align-self: center;
  }

  .hero-description-block {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-content .description,
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta,
  .cta-group {
    justify-content: center;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 0.5rem;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-card {
    transform: none;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 0;
    z-index: 1001;
  }

  .nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--mnhs-dark);
    border-radius: 2px;
    display: block;
    transition: all 0.3s ease;
  }

  .nav-menu-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--mnhs-white);
    border-left: 1px solid var(--mnhs-border);
    padding: 5rem 1.5rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    transition: right 0.3s ease;
    z-index: 999;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
  }

  .nav-menu-wrapper.active {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a,
  .nav-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
  }

  .nav-links a.active,
  .nav-link.active {
    background: rgba(185, 28, 28, 0.1);
  }

  .login-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.75rem 1.5rem;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .features-container {
    grid-template-columns: 1fr;
  }

  /* Hero description — smaller on mobile */
  .hero-description-lead {
    font-size: 0.75rem;
  }
  .hero-description-support {
    font-size: 0.6875rem;
  }

  .hero-phone-mockup {
    width: 180px;
    height: 328px;
    border-radius: 24px;
    padding: 7px;
  }

  .hero-phone-notch {
    width: 70px;
    height: 18px;
    border-radius: 0 0 10px 10px;
  }

  .hero-phone-screen {
    border-radius: 16px;
  }

  /* Phone mockup content — same structure as desktop, no wrap, reduced size */
  .phone-app,
  .phone-app-scanner {
    padding: 8px 10px;
    font-size: 7px;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .phone-app-scanner .phone-app-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: 8px;
    margin-bottom: 8px;
    min-width: 0;
  }

  .phone-app-scanner .phone-app-title {
    font-size: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .phone-app-scanner .phone-app-date {
    font-size: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .phone-app-scanner-view {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .scanner-viewfinder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    gap: 6px;
    min-width: 0;
  }
  .scanner-qr-icon {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0;
  }
  .scanner-hint {
    font-size: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
  }

  .phone-app-recent {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .phone-app-recent-label {
    font-size: 7px;
    margin-bottom: 6px;
    white-space: nowrap;
  }
  .phone-app-scanner .phone-app-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }
  .phone-app-row.scanned {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    min-height: 28px;
    flex-shrink: 0;
    min-width: 0;
  }
  .phone-app-row.scanned .phone-app-name {
    font-size: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .phone-app-time {
    font-size: 7px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .phone-app-row.scanned .phone-app-avatar {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    flex-shrink: 0;
  }
  .phone-app-row.scanned .phone-app-avatar svg {
    width: 12px;
    height: 12px;
  }

  .phone-app-stat {
    padding: 4px 8px;
    font-size: 7px;
  }
  .phone-app-row {
    gap: 6px;
    padding: 5px 8px;
    min-height: 28px;
  }
  .phone-app-name {
    font-size: 7px;
  }
  .phone-app-avatar {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
  }
  .phone-app-avatar svg {
    width: 12px;
    height: 12px;
  }

  /* Footer — mobile: center perfectly */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: clamp(3rem, 8vw, 4rem) var(--space-page-x)
      clamp(1.75rem, 4vw, 2.5rem);
    justify-items: center;
    text-align: center;
  }

  .footer-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 280px;
  }

  .footer-column h4 {
    margin-bottom: 1rem;
  }

  .footer-column ul {
    align-items: center;
  }

  .footer-brand {
    align-items: center;
    text-align: center;
  }

  .footer-brand img {
    width: 52px;
    height: 52px;
  }

  .footer-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-brand p,
  .footer-tagline {
    text-align: center;
  }

  .footer-bottom {
    padding: clamp(1rem, 2.5vw, 1.25rem) var(--space-page-x);
    text-align: center;
  }

  .footer-bottom p {
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Extra small devices (phones in portrait, ~480px and down) */
@media (max-width: 480px) {
  .nav {
    padding: 0 clamp(1rem, 4vw, 1.25rem);
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .hero {
    padding: calc(2.5rem + 52px) 0 2rem;
  }

  .hero-content {
    padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 4vw, 1.25rem);
  }

  .hero-eyebrow {
    font-size: clamp(0.6rem, 2.5vw, 0.7rem);
  }

  .hero-description-lead {
    font-size: 0.6875rem;
  }
  .hero-description-support {
    font-size: 0.6875rem;
  }

  .hero-heading .hero-heading-icon {
    width: clamp(1.5rem, 6vw, 2rem);
    height: clamp(1.5rem, 6vw, 2rem);
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 0.5rem;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .section.features {
    padding: clamp(2.5rem, 8vw, 4rem) var(--space-page-x);
  }

  .section-header {
    margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
  }

  main {
    padding: 0 var(--space-page-x) clamp(2.5rem, 6vw, 4rem);
  }

  .footer-content {
    padding: clamp(2.5rem, 6vw, 3rem) var(--space-page-x)
      clamp(1.5rem, 4vw, 2rem);
    gap: 2rem;
  }

  .footer-bottom {
    padding: clamp(1rem, 2vw, 1.25rem) var(--space-page-x);
  }

  .footer-brand img {
    width: 48px;
    height: 48px;
  }

  /* Phone mockup — even smaller on very narrow screens */
  .phone-app-scanner .phone-app-title {
    font-size: 7px;
  }
  .phone-app-scanner .phone-app-date {
    font-size: 6px;
  }
  .scanner-hint {
    font-size: 6px;
  }
  .phone-app-recent-label {
    font-size: 6px;
  }
  .phone-app-row.scanned .phone-app-name {
    font-size: 7px;
  }
  .phone-app-time {
    font-size: 6px;
  }
}
