/* ── Global Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Fonts ───────────────────────────────────────────────────────────────────── */
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

/* ── Gradient text utility ───────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #4F6CF7 0%, #06B6D4 50%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glassmorphism card ──────────────────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ── Nav ─────────────────────────────────────────────────────────────────────── */
#site-header {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#site-header.scrolled {
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* ── Ticker ──────────────────────────────────────────────────────────────────── */
.ticker-wrapper {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 80px, black calc(100% - 80px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 80px, black calc(100% - 80px), transparent 100%);
}

.ticker-content {
  display: flex;
  animation: slideTicker 28s linear infinite;
  width: max-content;
}

@keyframes slideTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Reveal animation ────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Benefit card hover ──────────────────────────────────────────────────────── */
.benefit-card {
  position: relative;
  overflow: hidden;
}

.benefit-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79, 108, 247, 0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* ── Form styles ─────────────────────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: #1e293b;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: #4f6cf7;
  box-shadow: 0 0 0 3px rgba(79, 108, 247, 0.12);
}

.form-input::placeholder { color: #94a3b8; }

select.form-input {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.form-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
}

/* ── FAQ accordion ───────────────────────────────────────────────────────────── */
.faq-item .faq-trigger:hover .faq-icon { color: #4f6cf7; }
.faq-item .faq-icon.rotated { transform: rotate(180deg); }
.faq-item .faq-answer {
  animation: fadeDown 0.2s ease-out;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Animated stat counters ──────────────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-18px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-d1 { animation: float 8s ease-in-out 2s infinite; }
.animate-float-d2 { animation: float 10s ease-in-out 4s infinite; }

.animate-fade-up {
  animation: fadeUp 0.7s ease-out both;
  opacity: 0;
}

/* ── Scrollbar ───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.animate-pulse-slow { animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Prose for policy pages ──────────────────────────────────────────────────── */
.prose p { margin-bottom: 1rem; line-height: 1.75; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.25rem; }
.prose ul { margin-bottom: 1rem; }
.prose li { margin-bottom: 0.25rem; line-height: 1.65; }
.prose a { color: #4f6cf7; text-decoration: none; }
.prose a:hover { text-decoration: underline; }

/* ── Admin dark scrollbar ────────────────────────────────────────────────────── */
.bg-dark ::-webkit-scrollbar-thumb { background: #1e2a45; }
.bg-dark-card ::-webkit-scrollbar-thumb { background: #1e2a45; }

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* bg-white/8 workaround for Tailwind CDN */
.bg-white\/8 { background-color: rgba(255,255,255,0.08); }
.bg-white\/12 { background-color: rgba(255,255,255,0.12); }
.bg-white\/3 { background-color: rgba(255,255,255,0.03); }
.hover\:bg-white\/3:hover { background-color: rgba(255,255,255,0.03); }
.hover\:bg-white\/5:hover { background-color: rgba(255,255,255,0.05); }
.hover\:bg-white\/8:hover { background-color: rgba(255,255,255,0.08); }
.hover\:bg-white\/12:hover { background-color: rgba(255,255,255,0.12); }
.admin-sidebar-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 0.75rem; font-size: 0.875rem; font-weight: 500; color: #e2e8f0; transition: all 0.15s; }
.admin-sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.admin-sidebar-link.active { color: #fff; background: rgba(255,255,255,0.10); }

/* ── Infrastructure partner logo ticker cards ───────────────────────────────── */
.partner-ticker-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 28px;
  height: 76px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.partner-ticker-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 16px rgba(79,108,247,0.12);
}

/* ── Floating label form (apply page v2) ─────────────────────────────────── */
.fl-wrap { position: relative; }

.fl-input {
  display: block;
  width: 100%;
  padding: 1.375rem 0.9rem 0.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
.fl-input::placeholder { color: transparent; }
.fl-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
select.fl-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1.125rem;
  padding-right: 2.75rem;
  cursor: pointer;
}

.fl-wrap.fl-err .fl-input {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.fl-label {
  position: absolute;
  left: 0.9rem;
  top: 0.95rem;
  font-size: 0.9375rem;
  color: #94a3b8;
  pointer-events: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 2.5rem);
}

/* Float state: focus, non-empty text/textarea, or .sv on select */
.fl-input:focus ~ .fl-label,
.fl-input:not(:placeholder-shown) ~ .fl-label,
.fl-input.sv ~ .fl-label {
  top: 0.3rem;
  font-size: 0.63rem;
  font-weight: 700;
  color: #6366f1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.fl-err-msg {
  display: none;
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.35rem;
  padding-left: 0.125rem;
}
.fl-wrap.fl-err .fl-err-msg { display: block; }

/* Step transition animations */
.app-step { transition: opacity 0.25s ease, transform 0.25s ease; }
.app-step.leaving {
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
}
.app-step.entering {
  opacity: 0;
  transform: translateX(20px);
}

/* ── Contract page ───────────────────────────────────────────────────────── */
.contract-doc {
  font-size: 0.875rem;
  line-height: 1.75;
  color: #374151;
}
.contract-doc h2 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.contract-doc p { margin-bottom: 0.75rem; }
.contract-doc ol { counter-reset: clause; padding-left: 0; list-style: none; }
.contract-doc ol li { counter-increment: clause; margin-bottom: 0.5rem; padding-left: 1.5rem; position: relative; }
.contract-doc ol li::before { content: counter(clause) ". "; position: absolute; left: 0; color: #6b7280; font-weight: 600; font-size: 0.8rem; }
.contract-doc table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.8125rem; }
.contract-doc table th { background: #f8fafc; padding: 0.625rem 0.875rem; text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; border: 1px solid #e5e7eb; }
.contract-doc table td { padding: 0.625rem 0.875rem; border: 1px solid #e5e7eb; color: #374151; }
.contract-doc table tr:nth-child(even) td { background: #f8fafc; }

.sig-input {
  display: block;
  width: 100%;
  padding: 0.75rem 0;
  font-family: 'Dancing Script', 'Brush Script MT', Georgia, serif;
  font-size: 1.75rem;
  color: #1e293b;
  border: none;
  border-bottom: 2px solid #cbd5e1;
  background: transparent;
  outline: none;
  transition: border-color 0.15s;
}
.sig-input:focus { border-bottom-color: #6366f1; }
.sig-input::placeholder { color: #cbd5e1; font-size: 1rem; font-family: 'Inter', sans-serif; }
