:root {
  --green: #6b8e23;
  --green-dark: #556b1c;
  --brown: #8b5e3c;
  --bg: #f5f0e1;
  --text-dark: #333;
  --text-light: #555;
  --card: #f9f9f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}
ul, li {
  list-style: none;
}
/* Header */
header {
  background: linear-gradient(180deg, #6b8e23, #7da83a);
  color: white;
  text-align: center;
  padding: 80px 20px;
}

header h1 {
  font-size: 2.6rem;
  margin-bottom: 10px;
}

header p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
}

/* CTA Button */
.cta {
  display: inline-block;
  background: white;
  color: var(--green);
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.cta:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* Sections */
section {
  max-width: 1000px;
  margin: auto;
  padding: 70px 20px;
  text-align: center;
}

h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

p {
  color: var(--text-light);
}

#logo {
  height: 72px;
  margin-bottom: 1.25rem;
}

/* Preview Grid */
#lawnPreview img {
  display: none;
}

.preview-grid {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.preview-grid img, .grass-card img {
  height: 200px;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* Cards */
.card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.card h3 {
  color: var(--green);
  margin-top: 0;
}

/* Flow Arrows */
.flow {
  position: relative;
}

.flow::after {
  content: "→";
  position: absolute;
  right: -35px;
  top: 45%;
  transform: translateY(-50%);
  font-size: 4rem;
  color: var(--green);
  font-weight: bold;
  z-index: 1;
  font-family: monospace;
}

.flow:last-child::after {
  content: "";
}

/* Demo Section */
.demo-section {
  background: white;
  border-radius: 20px;
}

.demo-input-group {
  margin-bottom: 20px;
}

#demo img {
  max-width: 300px;
  max-height: 300px;
  border-radius: 12px;
}

#demo-result {
  margin-top: 20px;
  font-weight: 700;
  color: var(--green);
  display: none;
}

.demo-result {
  display: none;
  margin-top: 30px;
}

/* Canvas Comparison */
.canvas-comparison {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

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

.canvas-display {
  display: none;
  border-radius: 12px;
  border: 2px solid #ddd;
  max-width: 100%;
}

/* Location & Slope */
.location-details {
  margin-top: 20px;
}

.location-details summary {
  cursor: pointer;
  font-weight: 600;
}

.location-input-wrapper {
  margin-top: 12px;
}

.location-input-wrapper input {
  margin-left: 8px;
  width: 120px;
}

.slope-input-wrapper {
  margin-top: 10px;
}

.slope-input-wrapper select {
  margin-left: 8px;
}

/* Grass Identification */
.grass-id-section {
  display: none;
}

.grass-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.user-grass-container {
  flex: 1;
  min-width: 260px;
}

.user-grass-note {
  font-size: .9em;
  opacity: .7;
  margin-top: 8px;
}

.grass-comparison-container {
  flex: 2;
  min-width: 300px;
}

.grass-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.grass-rules-panel {
  margin-top: 30px;
}

/* Grass Cards */
.grass-card {
  padding: 10px;
  cursor: pointer;
  background: var(--card);
  border-radius: 10px;
  transition: transform .15s, box-shadow .15s;
}

.grass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

.grass-card ul {
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.grass-card ul li {
  list-style: none;
}

.grass-rules-card {
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  padding: 16px;
  background: #fdfdf8;
}

/* Segmentation Bar */
.segmentation-bar {
  display: flex;
  width: 100%;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  font-weight: bold;
  margin-bottom: 25px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.segmentation-bar div {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  font-size: 12px;
  transition: all 0.3s ease;
}

.segmentation-bar div span {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  white-space: nowrap;
}

/* Demo Result Styling */
#demo-result h3, #demo-result h4 {
  margin-bottom: 12px;
  color: #2c3e50;
}

#demo-result p {
  margin-bottom: 25px;
}

/* Plan Cards */
.plan-week {
  background: var(--card);
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-week:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

.plan-week strong {
  display: block;
  font-size: 1.1em;
  margin-bottom: 8px;
  color: #27ae60;
}

.plan-week ul {
  padding-left: 20px;
  margin: 0;
}

.plan-week ul li {
  margin-bottom: 6px;
  list-style-type: none;
}

/* Footer */
footer {
  background: var(--brown);
  color: white;
  text-align: center;
  padding: 40px 20px;
}

footer p, footer a {
  color: white;
  margin: 0 10px;
  font-weight: 700;
}

/* Tooltips */
.tooltip-trigger {
  color: var(--green);
  text-decoration: underline;
  text-decoration-style: dotted;
  cursor: help;
  position: relative;
  font-weight: 600;
}

.tooltip-trigger:hover {
  color: var(--green-dark);
}

.tooltip-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.tooltip-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tooltip-content {
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

.tooltip-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--green);
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 0.2s;
}

.tooltip-close:hover {
  background: var(--green-dark);
}

.tooltip-content h3 {
  color: var(--green);
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.tooltip-content h4 {
  color: var(--green-dark);
  margin-top: 20px;
  margin-bottom: 10px;
}

.tooltip-content ul {
  padding-left: 25px;
  margin: 10px 0;
}

.tooltip-content ul li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.tooltip-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.tooltip-content table th,
.tooltip-content table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.tooltip-content table th {
  background: var(--bg);
  color: var(--text-dark);
  font-weight: 700;
}

.location-badge {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9em;
  margin: 10px 0;
  font-weight: 600;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  display: none;
}

.progress-bar {
  width: 100%;
  height: 30px;
  background: #e0e0e0;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  width: 0%;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.progress-text {
  text-align: center;
  margin-top: 8px;
  color: var(--text-light);
  font-size: 14px;
}

.soil-prompt {
  padding:20px;
}


/* Soil Upload Prompt */
.soil-prompt {
  background: linear-gradient(135deg, #fff8e1 0%, #ffe0b2 100%);
  border: 2px solid #ff9800;
  border-radius: 16px;
  padding: 25px;
  margin-top: 30px;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
  animation: slideIn 0.3s ease-out;
  transition: background 0.3s ease;
}

.soil-prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.soil-prompt-header h3 {
  margin: 0;
  color: #e65100;
}

.collapse-btn {
  background: #ff9800;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.collapse-btn:hover {
  background: #f57c00;
}

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

.soil-prompt-content p {
  margin: 10px 0;
}


/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  .flow::after {
    display: none;
  }
  section {
    padding: 20px;
  }
  svg {
    width: 50%;
    height: 50%;
  }

}

@media (max-width: 600px) {
  .segmentation-bar {
    height: 30px;
  }
  .segmentation-bar div span {
    font-size: 10px;
  }
  svg {
    width: 30%;
    height: 30%;
  }

}