/* style.css - Material Design 2 Gray Theme for Droop Control Website */

/* 1. Google Fonts Import */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Mono&display=swap");

/* 2. Global Styles & Variables */
:root {
  --background-color: #fafafa; /* Gray 50 */
  --card-background: #ffffff;
  --primary-text: #212121; /* Gray 900 */
  --secondary-text: #757575; /* Gray 600 */
  --accent-border: #e0e0e0; /* Gray 300 */
  --interactive-highlight: #eeeeee; /* Gray 200 */
  --link-color: #4285f4; /* Google Blue */
  --shadow-umbra: rgba(0, 0, 0, 0.2);
  --shadow-penumbra: rgba(0, 0, 0, 0.14);
  --shadow-ambient: rgba(0, 0, 0, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--background-color);
  color: var(--primary-text);
  margin: 0;
  line-height: 1.6;
  font-size: 16px;
}

/* 3. Layout & Structure */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.main-content {
  background-color: var(--card-background);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 1px -1px var(--shadow-umbra),
    0 1px 1px 0 var(--shadow-penumbra), 0 1px 3px 0 var(--shadow-ambient);
}

.divider {
  border: 0;
  height: 1px;
  background-color: var(--accent-border);
  margin: 3rem 0;
}

section {
  margin-bottom: 2rem;
  scroll-margin-top: 80px;
}

/* 4. Header & Navigation */
header {
  background-color: var(--card-background);
  color: var(--primary-text);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--accent-border);
  box-shadow: 0 2px 4px var(--shadow-umbra);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

header nav a {
  margin-left: 1.5rem;
  color: var(--secondary-text);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

header nav a:hover {
  color: var(--primary-text);
}

/* 5. Hero Section */
.hero {
  text-align: center;
  padding: 2rem 0;
}

.hero h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--secondary-text);
  max-width: 800px;
  margin: 0 auto 2rem;
}

.hero img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 2rem;
}

/* 6. General Content */
section h3 {
  font-size: 1.8rem;
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* 7. Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* 8. Typography & Tables */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
}

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

a:hover {
  text-decoration: underline;
}

code,
pre {
  font-family: "Roboto Mono", monospace;
  background-color: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

table th,
table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--accent-border);
}

table th {
  font-weight: 700;
  background-color: #f5f5f5;
}

/* 9. Interactive Elements (Alpine.js) */
.faq-item {
  border-bottom: 1px solid var(--accent-border);
}

.faq-question {
  cursor: pointer;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background-color: var(--interactive-highlight);
}

.faq-answer {
  padding: 0 1rem 1rem;
  color: var(--secondary-text);
  overflow: show;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease;
}

/* 10. Calculator */
.calculator {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.calculator .form-group {
  margin-bottom: 1rem;
}

.calculator label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--secondary-text);
}

.calculator input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  font-size: 1rem;
}

.calculator .result {
  font-size: 1.5rem;
  font-weight: 500;
  text-align: center;
}

/* 11. Footer */
footer {
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  color: var(--secondary-text);
  border-top: 1px solid var(--accent-border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.funding-info {
  font-size: 0.9rem;
  font-style: italic;
}

/* 12. Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .main-content {
    padding: 1.5rem;
  }

  .hero h2 {
    font-size: 2.2rem;
  }

  .grid,
  .calculator {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    padding: 1rem;
  }

  header nav {
    margin-top: 1rem;
  }

  header nav a {
    margin: 0 0.5rem;
  }

  .footer-content {
    flex-direction: column;
  }

  .funding-info {
    margin-bottom: 1rem;
  }
}
