/* Backyard Greens Crew - Production Stylesheet */
:root {
  --bg: #FFFFFF;
  --surface: #F5F5F7;
  --ink: #1D1D1F;
  --muted: #6E6E73;
  --line: #E3E3E6;
  --gold: #8D6A36;
  --btn: #24332A;
  --btnink: #FFFFFF;
  --deep: #18221C;
  --ondeep: #F1EEE6;
  --ondeepm: #AEB5A9;
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #111312;
    --ink: #F5F5F7;
    --muted: #A1A1A6;
    --line: #2C2C2E;
    --gold: #C9A56B;
    --btn: #EDE8DA;
    --btnink: #111612;
    --deep: #0B0F0C;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #111312;
  --ink: #F5F5F7;
  --muted: #A1A1A6;
  --line: #2C2C2E;
  --gold: #C9A56B;
  --btn: #EDE8DA;
  --btnink: #111612;
  --deep: #0B0F0C;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F5F5F7;
  --ink: #1D1D1F;
  --muted: #6E6E73;
  --line: #E3E3E6;
  --gold: #8D6A36;
  --btn: #24332A;
  --btnink: #FFFFFF;
  --deep: #18221C;
  --ondeep: #F1EEE6;
  --ondeepm: #AEB5A9;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  scroll-padding-top: calc(70px + env(safe-area-inset-top, 0px));
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 49;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1;
}

h1 {
  font-size: clamp(3.2rem, 9.5vw, 8.2rem);
  line-height: 0.96;
}

h2 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

h3 {
  font-size: 1.9rem;
}

em {
  font-style: italic;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.pill {
  display: inline-block;
  font: 500 0.98rem/1 var(--sans);
  padding: 16px 28px;
  border-radius: 999px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s, opacity 0.25s;
}

.pill:hover {
  transform: scale(1.04);
}

.pill.w {
  background: #ffffff;
  color: #111111;
}

.pill.d {
  background: var(--btn);
  color: var(--btnink);
}

.lnk {
  font-weight: 500;
  text-decoration: none;
  color: inherit;
}

.lnk::after {
  content: "\00a0\203A";
  transition: margin 0.2s;
}

.lnk:hover::after {
  margin-left: 4px;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  color: #ffffff;
  transition: background 0.35s, color 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}

nav.s {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  color: var(--ink);
  border-color: var(--line);
}

.nv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 400 1.35rem/1 var(--serif);
  letter-spacing: 0.01em;
}

.brand img {
  height: 34px;
  width: auto;
  border-radius: 5px;
  display: block;
  background: #fefefe;
}

.nv ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.nv ul a {
  text-decoration: none;
  opacity: 0.85;
}

.nv ul a:hover {
  opacity: 1;
}

.nv .pill {
  padding: 11px 20px;
  font-size: 0.88rem;
  background: #ffffff;
  color: #111111;
}

nav.s .pill {
  background: var(--btn);
  color: var(--btnink);
}

/* Hero Section */
.hero {
  height: 170vh;
  background: var(--bg);
}

.stick {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
}

.media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform;
  transform-origin: 50% 55%;
  background: #222222;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
  transform: scale(1.12);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 9, 0.45), rgba(8, 12, 9, 0.08) 40%, rgba(8, 12, 9, 0.7));
}

.hc {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9vh;
  color: #ffffff;
  will-change: transform, opacity;
  z-index: 2;
}

.hc p.sub {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  max-width: 30em;
  margin: 26px 0 34px;
  opacity: 0.92;
}

.hc .row {
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}

.hc > .wrap > * {
  animation: up 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hc h1 {
  animation-delay: 0.15s;
}

.hc .sub {
  animation-delay: 0.35s;
}

.hc .row {
  animation-delay: 0.5s;
}

@keyframes up {
  from {
    opacity: 0;
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Statement Section */
.say {
  padding: 18vh 0 14vh;
}

.say p {
  font: 400 clamp(2rem, 5vw, 4rem) / 1.12 var(--serif);
  letter-spacing: -0.01em;
  max-width: 18em;
}

.say .w {
  opacity: 0.16;
  transition: opacity 0.35s;
}

.say .w.on {
  opacity: 1;
}

/* Services Rail Section */
.rail {
  position: relative;
}

.pin {
  padding: 80px 0 60px;
}

.rh {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

.rh p {
  color: var(--muted);
  margin-top: 16px;
  max-width: 30em;
}

.track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 max(24px, calc((100vw - 1200px) / 2 + 24px)) 12px;
  scrollbar-width: none;
}

.track::-webkit-scrollbar {
  display: none;
}

.card {
  position: relative;
  flex: 0 0 auto;
  height: min(60vh, 520px);
  min-height: 380px;
  aspect-ratio: 4 / 5;
  border-radius: 26px;
  overflow: hidden;
  scroll-snap-align: center;
  background: #222222;
  color: #ffffff;
  cursor: pointer;
}

.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.card:hover img {
  transform: scale(1.06);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(6, 10, 7, 0.86));
}

.card div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px;
  z-index: 2;
}

.card p {
  font-size: 0.95rem;
  opacity: 0.88;
  margin: 10px 0 16px;
}

.card button {
  all: unset;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.2s, color 0.2s;
}

.card button:hover {
  background: #ffffff;
  color: #111111;
}

.card button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.bar {
  display: none;
  max-width: 1200px;
  margin: 34px auto 0;
  padding: 0 24px;
}

.bar i {
  display: block;
  height: 2px;
  background: var(--line);
  position: relative;
}

.bar b {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  background: var(--gold);
}

.pinned .pin {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: calc(76px + env(safe-area-inset-top, 0px)) 0 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pinned .track {
  overflow: visible;
  scroll-snap-type: none;
  will-change: transform;
  padding-left: max(24px, calc((100vw - 1200px) / 2 + 24px));
}

.pinned .bar {
  display: block;
  width: 100%;
}

/* Audience Section */
.aud {
  padding: 14vh 0;
}

.ah {
  margin-bottom: 50px;
}

.ag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.ac {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 4 / 3.3;
  display: block;
  color: #ffffff;
  text-decoration: none;
  background: #222222;
}

.ac img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ac:hover img {
  transform: scale(1.05);
}

.ac::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(6, 10, 7, 0.85));
}

.ac div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px;
  z-index: 2;
}

.ac h3 {
  font-size: 2.5rem;
}

.ac p {
  margin: 10px 0 14px;
  max-width: 26em;
  opacity: 0.9;
}

/* Central Texas Values Section */
.tx {
  background: var(--deep);
  color: var(--ondeep);
  padding: 16vh 0;
}

.tx h2 {
  max-width: 11em;
}

.tx .cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 70px;
}

.tx .cols div {
  border-top: 1px solid rgba(241, 238, 230, 0.22);
  padding-top: 22px;
}

.tx h3 {
  font-size: 1.7rem;
  margin-bottom: 10px;
}

.tx .cols p {
  color: var(--ondeepm);
  font-size: 0.98rem;
}

/* Process Section */
.pr {
  padding: 16vh 0;
}

.sts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
}

.st .ln {
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.st.in .ln {
  transform: scaleX(1);
}

.st b {
  display: block;
  font: 400 4rem/1 var(--serif);
  color: var(--gold);
  margin: 22px 0 14px;
}

.st p {
  color: var(--muted);
  margin-top: 8px;
}

/* Quote Section & Form */
.qt {
  background: var(--deep);
  color: var(--ondeep);
  padding: 16vh 0;
}

.qg {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
}

.qg > div > p {
  color: var(--ondeepm);
  margin-top: 18px;
  max-width: 26em;
}

form {
  display: grid;
  gap: 26px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

label, legend {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ondeepm);
  display: block;
  margin-bottom: 8px;
  padding: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--ondeep);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(241, 238, 230, 0.32);
  padding: 10px 0;
  border-radius: 0;
}

select {
  appearance: none;
  cursor: pointer;
}

select option {
  background: #18221C;
  color: #F1EEE6;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: #C9A56B;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.ch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ch label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ondeep);
}

.ch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ch span {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid rgba(241, 238, 230, 0.3);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ch span:hover {
  border-color: rgba(241, 238, 230, 0.6);
}

.ch input:checked + span {
  background: #EDE8DA;
  color: #111612;
  border-color: #EDE8DA;
}

.ch input:checked + span:hover {
  background: #EFECE6;
  border-color: #EFECE6;
}

.ch input:focus-visible + span {
  outline: 3px solid #C9A56B;
  outline-offset: 2px;
}

.qt .pill {
  background: #EDE8DA;
  color: #111612;
  justify-self: start;
}

.qt .pill[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.field-error {
  color: #F2A99F;
  font-size: 0.8rem;
  margin-top: 4px;
}

/* Honeypot field (hidden offscreen) */
#quote-website {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Quote status banners */
#quote-confirmation {
  display: none;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(241, 238, 230, 0.12);
  border: 1px solid rgba(241, 238, 230, 0.25);
  color: var(--ondeep);
  font-weight: 500;
  margin-top: 16px;
  line-height: 1.5;
}

#quote-confirmation.visible {
  display: block;
}

.qt-direct {
  margin-top: 32px;
  font-size: 0.95rem;
  line-height: 1.8;
}

#quote-error {
  display: none;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(242, 169, 159, 0.12);
  border: 1px solid rgba(242, 169, 159, 0.3);
  color: #F2A99F;
  font-size: 0.92rem;
  margin-top: 14px;
  line-height: 1.5;
}

#quote-error.visible {
  display: block;
}

#quote-error a {
  color: inherit;
  text-decoration: underline;
}

#turnstile-widget {
  min-height: 65px;
  margin: 6px 0 12px;
}

/* Footer */
footer {
  padding: 50px 0;
  color: var(--muted);
  font-size: 0.93rem;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

footer img {
  width: min(100%, 340px);
  height: auto;
  border-radius: 12px;
  display: block;
}

/* Scroll reveal helpers */
.js .rv {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}

.js .rv.in {
  opacity: 1;
  transform: none;
}

.lf, .rt {
  display: flex;
  align-items: center;
  gap: 28px;
}

.rt {
  gap: 18px;
}

/* Theme Toggle Button */
.tg {
  all: unset;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.25s;
}

.tg:hover {
  opacity: 1;
  transform: scale(1.08);
}

.tg:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.tg svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tg .sun {
  display: none;
}

:root[data-theme="dark"] .tg .sun {
  display: block;
}

:root[data-theme="dark"] .tg .moon {
  display: none;
}

/* Service Detail Modal Dialog (#service-modal) - FLIP Expand/Collapse Sheet */
#service-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  transform-origin: 0 0;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  border: 0;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  display: none;
  will-change: transform, border-radius, opacity;
}

#service-modal[hidden] {
  display: none !important;
  pointer-events: none !important;
}

#service-modal.is-open,
#service-modal[data-open="true"] {
  display: block !important;
}

#service-modal.open {
  display: block !important;
  opacity: 1;
  pointer-events: auto;
}

.shi {
  position: absolute;
  inset: 0;
}

.shi img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#service-modal .x {
  all: unset;
  cursor: pointer;
  position: absolute;
  z-index: 10;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 22, 21, 0.55);
  color: #ffffff;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s;
}

#service-modal.open .x {
  opacity: 1;
  transition: opacity 0.38s ease 0.25s, transform 0.25s;
}

#service-modal .x:hover {
  transform: scale(1.1);
}

#service-modal .x:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

#service-modal .x svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

.sx {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transition: opacity 0.28s ease;
}

#service-modal.open .sx {
  opacity: 1;
  transition: opacity 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.19s;
}

.sh-h {
  height: 64vh;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 32%, rgba(0, 0, 0, 0.65));
  cursor: pointer;
}

.sh-h .wrap {
  width: 100%;
  padding-bottom: 48px;
  cursor: default;
}

.sh-h .k {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 14px;
}

.sh-h h2 {
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  max-width: 12em;
}

.sh-b {
  background: var(--bg);
  padding: 72px 0 100px;
  position: relative;
}

.sh-b .g {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
}

.sh-b .ov {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.sh-b h3 {
  margin-bottom: 14px;
}

.inc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.inc li {
  padding: 15px 0 15px 26px;
  border-top: 1px solid var(--line);
  position: relative;
}

.inc li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.35em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.inc li:last-child {
  border-bottom: 1px solid var(--line);
}

.price-hint {
  display: inline-block;
  margin-top: 16px;
  font-weight: 600;
  color: var(--gold);
}

.gf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 48px;
}

.gf > span:first-child {
  color: var(--muted);
  margin-right: 6px;
}

.tgx {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.92rem;
}

.ct {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 44px;
}

.bk {
  all: unset;
  cursor: pointer;
  font-weight: 500;
}

.bk:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Media Queries */
@media (max-width: 900px) {
  .sh-b .g {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .lf {
    gap: 0;
  }
  .nv ul {
    display: none;
  }
  .ag, .qg, .tx .cols, .sts {
    grid-template-columns: 1fr;
  }
  .qg {
    gap: 44px;
  }
  .tx .cols, .sts {
    gap: 30px;
  }
  .card {
    height: 440px;
  }
}

@media (max-width: 560px) {
  .row2 {
    grid-template-columns: 1fr;
  }
  .brand span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .rv {
    opacity: 1;
    transform: none;
  }
  .say .w {
    opacity: 1;
  }
  .media img {
    transform: none;
  }
}
