/* Klice Lawn & Landscape — shared styles */

/* Anton (self-hosted, same webfont the Wix site used) */
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/anton-latin.woff2") format("woff2");
  unicode-range: U+0-FF, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/anton-latin-ext.woff2") format("woff2");
  unicode-range: U+100-24F, U+259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --green-dark: #1f3d0c;
  --green-primary: #328103;
  --green-brand: #2c6e02;
  --green-light: #a3d977;
  --black: #000000;
  --white: #ffffff;
  --off-white: #f4f6f2;
  --gray-text: #333333;
  --gray-border: #e2e5df;
  --font-display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --font-body: Arial, Helvetica, sans-serif;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.55;
}

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

a { color: inherit; text-decoration: none; }

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

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

.site-header {
  background: url("../assets/images/gallery-05.jpg") center/cover no-repeat;
  background-color: var(--green-dark);
  position: relative;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 28, 4, 0.72);
}

.nav-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: normal;
  line-height: 1;
  font-size: 28px;
  letter-spacing: 0.5px;
}

.logo span {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: bold;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--white);
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a:focus {
  text-decoration: underline;
}

.nav-links .active {
  text-decoration: underline;
}

.call-now {
  background: var(--green-primary);
  color: var(--white) !important;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 13px;
  white-space: nowrap;
}

.call-now:hover { background: var(--green-brand); text-decoration: none !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  z-index: 3;
}

/* ---------- Hero (full-viewport background video) ---------- */

/*
  Sticky "reveal" scroll effect, mirroring the Wix original: the media block is
  taller than the section and the video inside is sticky, so the video holds
  still while the page scrolls over it.
*/
.hero {
  position: relative;
  padding: 0;
  height: 100vh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: clip;
  background: var(--green-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: clip;
  z-index: 0;
}

.hero-bg-media {
  height: calc(100% + 100vh);
  margin-top: -50vh;
  overflow: clip;
  isolation: isolate;
}

.hero-bg-video {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  color: var(--white);
}

.hero-eyebrow {
  font-family: var(--font-display);
  color: var(--white);
  font-size: clamp(30px, 6.5vw, 78px);
  letter-spacing: 2px;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.hero-call {
  position: absolute;
  right: clamp(16px, 5vw, 70px);
  bottom: clamp(24px, 6vh, 70px);
  z-index: 3;
  background: var(--white);
  color: var(--green-primary);
  font-family: var(--font-display);
  font-size: clamp(15px, 1.6vw, 20px);
  letter-spacing: 0.5px;
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-call:hover,
.hero-call:focus-visible { transform: translateY(-2px); background: #f2fbe9; }

/* ---------- Section background video (intro + contact) ---------- */

.section-bg {
  position: absolute;
  inset: 0;
  overflow: clip;
  z-index: 0;
}

.section-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-bg-scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 28, 4, 0.72);
}

.intro {
  position: relative;
  overflow: clip;
  color: var(--white);
  padding: clamp(80px, 12vh, 150px) 0;
}

.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.intro h1 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.15;
  margin: 0 0 22px;
  text-transform: uppercase;
}

.intro p {
  max-width: 720px;
  margin: 0 auto 30px;
  font-size: 17px;
  color: #f1f4ee;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--green-primary);
  color: var(--white);
}

.btn-primary:hover { background: var(--green-brand); }

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ---------- Sections ---------- */

section {
  padding: 70px 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: normal;
  text-align: center;
  font-size: clamp(26px, 4vw, 38px);
  color: var(--green-primary);
  margin: 0 0 45px;
  letter-spacing: 1px;
}

/* Services */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--off-white);
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  padding: 34px 28px;
  text-align: center;
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: normal;
  color: var(--green-dark);
  font-size: 20px;
  letter-spacing: 1px;
  margin: 0 0 14px;
}

.service-card p {
  color: var(--gray-text);
  font-size: 15px;
  margin: 0;
}

/* Gallery */

.gallery-section { background: var(--off-white); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-grid a { border-radius: 6px; overflow: hidden; }

.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-grid a:hover img { transform: scale(1.06); }

/* Reviews */

.reviews-section { text-align: center; }

.review-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 30px;
}

.review-stars { color: #f5b301; font-size: 20px; margin-bottom: 14px; }

.review-quote {
  font-size: 18px;
  font-style: italic;
  color: var(--gray-text);
  margin: 0 0 16px;
}

.review-author { font-weight: bold; }

.review-badge { margin: 18px auto 0; height: 26px; }

/* Contact */

.contact-section {
  position: relative;
  overflow: clip;
  background: var(--green-dark);
  color: var(--white);
}

.contact-brand {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 38px);
  line-height: 1.1;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.contact-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 50px;
  align-items: start;
}

.contact-intro h2 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: 30px;
  color: var(--white);
}

.contact-intro .tagline {
  color: var(--green-light);
  font-family: var(--font-display);
  font-size: 20px;
  margin-top: 10px;
}

.contact-intro .phone-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 20px;
  font-weight: bold;
  color: var(--white);
  border-bottom: 2px solid var(--green-primary);
  padding-bottom: 2px;
}

form#contact-form {
  background: var(--white);
  color: var(--black);
  padding: 30px;
  border-radius: 8px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c9cfc3;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14px;
}

.field textarea { min-height: 110px; resize: vertical; }

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  font-size: 14px;
}

.checkbox-group input { width: auto; }

.newsletter-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.newsletter-field input { width: auto; }

.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
}

.form-status.success {
  display: block;
  background: #e4f3df;
  color: #1f5c0c;
  border: 1px solid #b6dba7;
}

.form-status.error {
  display: block;
  background: #fbe3e3;
  color: #8a1f1f;
  border: 1px solid #eab5b5;
}

/* Footer */

.site-footer {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 26px 20px;
  font-size: 13px;
}

.site-footer .footer-tagline {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--green-light);
  margin-bottom: 8px;
}

/* ---------- Blog ---------- */

.blog-hero {
  /* sits inside .site-header, so lift it above the header's scrim overlay */
  position: relative;
  z-index: 2;
  background: var(--green-dark);
  color: var(--white);
  padding: 60px 20px;
  text-align: center;
}

.blog-hero h1 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 10px;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 60px 0;
}

.blog-card {
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.blog-card img { width: 100%; height: 190px; object-fit: cover; }

.blog-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.blog-card h2 {
  font-size: 18px;
  margin: 0 0 8px;
  line-height: 1.3;
}

.blog-card .meta {
  font-size: 12px;
  color: #777;
  margin-bottom: 10px;
}

.blog-card p { font-size: 14px; color: var(--gray-text); flex: 1; }

.blog-card .read-more {
  margin-top: 14px;
  font-weight: bold;
  color: var(--green-primary);
  font-size: 13px;
  text-transform: uppercase;
}

/* Single post */

.post-hero {
  padding: 50px 0 0;
}

.post-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
}

.post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}

.post-content h1 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(26px, 4vw, 40px);
  color: var(--green-dark);
  margin-bottom: 8px;
}

.post-meta { color: #777; font-size: 13px; margin-bottom: 30px; }

.post-content h2 {
  font-size: 22px;
  color: var(--green-dark);
  margin-top: 34px;
}

.post-content p { margin: 16px 0; color: var(--gray-text); }

.post-content ul { color: var(--gray-text); }

.post-content .back-link {
  display: inline-block;
  margin-top: 30px;
  font-weight: bold;
  color: var(--green-primary);
}

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

@media (max-width: 900px) {
  .contact-wrap { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--green-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
    display: none;
  }

  .nav-links.open { display: flex; }

  .call-now { margin-top: 6px; }

  .form-row { grid-template-columns: 1fr; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero { padding: 60px 16px 80px; }
  section { padding: 50px 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery-grid img { height: 150px; }
}

/* ---------- Video-filled headline (video shows through the letters) ---------- */

/*
  The Wix original clipped a looping video to SVG <text>. This uses a blend-mode
  knockout instead: a white panel with black letters over the video, blended with
  `lighten`, so white stays white and the letters let the video through. Same look,
  but it reflows and scales like normal text. Browsers without blend-mode support
  fall back to plain black type on white.
*/
.video-text {
  position: relative;
  isolation: isolate;
  background: var(--white);
  margin: 0 0 45px;
  overflow: hidden;
}

.video-text-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.video-text-knockout {
  position: relative;
  z-index: 1;
  display: block;
  mix-blend-mode: lighten;
  background: var(--white);
  color: #000;
  font-family: var(--font-display);
  font-weight: normal;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1px;
  font-size: clamp(34px, 9vw, 104px);
  line-height: 1.12;
  padding: 0.12em 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Scroll / load entrance animations ---------- */

/*
  Timings, easings and transforms below match the Wix motion presets the original
  site used (fadeIn + growIn, floatIn, foldIn). Elements are revealed by the
  IntersectionObserver in js/main.js, which adds .in-view.
*/
@media (prefers-reduced-motion: no-preference) {
  [data-motion] {
    opacity: 0;
    will-change: transform, opacity;
  }

  /* Hero headline — 3.1s hold lets the mower finish cutting KLICE into the lawn */
  [data-motion="hero"].in-view {
    animation: m-hero 1800ms 3100ms cubic-bezier(0.645, 0.045, 0.355, 1) both;
  }

  [data-motion="grow"].in-view {
    animation: m-grow 1200ms 1ms cubic-bezier(0.645, 0.045, 0.355, 1) both;
  }

  [data-motion="float"].in-view {
    animation: m-float 1200ms 1ms cubic-bezier(0.445, 0.05, 0.55, 0.95) both;
  }

  [data-motion="fold"].in-view {
    animation: m-fold 1200ms 1ms cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  }
}

@keyframes m-hero {
  from { opacity: 0; transform: translateY(89%) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes m-grow {
  from { opacity: 0; transform: translateY(20%) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes m-float {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes m-fold {
  from {
    opacity: 0;
    transform: translateY(-50%) perspective(800px) rotateX(-90deg) translateY(50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) perspective(800px) rotateX(0deg) translateY(0);
  }
}

/* Reduced motion: everything is simply present, videos are paused by main.js */
@media (prefers-reduced-motion: reduce) {
  [data-motion] { opacity: 1; }
  html { scroll-behavior: auto; }
}

@media (max-width: 750px) {
  .hero { height: 100svh; }
  .hero-bg-media { height: calc(100% + 60vh); margin-top: -30vh; }
  .hero-call { right: 50%; transform: translateX(50%); }
  .hero-call:hover { transform: translateX(50%) translateY(-2px); }
}
