/* =============================================
   HOMEPAGE CSS - BASE STYLES
   The Cybartender - Astra Child Theme
   General styles, typography, utilities
   ============================================= */

/* =============================================
   TYPOGRAPHY - GOOGLE FONTS
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&family=JetBrains+Mono:wght@400;600;700&display=swap');

/* =============================================
   BASE RESET & BODY
   ============================================= */

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1410;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Override Astra defaults for homepage */
.cyb-homepage-editorial {
  font-family: 'Source Serif 4', Georgia, serif;
}

/* =============================================
   HEADINGS
   ============================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1410;
  margin: 0;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

/* =============================================
   LINKS
   ============================================= */

a {
  color: #b8420a;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #d96e35;
}

a:focus {
  outline: 2px solid #b8420a;
  outline-offset: 2px;
}

/* =============================================
   IMAGES
   ============================================= */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: 0;
}

/* =============================================
   UTILITIES
   ============================================= */

/* Spacing */
.cyb-mt-1 { margin-top: 0.5rem; }
.cyb-mt-2 { margin-top: 1rem; }
.cyb-mt-3 { margin-top: 1.5rem; }
.cyb-mt-4 { margin-top: 2rem; }
.cyb-mt-5 { margin-top: 3rem; }

.cyb-mb-1 { margin-bottom: 0.5rem; }
.cyb-mb-2 { margin-bottom: 1rem; }
.cyb-mb-3 { margin-bottom: 1.5rem; }
.cyb-mb-4 { margin-bottom: 2rem; }
.cyb-mb-5 { margin-bottom: 3rem; }

.cyb-pt-1 { padding-top: 0.5rem; }
.cyb-pt-2 { padding-top: 1rem; }
.cyb-pt-3 { padding-top: 1.5rem; }
.cyb-pt-4 { padding-top: 2rem; }
.cyb-pt-5 { padding-top: 3rem; }

.cyb-pb-1 { padding-bottom: 0.5rem; }
.cyb-pb-2 { padding-bottom: 1rem; }
.cyb-pb-3 { padding-bottom: 1.5rem; }
.cyb-pb-4 { padding-bottom: 2rem; }
.cyb-pb-5 { padding-bottom: 3rem; }

/* Text alignment */
.cyb-text-center { text-align: center; }
.cyb-text-left { text-align: left; }
.cyb-text-right { text-align: right; }

/* Display */
.cyb-hidden { display: none; }
.cyb-block { display: block; }
.cyb-inline-block { display: inline-block; }

/* =============================================
   LOADING STATES
   ============================================= */

.cyb-loading {
  opacity: 0.6;
  pointer-events: none;
}

.cyb-skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: cyb-skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes cyb-skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */

.cyb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to content link */
.cyb-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #b8420a;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.cyb-skip-link:focus {
  top: 0;
}

/* =============================================
   PRINT STYLES
   ============================================= */

@media print {
  .cyb-masthead-bottom,
  .cyb-newsletter-slim,
  .cyb-btn {
    display: none;
  }
  
  body {
    font-size: 12pt;
  }
  
  h1 { font-size: 24pt; }
  h2 { font-size: 20pt; }
  h3 { font-size: 18pt; }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}

/* =============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================= */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* GPU acceleration for transforms */
.cyb-main-story-img,
.cyb-secondary-story-img,
.cyb-feed-img {
  transform: translateZ(0);
  will-change: transform;
}

/* Prevent layout shift with aspect ratio */
.cyb-main-story-figure,
.cyb-secondary-story-media,
.cyb-feed-thumb {
  position: relative;
}

.cyb-main-story-img {
  aspect-ratio: 3 / 2;
}

.cyb-secondary-story-img {
  aspect-ratio: 4 / 3;
}

.cyb-feed-img {
  aspect-ratio: 1 / 1;
}

/* =============================================
   ASTRA OVERRIDES - HOMEPAGE ONLY
   ============================================= */

/* Hide default Astra header on homepage */
.home .site-header {
  display: none;
}

/* Remove default content padding */
.home .site-content {
  padding: 0;
}

/* Remove default container constraints */
.home .ast-container {
  max-width: 100%;
  padding: 0;
}

/* Full-width content */
.home .entry-content {
  max-width: 100%;
  padding: 0;
}

/* Remove default margins */
.home .ast-article-single {
  margin: 0;
}

/* =============================================
   RESPONSIVE BASE
   ============================================= */

@media (max-width: 1024px) {
  body {
    font-size: 15px;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* =============================================
   DARK MODE SUPPORT (Optional - Commented Out)
   ============================================= */

/*
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1410;
    color: #f5f2ed;
  }
  
  :root {
    --color-bg-light: #1a1410;
    --color-bg-warm: #2a2420;
    --color-text-primary: #f5f2ed;
    --color-text-secondary: #d0ccc5;
  }
}
*/
