/* WeAD RedFlag homepage redesign — 2026-07-10 */
:root {
  --rf-bg: #050508;
  --rf-panel: #0a0a0f;
  --rf-ink: #f4f4f5;
  --rf-muted: rgba(244, 244, 245, 0.62);
  --rf-dim: rgba(244, 244, 245, 0.38);
  --rf-red: #ff4444;
  --rf-red-deep: #dc2626;
  --rf-teal: #00d4aa;
  --rf-line: rgba(255, 255, 255, 0.08);
  --rf-font-display: 'Antonio', sans-serif;
  --rf-font-body: 'Inter', system-ui, sans-serif;
}

body.rf-home {
  margin: 0;
  background: var(--rf-bg);
  color: var(--rf-ink);
  font-family: var(--rf-font-body);
}

body.rf-home #loading-screen { display: none !important; }

/* —— Hero —— */
.rf-hero {
  position: relative;
  min-height: min(100vh, 820px);
  display: flex;
  align-items: flex-end;
  padding: 7rem 1.25rem 4.5rem;
  overflow: hidden;
}

.rf-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background: #050508;
}

.rf-hero-bg::before {
  content: '';
  position: absolute;
  inset: -4%;
  background:
    url('/images/redflag-hero-bg.png') center right / cover no-repeat;
  opacity: 0.92;
  animation: rf-hero-drift 28s ease-in-out infinite alternate;
  will-change: transform;
}

.rf-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050508 0%, rgba(5, 5, 8, 0.88) 38%, rgba(5, 5, 8, 0.35) 68%, rgba(5, 5, 8, 0.55) 100%),
    linear-gradient(180deg, rgba(5, 5, 8, 0.55) 0%, transparent 28%, transparent 62%, #050508 100%),
    radial-gradient(ellipse 55% 45% at 78% 42%, rgba(220, 38, 38, 0.18), transparent 60%);
}

@keyframes rf-hero-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.5%, 1%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .rf-hero-bg::before { animation: none; }
}

.rf-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

@media (min-width: 900px) {
  .rf-hero-inner { text-align: left; margin-left: max(1.25rem, calc((100% - 1100px) / 2)); }
}

.rf-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rf-teal);
  margin: 0 0 1rem;
  font-weight: 500;
}

.rf-brand {
  font-family: var(--rf-font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 10vw, 5.75rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.rf-brand-wead { color: #fff; display: inline-block; margin-right: 0.35em; }
.rf-brand-flag {
  color: var(--rf-red);
  text-shadow: 0 0 40px rgba(255, 68, 68, 0.35);
}

.rf-hero-line {
  font-family: var(--rf-font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 500;
  color: var(--rf-ink);
  margin: 0 0 0.85rem;
  letter-spacing: 0.01em;
}

.rf-hero-sub {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--rf-muted);
  max-width: 34rem;
  margin: 0 auto 2rem;
}

@media (min-width: 900px) {
  .rf-hero-sub { margin-left: 0; }
}

.rf-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@media (min-width: 900px) {
  .rf-hero-ctas { justify-content: flex-start; }
}

.rf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-family: var(--rf-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.rf-btn:hover { transform: translateY(-1px); }

.rf-btn-primary {
  background: linear-gradient(135deg, #9b1c1c 0%, var(--rf-red-deep) 55%, var(--rf-red) 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(220, 38, 38, 0.28);
}

.rf-btn-primary:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
}

.rf-btn-ghost {
  background: transparent;
  color: var(--rf-ink);
  border-color: rgba(255, 255, 255, 0.18);
}

.rf-btn-ghost:hover {
  border-color: rgba(255, 68, 68, 0.45);
  background: rgba(255, 68, 68, 0.08);
}

/* —— Sections —— */
.rf-section {
  padding: 4.5rem 1.25rem;
  border-top: 1px solid var(--rf-line);
}

.rf-section-alt {
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.9), rgba(5, 5, 8, 0.95));
}

.rf-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.rf-h2 {
  font-family: var(--rf-font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  text-align: center;
}

.rf-lead {
  text-align: center;
  color: var(--rf-muted);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.55;
  font-size: 1rem;
}

.rf-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .rf-steps { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

.rf-steps li {
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--rf-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}

.rf-step-n {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.15);
  color: var(--rf-red);
  font-family: var(--rf-font-display);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.rf-steps h3 {
  font-family: var(--rf-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.rf-steps p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--rf-muted);
}

.rf-paths {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 700px) {
  .rf-paths { grid-template-columns: repeat(2, 1fr); }
}

.rf-path {
  display: block;
  padding: 1.35rem 1.4rem;
  border-radius: 14px;
  border: 1px solid var(--rf-line);
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.rf-path:hover {
  border-color: rgba(255, 68, 68, 0.4);
  background: rgba(220, 38, 38, 0.06);
}

.rf-path strong {
  display: block;
  font-family: var(--rf-font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #fff;
}

.rf-path span {
  font-size: 0.9rem;
  color: var(--rf-muted);
  line-height: 1.45;
}

.rf-trust { text-align: center; }

.rf-trust-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* —— Login modal redesign (keep IDs) —— */
.rf-login-modal {
  z-index: 10000;
}

.rf-login-card {
  position: relative;
  max-width: 400px;
  width: calc(100% - 32px);
  margin: auto;
  background: var(--rf-panel);
  border: 1px solid var(--rf-line);
  border-radius: 16px;
  overflow: hidden;
  z-index: 10001;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.rf-login-card .modal-close-modern {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
}

.rf-login-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.35rem 1.25rem;
  border-bottom: 1px solid var(--rf-line);
}

.rf-login-logo {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.25);
  flex-shrink: 0;
}

.rf-login-logo img {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: contain;
}

.rf-login-head h2 {
  font-family: var(--rf-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
}

.rf-login-head h2 span { color: var(--rf-red); }

.rf-login-head p {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--rf-dim);
}

.rf-login-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rf-login-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rf-dim);
}

.rf-login-field input,
.rf-login-input,
#otpEmailInput,
#otpCodeInput {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rf-line);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--rf-font-body);
  outline: none;
}

#otpEmailInput:focus,
#otpCodeInput:focus {
  border-color: rgba(255, 68, 68, 0.45);
}

.rf-login-submit,
#otp-login-btn {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.95rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(153, 27, 27, 0.45);
  background: linear-gradient(135deg, #9b1c1c 0%, var(--rf-red-deep) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--rf-font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.rf-login-submit:hover,
#otp-login-btn:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
}

.rf-login-hint {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--rf-dim);
}

.rf-login-error {
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.rf-login-error p {
  margin: 0;
  color: #f87171;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .rf-hero { padding-top: 6rem; min-height: 88vh; }
  .rf-btn { width: 100%; }
  .rf-hero-ctas { width: 100%; }
}
