/* ==========================================================================
   BEST DONUTS LLC — Production Stylesheet
   Luxury Warm Editorial Theme
   ========================================================================== */

:root {
  /* High Density Theme Color Palette */
  --bg-primary: #FCF8F3;
  --bg-surface: #ffffff;
  --bg-surface-warm: #F7F2EC;
  --bg-card: #ffffff;
  
  --text-main: #2D1B14;
  --text-muted: #574238;
  --text-light: #786154;
  
  --brand-brown: #2D1B14;
  --brand-brown-dark: #1C100B;
  --brand-brown-light: #42291E;
  
  --brand-gold: #D97706;
  --brand-gold-hover: #B45309;
  --brand-gold-light: #FEF3C7;
  
  --accent-cream: #F5EBE1;
  --border-color: #E7E5E4;
  --border-light: #F5F5F4;
  
  /* High Density Sharp Shadows & Borders */
  --shadow-sm: 0 1px 3px rgba(45, 27, 20, 0.05);
  --shadow-md: 0 4px 12px rgba(45, 27, 20, 0.08);
  --shadow-lg: 0 12px 28px rgba(45, 27, 20, 0.12);
  
  /* Layout & Spacing */
  --max-width: 1240px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  /* Typography */
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Transitions */
  --transition: all 0.2s ease-in-out;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--brand-brown);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 10000;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Page Loader */
#loader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  animation: fadeOutLoader 0.4s ease 1.2s forwards;
  pointer-events: none;
}

@keyframes fadeOutLoader {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--brand-brown);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-brown);
  letter-spacing: 1px;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--brand-brown);
  line-height: 1.25;
}

a {
  color: var(--brand-brown);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--brand-gold-hover);
}

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

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Buttons - High Density Theme */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--brand-gold);
  color: #ffffff;
  border-color: var(--brand-gold-hover);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--brand-gold-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background-color: var(--brand-brown);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-gold:hover {
  background-color: var(--brand-brown-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background-color: var(--brand-brown);
  color: #ffffff;
  border-color: var(--brand-brown);
  transform: translateY(-1px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
  background-color: #ffffff;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-brown);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--brand-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  padding: 0.35rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-gold);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand-gold);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--brand-brown);
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Responsive Nav */
@media (max-width: 991px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 2rem 1.5rem;
    gap: 1.25rem;
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: 4rem 0 5rem 0;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--brand-gold-light);
  color: var(--brand-brown);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 900;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--bg-surface);
}

.hero-image-wrapper img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-wrapper:hover img {
  transform: scale(1.03);
}

.floating-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.floating-badge-icon {
  width: 38px;
  height: 38px;
  background-color: var(--accent-cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-brown);
  font-size: 1.2rem;
}

.floating-badge-text h4 {
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

.floating-badge-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-image-wrapper img {
    height: 360px;
  }
}

/* ==========================================================================
   Section Layouts
   ========================================================================== */

.section {
  padding: 5rem 0;
}

.section-warm {
  background-color: var(--bg-surface-warm);
}

.section-white {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.section-subtitle {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--brand-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-description {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.about-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.about-content h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.feature-list {
  list-style: none;
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-brown);
}

.feature-icon-check {
  width: 20px;
  height: 20px;
  background-color: var(--brand-gold);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
}

/* Feature Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-gold);
}

.card-icon {
  width: 44px;
  height: 44px;
  background-color: var(--brand-gold-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-gold-hover);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

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

/* Feature Image Card */
.image-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.image-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.image-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.image-card-body {
  padding: 1.75rem;
}

@media (max-width: 991px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-card {
  max-width: 720px;
  margin: 0 auto;
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.contact-icon {
  width: 68px;
  height: 68px;
  background-color: var(--brand-gold-light);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--brand-brown);
  margin: 0 auto 1.5rem auto;
}

.contact-email-box {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 1.5rem 0 2rem 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-brown);
  word-break: break-all;
}

/* ==========================================================================
   Privacy Policy Page Layout
   ========================================================================== */

.policy-page-header {
  padding: 3.5rem 0 2.5rem 0;
  background-color: var(--bg-surface-warm);
  border-bottom: 1px solid var(--border-color);
}

.policy-title {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
}

.policy-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.policy-layout {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 0 5rem 0;
}

.toc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-height: calc(100vh - var(--header-height) - 3rem);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  line-height: 1.4;
}

.toc-link:hover, .toc-link.active {
  background-color: var(--accent-cream);
  color: var(--brand-brown);
  font-weight: 700;
}

.policy-article {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  line-height: 1.8;
  color: var(--text-main);
  /* Force visible immediately */
  opacity: 1 !important;
  visibility: visible !important;
}

.policy-section {
  margin-bottom: 2.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
  scroll-margin-top: calc(var(--header-height) + 2rem);
}

.policy-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.policy-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--brand-brown);
}

.policy-section p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.policy-section ul, .policy-section ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-muted);
}

.policy-section li {
  margin-bottom: 0.5rem;
}

.policy-highlight-box {
  background-color: var(--bg-primary);
  border-left: 4px solid var(--brand-gold);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

@media (max-width: 991px) {
  .policy-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .toc-sidebar {
    position: static;
    max-height: 320px;
  }
  .policy-article {
    padding: 1.75rem;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--brand-brown-dark);
  color: var(--accent-cream);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
  border-top: 4px solid var(--brand-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffffff;
}

.footer-desc {
  color: #d1c0b3;
  font-size: 0.95rem;
  max-width: 400px;
}

.footer-title {
  font-family: var(--font-serif);
  color: var(--brand-gold);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link {
  color: #d1c0b3;
  font-size: 0.9rem;
}

.footer-link:hover {
  color: var(--brand-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #a89485;
}

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

/* Scroll To Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background-color: var(--brand-brown);
  color: #ffffff;
  border: 2px solid var(--brand-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 900;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  background-color: var(--brand-gold);
  color: var(--brand-brown-dark);
  transform: translateY(-3px);
}
