/* =====================================================
   PRIMETIMEGREENS — Reusable CSS Components
   Built on top of variables.css
   ===================================================== */

/* ── Base Reset & Defaults ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg-body);
  color: var(--color-text-body);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

::-webkit-scrollbar {
  display: none;
}

::selection {
  background-color: var(--color-leaf-vibrant);
  color: white;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Typography ── */
.font-editorial {
  font-family: var(--font-display);
  letter-spacing: var(--letter-spacing-editorial);
}

.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

.heading-hero {
  font-family: var(--font-display);
  letter-spacing: var(--letter-spacing-editorial);
  font-weight: 800;
  line-height: 1.08;
  color: var(--color-text-heading);
}

.heading-section {
  font-family: var(--font-display);
  letter-spacing: var(--letter-spacing-tight);
  font-weight: 700;
  color: var(--color-text-heading);
}

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

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

/* ── Layout Containers ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 640px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

@media (min-width: 640px) {
  .section {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }
}

/* ── Navigation (Floating Pill) ── */
.nav-pill {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-pill);
  padding: 0.625rem 1rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .nav-pill {
    padding: 0.625rem 1.5rem;
  }
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.7);
  transition: color var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: #000;
  font-weight: 600;
}

/* ── Logo ── */
.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.logo-mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--color-forest-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
}

.logo:hover .logo-mark {
  transform: scale(1.05);
}

.logo-mark-inner {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-leaf-light);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-forest-deep);
}

.logo-text .accent {
  color: var(--color-leaf-vibrant);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
  text-decoration: none;
  line-height: 1;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background-color: var(--color-dark-surface);
  color: white;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  background-color: #000;
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background-color: white;
  color: #000;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
  background-color: #fafafa;
  border-color: rgba(0, 0, 0, 0.3);
}

.btn-sm {
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
}

.btn-dark {
  background-color: #000;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.btn-dark:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.btn-accent {
  background-color: var(--color-secondary-fixed);
  color: #000;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.625rem 1rem;
}

.btn-accent:hover {
  background-color: white;
}

.btn-white {
  background-color: white;
  color: #000;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
}

.btn-white:hover {
  background-color: #f5f5f5;
}

.btn-disabled {
  background-color: var(--color-bg-card-alt);
  color: rgba(0, 0, 0, 0.7);
  cursor: default;
}

.btn-disabled:active {
  transform: none;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ── Eyebrow / Pill Tags ── */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.875rem;
  border-radius: var(--radius-pill);
  background-color: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.7);
}

.eyebrow-pill-dark {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--color-secondary-fixed);
  font-family: var(--font-mono);
}

.tag {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

.tag-sm {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
}

.badge-blur {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Status Dot ── */
.status-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  display: inline-block;
}

.status-dot-green {
  background-color: var(--color-leaf-light);
}

.status-dot-accent {
  background-color: var(--color-secondary-fixed);
}

.status-dot-glow {
  background-color: var(--color-emerald);
  box-shadow: var(--shadow-glow-dot);
}

/* ── Cards ── */
.card {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: white;
  box-shadow: var(--shadow-lg);
  transition: box-shadow var(--transition-slow);
}

.card:hover {
  box-shadow: var(--shadow-xl);
}

.card-lg {
  border-radius: var(--radius-card-lg);
}

.card-dark {
  background-color: var(--color-dark-surface);
  color: white;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-2xl);
}

.card-dark-deep {
  background-color: var(--color-dark-card);
  color: white;
  border-color: rgba(255, 255, 255, 0.1);
}

.card-sand {
  background-color: var(--color-sand-gold);
  border-color: rgba(217, 191, 96, 0.6);
}

.card-neutral {
  background-color: var(--color-bg-card-alt);
  border-color: rgba(0, 0, 0, 0.05);
}

/* ── Offering Card (Staggered Showcase) ── */
.offering-card {
  background: white;
  border-radius: var(--radius-card-lg);
  border: 1px solid rgba(0, 0, 0, 0.1);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr;
  transition: box-shadow var(--transition-slow);
}

.offering-card:hover {
  box-shadow: var(--shadow-xl);
}

@media (min-width: 1024px) {
  .offering-card {
    grid-template-columns: 7fr 5fr;
  }
}

.offering-card__image {
  position: relative;
  height: 18rem;
  overflow: hidden;
}

@media (min-width: 640px) {
  .offering-card__image {
    height: 24rem;
  }
}

.offering-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offering-card__body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #FDFDFD;
}

@media (min-width: 640px) {
  .offering-card__body {
    padding: 2.5rem;
  }
}

/* ── Blog Card ── */
.blog-card {
  background: white;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow var(--transition-slow);
}

.blog-card:hover {
  box-shadow: var(--shadow-sm);
}

.blog-card__image {
  height: 12rem;
  position: relative;
  overflow: hidden;
}

.blog-card__body {
  padding: var(--space-6);
}

/* ── Avatar Stack ── */
.avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.625rem;
  border: 2px solid white;
}

.avatar-lg {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 0.75rem;
}

.avatar-xl {
  width: 4rem;
  height: 4rem;
  font-size: 0.875rem;
}

.avatar-stack {
  display: flex;
}

.avatar-stack > * + * {
  margin-left: -0.5rem;
}

/* ── Micro Bar Chart ── */
.micro-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.375rem;
  height: 3rem;
}

.micro-bar-chart__bar {
  flex: 1;
  border-radius: 1px;
}

/* ── Notice Strip ── */
.notice-strip {
  width: 100%;
  background-color: #0E1612;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: var(--letter-spacing-wide);
}

/* ── Dark Statement Block ── */
.dark-block {
  background-color: var(--color-dark-card);
  color: white;
  border-radius: var(--radius-card-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-2xl);
  position: relative;
  overflow: hidden;
}

/* ── Form Inputs ── */
.input {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  background-color: white;
  color: var(--color-text-body);
  outline: none;
  transition: border-color var(--transition-base);
}

.input:focus {
  border-color: var(--color-leaf-vibrant);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.input-dark {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: var(--radius-pill);
}

.input-dark::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.input-dark:focus {
  border-color: var(--color-secondary-fixed);
}

textarea.input {
  resize: vertical;
  min-height: 8rem;
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-heading);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

/* ── Metric / Stat Display ── */
.stat-value {
  font-family: var(--font-display);
  letter-spacing: var(--letter-spacing-editorial);
  font-weight: 800;
  color: var(--color-text-heading);
}

.stat-value-green {
  color: var(--color-leaf-vibrant);
}

.stat-label {
  font-size: 0.625rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
}

/* ── Footer ── */
.footer {
  width: 100%;
  background-color: var(--color-dark-footer);
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-link {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-base);
}

.footer-link:hover {
  color: var(--color-secondary-fixed);
}

.footer-heading {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: var(--letter-spacing-wider);
}

/* ── Utility Classes ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, 1fr); }
}

.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }

.hidden { display: none; }
@media (min-width: 640px) {
  .sm\:inline-flex { display: inline-flex; }
  .sm\:inline { display: inline; }
}
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:block { display: block; }
}
@media (min-width: 1024px) {
  .lg\:inline { display: inline; }
}

/* ── Admin-Specific Components ── */
.admin-sidebar {
  width: 260px;
  background-color: var(--color-dark-surface);
  color: white;
  min-height: 100vh;
  padding: var(--space-6);
}

.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--transition-base);
}

.admin-sidebar-link:hover,
.admin-sidebar-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.admin-content {
  flex: 1;
  padding: var(--space-8);
  background-color: var(--color-bg-body);
}

.admin-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-subtle);
  padding: var(--space-6);
  box-shadow: var(--shadow-xs);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-text-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.admin-table td {
  padding: var(--space-4);
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: var(--color-bg-body);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
}

.status-badge-published {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--color-leaf-vibrant);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-badge-draft {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--color-text-slate);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ── Prose / Article Content ── */
.prose {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text-body);
  max-width: 65ch;
}

.prose h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-text-heading);
}

.prose h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text-heading);
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose img {
  border-radius: var(--radius-xl);
  margin: 1.5rem 0;
}

.prose blockquote {
  border-left: 3px solid var(--color-leaf-vibrant);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ── Flash / Alert Messages ── */
.alert {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: var(--space-6);
}

.alert-success {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--color-leaf-vibrant);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.1);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Hero Changing Background Slideshow ── */
.hero-bg-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: opacity 1200ms cubic-bezier(0.4, 0, 0.2, 1), transform 8000ms cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

/* Atmospheric contrast overlays */
.hero-overlay-balanced {
  background: linear-gradient(
    180deg,
    rgba(250, 250, 248, 0.89) 0%,
    rgba(250, 250, 248, 0.77) 32%,
    rgba(250, 250, 248, 0.84) 70%,
    #FAFAF8 100%
  );
}

.hero-overlay-subtle {
  background: linear-gradient(
    180deg,
    rgba(250, 250, 248, 0.95) 0%,
    rgba(250, 250, 248, 0.88) 32%,
    rgba(250, 250, 248, 0.92) 70%,
    #FAFAF8 100%
  );
}

.hero-overlay-vivid {
  background: linear-gradient(
    180deg,
    rgba(250, 250, 248, 0.80) 0%,
    rgba(250, 250, 248, 0.65) 32%,
    rgba(250, 250, 248, 0.75) 70%,
    #FAFAF8 100%
  );
}
