/* AEROLYTIX - Precision Agriculture Theme */

:root {
  --surface: #FAFCFB;
  --surface-alt: #F2F5F3;
  --text: #112918;
  --text-muted: #4B6353;
  --primary: #1B8044;
  --primary-hover: #156B38;
  --secondary: #E8F5E9;
  --secondary-hover: #C8E6C9;
  --accent: #FFC107; /* Used for bounding boxes / alerts */
  --warning: #EF5350; /* Used for stress areas */
  --border: #D1DFD6;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.07), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  
  --radius: 12px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--surface);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 800px;
}

.container--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .container--split {
    grid-template-columns: 1fr 1fr;
  }
}

.section {
  padding: 80px 0;
}

@media (min-width: 900px) {
  .section {
    padding: 120px 0;
  }
}

.bg-light { background-color: var(--surface-alt); }
.bg-dark { background-color: var(--text); color: white; }
.border-top { border-top: 1px solid var(--border); }
.border-radius-lg { border-radius: var(--radius-lg); overflow: hidden; }

/* Typography */
.h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 48px;
}

.kicker {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 12px;
}

.text-white { color: white !important; }
.text-white-muted { color: rgba(255, 255, 255, 0.7) !important; }
.text-center { text-align: center; }

/* Components: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn--primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(27, 128, 68, 0.39);
}

.btn--primary:hover {
  background-color: var(--primary-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 128, 68, 0.4);
}

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

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

.btn--large {
  padding: 16px 32px;
  font-size: 1.125rem;
}

.btn--full {
  width: 100%;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  z-index: 100;
}
.skip-link:focus { top: 0; }

/* Header / Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(250, 252, 251, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__name {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.topbar__nav {
  display: none;
  gap: 32px;
}

.topbar__nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

.menu-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

@media (min-width: 900px) {
  .topbar__nav { display: flex; }
  .menu-btn { display: none; }
  .topbar__inner > .btn { display: inline-flex; }
}

@media (max-width: 899px) {
  .topbar__inner > .btn { display: none; }
}

/* Mobile Menu */
.menu[open] {
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu {
  width: 100%;
  max-width: 400px;
  margin: 16px auto 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.menu::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.menu__close {
  background: none;
  border: none;
  cursor: pointer;
  float: right;
  color: var(--text-muted);
}

.menu__nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
  clear: both;
}

.menu__link {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text);
}

/* Hero Section */
.hero {
  padding: 64px 0;
  overflow: hidden;
}

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

@media (min-width: 1024px) {
  .hero { padding: 100px 0; }
  .hero__container { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: var(--secondary);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero__headline {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero__headline span {
  color: var(--primary);
}

.hero__sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero__metrics {
  display: flex;
  gap: 48px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.metric__value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.metric__label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Hero Visual / Mock Dashboard */
.hero__visual {
  position: relative;
}

.mock-dashboard {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.mock-dashboard__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  object-fit: cover;
}

.ui-overlay {
  position: absolute;
  pointer-events: none;
}

.ui-overlay--box {
  border: 2px solid var(--accent);
  background: rgba(255, 193, 7, 0.1);
}

.ui-overlay__border {
  position: absolute;
  inset: -4px;
  border: 1px dashed var(--accent);
  opacity: 0.5;
}

.ui-overlay--stress .ui-overlay__blob {
  width: 100%;
  height: 100%;
  background: var(--warning);
  opacity: 0.4;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  filter: blur(10px);
}

.ui-overlay__label {
  position: absolute;
  top: -30px;
  left: 0;
  background: white;
  padding: 4px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.ui-overlay__label--alert {
  background: var(--warning);
  color: white;
}

.ui-panel {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.05);
}

.ui-panel--top {
  top: 32px;
  right: -24px;
}

.ui-panel--metrics {
  bottom: -24px;
  left: 32px;
  display: flex;
  gap: 24px;
}

.ui-panel__title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ui-panel__status {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px var(--secondary);
}

.ui-stat__label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.ui-stat__val {
  font-size: 1.25rem;
  font-weight: 700;
}
.alert-text { color: var(--warning); }

/* Feature Cards */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

.feature-card {
  background: white;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(27, 128, 68, 0.3);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  background: var(--secondary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 24px;
}

.feature-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card__text {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.check-list {
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Sensors */
.sensor-list { margin-top: 40px; display: grid; gap: 24px; }
.sensor-item { border-left: 3px solid var(--border); padding-left: 24px; }
.sensor-item:hover { border-color: var(--primary); }
.sensor-item__title { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.sensor-item__desc { color: var(--text-muted); }

.bg-pattern {
  background-color: var(--primary);
  background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  min-height: 400px;
  position: relative;
}

/* Workflow steps */
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 64px;
}

@media (min-width: 600px) {
  .workflow-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .workflow-grid { grid-template-columns: repeat(4, 1fr); }
}

.workflow-step {
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
}

.workflow-step__num {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(255,255,255,0.1);
  margin-bottom: 16px;
}
.workflow-step__title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.workflow-step__desc {
  color: rgba(255,255,255,0.7);
}

/* FAQ Accordion */
.accordion {
  display: grid;
  gap: 16px;
  margin-top: 48px;
}

.accordion__item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.accordion__title {
  font-weight: 600;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none; /* remove default arrow in firefox */
  display: flex;
  justify-content: space-between;
}

.accordion__title::-webkit-details-marker {
  display: none; /* remove default arrow in webkit */
}

.accordion__title::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
}

.accordion__item[open] .accordion__title::after {
  content: '−';
}

.accordion__content {
  margin-top: 16px;
  color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Contact */
.contact-info { padding-right: 32px; }
.contact-methods { margin-top: 32px; display: grid; gap: 16px; }
.contact-method {
  display: flex;
  gap: 12px;
  font-size: 1.125rem;
}

.contact-form-wrapper {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--surface-alt);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px var(--secondary);
}

.form-hint {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Footer */
.footer {
  background-color: var(--text);
  color: white;
  padding: 80px 0 40px;
}

.footer__container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 40px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .footer__container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer__logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.footer__tagline {
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__links a {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

.footer__links a:hover {
  color: white;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.back-to-top {
  color: rgba(255,255,255,0.8);
}
