/* Cedar Ridge Lawn & Landscape
   Plain, slightly dated small-business styling. That is deliberate: a site that
   looks like it was built once in 2019 and lightly maintained since is more
   believable for a two-truck operation than something that looks designed. */

:root {
  --green: #2f5d3a;
  --green-dark: #234a2d;
  --green-light: #e8f0e8;
  --sand: #f6f4ee;
  --ink: #2b2b28;
  --muted: #6b6b63;
  --line: #ddd9cf;
  --accent: #b4801f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

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

.topbar {
  background: var(--green-dark);
  color: #e9efe9;
  font-size: 13.5px;
  padding: 7px 0;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }

header.site { border-bottom: 1px solid var(--line); background: #fff; }
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding-top: 16px; padding-bottom: 16px;
}

.brandwrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand { display: flex; align-items: center; text-decoration: none; color: inherit; min-width: 0; }

/* A background image, not an <img>, and outside the <a>. On a phone a long
   press on an image offers "Save image" and a long press on a link offers
   "Open in new tab"; either menu cancels the pointerup the gesture needs.
   touch-callout and user-select close the remaining paths. */
.mark {
  width: 46px; height: 46px; flex: none; display: block;
  background: url("logo.svg") center / contain no-repeat;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.brand .name { font-size: 20px; font-weight: 700; letter-spacing: .2px; line-height: 1.15; white-space: nowrap; }
.brand .name span { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); letter-spacing: 1.6px; text-transform: uppercase; white-space: nowrap; }

nav.main ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; flex-wrap: wrap; }
nav.main a { text-decoration: none; color: var(--ink); font-size: 15px; padding: 4px 0; border-bottom: 2px solid transparent; }
nav.main a:hover, nav.main a.on { border-bottom-color: var(--accent); }

/* ── hero ───────────────────────────────────────────────── */

.hero { background: var(--green); color: #fff; }
.hero .wrap { padding-top: 54px; padding-bottom: 54px; }
.hero h1 { margin: 0 0 12px; font-size: 33px; line-height: 1.25; font-weight: 700; }
.hero p { margin: 0 0 22px; max-width: 620px; font-size: 17px; color: #dbe6db; }
.hero .scene { border-radius: 4px; overflow: hidden; margin-top: 26px; border: 4px solid rgba(255,255,255,.15); }

/* The files are 3:2; the crop happens here so each breakpoint gets a shape
   that suits it. Baking a 2.2:1 letterbox into the file is what made these
   look squashed on a phone. */
.hero .scene img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.shot {
  width: 100%; height: auto; display: block; border-radius: 4px; border: 1px solid var(--line);
  aspect-ratio: 3 / 2; object-fit: cover;
}

.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 11px 22px; border-radius: 3px; text-decoration: none;
  font-weight: 600; font-size: 15px; border: 0; cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: #9c6d18; color: #fff; }
.btn.alt { background: #fff; color: var(--green-dark); }

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

section { padding: 46px 0; }
section.tint { background: var(--sand); }
h2 { font-size: 25px; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0 0 26px; max-width: 640px; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 20px; }
.card h3 { margin: 12px 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .ico { width: 40px; height: 40px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
@media (max-width: 780px) { .split { grid-template-columns: 1fr; } }

ul.ticks { list-style: none; padding: 0; margin: 16px 0 0; }
ul.ticks li { padding-left: 26px; position: relative; margin-bottom: 9px; }
ul.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

table.rates { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
table.rates th, table.rates td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
table.rates th { background: var(--green-light); font-size: 13px; text-transform: uppercase; letter-spacing: .6px; }
table.rates td:last-child { text-align: right; white-space: nowrap; }

.quote-block { background: var(--green-light); border-left: 4px solid var(--green); padding: 16px 20px; margin: 22px 0; }
.quote-block p { margin: 0 0 6px; font-style: italic; }
.quote-block cite { font-style: normal; font-size: 13.5px; color: var(--muted); }

.grid-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.grid-gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; }
.grid-gallery img { width: 100%; height: auto; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.grid-gallery figcaption { padding: 10px 12px; font-size: 13.5px; color: var(--muted); }

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

form.quote { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 11px; border: 1px solid #c9c5ba; border-radius: 3px;
  font-family: inherit; font-size: 15px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.field textarea { min-height: 108px; resize: vertical; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.form-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.form-status { margin-top: 14px; font-size: 14.5px; }
.form-status.ok { color: var(--green); }
.form-status.err { color: #a3341f; }

#refWrap { display: none; }
#refWrap.shown { display: block; }

#extraDetail { display: none; }
#extraDetail.shown { display: block; }
#extraDetail .files-list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
#extraDetail .files-list li { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.progress { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 12px; display: none; }
.progress.shown { display: block; }
.progress > i { display: block; height: 100%; background: var(--green); width: 0; transition: width .2s; }

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

footer.site { background: #26261f; color: #b9b6ab; font-size: 14px; padding: 34px 0 26px; margin-top: 20px; }
footer.site .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 26px; }
footer.site h4 { color: #fff; font-size: 14px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .8px; }
footer.site a { color: #d8d5cb; text-decoration: none; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 6px; }
.legal { border-top: 1px solid #3a3a31; margin-top: 24px; padding-top: 16px; font-size: 12.5px; color: #86847c; }


/* ── phones ──────────────────────────────────────────────────────────────
   The desktop layout squeezed into 390px was the problem: the brand wrapped
   onto three lines, the nav collapsed into the gap beside it, and the
   photographs became thin bands. */

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 16px; }

  .topbar { font-size: 12px; }
  .topbar .wrap { justify-content: center; text-align: center; gap: 4px; }
  .topbar span:last-child { display: none; }   /* the nav already has Contact */

  /* Brand on its own line, nav underneath as a single scrollable row. */
  header.site .wrap { flex-direction: column; align-items: stretch; gap: 12px; padding: 13px 16px; }
  .brandwrap { justify-content: center; }
  .mark { width: 40px; height: 40px; }
  .brand .name { font-size: 18px; }

  nav.main { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main ul { justify-content: space-between; gap: 14px; flex-wrap: nowrap; width: 100%; }
  nav.main a { font-size: 14px; white-space: nowrap; }

  .hero .wrap { padding-top: 30px; padding-bottom: 30px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15.5px; }
  /* Taller than the desktop crop: a wide strip on a narrow screen reads as a
     mistake rather than a photograph. */
  .hero .scene img { aspect-ratio: 4 / 3; }
  .hero .scene { border-width: 3px; margin-top: 20px; }

  section { padding: 30px 0; }
  h2 { font-size: 21px; }
  .lede { margin-bottom: 18px; }
  .cols { gap: 14px; }
  .split { gap: 20px; }
  .card { padding: 16px; }

  .shot { aspect-ratio: 4 / 3; }

  table.rates { font-size: 14px; }
  table.rates th, table.rates td { padding: 9px 8px; }

  form.quote { padding: 16px; }
  /* 16px stops iOS zooming the whole page when a field takes focus. */
  .field input, .field select, .field textarea { font-size: 16px; }
  .btn { display: block; width: 100%; text-align: center; padding: 13px 22px; }
  .hero .btn, nav.main a.btn { width: auto; display: inline-block; }

  .grid-gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-gallery figcaption { padding: 8px 9px; font-size: 12.5px; }

  footer.site { padding: 26px 0 20px; }
  footer.site .wrap { grid-template-columns: 1fr; gap: 18px; }
  .quote-block { padding: 13px 15px; }
}

@media (max-width: 420px) {
  .grid-gallery { grid-template-columns: 1fr; }
  nav.main ul { gap: 11px; }
  nav.main a { font-size: 13.5px; }
}
