/* ==========================================================================
   Redesign - Shared Styles
   Used by all redesigned public pages (index, register, about, terms, etc.)
   ========================================================================== */

/* =============================================
   RESET & BASE (scoped to .redesign)
   ============================================= */
html.redesign, html.redesign body {
  margin: 0;
  padding: 0;
  min-width: 0;
  background: #f4f8fc;
  font-family: 'Inter', 'Segoe UI', Frutiger, 'Frutiger Linotype', 'Dejavu Sans', 'Helvetica Neue', Arial, sans-serif;
  color: #2c3e50;
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 400;
}

:where(html.redesign) *, :where(html.redesign) *::before, :where(html.redesign) *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:where(html.redesign) a { text-decoration: none; color: inherit; }
:where(html.redesign) img { max-width: 100%; display: block; }

/* Preserve Ko-fi widget badge toggling */
html.redesign .kofi-badge-dark { display: none; }
html.redesign.dark-theme .kofi-badge-light { display: none; }
html.redesign.dark-theme .kofi-badge-dark { display: block; }

/* =============================================
   NAVBAR - Floating pill
   ============================================= */
.rd-navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  max-width: calc(100vw - 32px);
}

.rd-navbar-logo {
  width: 36px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.1));
}

.rd-navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #1a3a5c;
}

.rd-navbar-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #5a7a9a;
}

.rd-navbar-links a:hover { color: #2a6cb8; }

.rd-navbar-cta {
  background: #1a3a5c;
  color: #fff;
  padding: 0.55rem 1.4rem;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
}

.rd-navbar-cta:hover { background: #2a6cb8; }

/* =============================================
   BUTTONS
   ============================================= */
.rd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.rd-btn-dark {
  background: #1a3a5c;
  color: #fff;
}

.rd-btn-dark:hover { background: #2a6cb8; transform: translateY(-2px); }

.rd-btn-outline {
  background: transparent;
  color: #1a3a5c;
  border: 2px solid rgba(26,58,92,0.2);
}

.rd-btn-outline:hover { border-color: #2a6cb8; color: #2a6cb8; }

.rd-btn-white {
  background: #fff;
  color: #1a3a5c;
  position: relative;
}

.rd-btn-white:hover { background: #e0f0fa; transform: translateY(-2px); }

/* =============================================
   TORN PAPER EDGE
   ============================================= */
.rd-torn-edge {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 50px;
  background: #f4f8fc;
  clip-path: polygon(
    0% 60%, 4% 50%, 8% 62%, 12% 48%, 16% 58%, 20% 44%, 24% 56%, 28% 40%, 32% 54%,
    36% 38%, 40% 50%, 44% 36%, 48% 48%, 52% 32%, 56% 46%, 60% 30%, 64% 44%, 68% 28%,
    72% 42%, 76% 24%, 80% 40%, 84% 22%, 88% 38%, 92% 18%, 96% 34%, 100% 14%,
    100% 100%, 0% 100%
  );
}

/* =============================================
   FORM PAGE LAYOUT
   ============================================= */
.rd-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 4rem;
  background: linear-gradient(180deg, #daedf9 0%, #e8f2fb 40%, #f4f8fc 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative clouds on form pages */
.rd-page::before, .rd-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
}
.rd-page::before {
  width: 350px; height: 140px; border-radius: 70px;
  top: 8%; left: -60px;
  box-shadow: 50px -25px 0 rgba(255,255,255,0.5);
}
.rd-page::after {
  width: 250px; height: 100px; border-radius: 50px;
  top: 12%; right: -20px; opacity: 0.4;
  box-shadow: 40px -20px 0 rgba(255,255,255,0.4);
}

.rd-form-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 3rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,80,160,0.08), 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid rgba(255,255,255,0.6);
}

.rd-form-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 800;
  color: #1a3a5c;
  text-align: center;
  margin-bottom: 0.5rem;
}

.rd-form-subtitle {
  text-align: center;
  color: #5a7a9a;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.rd-form-group { margin-bottom: 1rem; }

.rd-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #c5e4f7;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: #1a3a5c;
  outline: none;
  transition: border-color 0.2s;
}

.rd-input:focus { border-color: #3bb9ff; }
.rd-input::placeholder { color: #a0c4e0; }

select.rd-input {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a9a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

textarea.rd-input {
  resize: vertical;
  min-height: 100px;
}

.rd-form-submit { margin-top: 1.5rem; }
.rd-form-submit .rd-btn { width: 100%; }

.rd-btn-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.rd-btn-row .rd-btn { flex: 1; }

.rd-form-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #5a7a9a;
}

.rd-form-footer a {
  color: #2a6cb8;
  font-weight: 500;
}

.rd-form-footer a:hover { text-decoration: underline; }

.rd-form-tos {
  text-align: center;
  font-size: 0.8rem;
  color: #8bb8d8;
  margin-top: 1rem;
}

.rd-form-tos a { color: #2a6cb8; }
.rd-form-tos a:hover { text-decoration: underline; }

/* Checkbox cards (subscriptions) */
.rd-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rd-checkbox-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #f0f7ff;
  border: 1.5px solid #c5e4f7;
  transition: border-color 0.2s;
  font-size: 0.95rem;
  color: #1a3a5c;
}

.rd-checkbox-card:hover { border-color: #3bb9ff; }

.rd-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2a6cb8;
  flex-shrink: 0;
}

/* Honeypot */
.hp-field { position: absolute; left: -9999px; }

/* TOS Modal (register page) */
.tos-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 20, 35, 0.6);
}

.tos-modal-content {
  background: #fff;
  margin: 5% auto;
  width: 80%;
  max-width: 800px;
  height: 80%;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tos-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #daedf9;
  background: #1a3a5c;
  border-radius: 16px 16px 0 0;
}

.tos-modal-header h2 {
  margin: 0;
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.tos-modal-close {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.tos-modal-close:hover { color: #fff; }

.tos-modal-body {
  flex: 1;
  overflow: hidden;
}

.tos-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* =============================================
   CONTENT PAGE LAYOUT
   ============================================= */
.rd-content-hero {
  background: linear-gradient(180deg, #daedf9 0%, #e0f0fa 100%);
  padding: 8rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative clouds on content hero */
.rd-content-hero::before, .rd-content-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}
.rd-content-hero::before {
  width: 300px; height: 120px; border-radius: 60px;
  top: 10%; left: -40px;
  box-shadow: 40px -20px 0 rgba(255,255,255,0.4);
}
.rd-content-hero::after {
  width: 200px; height: 80px; border-radius: 40px;
  top: 20%; right: 5%; opacity: 0.4;
}

.rd-content-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #1a3a5c;
  position: relative;
  z-index: 1;
}

.rd-content-hero p {
  font-size: 1.1rem;
  color: #5a7a9a;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
}

.rd-content-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.rd-content-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #daedf9;
}

.rd-content-body h2:first-child { margin-top: 0; }

.rd-content-body p {
  font-size: 0.95rem;
  color: #4a6a8a;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.rd-content-body a { color: #2a6cb8; font-weight: 500; }
.rd-content-body a:hover { text-decoration: underline; }
.rd-content-body a.rd-btn { color: inherit; font-weight: 600; text-decoration: none; }
.rd-content-body a.rd-btn-dark { color: #fff; }
.rd-content-body a.rd-btn-dark:hover { color: #fff; text-decoration: none; }

.rd-content-body ul {
  margin: 0.5rem 0 1rem 1.5rem;
  color: #4a6a8a;
  font-size: 0.95rem;
  line-height: 1.8;
}

.rd-content-body li { margin-bottom: 0.4rem; }

.rd-content-body code {
  background: #e8f4fd;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.rd-highlight-box {
  background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
  border-left: 4px solid #3bb9ff;
  border-radius: 0 12px 12px 0;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 1rem;
  color: #1a3a5c;
  font-weight: 500;
  font-style: italic;
}

.rd-last-updated {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #daedf9;
  font-size: 0.85rem;
  color: #8bb8d8;
  font-style: italic;
}

/* About page CTA */
.rd-about-cta {
  text-align: center;
  margin-top: 3rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, #e8f4fd 0%, #daedf9 100%);
  border-radius: 20px;
}

.rd-about-cta h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 0.5rem;
}

.rd-about-cta p {
  color: #5a7a9a;
  margin-bottom: 1.5rem;
}

/* =============================================
   STATUS PAGE LAYOUT
   ============================================= */
.rd-status-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 3.5rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,80,160,0.08);
  border: 1px solid rgba(255,255,255,0.6);
  text-align: center;
}

.rd-status-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
}

.rd-status-icon.success { background: #d1fae5; }
.rd-status-icon.error { background: #fee2e2; }
.rd-status-icon.warning { background: #fef3c7; }

.rd-status-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a3a5c;
  margin-bottom: 0.75rem;
}

.rd-status-card p {
  font-size: 1rem;
  color: #5a7a9a;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.rd-status-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.rd-status-link {
  font-size: 0.9rem;
  color: #2a6cb8;
  font-weight: 500;
}

.rd-status-link:hover { text-decoration: underline; }

/* =============================================
   FOOTER
   ============================================= */
.rd-footer {
  background: #132d47;
  padding: 2rem;
  text-align: center;
}

.rd-footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.rd-footer-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rd-footer-links a:hover { color: #fff; }

.rd-footer-social { margin-bottom: 1rem; }

.rd-footer-social-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.5rem;
}

.rd-footer-social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.rd-footer-social-icons a {
  opacity: 0.5;
  transition: opacity 0.2s;
}

.rd-footer-social-icons a:hover { opacity: 1; }

.rd-footer-social-icons img {
  width: 22px;
  height: 22px;
}

.rd-footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .rd-navbar-links { display: none; }
  .rd-navbar { padding: 0.5rem 1rem; gap: 1rem; }
  .rd-form-card { padding: 2rem 1.5rem; }
  .rd-status-card { padding: 2.5rem 1.5rem; }
  .rd-content-body { padding: 2rem 1.5rem 3rem; }
  .rd-btn-row { flex-direction: column; }
}
