/* ============================================================
   Graze Tech — Global styles
   Brand: forest green #007a13 + signal red #c71006
   ============================================================ */

:root {
  --forest: #007a13;
  --forest-deep: #04340f;
  --forest-soft: #0c8a22;
  --red: #c71006;
  --ink: #14201a;
  --muted: #5c6960;
  --line: rgba(4, 52, 15, 0.1);
  --white: #ffffff;
  --bg-soft: #f4fbf2;
  --radius: 24px;
  --shadow: 0 20px 50px rgba(4, 52, 15, 0.08);
  --nav-h: 118px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--forest); }

.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;
}

/* ===================== PRELOADER ===================== */
html.is-preloading,
html.is-preloading body {
  overflow: hidden;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 80% at 50% 20%, rgba(0, 122, 19, 0.08), transparent 55%),
    linear-gradient(180deg, #fff 0%, #f4fbf2 100%);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.55s;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 24px;
  text-align: center;
}

.preloader__logo-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  animation: preloaderLogoIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.preloader__logo-wrap::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(0, 122, 19, 0.15);
  border-top-color: var(--forest);
  animation: preloaderSpin 1.1s linear infinite;
}

.preloader__logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 122, 19, 0.22);
  box-shadow: 0 10px 28px rgba(4, 52, 15, 0.14);
}

.preloader__bar {
  width: min(160px, 42vw);
  height: 3px;
  border-radius: 999px;
  background: rgba(4, 52, 15, 0.1);
  overflow: hidden;
}

.preloader__bar-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest), var(--forest-soft), var(--red));
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.preloader__tag {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: preloaderTagIn 0.6s ease 0.35s forwards;
}

@keyframes preloaderLogoIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes preloaderSpin {
  to { transform: rotate(360deg); }
}

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

/* ===================== HEADER / NAV ===================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(4, 52, 15, 0.08);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 32px rgba(4, 52, 15, 0.12);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--forest) 0%, var(--forest-soft) 55%, var(--red) 100%);
}

.nav {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--nav-h);
  padding: 10px 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand img {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 122, 19, 0.22);
  box-shadow: 0 6px 18px rgba(4, 52, 15, 0.12);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-menu a {
  position: relative;
  display: block;
  padding: 10px 14px;
  color: #2a4030;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--forest);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--forest);
}

.nav-menu a:hover::after,
.nav-menu a:focus-visible::after {
  transform: scaleX(1);
}

.nav-menu a[aria-current="page"] {
  color: var(--forest);
}

.nav-menu a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--red);
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  list-style: none;
  padding: 0;
}

.nav-social__link {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  padding: 4px;
  border: 0;
  border-radius: 0;
  color: var(--forest);
  background: transparent;
  text-decoration: none;
  opacity: 1;
  transition: color 0.22s ease, transform 0.22s ease;
}

.nav-social__link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nav-social__link:hover,
.nav-social__link:focus-visible {
  color: var(--forest-deep);
  background: transparent;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: none;
}

.nav-social__link.is-pending {
  cursor: default;
  pointer-events: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--forest-deep);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--forest-deep);
  color: rgba(255, 255, 255, 0.88);
  padding: 72px 22px 0;
}

.footer-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 18px;
}

.footer-brand p {
  margin: 0;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.65;
}

.footer-col h3 {
  margin: 0 0 18px;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover { color: #8ef0a4; }

.footer-contact li { color: rgba(255, 255, 255, 0.78); }

.footer-bottom {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 24px 0 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-tag {
  color: #8ef0a4;
  font-weight: 600;
}

/* ===================== SHARED COMPONENTS ===================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ===================== BUTTONS ===================== */
.h-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.h-btn__text {
  display: inline-block;
}

.h-btn__icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  transition: background 0.22s ease, transform 0.22s ease;
}

.h-btn__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.h-btn svg:not(.h-btn__icon svg) {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.h-btn--primary,
.h-btn--solid {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 122, 19, 0.28);
}

.h-btn--primary:hover,
.h-btn--solid:hover {
  background: var(--forest-deep);
  border-color: var(--forest-deep);
  box-shadow: 0 10px 28px rgba(0, 122, 19, 0.34);
  transform: translateY(-1px);
}

.h-btn--primary:hover .h-btn__icon,
.h-btn--solid:hover .h-btn__icon {
  background: rgba(255, 255, 255, 0.24);
  transform: translateX(2px);
}

.h-btn--accent {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 6px 20px rgba(199, 16, 6, 0.3);
}

.h-btn--accent:hover {
  background: #a50d05;
  border-color: #a50d05;
  box-shadow: 0 10px 28px rgba(199, 16, 6, 0.38);
  transform: translateY(-1px);
}

.h-btn--accent:hover .h-btn__icon {
  background: rgba(255, 255, 255, 0.24);
  transform: translateX(2px);
}

.h-btn--light,
.h-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.h-btn--light:hover,
.h-btn--ghost:hover {
  background: #fff;
  border-color: #fff;
  color: var(--forest-deep);
  transform: translateY(-1px);
}

.h-btn--light:hover .h-btn__icon,
.h-btn--ghost:hover .h-btn__icon {
  background: rgba(4, 52, 15, 0.08);
  transform: translateX(2px);
}

.h-btn--outline {
  background: #fff;
  border-color: rgba(4, 52, 15, 0.14);
  color: var(--forest);
  box-shadow: 0 4px 16px rgba(4, 52, 15, 0.06);
}

.h-btn--outline:hover {
  border-color: var(--forest);
  box-shadow: 0 8px 22px rgba(4, 52, 15, 0.1);
  transform: translateY(-1px);
}

.h-check {
  list-style: none;
  margin: 26px 0 32px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.h-check li {
  position: relative;
  padding-left: 38px;
  font-weight: 600;
  color: #2c3a31;
}

.h-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 122, 19, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007a13' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}

/* ===================== TEXT SPLIT REVEAL ===================== */
.text-split {
  overflow: hidden;
}

.text-split__word {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 1.05em, 0) rotateX(24deg);
  filter: blur(8px);
  transform-origin: 50% 100%;
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.82s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.72s ease;
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform, filter;
}

.text-split.is-visible .text-split__word {
  opacity: 1;
  transform: none;
  filter: none;
}

.text-split .em {
  position: relative;
}

.text-split.is-visible .em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 2px;
  background: currentColor;
  opacity: 0.35;
  transform: scaleX(0);
  transform-origin: left center;
  animation: textEmUnderline 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--d, 0ms) + 180ms);
}

@keyframes textEmUnderline {
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .text-split__word {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .text-split .em::after {
    display: none;
  }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1020px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav-menu a {
    padding: 10px 10px;
    font-size: 0.84rem;
  }
}

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

  .nav-wrap {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(4, 52, 15, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .nav-wrap.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .nav-menu a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line);
  }

  .nav-menu a::after { display: none; }

  .nav-menu li:last-child a { border-bottom: 0; }

  .nav-social {
    justify-content: center;
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    width: 100%;
  }
}

@media (max-width: 640px) {
  :root { --nav-h: 100px; }

  .nav { padding: 8px 18px; }

  .brand img {
    width: 76px;
    height: 76px;
  }

  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }

  .preloader,
  .preloader__logo-wrap,
  .preloader__logo-wrap::before,
  .preloader__bar-fill,
  .preloader__tag {
    animation: none;
    transition: none;
  }

  .preloader__bar-fill {
    width: 100% !important;
  }
}
