:root {
  --ink: #111827;
  --muted: #64748b;
  --sand: #f4f0e6;
  --earth: #334155;
  --clay: #2f8f5b;
  --dark: #16231d;
  --yellow: #f2c94c;
  --paper: #fffdf7;
  --line: rgba(25, 38, 32, 0.13);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(47, 143, 91, 0.18), transparent 28rem),
    radial-gradient(circle at top left, rgba(242, 201, 76, 0.22), transparent 24rem),
    linear-gradient(180deg, #fbfff9 0%, #f4f0e6 100%);
}

a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
}

.brand img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--dark);
}

.brand strong { display: block; font-size: 1.08rem; }
.brand small { color: var(--muted); font-weight: 800; }

nav { display: flex; justify-content: center; gap: 0.25rem; }
nav a, .top-cta, .button {
  border-radius: 999px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  font-weight: 950;
}
nav a { color: var(--muted); }
.top-cta, .button.primary {
  background: linear-gradient(135deg, #17251f, #2f8f5b);
  color: #fff;
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  gap: 1rem;
  align-items: stretch;
  min-height: auto;
  padding: 2rem 0 1rem;
}

.hero-copy, .intro, .section, .contact {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 247, 0.88);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 3.25rem);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 1rem;
  color: #2f8f5b;
  font-size: 0.82rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 9.5em;
  margin-bottom: 1.25rem;
  font-size: clamp(3.25rem, 5vw, 4.8rem);
  line-height: 0.98;
}
h2 { margin-bottom: 1rem; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; }
p { color: var(--muted); font-size: 1.08rem; line-height: 1.65; }

.actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1rem; }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }

.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.intro, .section, .contact {
  margin: 1rem 0;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
}

.service-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.service-card div { padding: 1.2rem; }
.service-card span { display: block; margin-bottom: 0.5rem; font-size: 1.2rem; font-weight: 1000; }
.service-card p { margin-bottom: 0; font-size: 0.98rem; }

.portfolio {
  background:
    linear-gradient(135deg, rgba(22, 35, 29, 0.97), rgba(31, 50, 43, 0.97)),
    linear-gradient(90deg, #2f8f5b, #f2c94c);
  color: white;
}
.portfolio p { color: rgba(255,255,255,0.72); }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.portfolio figure {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
}
.portfolio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portfolio figcaption {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.8rem;
  display: grid;
  gap: 0.25rem;
  border-radius: 16px;
  padding: 0.8rem;
  background: rgba(17, 24, 39, 0.78);
  backdrop-filter: blur(12px);
}
.portfolio span { color: rgba(255,255,255,0.72); font-weight: 800; }

.contact {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 2rem;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(47, 143, 91, 0.95), rgba(22, 35, 29, 0.96)),
    linear-gradient(90deg, #f2c94c, #2f8f5b);
  color: white;
}
.contact .eyebrow, .contact p { color: rgba(255,255,255,0.78); }
.contact-card {
  display: grid;
  gap: 0.8rem;
  border-radius: 22px;
  padding: 1.2rem;
  background: white;
  color: var(--ink);
}
.contact-card a { font-weight: 1000; text-decoration: none; }

footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.admin-body { background: #f4f0e6; }
.admin-shell { max-width: 980px; padding: 2rem 0; }
.admin-login, .admin-editor, .admin-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.4rem;
  background: white;
  box-shadow: 0 18px 50px rgba(37,25,15,0.1);
}
.admin-login { max-width: 440px; margin: 10vh auto; display: grid; gap: 0.8rem; }
.admin-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.admin-panel { margin-top: 1rem; display: grid; gap: 0.9rem; }
.repeater { display: grid; gap: 0.8rem; border: 1px solid var(--line); border-radius: 18px; padding: 1rem; }
label { display: grid; gap: 0.35rem; color: var(--muted); font-weight: 900; }
input, textarea, button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
button { cursor: pointer; background: var(--dark); color: white; font-weight: 1000; }
.hidden { display: none; }
.admin-error { color: #b42318; }
.admin-status { color: #16703a; font-weight: 900; }

@media (max-width: 860px) {
  .hero, .contact { grid-template-columns: 1fr; }
  .topbar {
    position: fixed;
    grid-template-columns: 1fr auto;
    left: 0.5rem;
    right: 0.5rem;
    top: 0.5rem;
    width: auto;
    margin: 0;
    z-index: 100;
  }
  main { padding-top: 6.5rem; }
  nav { display: none; }
  .hero { min-height: auto; padding-top: 1.4rem; }
  .hero-image { min-height: 0; aspect-ratio: 4 / 3; }
  .services, .portfolio-grid { grid-template-columns: 1fr; }
  h1 { max-width: 100%; font-size: clamp(2.7rem, 10vw, 3.4rem); }
}

@media (max-width: 520px) {
  main, .topbar, footer { width: min(100% - 1rem, 1180px); }
  .topbar {
    gap: 0.55rem;
    border-radius: 18px;
    padding: 0.55rem;
  }
  main { padding-top: 5.8rem; }
  .brand img { width: 50px; height: 50px; }
  .brand strong { font-size: 0.95rem; }
  .brand small { font-size: 0.85rem; }
  .top-cta {
    padding: 0.72rem 0.82rem;
    text-align: center;
    white-space: nowrap;
  }
  h1 { font-size: clamp(2.35rem, 11vw, 3rem); }
}
