/* ==========================================================================
   Grove Dijital - styles.css
   Sections: 1 Variables | 2 Base | 3 Sidebar | 4 Buttons | 5 Hero
             6 Sections | 7 Cards | 8 Process | 9 About | 10 Form
             11 Inner pages | 12 Footer | 13 Mobile | 14 Reduced motion
   ========================================================================== */

/* 1. Variables ----------------------------------------------------------- */
:root {
  --olive: #626b3f;
  --olive-dark: #3e4728;
  --olive-light: #e9ebdf;
  --white: #ffffff;
  --text: #24251f;
  --text-soft: #5b5d51; /* darker than #77796D so small text passes contrast */
  --border: #dadecd;
  --error: #a32d2d;
  --sidebar-width: 280px;
  --page-padding: clamp(24px, 6vw, 88px);
}

/* 2. Base ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--white);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.75;
}

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

a {
  color: var(--olive-dark);
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  color: var(--olive-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  max-width: 65ch; /* keeps lines short enough to read comfortably */
  margin: 0 0 1.2em;
}

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

/* 3. Sidebar (desktop) --------------------------------------------------- */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 36px 28px;
  border-right: 1px solid var(--border);
  background: var(--white);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--olive-dark);
  font-family: Georgia, serif;
  font-size: 1.3rem;
  text-decoration: none;
}

.mark {
  width: 36px;
  height: 36px;
}

.sidebar nav {
  margin-top: 48px;
}

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

.sidebar nav a {
  display: block;
  margin-bottom: 4px;
  padding: 12px 14px;
  border-left: 3px solid transparent;
  color: var(--text);
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.sidebar nav a:hover {
  background: var(--olive-light);
  color: var(--olive-dark);
}

.sidebar nav a[aria-current] {
  border-left-color: var(--olive);
  background: var(--olive-light);
  color: var(--olive-dark);
  font-weight: 600;
}

.statement {
  margin: auto 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Mobile-only parts are hidden on desktop */
.topbar,
.close,
.overlay {
  display: none;
}

main {
  margin-left: var(--sidebar-width);
}

/* 4. Buttons ------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--olive);
  background: transparent;
  color: var(--olive-dark);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.btn:hover {
  background: var(--olive-light);
}

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

.btn.primary:hover {
  border-color: var(--olive-dark);
  background: var(--olive-dark);
}

/* 5. Hero ---------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 96px var(--page-padding);
}

.hero-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.lead {
  color: var(--text-soft);
  font-size: 1.25rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2em;
}

/* 6. Sections ------------------------------------------------------------ */
.section {
  padding: 88px var(--page-padding);
}

.section.tint {
  background: var(--olive-light);
}

.sub {
  margin-bottom: 2.2em;
  color: var(--text-soft);
}

/* 7. Service cards ------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.card {
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--white);
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--olive);
}

.card p {
  color: var(--text-soft);
}

.ico {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
}

.link {
  font-weight: 600;
}

/* 8. Process ------------------------------------------------------------- */
.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}

.step img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Alternate image side on every second step */
.step:nth-of-type(even) img {
  order: 2;
}

.num {
  display: block;
  margin-bottom: 8px;
  color: var(--olive-dark);
  font-weight: 600;
}

/* 9. About --------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* 10. Contact form ------------------------------------------------------- */
.form {
  max-width: 640px;
}

.field {
  margin-bottom: 22px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #a9ae93;
  border-radius: 0;
  background: var(--white);
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--olive);
}

.invalid {
  border-color: var(--error);
}

.err {
  display: block;
  min-height: 1.4em;
  margin-top: 4px;
  color: var(--error);
  font-size: 0.9rem;
}

.note {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.status {
  color: var(--olive-dark);
  font-weight: 600;
}

/* 11. Inner pages (contact, privacy, terms) ------------------------------ */
.page {
  padding-top: 96px;
}

.two {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  margin-top: 40px;
}

.info {
  padding-left: 32px;
  border-left: 1px solid var(--border);
}

.doc h2 {
  margin-top: 1.8em;
  font-size: 1.6rem;
}

.meta {
  color: var(--text-soft);
  font-size: 0.95rem;
}

/* 12. Footer ------------------------------------------------------------- */
.footer {
  padding: 56px var(--page-padding) 32px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 1rem;
}

.fgrid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.fgrid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--olive-dark);
}

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

.fgrid li {
  margin-bottom: 6px;
}

.copy {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

/* 13. Mobile and tablet (sidebar becomes a drawer) ----------------------- */
@media (max-width: 960px) {
  main {
    margin-left: 0;
    padding-top: 64px;
  }

  .topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
  }

  .burger {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    background: var(--white);
    cursor: pointer;
  }

  .sidebar {
    width: min(300px, 85vw);
    transform: translateX(-100%);
    transition: transform 0.25s;
  }

  .sidebar.open {
    transform: none;
  }

  .close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    cursor: pointer;
  }

  .overlay {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(36, 37, 31, 0.5);
  }

  .overlay.show {
    display: block;
  }

  .hero,
  .step,
  .about,
  .two {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .step:nth-of-type(even) img {
    order: 0;
  }

  .hero-img {
    aspect-ratio: 3 / 2;
  }

  .info {
    padding-top: 24px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

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

  .section,
  .hero {
    padding-top: 56px;
    padding-bottom: 56px;
  }
}

/* 14. Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
