/*
Theme Name: Collective Sudan Custom
Theme URI: https://collectivesudan.org
Author: Antigravity
Description: Apple-inspired Black & White theme
Version: 2.0.0
Text Domain: collectivesudan
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #1D1D1F; /* Apple dark text */
  --color-secondary: #86868B; /* Apple gray text */
  --color-accent: #000000; /* Pure black for buttons/highlights */
  --color-background: #FFFFFF; /* Pure white */
  --color-surface: #F5F5F7; /* Apple card gray bg */
  --color-white: #FFFFFF;
  --color-border: #D2D2D7; /* Apple border */

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Roboto", "Inter", sans-serif;
  --font-family-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Roboto", "Inter", sans-serif;
  
  --font-h1: 700 clamp(48px, 6vw, 80px)/1.05 var(--font-family-display);
  --font-h2: 600 clamp(32px, 4vw, 56px)/1.1 var(--font-family-display);
  --font-h3: 600 28px/1.2 var(--font-family-display);
  --font-body: 400 17px/1.47059 var(--font-family);
  --font-label: 600 12px/1 var(--font-family);
  --font-btn: 500 16px/1 var(--font-family);

  --max-width: 1024px;
  --gap: 32px;
  --padding-section: 120px;
  --radius-sm: 8px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 980px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font: var(--font-body);
  color: var(--color-primary);
  background-color: var(--color-background);
  letter-spacing: -0.022em;
  scroll-behavior: smooth;
}

h1 { font: var(--font-h1); letter-spacing: -0.015em; margin-bottom: 24px; text-align: center; }
h2 { font: var(--font-h2); letter-spacing: -0.015em; margin-bottom: 20px; text-align: left;}
h3 { font: var(--font-h3); margin-bottom: 16px; letter-spacing: -0.015em; }
p { font: var(--font-body); color: var(--color-secondary); letter-spacing: -0.022em; }

a { color: inherit; text-decoration: none; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-md); }
ul, ol { list-style: none; }

/* Structural Utility Classes */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.section { padding: var(--padding-section) 0; }
.section-sm { padding: 80px 0; }

.flex-row { display: flex; gap: var(--gap); flex-wrap: wrap; }
.flex-col { display: flex; flex-direction: column; gap: var(--gap); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.text-center h2 { text-align: center; }
.text-center p { margin: 0 auto; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Visual Classes */
.bg-primary { background-color: var(--color-accent); color: var(--color-white); }
.bg-primary p { color: #A1A1A6; }
.bg-primary h2, .bg-primary h1, .bg-primary h3 { color: var(--color-white); }
.bg-background { background-color: var(--color-background); }
.bg-white { background-color: var(--color-white); }
.bg-surface { background-color: var(--color-surface); }
.bg-alert, .bg-primary .overline, .bg-background .overline { background: none; }

.text-white { color: var(--color-white); }
.text-primary, .bg-background h2, .bg-white h2 { color: var(--color-primary); }
.text-surface { color: var(--color-secondary); }

/* Typography Patterns */
.overline {
  font: var(--font-label);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 16px;
  display: block;
}

.divider-bar { display: none; } /* Hide hard lines */

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font: var(--font-btn);
  letter-spacing: -0.01em;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.btn-primary { background-color: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { transform: scale(1.02); background-color: #000000; box-shadow: 0 4px 14px rgba(0,0,0,0.2); }

.btn-ghost { background-color: transparent; border: 1px solid var(--color-border); color: var(--color-primary); }
.btn-ghost:hover { background-color: var(--color-surface); }
.bg-primary .btn-ghost { border-color: #424245; color: var(--color-white); }
.bg-primary .btn-ghost:hover { background-color: #424245; }
.bg-primary .btn-primary { background-color: var(--color-white); color: var(--color-primary); }
.bg-primary .btn-primary:hover { transform: scale(1.02); background-color: #F5F5F7; box-shadow: 0 4px 14px rgba(255,255,255,0.2); }

.btn-text-link {
  font: var(--font-btn);
  color: var(--color-primary);
  border-bottom: 1px solid transparent;
  padding: 0 0 2px 0;
  display: inline-block;
}
.btn-text-link:hover { border-bottom-color: var(--color-primary); transform: translateX(4px); }
.btn:active, .btn-text-link:active { transform: scale(0.96); box-shadow: none !important; opacity: 0.8; }
a:active { opacity: 0.6; }

/* Glassmorphism Sticky Header */
.site-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  background-color: transparent;
  padding: 20px 0;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.site-header.is-sticky, .site-header.solid-bg {
  background-color: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.site-header .flex-row { flex-wrap: nowrap !important; gap: 16px; justify-content: space-between; } /* Force mobile logo and hamburger onto same line */

.logo-wrap { display: flex; align-items: center; flex: 1; min-width: 0; }
.logo-wrap a { display: flex; align-items: center; position: relative; max-width: 100%; }
.logo-wrap img { height: 48px; padding: 4px 0; max-width: 100%; object-fit: contain; object-position: left center; width: auto; border-radius: 0; transition: opacity 0.3s ease; }

/* SVG Fallback Logo */
.logo-wrap svg { height: 48px; fill: var(--color-white); transition: fill 0.3s ease; }
.site-header.is-sticky .logo-wrap svg,
.site-header.solid-bg .logo-wrap svg { fill: var(--color-primary); }

/* Customizer Two-Logo Switcher */
.logo-fade-wrap { position: relative; display: flex; height: 48px; }
.logo-alt { position: absolute; top: 0; left: 0; height: 100%; width: auto; opacity: 1; }
.logo-main { opacity: 0; }

.site-header.is-sticky .logo-main,
.site-header.solid-bg .logo-main { opacity: 1; }
.site-header.is-sticky .logo-alt,
.site-header.solid-bg .logo-alt { opacity: 0; }

.main-navigation ul { display: flex; gap: 32px; }
.main-navigation a {
  font: 400 13px/1 var(--font-family);
  color: var(--color-white);
  opacity: 0.9;
  letter-spacing: -0.01em;
  text-transform: none;
}
.main-navigation a:hover { opacity: 1; text-decoration: underline; }
.site-header.is-sticky .main-navigation a,
.site-header.solid-bg .main-navigation a { color: var(--color-primary); }

/* Remove SVG overrides */
.site-header.is-sticky .logo-wrap text,
.site-header.solid-bg .logo-wrap text { fill: var(--color-primary) !important; }

/* Mobile Menu */
.nav-toggle { display: none; background: transparent; border: none; cursor: pointer; color: var(--color-primary); padding:8px; margin-right: -8px;}
.site-header:not(.is-sticky):not(.solid-bg) .nav-toggle { color: var(--color-white); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-navigation { margin-left: auto; } /* explicitly push toggle right */
  .main-navigation ul { 
    display: flex; /* keep flex so it interpolates opacity/transform correctly */
    flex-direction: column; 
    gap: 24px; 
    padding: 32px;
    position: absolute; 
    top: 100%; left: 0; width: 100vw; height: 100dvh; overflow-y: auto; padding-bottom: 120px;
    background-color: rgba(255, 255, 255, 0.98); 
    backdrop-filter: saturate(180%) blur(20px); 
    -webkit-backdrop-filter: saturate(180%) blur(20px); 
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: all 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
  }
  .main-navigation.is-open ul { 
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .main-navigation.is-open a { color: var(--color-primary) !important; font-size: 18px; font-weight: 500; }
  .header-cta { display: none !important; } /* hide header CTA on mobile to avoid crowding */
}

/* Stats Bar */
.stats-bar { background-color: var(--color-surface); padding: 60px 0; border: none; }
.stat-item { flex: 1; padding: 24px; border: none; text-align: center; }
.stat-number { font: var(--font-h2); color: var(--color-primary); margin-bottom: 8px;}
.stat-label { font: var(--font-label); color: var(--color-secondary); text-transform: uppercase; letter-spacing: 0.05em;}

/* Two Column Layout blocks */
.split-section { padding: var(--padding-section) 0; overflow: hidden; }
.split-content { width: calc(45% - (var(--gap) / 2)); padding-right: 40px; transition: all 0.3s ease; }
.split-image { width: calc(55% - (var(--gap) / 2)); transition: all 0.3s ease; }
.split-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); box-shadow: 0 20px 40px rgba(0,0,0,0.06); }
.split-reverse { flex-direction: row-reverse; }
.split-reverse .split-content { padding-right: 0; padding-left: 40px; }

@media (max-width: 992px) {
  .flex-row { flex-direction: column; }
  .split-content, .split-image { width: 100%; padding: 0 !important; }
  .stat-item { flex: 0 0 50%; }
}

/* Footer structure */
.site-footer {
  background-color: var(--color-surface);
  color: var(--color-primary);
  padding: 60px 0 20px;
  border-top: 1px solid var(--color-border);
}
.footer-logo-col img { border-radius: 0; height: auto; width: 100%; max-width: 150px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { height: 24px; margin-bottom: 16px; }
.footer-desc { color: var(--color-secondary); font-size: 13px; }
.footer-col h4 { font: 600 12px/1 var(--font-family); color: var(--color-primary); margin-bottom: 16px; font-weight: 600; text-transform:none; letter-spacing:0;}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--color-secondary); font: 400 13px/1 var(--font-family); }
.footer-col a:hover { color: var(--color-primary); }
.footer-social { display: flex; gap: 16px; font-size: 18px;}
.footer-social a { color: var(--color-secondary); }
.footer-social a:hover { color: var(--color-primary); }
.footer-bottom { border-top: 1px solid var(--color-border); padding-top: 20px; text-align: center; font: 400 12px/1 var(--font-family); color: var(--color-secondary); }

@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }

/* Hero specific structures */
.hero-section { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; text-align: center; }
.hero-vh-100 { height: 100vh; }
.hero-vh-60 { height: 60vh; }
.hero-vh-40 { height: 40vh; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1; }
.hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero-subtitle { color: rgba(255,255,255,0.8) !important; font-size: 24px; max-width: 700px; margin: 0 auto; letter-spacing: -0.01em;}
.hero-buttons { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; width: 100%; }

/* Context Apple-style fact strips */
.fact-strip {
  background: rgba(255,255,255,0.15);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 600px;
  border: 1px solid rgba(255,255,255,0.2);
  gap: 16px;
}
.fact-strip p { color: var(--color-white); margin: 0; }

/* Apple Form Styles */
.bauhaus-form input, .bauhaus-form select, .bauhaus-form textarea {
  width: 100%; border: 1px solid var(--color-border); padding: 16px; font: 400 16px var(--font-family); background: var(--color-surface); color: var(--color-primary); border-radius: var(--radius-sm); transition: all 0.3s ease;
}
.bauhaus-form input:focus, .bauhaus-form select:focus, .bauhaus-form textarea:focus { outline: none; border-color: var(--color-primary); background: var(--color-white); box-shadow: 0 0 0 4px rgba(0,0,0,0.05); }

/* Subscription Strip Apple Style */
.sub-strip { background: var(--color-surface); padding: 80px 0; }
.sub-strip h2 { color: var(--color-primary); }
.sub-strip form { display: flex; width: 400px; max-width: 100%; gap: 12px; }
.sub-strip input { flex:1; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: var(--color-white); color: var(--color-primary); font: 400 16px var(--font-family); }
.sub-strip button { padding: 16px 32px; border-radius: var(--radius-pill); }

/* Logo grid */
.logo-cell img { border-radius: 0; opacity: 0.6; transition: opacity 0.3s; filter: grayscale(100%); }
.logo-cell img:hover { opacity: 1; filter: grayscale(0%); }

.partner-card {
    background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 32px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.3s; text-align: center;
}
.partner-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }
.partner-card img { filter: grayscale(100%); transition: filter 0.3s; border-radius:0; }
.partner-card:hover img { filter: grayscale(0%); }
