/* ================= BASE ================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fcfcfc;
  color: #111827;
}

.white-theme {
  background: #fcfcfc;
  color: #111827;
}

/* ================= LAYOUT ================= */
.hero {
  min-height: calc(100vh - 144px); /* header + footer spacing */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
}

.cards-grid {
  width: 1150px;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 32px;
  align-items: start;
}

.card-unit {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ================= HERO ICONS ================= */
.hero-icon-link {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: transform 0.14s ease;
}
.hero-icon-link:hover {
  transform: scale(1.05);
}
.hero-icon-svg {
  width: 80px;
  height: 80px;
}
.hero-icon-svg.store path {
  stroke: #0f5fff;
}
.hero-icon-svg.tools path {
  stroke: #0c7c59;
}
.hero-icon-svg.guides path {
  stroke: #eab308;
}

/* ================= CARDS ================= */
.home-card,
.home-card:focus,
.home-card:active {
  text-decoration: none;
  outline: none;
  color: inherit;
}
.home-card {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 18px;
  padding: 22px;
  height: auto;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.04), 0 1px 4px rgba(17, 24, 39, 0.02);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(15, 95, 255, 0.1), 0 1px 4px rgba(17, 24, 39, 0.08);
  border-color: #0f5fff;
  z-index: 1;
}
.home-card:active {
  transform: none;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.06);
  border-color: #cbd5e1;
}

/* --- card-specific hover backgrounds --- */
.home-card.store-card:hover {
  background: #f8faff;
}
.home-card.store-card:active {
  background: #f0f4ff;
}
.home-card.tools-card:hover {
  background: #fafff8;
}
.home-card.tools-card:active {
  background: #f4fff0;
}
.home-card.guides-card:hover {
  background: #fffcf8;
  border-color: #eab308;
}
.home-card.guides-card:active {
  background: #fff8f0;
}

/* --- card text --- */
.home-card h2 {
  margin: 0;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.1px;
  color: #0f172a;
  text-align: center;
}
.home-card p {
  margin: 0;
  color: #4b5563;
  font-size: 14.5px;
  line-height: 1.55;
  text-align: center;
}
.home-card .cta {
  margin-top: auto;
  color: #0f5fff;
  font-weight: 600;
  font-size: 14.5px;
  transition: color 0.14s ease;
  text-align: center;
}
.home-card:hover .cta {
  color: #0c7c59;
}
.home-card.guides-card:hover .cta {
  color: #eab308;
}

/* ================= FOOTER ================= */
.pt-footer {
  text-align: center;
  color: #6b7280;
  padding: 10px 0 10px;
  background-color: #f9fafb;
  font-size: 13px;
  border-top: 1px solid #e5e7eb;
}

/* ================= MODAL ================= */
.pt-modal::backdrop {
  background: rgba(0, 0, 0, 0.35);
}
.pt-modal {
  border: none;
  padding: 0;
  border-radius: 12px;
  margin: auto;
  z-index: 10000;
}

.modal-card {
  min-width: 420px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* --- modal header --- */
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}
.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
}
.modal-logo {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* --- modal body --- */
.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}
.modal-body input {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
}
.modal-body input:focus {
  border-color: #0f5fff;
  box-shadow: 0 0 0 3px rgba(15, 95, 255, 0.14);
}
.error-message {
  color: #b91c1c;
  font-size: 13px;
  min-height: 16px;
  text-align: center;
}

/* --- modal footer --- */
.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
.modal-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #111;
  cursor: pointer;
}
.modal-btn.primary {
  background: #0f5fff;
  border-color: #0f5fff;
  color: white;
}
.modal-btn.primary:hover {
  background: #0d4acf;
  border-color: #0d4acf;
}

/* ================= CLEANUP: Legacy Global BTN Patch ================= */
body > button.btn,
body > .btn {
  display: none !important;
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  z-index: -1 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1060px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .home-card {
    height: auto;
  }
  .modal-card {
    min-width: min(420px, 92vw);
  }
}
