/* =========================
   Core tokens & resets
   ========================= */
:root {
  color-scheme: light dark;
  --brand: #0a5e3b;
  --ink: #0f251b;
  --muted: #5b6f66;
  --bg: #f6fbf8;
  --nav-h: 56px; /* tinggi navbar */
}

html {
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: #fff;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; }

.container {
  max-width: 1160px;
  margin-inline: auto;
  padding: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =========================
   Navbar
   ========================= */
nav {
  background: var(--brand);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  min-height: var(--nav-h);
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; }

/* FIX: respect HTML logo size; don't force 28px square */
.brand .logo {
  max-height: 40px; /* matches height="40" from HTML */
  height: 40px;
  width: auto;      /* keep aspect ratio from the file */
  border-radius: 6px;
  object-fit: contain;
  display: inline-block;
}

/* Menu (desktop default) */
.menu {
  transition: all .25s ease-in-out;
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.menu a { color: #fff; font-weight: 600; }
.menu a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.menu a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Hamburger */
.nav-toggle {
  display: none;
  position: relative;
  width: 40px; height: 40px;
  background: none; border: 0;
  cursor: pointer;
  color: #fff;
  font-size: 0; line-height: 1;
  padding: .25rem .5rem;
}
.nav-toggle .bar { display: none !important; } /* avoid duplicate bars */
.nav-toggle::before{
  --w: 20px; --h: 2px; --g: 6px;
  content: ""; position: absolute; left: 50%; top: 50%;
  width: var(--w); height: var(--h); background: currentColor; border-radius: 2px;
  transform: translate(-50%, -50%);
  box-shadow: 0 calc(-1 * var(--g)) 0 0 currentColor, 0 var(--g) 0 0 currentColor;
}

/* Mobile menu */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .menu {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--brand);
    padding: 1rem;
    position: absolute;
    top: 100%; right: 0; left: 0;
    z-index: 1000;
    box-shadow: 0 10px 22px rgba(0,0,0,.15);
    border-top: 1px solid rgba(255,255,255,.2);
  }
  .menu.active { display: flex; } /* unified */
}

/* =========================
   Hero
   ========================= */
.hero {
  position: relative;
  isolation: isolate; /* ensure ::before is below content */
  background: linear-gradient(180deg, var(--bg), #fff);
  border-bottom: 1px solid #e7efe9;
}

/* Single authoritative background (avoid conflicts with .hero-with-bg::before) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    /* overlay kiri agar teks kontras */
    linear-gradient(90deg,
      rgba(255,255,255,.95) 0 38%,
      rgba(255,255,255,.80) 38% 60%,
      rgba(255,255,255,.55) 60% 100%
    ),
    image-set(
      url("assets/image/hero.avif") type("image/avif") 1x,
      url("assets/image/hero.webp") type("image/webp") 1x,
      url("assets/image/hero.jpg")  type("image/jpeg") 1x
    );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: contrast(1.05) saturate(1.05);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .hero::before {
    background:
      linear-gradient(90deg,
        rgba(0,0,0,.55) 0 38%,
        rgba(0,0,0,.40) 38% 60%,
        rgba(0,0,0,.25) 60% 100%
      ),
      image-set(
        url("assets/image/hero.avif") type("image/avif") 1x,
        url("assets/image/hero.webp") type("image/webp") 1x,
        url("assets/image/hero.jpg")  type("image/jpeg") 1x
      );
  }
}

/* Mobile overlay */
@media (max-width: 767.98px) {
  .hero::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.75)),
      image-set(
        url("assets/image/hero.avif") type("image/avif") 1x,
        url("assets/image/hero.webp") type("image/webp") 1x,
        url("assets/image/hero.jpg")  type("image/jpeg") 1x
      );
    background-position: center 20%;
  }
}

/* ✅ Tambahkan kode ini di sini */
@media (min-width: 1200px) {
  .hero::before {
    background-attachment: fixed;
  }
}

.hero-wrap {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  padding: 2.25rem 1rem;
}
@media (min-width: 900px) {
  .hero-wrap {
    grid-template-columns: 1.2fr 1fr;
    padding: 3rem 1rem;
  }
}

.badge, .kicker {
  display: inline-block;
  background: #eef6f1;
  border: 1px solid #cfe3d8;
  color: var(--brand);
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

.tagline{
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .06em;
  font-size: clamp(12px, 0.9rem, 14px);
  line-height: 1.25;
  color: #1F3A5F;
  opacity: .85;
  margin: .25rem 0 .5rem;
}
@media (max-width: 640px){
  .tagline{ font-size: .85rem; letter-spacing: .05em; }
}

h1 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  margin: 0.2rem 0 0.6rem;
  line-height: 1.15;
}
.lead { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.125rem); }

.cta {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem; border-radius: 0.75rem; font-weight: 700;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-ghost { border: 1px solid #cfe3d8; color: var(--brand); }

/* Hero card */
.hero-card {
  background: #fff;
  border: 1px solid #e7efe9;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(10, 94, 59, 0.06);
}
.hero-card h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

/* =========================
   Sections, grids, cards
   ========================= */
section { padding: 2rem 0; scroll-margin-top: 70px; }
section h2 { font-size: clamp(1.4rem, 2.3vw, 2rem); margin: 0 0 0.75rem; }
.muted { color: var(--muted); }

.grid-2 { display: grid; gap: 1rem; }
.grid    { display: grid; gap: 1rem; } /* FIX: 1rem (no space) */
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: #fff;
  border: 1px solid #e7efe9;
  border-radius: 1rem;
  padding: 1rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(10, 94, 59, 0.1);
}
.card h3 { margin: 0.25rem 0 0.35rem; font-size: 1.1rem; }

/* =========================
   Steps
   ========================= */
.steps { counter-reset: step; display: grid; gap: 1.25rem; }

.step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  column-gap: 0.75rem;
  align-items: start;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 700;
  grid-row: 1 / span 2; align-self: center;
}
.step h3 { margin: 0; }
.step p { margin: 0.35rem 0 0; line-height: 1.6; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* =========================
   CTA strip
   ========================= */
.cta-strip {
  background: linear-gradient(180deg, #0a5e3b, #0a7c52);
  color: #fff;
  border-radius: 1rem;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  align-items: center;
}
@media (min-width: 860px) {
  .cta-strip { grid-template-columns: 1fr auto; padding: 1.25rem 1.5rem; }
}

/* =========================
   FAQ
   ========================= */
details {
  border: 1px solid #e7efe9;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
}
details + details { margin-top: 0.6rem; }
summary { cursor: pointer; font-weight: 700; }

/* =========================
   Footer
   ========================= */
footer { border-top: 1px solid #e7efe9; }
.footer-grid { display: grid; gap: 1rem; }
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 2fr 1fr; }
}
.copyright { font-size: 0.95rem; opacity: 0.85; }

/* =========================
   Contact page helpers
   ========================= */

@media (min-width: 768px){
  .grid-2--split{
    display: grid;
    gap: 1rem;
    grid-template-columns: 1.2fr .8fr; /* form lebih lebar */
  }
}

form { display: grid; gap: .75rem; }
label{ font-weight: 600; }
input, textarea, button{
  font: inherit; padding: .6rem .8rem;
  border: 1px solid #cfd8d3; border-radius: .5rem;
  width: 100%; background: #fff; color: inherit;
}
textarea{ min-height: 140px; resize: vertical; }
button{ cursor: pointer; background: var(--brand); color: #fff; border: none; }
button:hover, button:focus{ filter: brightness(1.05); }
.help{ font-size: .9rem; color: var(--muted); }
.invalid{ border-color: #b00020; outline-color: #b00020; }

.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;
}
#form-status{ margin-top: .5rem; font-size: .95rem; }
#form-status.ok { color: var(--brand); }
#form-status.err { color: #b00020; }

.mt-2 { margin-top: 0.5rem; }
.list-compact{ margin: 0; padding-left: 1rem; }
.err-block{ margin: .25rem 0 1rem; font-weight: 600; }
.mt-n1{ margin-top: -.25rem; }
.hp-field{ position: absolute; left: -9999px; }
[hidden]{ display: none !important; }
.ok { color: var(--brand); }
.err { color: #b00020; }
.err a { color: inherit; text-decoration: underline; }

/* Overlay used on contact page (you can also use it on index later) */
.menu-overlay{
  display: none;
  position: fixed;
  top: var(--nav-h, 56px);
  left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.35);
  z-index: 999;
}
.menu-overlay.open{ display: block; }

