/* Crop Clinic website: shared styles */
:root {
  --green-900: #1b5e20;
  --green-700: #2e7d32;
  --green-500: #4caf50;
  --green-100: #e8f5e9;
  --green-50: #f5f9f5;
  --text: #1b2a1c;
  --muted: #5f6f63;
  --border: #dfe7e0;
  --surface: #ffffff;
  --danger: #c62828;
  --danger-bg: #ffebee;
  --warning-bg: #fff3e0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(27, 94, 32, 0.12);
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--green-50);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* height:auto keeps the aspect ratio when CSS narrows an <img> that has
   width/height attributes (otherwise the attribute height stays fixed). */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-700); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--green-700); }
@media (max-width: 640px) {
  .nav { gap: 12px; }
  .nav .hide-sm { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 12px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform 0.1s, background 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-900); }
.btn-light { background: #fff; color: var(--green-700); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline-green { background: #fff; color: var(--green-700); border-color: var(--green-700); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a61b1b; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
  color: #fff; overflow: hidden;
}
.hero .container {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
  padding-top: 64px; padding-bottom: 64px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; margin: 16px 0 12px; }
.hero p.lead { font-size: 1.2rem; opacity: 0.95; margin: 0 0 28px; max-width: 34ch; }
.hero .app-icon { width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { margin-top: 14px; font-size: 0.9rem; opacity: 0.85; }
.hero .phones { position: relative; height: 520px; }
.phone {
  position: absolute; width: 230px; border-radius: 28px; overflow: hidden;
  border: 6px solid #10331a; background: #10331a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.phone img { width: 100%; }
.hero .phone-a { right: 150px; top: 20px; transform: rotate(-4deg); }
.hero .phone-b { right: 0; top: 70px; transform: rotate(5deg); }
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 40px; }
  .hero .phones { height: 420px; }
  .hero .phone { width: 180px; }
  .hero .phone-a { left: 50%; right: auto; margin-left: -175px; }
  .hero .phone-b { left: 50%; right: auto; margin-left: -10px; }
}
@media (max-width: 420px) {
  .hero .phones { height: 360px; }
  .hero .phone { width: 150px; }
  .hero .phone-a { margin-left: -150px; }
  .hero .phone-b { margin-left: -5px; }
}

/* Sections */
section { padding: 72px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 8px; }
.section-title p { color: var(--muted); margin: 0 auto; max-width: 60ch; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green-700); margin-bottom: 8px;
}

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin: 12px 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-100); font-size: 1.5rem;
}

.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.screens figure { margin: 0; text-align: center; }
.screens .phone { position: static; width: 100%; max-width: 230px; margin: 0 auto 12px; }
.screens figcaption { font-weight: 600; }
@media (max-width: 900px) { .screens { grid-template-columns: repeat(2, 1fr); } }

.regions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.region { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.region .code {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px;
  border-radius: 12px; background: var(--green-700); color: #fff; font-weight: 700;
}
.region h3 { margin: 12px 0 4px; font-size: 1.05rem; }
.region p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 900px) { .regions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .regions { grid-template-columns: 1fr; } }

.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

details.faq {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; margin-bottom: 12px;
}
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { color: var(--muted); margin: 10px 0 0; }

.cta {
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
  color: #fff; border-radius: 24px; padding: 48px 24px; text-align: center;
}
.cta h2 { margin: 0 0 8px; }
.cta p { margin: 0 0 24px; opacity: 0.92; }

/* Document pages (privacy, terms, deletion) */
.doc-hero {
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
  color: #fff; padding: 48px 0 40px;
}
.doc-hero h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.doc-hero p { margin: 0; opacity: 0.9; }
.doc { max-width: 780px; margin: 0 auto; padding: 40px 16px 72px; }
.doc h2 { color: var(--green-700); font-size: 1.25rem; margin-top: 36px; }
.doc h3 { font-size: 1.05rem; margin-top: 24px; }
.doc table { width: 100%; border-collapse: collapse; background: var(--surface); margin: 12px 0; }
.doc th, .doc td {
  text-align: left; vertical-align: top; padding: 10px 12px;
  border: 1px solid var(--border); font-size: 0.95rem;
}
.doc th { background: var(--green-100); }
.table-wrap { overflow-x: auto; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; }
.toc ol { margin: 8px 0 0; padding-left: 20px; }
.callout {
  border-radius: 12px; padding: 14px 16px; margin: 16px 0;
  background: var(--green-100); border: 1px solid #c8e6c9;
}
.callout.warning { background: var(--warning-bg); border-color: #ffcc80; }
.callout.danger { background: var(--danger-bg); border-color: #ef9a9a; }

/* Forms */
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin: 24px 0; box-shadow: var(--shadow);
}
.form-card h2 { margin-top: 0; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit;
  border: 1px solid #c7d3c9; border-radius: 12px; background: #fff;
}
input:focus { outline: 3px solid rgba(46, 125, 50, 0.25); border-color: var(--green-700); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 18px; height: 18px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.msg { margin-top: 16px; }
.hidden { display: none !important; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green-700); font: inherit; text-decoration: underline; cursor: pointer; }

/* Footer */
.site-footer { background: #10331a; color: #cfe3d1; padding: 40px 0 28px; margin-top: 0; }
.site-footer .container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: #e8f5e9; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer .small { font-size: 0.85rem; opacity: 0.8; width: 100%; }
