/* ==========================================================================
   VerifyMyCards — Custom Styles
   Tailwind (CDN) handles most layout/utility classes.
   This file covers: fine typography, animations, modal, form states,
   accordion, and effects that are cleaner as hand-written CSS.
   ========================================================================== */

:root {
  --brand-blue: #2563eb;
  --brand-cyan: #06b6d4;
  --brand-green: #10b981;
}

/* Tailwind's display utilities (e.g. "grid", "flex") share specificity with
   the UA [hidden] rule, so they can win the cascade and keep an element
   toggled via el.hidden visible. Force [hidden] to always take priority. */
[hidden] {
  display: none !important;
}

* {
  scroll-behavior: smooth;
}

html,
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* ---------------------------------- */
/* Accessibility: skip link            */
/* ---------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand-blue);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
  font-weight: 600;
  font-size: 0.875rem;
}
.skip-link:focus {
  left: 0;
}

/* ---------------------------------- */
/* Sticky header states                */
/* ---------------------------------- */
#site-header #nav-inner {
  background: transparent;
}
#site-header.scrolled #nav-inner {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.7);
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan));
  transition: width 0.25s ease;
  border-radius: 999px;
}
.nav-link:hover {
  color: #0f172a;
}
.nav-link:hover::after {
  width: 100%;
}

.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  color: #334155;
  transition: background 0.2s ease;
}
.mobile-link:hover {
  background: #f1f5f9;
}

/* ---------------------------------- */
/* Hero background grid + blobs        */
/* ---------------------------------- */
.bg-grid-slate {
  background-image: linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.trust-badge:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.25);
}

/* ---------------------------------- */
/* Scroll reveal animations            */
/* ---------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1.in-view { transition-delay: 0.1s; }
.reveal-delay-2.in-view { transition-delay: 0.2s; }
.reveal-delay-3.in-view { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------- */
/* Section headers                     */
/* ---------------------------------- */
.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue);
  background: #eff6ff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.section-subtitle {
  margin-top: 0.75rem;
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ---------------------------------- */
/* How It Works cards                  */
/* ---------------------------------- */
.how-card {
  position: relative;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  padding: 2rem 1.75rem;
  box-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.how-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.18);
  border-color: #dbeafe;
}
.how-card-number {
  font-size: 0.75rem;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.how-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  margin-bottom: 1.25rem;
}
.how-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.how-card-desc {
  color: #64748b;
  font-size: 0.925rem;
  line-height: 1.6;
}

/* ---------------------------------- */
/* Supported card tiles                */
/* ---------------------------------- */
.card-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.75rem 1rem;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #334155;
  text-align: center;
  cursor: default;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.card-tile:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 16px 32px -10px rgba(6, 182, 212, 0.25);
  border-color: #cffafe;
}
.card-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.9rem;
  color: #64748b;
  transition: transform 0.3s ease, color 0.3s ease;
}
.card-tile-icon svg {
  width: 1.9rem;
  height: 1.9rem;
}
.card-tile:hover .card-tile-icon {
  transform: scale(1.15) rotate(-4deg);
  color: var(--brand-blue);
}

/* ---------------------------------- */
/* Why Choose Us feature cards         */
/* ---------------------------------- */
.feature-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(16, 185, 129, 0.2);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.4);
}
.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.feature-desc {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------------------------------- */
/* FAQ accordion                       */
/* ---------------------------------- */
.faq-item {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 12px -4px rgba(15, 23, 42, 0.05);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  font-size: 0.975rem;
  color: #0f172a;
}
.faq-question:hover {
  background: #f8fafc;
}
.faq-question:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: -2px;
}
.faq-chevron {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  color: #94a3b8;
  transition: transform 0.3s ease;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--brand-blue);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
  padding: 0 1.5rem;
}
.faq-item.open .faq-answer {
  padding: 0 1.5rem 1.25rem;
}
.faq-answer p {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ---------------------------------- */
/* Footer                              */
/* ---------------------------------- */
.footer-link {
  color: #94a3b8;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: #fff;
}

/* ==========================================================================
   Verification Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.show {
  opacity: 1;
}
.modal-overlay[hidden] {
  display: none;
}

/* Blur the page content behind the modal */
body.modal-open #site-header,
body.modal-open main,
body.modal-open footer {
  filter: blur(4px);
  transition: filter 0.3s ease;
}
body.modal-open {
  overflow: hidden;
}

.modal-panel {
  box-sizing: border-box;
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, 0.45);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-panel.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.modal-panel[hidden] {
  display: none;
}

.modal-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  transition: all 0.2s ease;
}
.modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

/* ---------------------------------- */
/* Form fields                         */
/* ---------------------------------- */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}
.req {
  color: #ef4444;
}
.form-group input[type='text'],
.form-group input[type='email'],
.form-group select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 0.75rem;
  border: 1.5px solid #e2e8f0;
  font-size: 0.925rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1.05rem;
  cursor: pointer;
}
.form-group select option {
  color: #0f172a;
  background: #fff;
}
.form-group input[type='text']:focus,
.form-group input[type='email']:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.form-group input.valid,
.form-group select.valid {
  border-color: var(--brand-green);
  background-color: #f0fdf4;
}
.form-group input.invalid,
.form-group select.invalid {
  border-color: #ef4444;
  background-color: #fef2f2;
}
.field-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}
.field-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.35rem;
  min-height: 0;
  display: none;
  font-weight: 500;
}
.field-error.show {
  display: block;
}

.form-group-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1.5rem 0 0.25rem;
}
.form-group-checkbox input[type='checkbox'] {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brand-blue);
  flex-shrink: 0;
  cursor: pointer;
}
.form-group-checkbox label {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  cursor: pointer;
}

.verify-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: 0.85rem;
  font-weight: 700;
  font-size: 0.975rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  box-shadow: 0 10px 25px -8px rgba(37, 99, 235, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.verify-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(37, 99, 235, 0.55);
}
.verify-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------------------------------- */
/* Loading step                        */
/* ---------------------------------- */
.loader-ring {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--brand-blue);
  border-right-color: var(--brand-cyan);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-track {
  width: 100%;
  max-width: 16rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 1.75rem;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-cyan), var(--brand-green));
  transition: width 0.15s linear;
}

/* ---------------------------------- */
/* Success step                        */
/* ---------------------------------- */
.success-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--brand-green);
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.error-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: #fef2f2;
  color: #ef4444;
  animation: pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ref-code {
  margin-top: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #475569;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
}

/* Scrollbar polish for modal */
.modal-panel::-webkit-scrollbar {
  width: 8px;
}
.modal-panel::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 999px;
}
