/*
  Global styles for Sheela Grid Works website

  The design draws inspiration from the provided branding materials, using an
  earthy off‑white backdrop and a restrained palette of deep teal and warm
  red. Layouts are built with flexbox and CSS grid for responsive behaviour.
*/

/* Colour palette */
:root {
  --color-bg: #f7f0e6;
  --color-primary: #b23c3f; /* warm red from the logo */
  --color-secondary: #084c45; /* deep teal for headings and buttons */
  --color-text: #0d3330; /* dark teal for body copy */
  --color-muted: #737373; /* muted grey for secondary text */
  --max-width: 1200px;
}

/* Reset & base typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

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

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

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-secondary);
  color: var(--color-bg);
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

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

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

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

/* Navigation bar */
header {
  background-color: var(--color-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.brand-logo {
  height: 40px;
  width: 40px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links li a {
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links li a:hover::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
}

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

.nav-toggle .bar {
  width: 24px;
  height: 2px;
  background-color: var(--color-secondary);
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 1rem;
  gap: 2rem;
}

.hero-content {
  flex: 1;
}

.hero-image {
  flex: 1;
  text-align: center;
}

.hero-image img {
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 1rem;
}

.hero p {
  margin-bottom: 1.5rem;
  max-width: 600px;
}

/* Features section */
.features {
  background-color: #fcf8f1;
  padding: 2rem 1rem;
}

.features h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature {
  background-color: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* CTA section */
.cta {
  text-align: center;
  padding: 2rem 1rem;
  background-color: var(--color-bg);
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  margin-bottom: 1.5rem;
}

/* Page header (generic for secondary pages) */
.page-header {
  text-align: center;
  max-width: var(--max-width);
  margin: 2rem auto 1rem;
  padding: 0 1rem;
}

.page-header p {
  max-width: 800px;
  margin: 0.5rem auto 0;
  color: var(--color-muted);
}

/* About page styles */
.about-story, .about-values, .about-approach, .brand-gallery {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
}

.about-values ul {
  list-style: disc;
  padding-left: 1.5rem;
  line-height: 1.7;
}

.about-approach p {
  margin-bottom: 1rem;
}

.brand-gallery .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.brand-gallery figure {
  margin: 0;
}

.brand-gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
}

.product-card {
  background-color: var(--color-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.product-card h3 {
  margin: 1rem;
  font-size: 1.25rem;
}

.product-card p {
  margin: 0 1rem 1.5rem;
  flex-grow: 1;
  color: var(--color-muted);
}

/* Contact section */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
}

.contact-details h2,
.contact-form h2 {
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  padding: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 2px rgba(8, 76, 69, 0.1);
}

.form-message {
  margin-top: 0.5rem;
  color: var(--color-secondary);
  font-weight: 600;
}

/* Footer */
footer {
  background-color: var(--color-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem;
}

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

footer .footer-brand img {
  height: 32px;
  width: 32px;
}

footer .footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

footer .footer-links a {
  color: var(--color-secondary);
  font-size: 0.875rem;
  font-weight: 600;
}

footer .footer-links a:hover {
  text-decoration: underline;
}

/* Responsive navigation behaviour */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: var(--color-bg);
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .hero {
    flex-direction: column;
  }
  .hero-image {
    margin-top: 1rem;
  }
  .contact-section {
    grid-template-columns: 1fr;
  }
}