/* CraftPilot landing (index.html, <lang>/index.html) – the app's light
   theme, as on the screenshots: a pale grey page, white cards, its green
   and the blue of work orders, over a faint blueprint grid and floor plan.
   Plain CSS, no build step. The legal pages keep style.css. */

:root {
  --bg: #f7f9fa;
  --bg-deep: #f3f5f7;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-strong: #ffffff;
  --border: #e1e5ea;
  --text: #161b22;
  --muted: #5b6573;
  /* The app's green (AppColors.accentFill) and the blue of work orders. */
  --lime: #0e7c66;
  --teal: #3a6ea5;
  --brand: #16a085;
  --shadow: 0 1px 2px rgba(22, 27, 34, 0.04), 0 8px 24px rgba(22, 27, 34, 0.06);
  --radius: 18px;
  --container: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Background ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(22, 160, 133, 0.10), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(58, 110, 165, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 70%);
}
/* Blueprint grid, fading out downwards. */
.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(58, 110, 165, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 110, 165, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}
.plan-outline {
  position: absolute;
  right: 4%;
  top: 110px;
  width: min(560px, 60vw);
  opacity: 0.12;
}
.plan-outline polygon { fill: none; stroke: var(--teal); stroke-width: 3; }
.plan-outline circle { fill: var(--teal); }
.plan-outline text { fill: var(--teal); font: 600 20px sans-serif; }

/* ---------- Header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.brand b { color: var(--lime); font-weight: 800; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 0.95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
/* Language menu: a plain <details>, no script. */
.langs { position: relative; }
.langs summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 9px;
}
.langs summary::-webkit-details-marker { display: none; }
.langs summary::after { content: " ▾"; font-size: 0.75em; }
.langs[open] summary, .langs summary:hover { color: var(--text); }
.langs-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  min-width: 150px;
  padding: 6px;
  border-radius: 12px;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(22, 27, 34, 0.12);
}
.langs-menu a { color: var(--text); padding: 7px 10px; border-radius: 8px; font-size: 0.95rem; }
.langs-menu a:hover { background: rgba(14, 124, 102, 0.07); text-decoration: none; }
.langs-menu a[aria-current="page"] { color: var(--lime); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary:hover { background: #0b6b58; }
.btn-primary {
  background: var(--lime);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(14, 124, 102, 0.22);
}
.btn-ghost {
  background: #ffffff;
  color: var(--text);
  border-color: #cfd5dc;
}
.btn-ghost:hover { border-color: var(--lime); }
.btn-small { padding: 8px 16px; font-size: 0.92rem; border-radius: 10px; }
/* Not a link: a platform on its way (iPhone). */
.btn-soon {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
  border-style: dashed;
  cursor: default;
}
.btn-soon:hover { transform: none; }
.btn svg { flex: none; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 46fr 54fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--lime);
  font-weight: 650;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.nowrap { white-space: nowrap; }
.accent {
  background: linear-gradient(90deg, var(--lime), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 34em;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row.center { justify-content: center; }
.fineprint { margin-top: 16px; color: var(--muted); font-size: 0.9rem; }

.hero-mockup {
  width: 100%;
  filter: drop-shadow(0 30px 40px rgba(22, 27, 34, 0.18));
}

/* ---------- Trade strip ---------- */

.trades-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--glass);
}
.trades-inner { padding-top: 22px; padding-bottom: 22px; color: var(--muted); text-align: center; }
.trades-inner strong { color: var(--text); margin-right: 6px; }

/* ---------- Features ---------- */

.section-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  letter-spacing: -0.01em;
}
.section-lead {
  max-width: 40em;
  margin: 12px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}

.features { padding-top: 96px; padding-bottom: 40px; }

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-top: 88px;
}
.feature.reverse .feature-copy { order: 2; }
.feature h3 { margin: 0 0 12px; font-size: 1.75rem; line-height: 1.2; }
.feature p { color: var(--muted); font-size: 1.05rem; }
.feature .eyebrow { color: var(--lime); font-size: 0.85rem; }

.checks { list-style: none; padding: 0; margin: 18px 0 0; }
.checks li {
  position: relative;
  padding-left: 28px;
  margin: 8px 0;
  color: var(--text);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(14, 124, 102, 0.1);
  box-shadow: inset 0 0 0 1.5px var(--lime);
}
.checks li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: calc(0.45em + 4px);
  width: 4px;
  height: 7px;
  border: solid var(--lime);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Phones in the app's frame (scripts/landing_images.py), transparent
   around them: the shadow follows the phone. */
.feature-mockup {
  width: min(300px, 78%);
  filter: drop-shadow(0 24px 36px rgba(22, 27, 34, 0.18));
}
.feature-mockup-wide { width: min(470px, 100%); }
/* The workshop board on a screen: as wide as the column allows. */
.feature-mockup-screen { width: 100%; }
.feature-visual:has(.feature-mockup-screen) { align-items: center; }
.feature-visual { display: flex; justify-content: center; align-items: flex-start; }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 96px;
}
.mini {
  box-shadow: var(--shadow);
  padding: 22px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mini h4 { margin: 0 0 6px; font-size: 1.05rem; }
.mini p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Pricing ---------- */

.pricing { padding-top: 96px; padding-bottom: 40px; }
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 340px));
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}
.plan {
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.plan h3 { margin: 0; font-size: 1.3rem; }
.plan-price { margin: 6px 0 0; color: var(--muted); }
.plan-price strong { color: var(--text); font-size: 1.9rem; font-weight: 800; letter-spacing: -0.01em; }
.plan-note { margin: 0 0 4px; color: var(--muted); font-size: 0.92rem; }
.prices-note { margin: 20px auto 0; text-align: center; color: var(--muted); font-size: 0.9rem; }
.plan .checks { flex: 1; margin-bottom: 24px; }
.plan-team {
  background: var(--glass-strong);
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime), 0 20px 50px rgba(14, 124, 102, 0.12);
}

/* ---------- FAQ: plain <details>, no script ---------- */

.faq { padding-top: 96px; padding-bottom: 40px; }
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 760px;
  margin: 40px auto 0;
}
.faq-item {
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 650;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; color: var(--lime); font-size: 1.3rem; line-height: 1.2; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: var(--radius); }
.faq-item p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* ---------- Final CTA + footer ---------- */

.final-cta { padding-top: 96px; padding-bottom: 96px; text-align: center; }
.final-cta h2 { margin: 0 0 24px; font-size: clamp(1.7rem, 3vw, 2.2rem); }

.footer { border-top: 1px solid var(--border); padding: 28px 0 36px; color: var(--muted); font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer nav a { color: var(--muted); }
.footer nav a:hover { color: var(--text); }
/* X and Facebook: icons among the footer's links, with room to tap them. */
.footer nav .footer-social { display: inline-flex; align-items: center; padding: 4px; margin: -4px; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .plans { grid-template-columns: repeat(auto-fit, minmax(260px, 360px)); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; gap: 36px; }
  .feature, .feature.reverse { grid-template-columns: 1fr; gap: 32px; margin-top: 72px; }
  .feature.reverse .feature-copy { order: 0; }
  .mini-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .plan-outline { display: none; } /* would sit behind the heading */
  .topbar-inner { gap: 12px; }
  .topbar-inner .langs { margin-left: auto; }
  .plans { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 100%; }
  .lead { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
