/* ═══════════════════════════════════════════════════════════════════════
   DoughOps Landing Page Redesign — Override Layer
   Issues addressed: #1 Typography, #2 Color, #3 Hero screenshot,
   #4 Layout breaking, #5 Feature cards, #6 App showcase,
   #8 Dark sections, #9 Mobile CTA, #10 Motion/delight
   ═══════════════════════════════════════════════════════════════════════ */

/* ── #1 Typography: Replace Inter with distinctive bakery-appropriate fonts ── */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ── #2 Warm secondary palette ── */
  --color-cream: #fdf6ed;
  --color-cream-dark: #f5ead8;
  --color-espresso: #2c1810;
  --color-espresso-light: #3d2518;
  --color-espresso-mid: #4a2e1c;
  --color-cocoa: #6b4226;
  --color-warm-gray: #f8f4f0;
  --color-warm-border: #e8ddd0;
  --color-amber-glow: #f5a623;
}

/* Override base font */
body {
  font-family: var(--font-body) !important;
  background: var(--color-cream) !important;
  color: var(--color-espresso) !important;
}

/* All headings get the display serif */
h1, h2, h3,
.section-title,
.hero-title,
.pricing-card h3,
.faq-item h3,
.final-cta h2 {
  font-family: var(--font-display) !important;
  letter-spacing: -0.01em;
}

.section-title {
  font-weight: 400 !important;
}

.section-eyebrow {
  font-family: var(--font-body) !important;
  letter-spacing: 0.12em !important;
  font-weight: 600 !important;
}

/* Nav text */
.nav-logo-text {
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
}

.nav-links a {
  font-family: var(--font-body) !important;
}

/* ── #2 Color: Warm palette throughout ── */

/* Warm cream backgrounds instead of stark white */
.feature-categories,
.app-showcase,
.pos-integration,
.calculator {
  background: var(--color-warm-gray) !important;
}

/* Section alternating — cream tones */
.trust-bar {
  background: var(--color-cream) !important;
  border-top: 1px solid var(--color-warm-border) !important;
  border-bottom: 1px solid var(--color-warm-border) !important;
}

/* ── #8 Dark sections: espresso brown instead of charcoal ── */

.hero.hero-clean {
  background: linear-gradient(170deg, var(--color-espresso) 0%, var(--color-espresso-light) 60%, var(--color-espresso-mid) 100%) !important;
  position: relative;
  overflow: hidden;
}

/* Warm radial glow behind hero */
.hero.hero-clean::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(234,117,32,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero.hero-clean::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 50%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(245,166,35,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* Hero text contrast fixes */
.hero-title {
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-title-accent {
  color: var(--color-glaze-400) !important;
}

.hero-subtitle {
  color: rgba(255, 245, 235, 0.85) !important;
}

.hero-subtitle strong {
  color: #fff !important;
}

.hero-meta span {
  color: rgba(255, 245, 235, 0.75) !important;
}

.hero-cta .btn-outline {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.hero-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
}

/* Pricing section warm dark */
.pricing {
  background: linear-gradient(170deg, var(--color-espresso) 0%, #1e1208 100%) !important;
}

/* FAQ warm dark */
.faq {
  background: var(--color-espresso) !important;
}

.faq-item {
  border-color: var(--color-espresso-mid) !important;
  background: rgba(255,255,255,0.03) !important;
}

/* Final CTA — richer gradient */
.final-cta {
  background: linear-gradient(135deg, #ea7520 0%, #c85a10 40%, #a04510 100%) !important;
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Footer warm dark */
.footer {
  background: var(--color-espresso) !important;
  border-top: 1px solid var(--color-espresso-mid) !important;
}

/* ── Dark section text contrast ── */

/* Pricing text */
.pricing .section-title,
.pricing .pricing-card h3,
.pricing .pricing-amount,
.pricing .pricing-period {
  color: #fff !important;
}

.pricing .section-subtitle,
.pricing .pricing-card-description,
.pricing .pricing-extra {
  color: rgba(255, 245, 235, 0.75) !important;
}

.pricing .pricing-features li {
  color: rgba(255, 245, 235, 0.85) !important;
}

.pricing .pricing-guarantee {
  color: var(--color-glaze-400) !important;
}

/* FAQ text */
.faq .section-title {
  color: #fff !important;
}

.faq-item h3 {
  color: #fff !important;
}

.faq-item p {
  color: rgba(255, 245, 235, 0.8) !important;
}

.faq-item a {
  color: var(--color-glaze-400) !important;
}

/* Footer text */
.footer, .footer a, .footer p {
  color: rgba(255, 245, 235, 0.7) !important;
}

.footer-heading {
  color: rgba(255, 245, 235, 0.9) !important;
}

.footer-logo span, .footer-brand > p {
  color: rgba(255, 245, 235, 0.85) !important;
}

.footer a:hover {
  color: var(--color-glaze-400) !important;
}

/* Final CTA text */
.final-cta h2 {
  color: #fff !important;
}

.final-cta p,
.final-cta-notes span {
  color: rgba(255, 255, 255, 0.9) !important;
}


/* ── #4 Layout: Break the grid, add visual surprise ── */

/* Hero title — larger, more dramatic */
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
  line-height: 1.05 !important;
  font-weight: 400 !important;
  letter-spacing: -0.02em !important;
}

.hero-title-accent {
  font-style: italic;
}

/* Hero screenshot overlaps into trust bar */
.hero-screenshot {
  margin-bottom: -80px !important;
  position: relative;
  z-index: 10;
}

.trust-bar {
  padding-top: 100px !important;
}

/* Who It's For — offset cards on hover with staggered positioning */
.segment-card:nth-child(2),
.segment-card:nth-child(4) {
  transform: translateY(12px);
}

/* Feature section angled top divider */
.feature-categories {
  position: relative;
  padding-top: 5rem !important;
}

.feature-categories::before {
  content: "";
  position: absolute;
  top: -3rem;
  left: 0;
  right: 0;
  height: 4rem;
  background: var(--color-warm-gray);
  clip-path: polygon(0 100%, 100% 30%, 100% 100%);
}

/* Calculator section — angled entry */
.calculator {
  position: relative;
}

.calculator::before {
  content: "";
  position: absolute;
  top: -2rem;
  left: 0;
  right: 0;
  height: 3rem;
  background: var(--color-warm-gray);
  clip-path: polygon(0 30%, 100% 100%, 0 100%);
}


/* ── #5 Feature cards: visual hierarchy with accent borders ── */

.category-card {
  border: 1px solid var(--color-warm-border) !important;
  background: white !important;
  border-radius: 16px !important;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  position: relative;
  overflow: hidden;
}

/* Top accent bar per card — matches icon color */
.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-warm-border);
  transition: height 0.3s ease, background 0.3s ease;
}

.category-card:nth-child(1)::before { background: #3b82f6; }
.category-card:nth-child(2)::before { background: #22c55e; }
.category-card:nth-child(3)::before { background: #d97706; }
.category-card:nth-child(4)::before { background: #ec4899; }
.category-card:nth-child(5)::before { background: #6366f1; }
.category-card:nth-child(6)::before { background: #db2777; }

.category-card:hover::before {
  height: 5px;
}

.category-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 40px -8px rgba(44, 24, 16, 0.12),
              0 8px 16px -4px rgba(44, 24, 16, 0.06) !important;
  border-color: transparent !important;
}

/* Bigger icons */
.category-icon {
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
}

.category-icon svg {
  width: 26px !important;
  height: 26px !important;
}

.category-header h3 {
  font-family: var(--font-display) !important;
  font-size: 1.35rem !important;
  font-weight: 400 !important;
}

.category-features li {
  font-family: var(--font-body) !important;
}


/* ── #6 App showcase: tilted perspective, shadow depth ── */

.showcase-grid {
  perspective: 1200px;
}

.showcase-item .screenshot-mockup {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.5s ease !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(44, 24, 16, 0.1),
              0 2px 8px rgba(44, 24, 16, 0.06) !important;
}

.showcase-item-large .screenshot-mockup {
  transform: rotateY(-2deg) rotateX(1deg);
}

.showcase-item .screenshot-mockup:hover {
  transform: rotateY(0) rotateX(0) translateY(-4px) !important;
  box-shadow: 0 24px 50px rgba(44, 24, 16, 0.15),
              0 8px 20px rgba(44, 24, 16, 0.08) !important;
}

/* #3 Fix lazy loading on showcase images — ensure they load */
.showcase-item .screenshot-mockup img,
.hero-screenshot img {
  min-height: 200px;
  background: linear-gradient(135deg, #f0ebe4 0%, #e8ddd0 100%);
}

.showcase-item h3 {
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
  font-size: 1.25rem !important;
  margin-top: 1rem;
}

/* Browser chrome — warmer */
.browser-chrome {
  background: linear-gradient(180deg, #f5ead8 0%, #efe3d3 100%) !important;
}

.url-bar {
  background: rgba(255,255,255,0.7) !important;
  color: var(--color-cocoa) !important;
}


/* ── #9 Mobile sticky CTA: compact slim bar ── */

.sticky-mobile-cta {
  padding: 8px 12px !important;
  background: rgba(44, 24, 16, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(234, 117, 32, 0.3) !important;
}

.sticky-mobile-cta .btn {
  padding: 10px 16px !important;
  font-size: 0.875rem !important;
  border-radius: 10px !important;
}


/* ── #10 Motion & delight ── */

/* Enhanced fade-in animation — works with existing IntersectionObserver */
.animate-target {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Staggered delays for cards within grids */
.category-card,
.showcase-item,
.pos-card {
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              border-color 0.3s ease !important;
}

/* Hero entrance animation */
@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-screenshot-rise {
  from {
    opacity: 0;
    transform: translateY(60px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-title {
  animation: hero-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-subtitle {
  animation: hero-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero-cta {
  animation: hero-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero-meta {
  animation: hero-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-screenshot {
  animation: hero-screenshot-rise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

/* Button hover — warm glow */
.btn-primary {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(234, 117, 32, 0.4),
              0 0 0 3px rgba(234, 117, 32, 0.1) !important;
  transform: translateY(-2px) !important;
}

/* Pricing cards entrance */
.pricing-card {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s ease,
              border-color 0.3s ease !important;
}

.pricing-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 24px 48px rgba(0,0,0,0.2) !important;
}

/* FAQ items — smooth expand feel */
.faq-item {
  transition: border-color 0.3s ease, background 0.3s ease !important;
}

.faq-item:hover {
  border-color: var(--color-glaze-500) !important;
  background: rgba(234, 117, 32, 0.04) !important;
}

/* Subtle noise texture overlay on hero for depth */
.hero.hero-clean .container::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: overlay;
}

/* POScard warm borders */
.pos-card {
  border-color: var(--color-warm-border) !important;
  background: white !important;
}

.pos-card:hover {
  border-color: var(--color-glaze-400) !important;
}

/* Calculator card — warm styling */
.calculator-card {
  border: 1px solid var(--color-warm-border) !important;
  background: white !important;
  border-radius: 16px !important;
}

/* Trust badge styling */
.trust-badge {
  font-family: var(--font-body) !important;
}

/* Pricing card backgrounds — warmer */
.pricing-card {
  background: rgba(255, 248, 240, 0.05) !important;
  border-color: rgba(234, 117, 32, 0.15) !important;
}

.pricing-card:hover {
  background: rgba(255, 248, 240, 0.08) !important;
}

.pricing-card-popular {
  border-color: var(--color-glaze-500) !important;
}

/* Nav — warm backdrop */
.nav {
  background: rgba(253, 246, 237, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

.nav-scrolled {
  box-shadow: 0 1px 12px rgba(44, 24, 16, 0.08) !important;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* ── Responsive overrides ── */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem !important;
  }

  .hero-screenshot {
    margin-bottom: -40px !important;
  }

  .trust-bar {
    padding-top: 60px !important;
  }

  .segment-card:nth-child(2),
  .segment-card:nth-child(4) {
    transform: none;
  }

  .feature-categories::before,
  .calculator::before {
    display: none;
  }

  .showcase-item-large .screenshot-mockup {
    transform: none;
  }
}
