/* ===========================================
   New Home Page Styles
   =========================================== */

/* ===========================================
   CSS Variables - Light Mode (default)
   =========================================== */
:root {
  /* Backgrounds */
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-surface-elevated: #ffffff;

  /* Text */
  --color-text: #1a1a1a;
  --color-text-secondary: #6b6b6b;
  --color-text-muted: #9a9a9a;

  /* Accent */
  --color-accent: #2d7a85;
  --color-accent-hover: #236770;
  --color-accent-light: #e8f4f5;
  --color-accent-text: #ffffff;

  /* Borders */
  --color-border: rgba(0,0,0,0.06);
  --color-border-strong: rgba(0,0,0,0.12);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);

  /* Nav */
  --nav-bg: rgba(245,245,244,0.92);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Spacing & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ===========================================
   CSS Variables - Dark Mode
   =========================================== */
@media (prefers-color-scheme: dark) {
  :root {
    /* Backgrounds */
    --color-bg: rgba(31, 33, 33, 1);
    --color-surface: #141414;
    --color-surface-elevated: #1a1a1a;

    /* Text */
    --color-text: #f0f0f0;
    --color-text-secondary: #a0a0a0;
    --color-text-muted: #707070;

    /* Accent - slightly brighter for dark mode */
    --color-accent: #4db8c7;
    --color-accent-hover: #5ec9d8;
    --color-accent-light: rgba(77, 184, 199, 0.15);
    --color-accent-text: #0a0a0a;

    /* Borders */
    --color-border: rgba(255,255,255,0.06);
    --color-border-strong: rgba(255,255,255,0.12);

    /* Shadows - subtle in dark mode */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);

    /* Nav */
    --nav-bg: rgba(35,35,35,0.92);
  }
}

/* ===========================================
   Base Styles
   =========================================== */
body:has(.new-home) {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
}

.new-home * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.new-home {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===========================================
   Navigation
   =========================================== */
.new-home .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.new-home .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.new-home .nav-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.new-home .nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.new-home .nav-links a {
  font-size: 0.875rem;
  font-weight: 450;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.new-home .nav-links a:hover {
  color: var(--color-text);
}

/* ===========================================
   Hero Section
   =========================================== */
.new-home .hero {
  padding: 120px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.new-home .hero-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: center;
}

.new-home .hero-text h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.new-home .hero-text h1 span {
  display: block;
  color: var(--color-accent);
}

.new-home .hero-text p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 420px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.new-home .hero-stats {
  display: flex;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.new-home .stat {
  display: flex;
  flex-direction: column;
}

.new-home .stat-value {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.new-home .stat-unit {
  font-size: 0.6em;
  font-weight: 400;
  margin-left: 0.15em;
  color: var(--color-text-secondary);
}

.new-home .stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.new-home .hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-lg);
  display: block;
  text-decoration: none;
}

.new-home .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.new-home .hero-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 80px 24px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  color: white;
}

.new-home .hero-image-caption h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.new-home .hero-image-caption p {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Hero loading/placeholder state */
.new-home .hero-image.hero-loading .hero-image-caption {
  display: none;
}

.new-home .hero-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 50%, #e0e0e0 100%);
  background-size: 200% 200%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@media (prefers-color-scheme: dark) {
  .new-home .hero-placeholder {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 50%, #2a2a2a 100%);
    background-size: 200% 200%;
  }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.new-home .hero-image:not(.hero-loading) .hero-placeholder {
  display: none;
}

/* ===========================================
   Section Layout
   =========================================== */
.new-home .section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.new-home .section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
}

.new-home .section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.new-home .section-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
}

.new-home .section-link:hover {
  text-decoration: underline;
}

/* ===========================================
   Post Grid & Cards
   =========================================== */
.new-home .posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.new-home .post-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.new-home .post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.new-home .post-card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.new-home .post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.new-home .post-card:hover .post-card-image img {
  transform: scale(1.03);
}

.new-home .post-card-content {
  padding: 20px;
}

.new-home .post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.new-home .post-card-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.new-home .post-card-tag {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.new-home .post-card-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--color-text);
}

.new-home .post-card-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.new-home .post-card-stats {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.new-home .post-card-stat {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.new-home .post-card-stat svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

/* Featured post (large) */
.new-home .post-featured {
  grid-column: span 2;
}

.new-home .post-featured .post-card-image {
  aspect-ratio: 2/1;
}

.new-home .post-featured .post-card-title {
  font-size: 1.5rem;
}

/* ===========================================
   Category Chips
   =========================================== */
.new-home .categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.new-home .category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.9375rem;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s;
}

.new-home .category-chip:hover {
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-color: var(--color-accent);
}

.new-home .category-chip svg {
  width: 18px;
  height: 18px;
  opacity: 0.6;
}

.new-home .category-chip:hover svg {
  opacity: 1;
}

/* ===========================================
   Footer
   =========================================== */
.new-home .footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 24px;
  margin-top: 40px;
}

.new-home .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.new-home .footer-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.new-home .footer-links {
  display: flex;
  gap: 24px;
}

.new-home .footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-decoration: none;
}

.new-home .footer-links a:hover {
  color: var(--color-text);
}

/* ===========================================
   Categories Section (full-width)
   =========================================== */
.new-home .section-categories {
  background: var(--color-surface);
  margin: 0;
  max-width: none;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 80px 24px;
}

.new-home .section-categories-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 1024px) {
  .new-home .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .new-home .hero-text h1 {
    font-size: 2.75rem;
  }

  .new-home .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .new-home .post-featured {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .new-home .nav-links {
    display: none;
  }

  .new-home .hero {
    padding: 100px 20px 60px;
  }

  .new-home .hero-text h1 {
    font-size: 2.25rem;
  }

  .new-home .hero-stats {
    gap: 24px;
  }

  .new-home .stat-value {
    font-size: 1.5rem;
  }

  .new-home .section {
    padding: 60px 20px;
  }

  .new-home .section-categories {
    padding: 60px 20px;
  }

  .new-home .posts-grid {
    grid-template-columns: 1fr;
  }

  .new-home .post-featured {
    grid-column: span 1;
  }

  .new-home .post-featured .post-card-image {
    aspect-ratio: 16/10;
  }

  .new-home .footer-inner {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .new-home .more-links-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   More Page Links Grid
   =========================================== */
.new-home .more-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.new-home .more-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.new-home .more-link:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.new-home .more-link-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
}

.new-home .more-link-icon svg {
  width: 24px;
  height: 24px;
}

.new-home .more-link:hover .more-link-icon {
  background: var(--color-accent);
  color: var(--color-accent-text);
}

.new-home .more-link-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.new-home .more-link-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}

.new-home .more-link-desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

@media (max-width: 640px) {
  .new-home .more-links-grid {
    grid-template-columns: 1fr;
  }
}
