/* =============================================
   LW Builder Preview — AZ Turf & Concrete
   ============================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 720px; }

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

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--c-text);
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: var(--c-green); color: #fff;
  font-weight: 800; font-size: 20px; letter-spacing: 0.5px;
  border-radius: 6px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 16px; letter-spacing: 0.4px; }
.brand-text em {
  font-style: normal; font-size: 11px; color: var(--c-muted);
  letter-spacing: 1.5px;
}
.header-right {
  display: flex; align-items: center; gap: 20px;
}
.header-phone {
  text-decoration: none; font-weight: 600; color: var(--c-navy);
  font-size: 14px;
}
.lang-switch {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--c-muted);
}
.lang-switch a {
  text-decoration: none; padding: 2px 6px; border-radius: 4px;
  color: var(--c-muted);
}
.lang-switch a.active { color: #fff; background: var(--c-navy); }

@media (max-width: 600px) {
  .header-phone { display: none; }
  .brand-text em { display: none; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; transition: all .15s ease;
  text-decoration: none;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: var(--c-green); color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.btn-primary:hover:not(:disabled) { background: var(--c-green-d); }
.btn-ghost {
  background: #fff; color: var(--c-text); border-color: var(--c-border);
}
.btn-ghost:hover { background: var(--c-bg); }
.btn-link {
  background: none; color: var(--c-muted); text-decoration: underline;
  padding: 8px 4px;
}
.btn-link:hover { color: var(--c-navy); }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-block { width: 100%; }

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

.screen { display: none; }
.screen.is-active { display: block; }

.screen-hero { padding: 60px 0 80px; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  padding: 6px 12px; background: rgba(92,177,50,.12); color: var(--c-green-d);
  border-radius: 100px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.6px; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-copy h1 {
  font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08;
  font-weight: 800; letter-spacing: -0.5px; margin: 0 0 18px;
  color: var(--c-navy);
}
.hero-copy .lead {
  font-size: 17px; color: var(--c-muted); margin: 0 0 24px;
  max-width: 560px;
}
.hero-bullets {
  list-style: none; padding: 0; margin: 0 0 32px;
  display: flex; flex-wrap: wrap; gap: 18px;
}
.hero-bullets li {
  font-size: 14px; color: var(--c-text);
  padding-left: 22px; position: relative;
}
.hero-bullets li::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 14px; height: 14px; transform: translateY(-50%);
  background: var(--c-green);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12l5 5L20 7' stroke='black' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12l5 5L20 7' stroke='black' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}

.hero-art {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: 16px; overflow: visible;
}
.hero-art-card {
  position: absolute; inset: 0; border-radius: 16px;
  background-size: cover; background-position: center;
  box-shadow: 0 18px 40px -12px rgba(15,23,42,.18);
}
.hero-art-before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23E5D4B5'/><stop offset='1' stop-color='%23B89968'/></linearGradient></defs><rect width='400' height='300' fill='url(%23g)'/><circle cx='90' cy='190' r='14' fill='%23A88652'/><circle cx='200' cy='220' r='10' fill='%23A88652'/><circle cx='320' cy='195' r='16' fill='%23A88652'/></svg>");
  transform: translate(-22px, -20px);
}
.hero-art-after {
  background-image: linear-gradient(135deg,#5CB132 0%,#3F8F1F 60%,#1B2A47 100%);
  width: 70%; height: 70%; left: auto; right: -10px; bottom: -16px; top: auto;
}
.hero-art-after::after {
  content:''; position:absolute; inset:0; border-radius:16px;
  background:
    repeating-linear-gradient(95deg, rgba(255,255,255,.08) 0 2px, transparent 2px 6px),
    radial-gradient(circle at 30% 70%, rgba(255,255,255,.18), transparent 60%);
}
/* When the admin has uploaded real photos, override the gradient
   placeholders and show the actual images. */
.hero-art-photo {
  background-size: cover;
  background-position: center;
  background-color: #1B2A47;
}
.hero-art-photo.hero-art-after::after { display: none; }
.hero-art-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(15,23,42,.78); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 6px 10px; border-radius: 100px;
}
.hero-art-tag-after { background: var(--c-green); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { max-width: 480px; margin: 0 auto; }
  .screen-hero { padding: 32px 0 56px; }
}

/* ----------------------- Stepper ----------------------- */

.flow { padding: 32px 0 80px; }
.stepper {
  list-style: none; padding: 0; margin: 0 0 32px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  counter-reset: step;
}
.step {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: #fff;
  border: 1px solid var(--c-border); border-radius: 10px;
  font-size: 13px; color: var(--c-muted);
  counter-increment: step;
}
.step::before {
  content: counter(step);
  width: 24px; height: 24px; flex: 0 0 24px;
  background: var(--c-bg); color: var(--c-muted);
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.step.is-active { border-color: var(--c-green); color: var(--c-text); }
.step.is-active::before { background: var(--c-green); color: #fff; }
.step.is-done { color: var(--c-text); }
.step.is-done::before { background: var(--c-navy); color: #fff; }
.step span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .stepper { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .step { flex-direction: column; align-items: flex-start; padding: 10px; }
  .step span { font-size: 11px; }
}

/* ----------------------- Screen titles ----------------------- */

.screen-title {
  font-size: 28px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--c-navy); margin: 0 0 8px;
}
.screen-sub { color: var(--c-muted); margin: 0 0 28px; max-width: 720px; }

.actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 32px; flex-wrap: wrap;
}

/* ----------------------- Dropzone ----------------------- */

.dropzone {
  display: block; padding: 48px 24px; text-align: center;
  border: 2px dashed var(--c-border); border-radius: 14px;
  background: #fff; cursor: pointer;
  transition: all .15s ease;
  position: relative;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--c-green); background: rgba(92,177,50,.04);
}
.dropzone-icon { color: var(--c-green); margin-bottom: 12px; }
.dropzone-empty strong { display: block; font-size: 16px; margin-bottom: 6px; }
.dropzone-empty small { color: var(--c-muted); }
.dropzone-preview {
  position: relative; padding: 0;
}
.dropzone-preview img {
  max-height: 380px; margin: 0 auto; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.dropzone-change {
  position: absolute; top: 12px; right: 12px;
}

/* ----------------------- Material grid ----------------------- */

.material-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.material {
  text-align: left; cursor: pointer;
  background: #fff; border: 2px solid var(--c-border); border-radius: 12px;
  padding: 0; overflow: hidden;
  transition: all .15s ease;
  display: flex; flex-direction: column;
  font: inherit; color: inherit;
}
.material:hover {
  border-color: var(--c-green);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(15,23,42,.18);
}
.material.is-selected {
  border-color: var(--c-green); box-shadow: 0 0 0 3px rgba(92,177,50,.25);
}
.material-img {
  aspect-ratio: 4 / 3; background: var(--c-bg); overflow: hidden;
}
.material-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.material-meta { padding: 12px 14px; }
.material-meta strong {
  display: block; font-size: 14px; color: var(--c-navy); margin-bottom: 2px;
}
.material-meta span { font-size: 12px; color: var(--c-muted); line-height: 1.4; }

.current-base {
  margin-bottom: 24px; max-width: 480px;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

/* ----------------------- Result + lead ----------------------- */

.result-stage {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px;
  align-items: start;
}
.ba-slider {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: 14px; overflow: hidden;
  background: #000;
  user-select: none; touch-action: none;
  box-shadow: 0 12px 36px -12px rgba(15,23,42,.22);
}
.ba-before, .ba-after {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.ba-after {
  clip-path: inset(0 0 0 50%);
}
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 0; cursor: ew-resize;
}
.ba-line {
  position: absolute; top: 0; bottom: 0; left: -1px; width: 2px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 1px rgba(0,0,0,.1);
}
.ba-knob {
  position: absolute; top: 50%; left: 0;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: var(--c-navy);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.ba-tag {
  position: absolute; top: 12px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 10px; border-radius: 100px;
  pointer-events: none;
}
.ba-tag-l { left: 12px; }
.ba-tag-r { right: 12px; background: var(--c-green); }

.result-side {
  display: flex; flex-direction: column; gap: 16px;
}
.result-pickbox {
  background: #fff; border: 1px solid var(--c-border); border-radius: 10px;
  padding: 10px 14px;
}
.result-pickbox small {
  display: block; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--c-muted); margin-bottom: 2px;
}
.result-pickbox strong { font-size: 15px; color: var(--c-navy); }

.lead-form {
  background: #fff; border: 1px solid var(--c-border); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
}
.lead-form h3 { margin: 0; font-size: 19px; color: var(--c-navy); }
.lead-form p  { margin: -4px 0 6px; color: var(--c-muted); font-size: 14px; }
.lead-form label {
  display: flex; flex-direction: column; gap: 6px;
}
.lead-form label > span {
  font-size: 13px; font-weight: 600; color: var(--c-text);
}
.lead-form input, .lead-form textarea {
  font: inherit; color: var(--c-text);
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--c-border); background: #fff;
  outline: none; transition: border-color .15s;
}
.lead-form input:focus, .lead-form textarea:focus {
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(92,177,50,.18);
}
.lead-form textarea { resize: vertical; min-height: 60px; }
.lead-error {
  margin: 0; font-size: 13px; color: #B91C1C;
  background: #FEE2E2; padding: 8px 10px; border-radius: 6px;
}
.lead-consent {
  font-size: 11px; color: var(--c-muted); line-height: 1.5;
}
.lead-thanks {
  text-align: center; padding: 28px 22px;
  background: #fff; border: 1px solid var(--c-border); border-radius: 14px;
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
}
.lead-thanks-check {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(92,177,50,.15); color: var(--c-green-d);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 4px;
}
.lead-thanks h3 { margin: 0; color: var(--c-navy); }
.lead-thanks p  { margin: 0 0 8px; color: var(--c-muted); }

@media (max-width: 880px) {
  .result-stage { grid-template-columns: 1fr; }
}

/* ----------------------- Loader ----------------------- */

.loader {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.loader-card {
  background: #fff; border-radius: 14px; padding: 32px;
  text-align: center; max-width: 360px; width: 100%;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,.4);
}
.loader-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid rgba(92,177,50,.2);
  border-top-color: var(--c-green);
  margin: 0 auto 20px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader h3 { margin: 0 0 6px; color: var(--c-navy); font-size: 18px; }
.loader p  { margin: 0; color: var(--c-muted); font-size: 14px; }

/* ----------------------- Toast ----------------------- */

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1F2937; color: #fff; padding: 12px 18px; border-radius: 10px;
  z-index: 200; max-width: calc(100% - 32px);
  box-shadow: 0 12px 24px rgba(0,0,0,.25);
  font-size: 14px;
}
.toast.is-error { background: #B91C1C; }

/* ----------------------- Sample CTA ----------------------- */

.sample-cta { display: flex; flex-direction: column; gap: 16px; }
.sample-cta-card {
  background: linear-gradient(135deg, var(--c-green) 0%, var(--c-green-d) 100%);
  color: #fff; border-radius: 14px; padding: 22px;
  box-shadow: 0 8px 24px -8px rgba(92,177,50,.4);
}
.sample-cta-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.18); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  padding: 4px 10px; border-radius: 100px;
  margin-bottom: 12px; text-transform: uppercase;
}
.sample-cta-card h3 {
  margin: 0 0 8px; font-size: 22px; line-height: 1.2;
  font-weight: 800;
}
.sample-cta-card p {
  margin: 0 0 14px; opacity: .95; font-size: 14px; line-height: 1.5;
}
.sample-cta-list {
  list-style: none; padding: 0; margin: 0 0 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.sample-cta-list li {
  font-size: 13px; padding-left: 22px; position: relative;
  color: #fff; opacity: .95;
}
.sample-cta-list li::before {
  content: ''; position: absolute; left: 0; top: 4px;
  width: 14px; height: 14px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12l5 5L20 7' stroke='black' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M5 12l5 5L20 7' stroke='black' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}
.sample-cta-card .btn-primary {
  background: #fff; color: var(--c-green-d);
}
.sample-cta-card .btn-primary:hover { background: #F1F5F9; }
.sample-cta-card .btn-link {
  color: rgba(255,255,255,.85); margin-top: 6px;
}
.sample-cta-card .btn-link:hover { color: #fff; }

/* Sample form (extends .lead-form) */
.sample-form .grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.sample-form .grid-3 {
  display: grid; grid-template-columns: 1.4fr 1fr 0.9fr; gap: 12px;
}
.sample-form select {
  font: inherit; color: var(--c-text);
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--c-border); background: #fff;
  outline: none; transition: border-color .15s;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M6 8l4 4 4-4' stroke='%2364748B' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}
.sample-form select:focus {
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(92,177,50,.18);
}

/* Honeypot — visually hidden but reachable to bots */
.hp-trap {
  position: absolute !important;
  left: -10000px !important; top: auto !important;
  width: 1px !important; height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 520px) {
  .sample-form .grid-2 { grid-template-columns: 1fr; }
  .sample-form .grid-3 { grid-template-columns: 1fr 1fr; }
  .sample-form .grid-3 > label:first-child { grid-column: 1 / -1; }
}

/* ----------------------- Footer ----------------------- */

.site-footer {
  background: var(--c-navy); color: #C9D2E3;
  padding: 28px 0 32px; margin-top: auto;
}
.site-footer .container { text-align: center; }
.site-footer p { margin: 4px 0; font-size: 14px; }
.site-footer .small { color: #8896B0; font-size: 12px; }

/* ====================================================================
   Mobile polish — applies across the full public flow
   ==================================================================== */

@media (max-width: 600px) {
  /* Tighter container padding */
  .container { padding: 0 16px; }

  /* Hero fits within the viewport without scrolling on first paint */
  .screen-hero { padding: 24px 0 40px; }
  .hero-copy h1 { font-size: clamp(28px, 8vw, 36px); margin-bottom: 12px; }
  .hero-copy .lead { font-size: 15px; margin-bottom: 18px; }
  .hero-bullets { gap: 10px 16px; margin-bottom: 22px; }
  .hero-bullets li { font-size: 13px; }
  .hero-art { aspect-ratio: 4 / 3; max-width: 360px; }
  .btn-lg { padding: 14px 22px; font-size: 16px; width: 100%; }

  /* Stepper: keep all 4 visible but compact */
  .stepper { gap: 4px; }
  .step { padding: 8px 6px; }
  .step::before { width: 22px; height: 22px; flex-basis: 22px; font-size: 11px; }
  .step span { font-size: 10px; line-height: 1.2; }

  /* Screen titles */
  .screen-title { font-size: 22px; }
  .screen-sub   { font-size: 14px; margin-bottom: 20px; }
  .flow         { padding: 20px 0 60px; }

  /* Material grid: 2 columns max — full-width was too tall */
  .material-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .material-img { aspect-ratio: 1 / 1; }
  .material-meta { padding: 10px; }
  .material-meta strong { font-size: 13px; }
  .material-meta span   { font-size: 11px; }

  /* Dropzone */
  .dropzone { padding: 32px 16px; }
  .dropzone-icon svg { width: 32px; height: 32px; }
  .dropzone-empty strong { font-size: 14px; }
  .dropzone-empty small  { font-size: 12px; }
  .dropzone-preview img  { max-height: 280px; }

  /* Actions: stack and full-width on phone */
  .actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
  }
  .actions .btn { width: 100%; }
  .actions .btn-link { padding: 10px; }

  /* Result: before/after slider taller, side panel below */
  .ba-slider { aspect-ratio: 4 / 3; border-radius: 12px; }
  .ba-tag { font-size: 10px; padding: 4px 8px; }
  .ba-knob { width: 32px; height: 32px; }

  .result-pickbox { padding: 8px 12px; }
  .result-pickbox small  { font-size: 10px; }
  .result-pickbox strong { font-size: 14px; }

  /* Sample CTA on phone */
  .sample-cta-card  { padding: 18px; }
  .sample-cta-card h3 { font-size: 19px; }
  .sample-cta-card p, .sample-cta-list li { font-size: 13px; }
  .lead-form { padding: 18px; }
  .lead-form h3 { font-size: 17px; }

  /* Loader card adapts to small viewports */
  .loader { padding: 16px; }
  .loader-card { padding: 24px; }
  .loader-spinner { width: 40px; height: 40px; }
  .loader h3 { font-size: 16px; }
  .loader p  { font-size: 13px; }

  /* Footer */
  .site-footer { padding: 22px 0 26px; }
  .site-footer p { font-size: 13px; }
}

/* Very narrow phones (≤380px) */
@media (max-width: 380px) {
  .material-grid { grid-template-columns: 1fr; }
  .material-img  { aspect-ratio: 16 / 10; }
  .stepper       { grid-template-columns: repeat(4, 1fr); }
  .step          { padding: 6px 4px; }
}
