/* ────────────────────────────────────────────────
   FreshCheck — Garden/Sprout Design System
   Palette: deep leaf green + warm brown + cream
──────────────────────────────────────────────── */

:root {
  --green-darkest: #006633;
  --green-dark:    #024b26;
  --green-mid:     #0f8a4d;
  --green-light:   #28bd73;
  --green-pale:    #d1f0e0;
  --green-mist:    #f0f9f5;

  --brown:         #7d5936;
  --brown-light:   #bd9a6e;
  --cream:         #faf6ef;
  --cream-dark:    #f0e6d6;

  --weed-bg:       #fdf6e8;
  --weed-border:   #e0b45c;
  --weed-accent:   #c0c50e;

  --wilting-bg:     #f4f0f9;
  --wilting-border: #b9a0d6;
  --wilting-accent: #b9422d;

  --text:       #14261b;
  --text-muted: #4a6354;
  --text-light: #7a9484;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 4px  rgba(0,51,25,0.07);
  --shadow-md: 0 4px 16px rgba(0,51,25,0.10);
  --shadow-lg: 0 8px 32px rgba(0,51,25,0.13);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ── Typography ─────────────────────────────── */

h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  color: var(--green-dark);
  line-height: 1.25;
}

a { color: var(--green-mid); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }

/* ── Layout helpers ─────────────────────────── */

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

/* ── Site header ────────────────────────────── */

.site-header {
  background: #ffffff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--green-pale);
}

/* ── Brand / logo (current markup) ─── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img.logo,
img.logo {
  height: 32px;
  width: auto;
  display: block;
}

.brand-name {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

/* ── Legacy logo classes (kept for backwards compat) ── */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--green-dark);
}

.logo-icon {
  display: block;
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

/* Legacy — kept in case any template still references these */
.logo-leaf { font-size: 22px; line-height: 1; }
.logo-name { font-family: 'Lora', serif; font-size: 18px; font-weight: 500; color: var(--green-dark); }
.logo-tag  { font-size: 12px; font-weight: 500; background: var(--green-dark); color: #fff; padding: 2px 8px; border-radius: 100px; letter-spacing: 0.03em; }

/* ── Site footer ────────────────────────────── */

.site-footer {
  background: var(--green-darkest);
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  padding: 24px;
  text-align: center;
  line-height: 1.8;
  margin-top: auto;
}

.site-footer .footer-copy {
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
}

/* ── Hero ───────────────────────────────────── */

.hero {
  background: linear-gradient(155deg, var(--green-dark) 0%, var(--green-mid) 100%);
  padding: 80px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.hero-headline {
  font-family: 'Lora', serif;
  font-size: clamp(32px, 5vw, 52px);
  color: #fff;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Scan form ──────────────────────────────── */

.scan-form { width: 100%; }

.input-row {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-lg);
  padding: 6px 6px 6px 16px;
  backdrop-filter: blur(4px);
}

.url-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #fff;
  min-width: 0;
}

.url-input::placeholder { color: rgba(255,255,255,0.5); }

.url-input:-webkit-autofill,
.url-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px var(--green-mid) inset;
  -webkit-text-fill-color: #fff;
}

.scan-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  color: var(--green-dark);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  text-decoration: none;
}

.scan-btn:hover { background: #fff; transform: translateY(-1px); text-decoration: none; color: var(--green-dark); }
.scan-btn:active { transform: translateY(0); }

/* Loading state */
.scan-btn .btn-spinner { display: none; }
.scan-btn.loading .btn-label { display: none; }
.scan-btn.loading .btn-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--green-mid);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.scan-btn.loading { cursor: not-allowed; opacity: 0.85; }

@keyframes spin { to { transform: rotate(360deg); } }

.form-hint {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  margin-top: 12px;
}

/* ── Alert ──────────────────────────────────── */

.alert {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  text-align: left;
}

.alert-error {
  background: rgba(255, 80, 80, 0.15);
  border: 1px solid rgba(255, 80, 80, 0.4);
  color: #ffe0e0;
}

/* ── What we check ──────────────────────────── */

.what-we-check {
  padding: 72px 0;
  background: var(--green-mist);
}

.section-title {
  font-family: 'Lora', serif;
  font-size: 26px;
  color: var(--green-dark);
  text-align: center;
  margin-bottom: 40px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.check-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(82,183,136,0.12);
  transition: transform 0.15s, box-shadow 0.15s;
}

.check-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.check-icon { font-size: 28px; margin-bottom: 12px; }

.check-card h3 {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.check-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }

/* ── Report page ────────────────────────────── */

.report-page { padding-bottom: 60px; }

.report-header {
  background: linear-gradient(155deg, var(--green-dark) 0%, var(--green-mid) 100%);
  padding: 48px 0 40px;
  margin-bottom: 48px;
}

.back-link {
  display: inline-block;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin-bottom: 20px;
  transition: color 0.15s;
}

.back-link:hover { color: #fff; text-decoration: none; }

.report-title {
  font-family: 'Lora', serif;
  font-size: clamp(26px, 4vw, 40px);
  color: #fff;
  margin-bottom: 8px;
}

.report-url {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
  word-break: break-all;
}

.report-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.warn-note { color: rgba(255,220,100,0.85); }

.summary-line {
  margin-top: 16px;
  font-size: 15px;
  color: rgba(255,255,255,0.8);
}

.all-clear {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-top: 20px;
}

.all-clear-icon { display: flex; align-items: center; flex-shrink: 0; }
.all-clear p { color: rgba(255,255,255,0.9); font-size: 16px; }

/* ── Incomplete-scan banner ─────────────────── */

.incomplete-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-top: 20px;
}

.incomplete-icon { display: flex; align-items: center; flex-shrink: 0; }

.incomplete-body { flex: 1; }

.incomplete-headline {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

.incomplete-detail {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  line-height: 1.55;
}

.incomplete-reason {
  opacity: 0.75;
  font-style: italic;
}

/* ── Findings sections ──────────────────────── */

.findings-section { margin-bottom: 52px; }

.section-header { margin-bottom: 20px; }

.weed-section-header {
  border-left: 5px solid var(--weed-border);
  background: var(--weed-bg);
  padding: 14px 18px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 24px;
}

.wilting-section-header {
  border-left: 5px solid var(--wilting-border);
  background: var(--wilting-bg);
  padding: 14px 18px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 24px;
}

.section-heading {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.weed-heading   { color: var(--weed-accent); }
.wilting-heading { color: var(--wilting-accent); }

.section-desc { font-size: 14px; color: var(--text-muted); }

.count-badge {
  font-size: 13px;
  font-weight: 700;
  border-radius: 100px;
  padding: 2px 10px;
}

.weed-badge   { background: #fff; color: var(--weed-accent); border: 1px solid var(--weed-border); }
.wilting-badge { background: #fff; color: var(--wilting-accent); border: 1px solid var(--wilting-border); }

/* ── Finding cards ──────────────────────────── */

.findings-list { display: flex; flex-direction: column; gap: 14px; }

.finding-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px 24px 0;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid transparent;
  transition: opacity 0.3s, transform 0.3s;
  overflow: hidden;
}

.weed-card    { border-left-color: var(--weed-border); }
.wilting-card { border-left-color: var(--wilting-border); }

.finding-card.severity-high { border-left-width: 6px; }
.weed-card.severity-high     { border-left-color: #c0392b; }
.wilting-card.severity-high  { border-left-color: var(--wilting-accent); }

.finding-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}

.finding-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.check-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
}

.expired-event-tag { background: #fde8c8; color: #7c4a00; }
.broken-link-tag   { background: #fce4e4; color: #6b1515; }
.copyright-tag     { background: #e8e4f5; color: #3d2278; }
.ssl-tag           { background: #e4efff; color: #153066; }

.severity-tag {
  font-size: 11px;
  font-weight: 600;
  color: #c0392b;
  background: #fde8e8;
  border-radius: 100px;
  padding: 2px 9px;
}

.dismiss-btn {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.weed-card .dismiss-btn:hover {
  background: var(--weed-bg);
  color: var(--weed-accent);
  border-color: var(--weed-border);
}

.wilting-card .dismiss-btn:hover {
  background: var(--wilting-bg);
  color: var(--wilting-accent);
  border-color: var(--wilting-border);
}

.finding-title {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.finding-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

.broken-link-list {
  list-style: disc;
  padding-left: 1.4em;
  margin: 0 0 14px;
}

.broken-link-list li {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  word-break: break-all;
}

.finding-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 13px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.finding-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.finding-location a {
  color: var(--green-mid);
  font-weight: 500;
  word-break: break-all;
}

.finding-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
}

.footer-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Monitor CTA ────────────────────────────── */

.monitor-cta {
  margin-top: 48px;
  background: linear-gradient(150deg, var(--green-dark) 0%, var(--green-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 44px 40px 36px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

/* subtle botanical texture overlay */
.monitor-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 55%),
                    radial-gradient(circle at 15% 85%, rgba(255,255,255,0.04) 0%, transparent 45%);
  pointer-events: none;
}

.monitor-cta-title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  position: relative;
}

.monitor-cta-lead {
  font-size: 15px;
  color: rgba(255,255,255,0.82);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto 28px;
  position: relative;
}

.monitor-plans {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.monitor-plan { position: relative; }

.monitor-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  min-width: 160px;
  font-family: inherit;
}

.monitor-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}

.monitor-btn:active { transform: translateY(0); }

.monitor-btn-primary {
  background: #fff;
  color: var(--green-dark);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.monitor-btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
}

.monitor-btn-secondary:hover { background: rgba(255,255,255,0.2); }

.monitor-btn-price {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.monitor-btn-primary .monitor-btn-price { color: var(--green-dark); }
.monitor-btn-secondary .monitor-btn-price { color: #fff; }

.monitor-btn-per {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.7;
  margin-left: 1px;
}

.monitor-btn-note {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.01em;
}

.monitor-btn-primary .monitor-btn-note { color: var(--green-mid); opacity: 1; }

/* "Best value" pill above the primary button */
.monitor-plan-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--weed-border);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.monitor-cta-fine {
  margin-top: 18px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
}

/* ── Empty state ────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon { display: flex; justify-content: center; align-items: center; margin-bottom: 16px; }

.empty-state h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.empty-state p { color: var(--text-muted); margin-bottom: 32px; }

/* ── Share section ──────────────────────────── */

.share-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--cream-dark);
}

.share-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }

.share-url-row { display: flex; gap: 8px; }

.share-url-input {
  flex: 1;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--green-mist);
  min-width: 0;
  outline: none;
}

.copy-btn {
  background: var(--green-mid);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.copy-btn:hover { background: var(--green-dark); }

/* ── Scanning / progress page ───────────────── */

.scanning-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: 40px 24px;
}

.scanning-inner {
  text-align: center;
  max-width: 500px;
  width: 100%;
}

/* Animated leaf with ripples */
.scan-animation {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin-bottom: 32px;
}

.scan-leaf {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  animation: leaf-pulse 2.4s ease-in-out infinite;
}

@keyframes leaf-pulse {
  0%, 100% { transform: scale(1);    opacity: 1;    }
  50%       { transform: scale(1.12); opacity: 0.85; }
}

.scan-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--green-light);
  animation: ripple 2.4s ease-out infinite;
  opacity: 0;
}
.scan-ripple--2 { animation-delay: 0.8s;  }
.scan-ripple--3 { animation-delay: 1.6s; }

@keyframes ripple {
  0%   { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0;   }
}

/* Text */
.scanning-headline {
  font-size: 1.75rem;
  margin-bottom: 8px;
  color: var(--green-dark);
}

.scanning-url {
  font-size: 0.9rem;
  color: var(--text-muted);
  word-break: break-all;
  margin-bottom: 28px;
}

/* Progress bar */
.progress-wrap {
  background: var(--green-pale);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green-mid), var(--green-light));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.scanning-status {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  min-height: 1.4em;
}

.pages-counter {
  font-size: 0.85rem;
  color: var(--green-mid);
  font-weight: 600;
  margin-bottom: 20px;
}

.scanning-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 24px;
}

/* Error state */
.scan-error-box {
  margin-top: 24px;
  background: var(--weed-bg);
  border: 1px solid var(--weed-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.scan-error-msg {
  color: var(--weed-accent);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.scan-btn--small {
  padding: 10px 22px;
  font-size: 0.9rem;
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 600px) {
  .input-row { flex-direction: column; padding: 10px; }
  .url-input { color: var(--text); }
  .url-input::placeholder { color: var(--text-light); }
  .scan-btn  { width: 100%; justify-content: center; }
  .report-header .container { padding: 0 16px; }
  .finding-header { flex-direction: column; }
  .share-url-row  { flex-direction: column; }
}
