/* =========================================================
   LotWise — green & white, calm, professional
   One stylesheet for both the landing page and calculator.
   ========================================================= */

:root {
  /* ---- Colour ---- */
  --ink: #11271e;          /* primary text, near-black green */
  --ink-soft: #3b4f45;     /* secondary text */
  --muted: #5f7268;        /* labels, captions */
  --emerald: #1f8a5e;      /* brand green */
  --emerald-deep: #0f5d3d; /* hover / depth */
  --emerald-soft: #e9f4ee; /* soft fills, chips */
  --mint-bg: #f5faf7;      /* page background wash */
  --line: #dde9e1;         /* hairline borders */
  --white: #ffffff;
  --amber: #b9760f;        /* gentle caution */
  --danger: #b23b2e;       /* over-risk */

  /* ---- Depth ---- */
  --shadow-sm: 0 4px 14px rgba(16, 40, 30, .05);
  --shadow: 0 14px 40px rgba(16, 40, 30, .08);
  --shadow-lg: 0 24px 60px rgba(16, 40, 30, .10);

  /* ---- Shape ---- */
  --radius: 18px;
  --radius-sm: 12px;

  /* ---- Type ---- */
  --display: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---- Reset-ish ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--mint-bg);
  /* a barely-there green glow at the top, the rest clean white-green */
  background-image:
    radial-gradient(900px 480px at 50% -180px, rgba(31, 138, 94, .10), transparent 70%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -.01em;
  color: var(--ink);
}
.brand .mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--emerald-soft);
  border-radius: 10px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: .94rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--emerald-deep); }
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--emerald-deep);
}
.nav-back:hover { color: var(--ink); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary {
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 138, 94, .28);
}
.btn-primary:hover {
  background: var(--emerald-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 93, 61, .32);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: #fff;
  color: var(--emerald-deep);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--emerald); background: var(--emerald-soft); }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .18s ease; }
.btn-primary:hover .arrow { transform: translateX(3px); }

/* =========================================================
   Shared section bits
   ========================================================= */
.eyebrow {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--emerald);
}
.section { padding: 76px 0; }

/* =========================================================
   Hero (landing)
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 72px 0 64px;
}
.hero-copy { animation: rise .7s cubic-bezier(.2, .7, .3, 1) both; }
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  margin: 16px 0 18px;
  color: var(--ink);
}
.hero h1 .accent { color: var(--emerald); }
.hero p.lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 30em;
  margin: 0 0 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note {
  margin-top: 20px;
  font-size: .86rem;
  color: var(--muted);
}

/* Floating preview card = the signature: turns inputs into one number */
.preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 26px 26px 30px;
  animation: rise .7s .12s cubic-bezier(.2, .7, .3, 1) both;
}
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.preview-head .tag {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.preview-dot {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .78rem; font-weight: 600; color: var(--emerald-deep);
}
.preview-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(31, 138, 94, .15);
}
.preview-rows { margin: 18px 0 22px; }
.preview-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 9px 0;
}
.preview-row + .preview-row { border-top: 1px dashed var(--line); }
.preview-row .k { font-size: .9rem; color: var(--muted); }
.preview-row .v { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.preview-result {
  background: var(--emerald-soft);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.preview-result .lbl {
  font-size: .74rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--emerald-deep);
}
.preview-result .num {
  font-family: var(--mono); font-weight: 700;
  font-size: 2.1rem; line-height: 1; color: var(--emerald-deep);
}

/* =========================================================
   Features (landing)
   ========================================================= */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}
.feature .ficon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--emerald-soft);
  border-radius: 12px;
  margin-bottom: 16px;
}
.feature h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.12rem;
  margin: 0 0 8px;
  color: var(--ink);
}
.feature p { margin: 0; font-size: .96rem; color: var(--ink-soft); }

/* =========================================================
   About (landing)
   ========================================================= */
.about {
  background: var(--emerald-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.about h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 12px 0 0;
  color: var(--ink);
}
.about-body p {
  font-size: 1.06rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body strong { color: var(--emerald-deep); font-weight: 600; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer .brand { font-size: 1rem; }
.footer .fine { font-size: .84rem; color: var(--muted); }

/* =========================================================
   Calculator page
   ========================================================= */
.calc-head { padding: 56px 0 8px; }
.calc-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -.02em;
  margin: 14px 0 10px;
  color: var(--ink);
}
.calc-head p { font-size: 1.06rem; color: var(--ink-soft); max-width: 40em; margin: 0; }

.calc-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 26px;
  padding: 28px 0 72px;
  align-items: start;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 28px; }
.card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 4px;
  color: var(--ink);
}
.card-sub { font-size: .9rem; color: var(--muted); margin: 0 0 22px; }

/* Form fields */
.field { margin-bottom: 18px; }
.field > label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.field .hint { font-weight: 400; color: var(--muted); }

.control {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
.control:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(31, 138, 94, .12);
}
.control::placeholder { color: #9fb0a7; }

/* input with a leading symbol (currency) */
.input-symbol { position: relative; }
.input-symbol .sym {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono);
  font-size: .95rem;
  color: var(--muted);
  pointer-events: none;
}
.input-symbol .control { padding-left: 40px; }

select.control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235f7268' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* quick risk chips */
.chips { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.chip {
  font-size: .82rem;
  font-weight: 600;
  color: var(--emerald-deep);
  background: var(--emerald-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--emerald); }
.chip.active { background: var(--emerald); color: #fff; }

/* conditional price field shown only when needed */
.conditional { display: none; }
.conditional.show { display: block; }

/* inline validation message — speaks in the interface voice */
.formMsg {
  margin-top: 6px;
  font-size: .86rem;
  color: var(--amber);
  min-height: 1.1em;
}

/* ---- Result panel (sticky on desktop) ---- */
.result {
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  color: #eaf3ee;
  overflow: hidden;
  position: sticky;
  top: 92px;
}
.result-pad { padding: 28px; }
.result-eyebrow {
  font-size: .74rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #79c9a3;
}
.result-empty {
  margin-top: 18px;
  color: #9db8ac;
  font-size: .98rem;
}
.result-main { display: none; }
.result-main.show { display: block; }

.lot-figure {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 1;
  color: #fff;
  margin: 14px 0 4px;
  letter-spacing: -.01em;
}
.lot-label { font-size: .92rem; color: #9db8ac; }

.result-divider { height: 1px; background: rgba(255,255,255,.10); margin: 22px 0; }

.result-rows { display: grid; gap: 14px; }
.result-row {
  display: flex; align-items: baseline; justify-content: space-between;
}
.result-row .rk { font-size: .92rem; color: #9db8ac; }
.result-row .rv { font-family: var(--mono); font-weight: 500; color: #eaf3ee; }

.risk-flag {
  margin-top: 20px;
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: rgba(178, 59, 46, .16);
  border: 1px solid rgba(229, 122, 110, .35);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: .88rem;
  color: #f6c9c2;
}
.risk-flag.show { display: flex; }
.risk-flag.ok {
  display: flex;
  background: rgba(31, 138, 94, .16);
  border-color: rgba(121, 201, 163, .35);
  color: #b9e6d0;
}

/* plain-language formula note under the form */
.note {
  margin-top: 22px;
  background: var(--emerald-soft);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: .92rem;
  color: var(--ink-soft);
}
.note h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  margin: 0 0 8px;
  color: var(--emerald-deep);
}
.note p { margin: 0 0 8px; }
.note p:last-child { margin: 0; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 52px; }
  .preview { order: 2; }
  .features { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 22px; }
  .calc-grid { grid-template-columns: 1fr; }
  .result { position: static; }
  .section { padding: 56px 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .nav-links { gap: 18px; font-size: .9rem; }
  .two-col { grid-template-columns: 1fr; }
  .card-pad, .result-pad { padding: 22px; }
  .lot-figure { font-size: 2.8rem; }
}

/* =========================================================
   Motion (calm, and respectful of reduced-motion)
   ========================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
