/* /css/components.css
 *
 * Reusable UI System: Refined Vanilla.
 * Handles typography headers, interactive surfaces, and utility layouts.
 */

/* ==========================================================================
   1. SECTION HEADERS
   ========================================================================== */

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  /* Fix: Guaranteed vertical breathing room */
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h1,
.section-header h2 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.section-subtitle {
  margin: 0;
  color: var(--text-dim);
  max-width: 65ch;
  line-height: 1.6;
}

/* ==========================================================================
   2. BUTTON SYSTEM
   ========================================================================== */

/* Base Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-md);
  background: var(--accent-primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.2, 0, 0.2, 1),
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px var(--accent-glow);
}

.btn:active {
  transform: translateY(0);
}

/* Modifier: Outline */
.btn--outline {
  background: transparent;
  color: var(--text-bright);
  border-color: var(--border-color);
}

.btn--outline:hover {
  background: rgba(185, 208, 220, 0.05);
  border-color: rgba(185, 208, 220, 0.2);
}

/* Modifier: Small */
.btn--sm {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

/* Modifier: Premium (Shimmer Effect) */
.btn--premium {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.btn--premium .shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.15),
      transparent);
  transform: skewX(-20deg);
  animation: shimmerLoop 4s infinite linear;
  pointer-events: none;
}

@keyframes shimmerLoop {
  0% {
    left: -100%;
  }

  20% {
    left: 200%;
  }

  100% {
    left: 200%;
  }
}

/* Modifier: Pulse Emphasis */
.btn--pulse {
  animation: btnPulse 2.2s infinite ease-in-out;
}

@keyframes btnPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(21, 122, 110, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(21, 122, 110, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(21, 122, 110, 0);
  }
}

/* ==========================================================================
   3. INTERACTIVE SURFACES (CARDS)
   ========================================================================== */

/* Base Card Logic (Shared by Glass & Support) */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--card-shadow);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(21, 122, 110, 0.3);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 20px -5px var(--accent-glow);
}

/* Modifier: Premium Border */
.card--premium {
  border-color: rgba(21, 122, 110, 0.2);
}

/* Decorative Card Accents */
.card-glow {
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle at top right, var(--accent-glow), transparent 70%);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.card-icon {
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* ==========================================================================
   4. SCROLL ASSIST
   ========================================================================== */

.scroll-assist-wrap {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 1000;
  display: inline-flex;
  gap: 0.6rem;
}

.scroll-assist {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(19, 20, 22, 0.85);
  color: var(--text-bright);
  font-size: 1.1rem;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background-color 0.2s ease;
}

.scroll-assist:hover {
  background: rgba(21, 122, 110, 0.2);
  transform: translateY(-2px);
}

.scroll-assist:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.scroll-assist.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.scroll-assist-wrap.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

/* ==========================================================================
   ABOUT US: CORRECTED SIDE-BY-SIDE LAYOUT
   ========================================================================== */

.about-section {
    padding-block: var(--space-8);
}

/* 1. THE GRID: 1.2fr Left / 0.8fr Right */
.about-grid {
    display: grid;
    gap: 4rem;
    grid-template-columns: 1fr; /* Stacked on mobile */
    align-items: center;
    margin-top: 2rem;
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: 1.2fr 0.8fr;
        text-align: left;
    }
}

/* 2. SUB-HEADER: "Pure Vanilla" Style */
.about-sub-header {
    font-size: var(--text-lg);
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem; /* Added spacing from the paragraph */
    position: relative;
    display: inline-block;
}

/* Optional: Small accent line for extra "Fancy" feel */
.about-sub-header::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* 3. TEXT WRAPPER: Breathing room */
.about-text-wrapper p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-main);
    max-width: 60ch;
}

.lead-text {
    font-size: 1.15rem;
    color: var(--text-bright);
}

/* 4. VISUALS: Atmospheric Glow & Floating */
.about-visual-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.about-glow-aura {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 75%);
    opacity: 0.15;
    filter: blur(40px);
    z-index: 0;
}

.floating-logo {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 320px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
    animation: aboutLogoFloat 7s ease-in-out infinite; /* Cinematic motion */
}

@keyframes aboutLogoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1.5deg); }
}

/* Mobile Alignment Fix */
@media (max-width: 900px) {
    .about-sub-header {
        text-align: center;
        width: 100%;
    }
    .about-sub-header::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .about-text-wrapper {
        text-align: center;
    }
    .about-text-wrapper p {
        margin-inline: auto;
    }
}

/* ==========================================================================
   SUPPORT & VOTE: HORIZONTAL CINEMATIC LAYOUT
   ========================================================================== */

.support-section {
    padding-block: var(--space-8);
    position: relative;
    background: radial-gradient(circle at 50% 100%, rgba(21, 122, 110, 0.08), transparent 60%);
}

/* 1. HEADER: Guaranteed Vertical Breathing Room */
.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; 
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    margin: 0;
    font-size: var(--text-xl);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* 2. THE GRID: Side-by-Side Logic */
.support-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr; 
    max-width: var(--container-max-width);
    margin-inline: auto;
}

@media (min-width: 860px) {
    .support-grid {
        grid-template-columns: 1.1fr 0.9fr; 
        align-items: stretch; 
    }
}

/* 3. PREMIUM CARD: Animated "Border Beam" */
.support-card--premium {
    position: relative;
    z-index: 1;
    background: rgba(19, 20, 22, 0.5) !important;
    animation: cardFloat 6s ease-in-out infinite; 
}

.support-card--premium::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(
        from var(--beam-angle),
        transparent 70%,
        var(--accent-primary) 85%,
        var(--accent-glow) 95%,
        transparent
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: beamRotate 4s linear infinite;
    pointer-events: none;
}

@property --beam-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes beamRotate {
    to { --beam-angle: 360deg; }
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* 4. BASE CARD: Refined Spacing & Bottom-Aligned Button */
.support-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.support-card--full {
    grid-column: 1 / -1;
}

.support-card h3 {
    margin-bottom: 1.25rem;
    color: var(--text-bright);
}

.support-card p {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.support-card-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.support-card-note {
    color: var(--text-dim);
    font-size: var(--text-sm);
}

/* Hardware List Styling */
.support-features {
    margin-bottom: 3rem; 
    list-style: none; /* Ensure no default bullets */
}

.support-features li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

/* Visual List Marker */
.support-features li::before {
    content: "→";
    color: var(--accent-primary);
    font-weight: bold;
}

/* "Buy Us a Coffee" Button at Bottom */
.btn-premium {
    margin-top: auto; /* Pushes the button to the absolute bottom of the flex card */
    align-self: flex-start;
}

.support-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(21, 122, 110, 0.4);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8), 0 0 30px -10px var(--accent-glow);
}

/* 5. VOTE GRID: Alignment Sync */
.vote-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.25rem;
    margin-top: auto; 
}

.btn-vote {
    position: relative;
    padding: 1.25rem;
    background: rgba(185, 208, 220, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 1;
    overflow: hidden;
}

.btn-vote::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--accent-glow), transparent);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.6s ease, opacity 0.6s ease;
    z-index: -1;
}

.btn-vote:hover::after {
    opacity: 0.15;
    transform: scale(2.5);
}

@media (max-width: 860px) {
    .support-card { padding: 2.5rem; }
    .support-card--premium { animation: none; }
    .vote-grid-2x2 { gap: 0.75rem; }
}

/* ==========================================================================
   5. UTILITIES
   ========================================================================== */

.text-dim {
  color: var(--text-dim);
}

.text-bright {
  color: var(--text-bright);
}

.credit {
  color: var(--text-dim);
  font-size: var(--text-sm);
}

.credit-name {
  color: var(--accent-primary);
  font-style: normal;
  font-weight: 600;
}

/* Join CTA */
.join-cta-section {
  padding-block: var(--space-8);
}

.join-cta-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .join-cta-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.join-cta-content h2 {
  margin-bottom: 1rem;
}

.join-cta-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
  color: var(--text-main);
}

.join-cta-list li {
  padding-left: 1.25rem;
  position: relative;
}

.join-cta-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.join-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.join-cta-media {
  position: relative;
}

.join-cta-stack {
  display: grid;
  gap: 1.25rem;
}

.join-cta-stack img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  object-fit: cover;
}

@media (min-width: 900px) {
  .join-cta-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .join-cta-stack img:first-child {
    grid-column: span 2;
    height: 220px;
  }

  .join-cta-stack img:nth-child(2),
  .join-cta-stack img:nth-child(3) {
    height: 180px;
  }
}

/* Donator CTA */
.donor-cta-section {
  padding-block: var(--space-7);
}

.donor-cta-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem 3rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background: linear-gradient(120deg, rgba(21, 122, 110, 0.18), rgba(19, 20, 22, 0.35));
  box-shadow: var(--card-shadow);
}

.donor-cta-content h2 {
  margin-bottom: 0.75rem;
}

.donor-cta-content {
  max-width: 900px;
}

.donor-cta-kicker {
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: var(--text-xs);
  color: var(--text-dim);
}

.donor-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.donor-cta-inline {
  color: var(--text-dim);
}

.donor-rank-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.donor-rank-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: rgba(19, 20, 22, 0.55);
}

.donor-rank-card h3 {
  margin-bottom: 0.75rem;
}

.donor-rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.donor-rank-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-dim);
}

.donor-rank-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0.4rem;
  font-size: 0.65rem;
  color: var(--accent-primary);
}

.donor-cta-footnote {
  margin-top: 1.5rem;
  font-size: var(--text-sm);
  color: var(--text-dim);
}

@media (max-width: 700px) {
  .donor-cta-card {
    padding: 2rem;
  }
}

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

.mx-auto {
  margin-inline: auto;
}

.list-reset {
  list-style: none;
  padding: 0;
  margin: 0;
}

.is-active {
  color: var(--accent-primary);
}

/* Contact card */
.contact-card {
  padding: 3rem;
}

.contact-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 900px) {
  .contact-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem;
  }
}

.contact-block h4 {
  font-size: var(--text-lg);
  margin-bottom: 0.6rem;
  color: var(--text-bright);
}

.contact-block--split {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

@media (min-width: 900px) {
  .contact-block--split {
    padding-top: 0;
    border-top: 0;
    padding-left: 2.5rem;
    border-left: 1px solid var(--border-color);
  }
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.contact-tag {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.contact-detail {
  font-weight: 600;
  color: var(--text-bright);
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-primary);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition:
    transform 0.2s cubic-bezier(0.2, 0, 0.2, 1),
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.contact-email:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -12px var(--accent-glow);
}

.contact-divider {
  height: 1px;
  width: min(900px, 100%);
  margin: 1.5rem auto 0;
  background: linear-gradient(90deg, transparent, rgba(185, 208, 220, 0.4), transparent);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.75rem;
}

/* Standard Margins */
.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

/* Responsive Grid for mobile */
@media (max-width: 600px) {
  .card {
    padding: 2rem;
  }

  .vote-grid-2x2 {
    grid-template-columns: 1fr;
  }
}
