/* ===========================
   RubyGrapes.com — Styles
   =========================== */

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

:root {
  --primary: #8B1A2B;
  --primary-dark: #6B1421;
  --accent: #2D6A4F;
  --accent-light: #52B788;
  --text: #1A1A2E;
  --text-light: #555;
  --bg-warm: #FDF8F4;
  --bg-green: #F0F7F4;
  --white: #FFFFFF;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center {
  text-align: center;
}

.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 56px;
  max-width: 560px;
}

.section-subtitle.text-center {
  margin-left: auto;
  margin-right: auto;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 26, 43, 0.3);
}

.btn-full {
  width: 100%;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.navbar.scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.nav-logo span {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 6px;
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(139, 26, 43, 0.05);
}

.nav-link--cta {
  background: var(--primary);
  color: var(--white) !important;
  margin-left: 8px;
}

.nav-link--cta:hover {
  background: var(--primary-dark) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('https://images.unsplash.com/photo-1464226184884-fa280b87c399?w=1600&h=900&fit=crop') center/cover no-repeat;
  color: var(--white);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(107, 20, 33, 0.85) 0%, rgba(26, 26, 46, 0.7) 100%);
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 720px;
  padding: 0 24px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* --- About --- */
.about {
  background: var(--bg-warm);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text .section-title {
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.about-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 360px;
  object-fit: cover;
}

/* --- Products --- */
.products {
  background: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

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

.product-info {
  padding: 28px;
}

.product-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.product-info p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.product-features {
  list-style: none;
  padding: 0;
}

.product-features li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.product-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-light);
}

/* --- Why Choose Us --- */
.why-us {
  background: var(--bg-green);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: var(--bg-green);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* --- Certifications --- */
.certifications {
  background: var(--white);
}

.cert-grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.cert-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cert-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.cert-icon:hover {
  background: var(--bg-green);
  border-color: var(--accent);
}

.cert-icon svg {
  width: 36px;
  height: 36px;
  color: var(--accent);
}

.cert-badge span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* --- Contact --- */
.contact {
  background: var(--bg-warm);
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background: var(--white);
  padding: 40px 28px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.contact-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: var(--bg-green);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.contact-card h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.contact-card p {
  font-size: 1.05rem;
  color: var(--text);
}

.contact-card a {
  color: var(--text);
  font-weight: 500;
}

.contact-card a:hover {
  color: var(--primary);
}

/* --- Footer --- */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .nav-logo {
  display: inline-block;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-links h4,
.footer-social h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent-light);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  color: var(--white);
}

.social-links svg {
  width: 18px;
  height: 18px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .hero-tagline {
    font-size: 1.05rem;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.35s ease;
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-link {
    display: block;
    padding: 12px 16px;
    width: 100%;
  }

  .nav-link--cta {
    text-align: center;
    margin-left: 0;
    margin-top: 8px;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Grids */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .container {
    padding: 0 16px;
  }

  .cert-grid {
    gap: 28px;
  }
}
