/*
Theme Name: MacDuke OnePage
Theme URI: https://macduke.com
Author: MacDuke
Author URI: https://macduke.com
Description: A premium one-page WordPress theme for MacDuke Food Processing Machinery. Clean, modern, and fully customizable via the WordPress Customizer.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: macduke-onepage
Tags: one-column, custom-menu, featured-images, theme-options, translation-ready
*/

/* =============================================
   CSS Variables / Design Tokens
   ============================================= */
:root {
  --color-bg: #ffffff;
  --color-fg: #141a24;
  --color-steel: hsl(210, 45%, 28%);
  --color-steel-light: hsl(210, 30%, 45%);
  --color-steel-dark: hsl(210, 50%, 18%);
  --color-charcoal: hsl(220, 20%, 10%);
  --color-charcoal-light: hsl(220, 15%, 20%);
  --color-surface: hsl(210, 20%, 97%);
  --color-muted: hsl(220, 10%, 46%);
  --color-border: hsl(220, 13%, 90%);
  --color-white: #ffffff;
  --color-whatsapp: hsl(142, 70%, 40%);
  --color-whatsapp-hover: hsl(142, 70%, 35%);

  --gradient-hero: linear-gradient(135deg, hsl(220, 20%, 10%, 0.92), hsl(210, 45%, 28%, 0.85));
  --gradient-dark: linear-gradient(180deg, hsl(220, 20%, 10%), hsl(220, 20%, 15%));
  --gradient-steel: linear-gradient(135deg, hsl(210, 45%, 28%), hsl(210, 50%, 18%));

  --shadow-card: 0 4px 24px -4px hsl(210, 45%, 28%, 0.08);
  --shadow-card-hover: 0 12px 40px -8px hsl(210, 45%, 28%, 0.15);
  --shadow-elevated: 0 20px 60px -12px hsl(220, 20%, 10%, 0.2);

  --radius: 0.75rem;
  --container: 1200px;
  --header-h: 72px;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  color: var(--color-fg);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius);
  padding: 0.75rem 1.75rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-steel {
  background: var(--gradient-steel);
  color: var(--color-white);
}
.btn-steel:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-outline {
  border: 1.5px solid var(--color-border);
  color: var(--color-fg);
  background: transparent;
}
.btn-outline:hover { border-color: var(--color-steel); color: var(--color-steel); }

.btn-hero {
  background: var(--color-white);
  color: var(--color-charcoal);
  font-size: 1rem;
  padding: 1rem 2rem;
}
.btn-hero:hover { opacity: 0.9; }

.btn-hero-outline {
  border: 1.5px solid rgba(255,255,255,0.3);
  color: var(--color-white);
  font-size: 1rem;
  padding: 1rem 2rem;
}
.btn-hero-outline:hover { border-color: var(--color-white); background: rgba(255,255,255,0.1); }

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
}
.btn-whatsapp:hover { background: var(--color-whatsapp-hover); }

.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }

/* =============================================
   Header / Navigation
   ============================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s;
}
.site-header.scrolled {
  box-shadow: var(--shadow-card);
}

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

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.logo-accent { color: var(--color-steel); }
.logo-sub { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--color-muted); font-weight: 500; }

.nav-desktop { display: none; gap: 0.25rem; align-items: center; }
@media (min-width: 1024px) { .nav-desktop { display: flex; } }

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  border-radius: 0.375rem;
  transition: all 0.2s;
}
.nav-link:hover { color: var(--color-fg); background: var(--color-surface); }

.header-cta { display: none; }
@media (min-width: 1024px) { .header-cta { display: flex; align-items: center; gap: 0.75rem; } }

.mobile-toggle {
  display: flex;
  padding: 0.5rem;
  color: var(--color-fg);
}
@media (min-width: 1024px) { .mobile-toggle { display: none; } }

.mobile-toggle svg {
  width: 24px; height: 24px;
}

.mobile-menu {
  display: none;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem;
}
.mobile-menu.active { display: block; }
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }

.mobile-menu .nav-link {
  display: block;
  padding: 0.75rem 1rem;
}

/* =============================================
   Section shared
   ============================================= */
.section { padding: 5rem 0; }
.section-alt { background: var(--color-surface); }
.section-dark { background: var(--color-charcoal); color: var(--color-white); }
.section-gradient { background: var(--gradient-dark); color: var(--color-white); }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-steel);
  margin-bottom: 0.75rem;
  display: block;
}
.section-dark .section-label,
.section-gradient .section-label { color: var(--color-steel-light); }

.section-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.section-dark .section-title { color: var(--color-white); }

.section-desc {
  color: var(--color-muted);
  max-width: 540px;
  margin: 0 auto;
}
.section-dark .section-desc { color: rgba(255,255,255,0.6); }

/* =============================================
   Hero
   ============================================= */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: var(--header-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
}
.hero-content {
  position: relative;
  max-width: 720px;
  padding: 5rem 0;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  margin-bottom: 1.5rem;
}
.hero-badge-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: hsl(142,70%,50%);
}
.hero-badge-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}
.hero h1 span { color: var(--color-steel-light); }
.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.7);
  max-width: 540px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-trust {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(20,26,36,0.8);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 0;
}
.hero-trust-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
}
@media (min-width: 768px) { .hero-trust-inner { justify-content: space-between; } }
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
}
.trust-item svg { width: 16px; height: 16px; color: var(--color-steel-light); }

/* =============================================
   Products
   ============================================= */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }

.product-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s, transform 0.3s;
}
.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}
.product-card-img {
  aspect-ratio: 1;
  background: var(--color-surface);
  overflow: hidden;
  position: relative;
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(20,26,36,0.8);
  color: var(--color-white);
  border-radius: 0.375rem;
  backdrop-filter: blur(4px);
}
.product-card-body { padding: 1.25rem 1.5rem; }
.product-card-body h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.product-card-body p { font-size: 0.875rem; color: var(--color-muted); margin-bottom: 1rem; line-height: 1.5; }

.product-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.spec-item {
  text-align: center;
  padding: 0.5rem;
  background: var(--color-surface);
  border-radius: 0.5rem;
}
.spec-label { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); display: block; }
.spec-value { font-size: 0.75rem; font-weight: 600; margin-top: 0.125rem; display: block; }

/* =============================================
   Why MacDuke (About)
   ============================================= */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: var(--color-bg);
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s;
}
.feature-card:hover { box-shadow: var(--shadow-card-hover); }
.feature-icon {
  width: 3rem; height: 3rem;
  border-radius: 0.5rem;
  background: hsl(210,45%,28%,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--color-steel);
}
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--color-muted); line-height: 1.6; }

.metrics-bar {
  background: var(--color-charcoal);
  border-radius: 1rem;
  padding: 2rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}
.metric-value { font-size: 2.5rem; font-weight: 800; color: var(--color-steel-light); margin-bottom: 0.25rem; }
.metric-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); font-weight: 500; }

/* =============================================
   Gallery
   ============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,26,36,0.2);
  transition: background 0.3s;
}
.gallery-item:hover .gallery-overlay { background: rgba(20,26,36,0.1); }

/* =============================================
   Testimonials
   ============================================= */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .testimonials-grid { grid-template-columns: repeat(2, 1fr); } }

.testimonial-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.testimonial-text {
  font-size: 0.9375rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-style: italic;
}
.testimonial-text::before { content: '\201C'; font-size: 1.5rem; color: var(--color-steel); margin-right: 0.25rem; }
.testimonial-author { font-size: 0.875rem; font-weight: 700; }
.testimonial-role { font-size: 0.75rem; color: var(--color-muted); }

/* =============================================
   FAQ
   ============================================= */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  color: var(--color-fg);
  transition: background 0.2s;
}
.faq-question:hover { background: var(--color-surface); }
.faq-question svg {
  width: 20px; height: 20px;
  color: var(--color-muted);
  flex-shrink: 0;
  transition: transform 0.3s;
}
.faq-item.active .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.7;
}
.faq-item.active .faq-answer { display: block; }

/* =============================================
   Contact
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 2fr 1fr; } }

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--color-bg);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-steel);
}

.contact-info {
  background: var(--color-surface);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--color-border);
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}
.contact-info h3 { font-size: 1.125rem; margin-bottom: 1.5rem; }
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.contact-info-item svg { width: 20px; height: 20px; color: var(--color-steel); flex-shrink: 0; margin-top: 2px; }
.contact-info-label { font-size: 0.875rem; font-weight: 500; }
.contact-info-value { font-size: 0.875rem; color: var(--color-muted); }

.form-message {
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  display: none;
}
.form-message.success { display: block; background: hsl(142,50%,92%); color: hsl(142,70%,30%); }
.form-message.error { display: block; background: hsl(0,70%,95%); color: hsl(0,70%,40%); }

/* =============================================
   CTA
   ============================================= */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 600px; height: 600px;
  background: var(--color-steel);
  border-radius: 50%;
  filter: blur(200px);
  opacity: 0.1;
}
.cta-content { position: relative; max-width: 640px; margin: 0 auto; }
.cta-content h2 span { color: var(--color-steel-light); }
.cta-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2.5rem; }

/* =============================================
   Footer
   ============================================= */
.site-footer {
  background: var(--color-charcoal);
  color: var(--color-white);
  padding: 4rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }

.footer-brand p { font-size: 0.875rem; color: rgba(255,255,255,0.6); line-height: 1.6; margin-top: 1rem; }
.footer-heading { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.8); margin-bottom: 1rem; }
.footer-links li { margin-bottom: 0.625rem; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-links a:hover { color: var(--color-white); }
.footer-contact-item { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.footer-contact-item svg { width: 16px; height: 16px; color: var(--color-steel-light); flex-shrink: 0; }
.footer-contact-item span,
.footer-contact-item a { font-size: 0.875rem; color: rgba(255,255,255,0.6); }
.footer-contact-item a:hover { color: var(--color-white); }

.footer-bottom {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.footer-bottom-badges { display: flex; gap: 1.5rem; }
.footer-bottom-badges span { font-size: 0.75rem; color: rgba(255,255,255,0.4); }

/* =============================================
   WhatsApp FAB
   ============================================= */
.whatsapp-fab {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-whatsapp);
  color: var(--color-white);
  padding: 0.875rem 1.25rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-elevated);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
}
.whatsapp-fab:hover { background: var(--color-whatsapp-hover); transform: scale(1.05); }
.whatsapp-fab svg { width: 20px; height: 20px; }
.whatsapp-fab-text { display: none; }
@media (min-width: 640px) { .whatsapp-fab-text { display: inline; } }

/* =============================================
   Utilities
   ============================================= */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
