/* =========================================================
   Fernwright — styles (dark theme)
   Colors live in the variables below; change them here only.
   ========================================================= */

:root {
  --green: #2E6B3F;          /* filled buttons */
  --green-dark: #24563A;     /* filled button hover */
  --green-bright: #7FCB93;   /* green text, icons, numbers on dark */
  --green-soft: #7FB685;     /* decorative fern drawing */

  --bg: #0A0E0C;             /* page background */
  --bg-alt: #0E1311;         /* alternating sections */
  --surface: #131A16;        /* cards */
  --surface-2: #19211D;      /* inputs, hover */
  --text: #E4EAE6;
  --muted: #98A69E;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --white: #FFFFFF;

  --font-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --max: 1120px;
  --gutter: 24px;
  --section: 64px;
  --bar-h: 56px;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --ease: 150ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 28px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(46, 107, 63, 0.18), transparent 70%),
    radial-gradient(700px 500px at 90% 10%, rgba(30, 60, 90, 0.16), transparent 70%),
    var(--bg);
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--white);
}
h1 { font-size: 48px; font-weight: 800; }
h2 { font-size: 30px; font-weight: 800; margin-bottom: 24px; }
h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }

p { margin: 0 0 12px; }

a { color: var(--green-bright); }
a:hover { color: var(--white); }

:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--bg); }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-narrow { max-width: 760px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid var(--green);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-filled { background: var(--green); color: var(--white); }
.btn-filled:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--green-bright); color: var(--white); }

.btn-light { background: var(--white); color: #0B0F0D; border-color: var(--white); }
.btn-light:hover { background: #E4EAE6; border-color: #E4EAE6; color: #0B0F0D; }

.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.7; cursor: wait; transform: none; }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

/* ---------- Top bar island ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px var(--gutter) 0;
}

.header-inner {
  position: relative;
  max-width: var(--max);
  height: var(--bar-h);
  margin: 0 auto;
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(14, 18, 16, 0.82);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--white);
}
.logo:hover { color: var(--white); }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.site-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-list {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0 auto;
  padding: 0;
}
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--ease), background-color var(--ease);
}
.nav-list a:hover { color: var(--white); background: rgba(255, 255, 255, 0.05); }
.nav-list a.active,
.nav-list a[aria-current="true"] { color: var(--white); background: rgba(255, 255, 255, 0.1); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), background-color var(--ease);
}
.menu-bars { position: relative; }
.menu-bars::before,
.menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 56px 0 24px;
}
/* The hero is followed directly by How it works: keep the gap between them small */
.hero + .section { padding-top: 40px; }

/* Fern is sized to the hero's height so it is never cut off */
.hero-fern {
  position: absolute;
  right: 4%;
  top: 16px;
  bottom: 0;
  height: calc(100% - 16px);
  width: auto;
  aspect-ratio: 560 / 780;
  overflow: visible;
  color: var(--green-soft);
  opacity: 0.16;
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { max-width: 13ch; margin-bottom: 16px; }
.hero-subhead { max-width: 540px; font-size: 18px; color: var(--muted); margin-bottom: 24px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-location { font-size: 14px; color: var(--muted); margin: 0; }

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

.section { padding: var(--section) 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step-number {
  display: block;
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: var(--green-bright);
  margin-bottom: 12px;
}
.steps p, .portfolio-card p, .price-card p { color: var(--muted); margin: 0; }

/* Features */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 600;
  box-shadow: none;
}
.check {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(127, 203, 147, 0.12);
  color: var(--green-bright);
  display: grid;
  place-items: center;
}
.check svg { width: 16px; height: 16px; }

/* Portfolio */
.portfolio {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.portfolio-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.portfolio-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  filter: brightness(0.9);
}
.portfolio-body { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.portfolio-body h3 { margin: 0; }

/* A single project fills the row as a wide card instead of leaving half of it empty */
.portfolio-card:only-child { grid-column: 1 / -1; flex-direction: row; }
.portfolio-card:only-child img { width: 58%; flex: none; border-bottom: 0; border-right: 1px solid var(--border); }
.portfolio-card:only-child .portfolio-body { justify-content: center; padding: 28px; }
.pill {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(127, 182, 133, 0.12);
  border: 1px solid rgba(127, 182, 133, 0.35);
  color: var(--green-bright);
  font-size: 12px;
  font-weight: 600;
}
.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: auto;
  font-weight: 600;
  text-decoration: none;
}
.portfolio-link:hover { text-decoration: underline; }

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 360px));
  justify-content: center;
  gap: 16px;
}
.price-card { position: relative; display: flex; flex-direction: column; padding: 26px; }
.price-card.featured { border: 1px solid var(--green-bright); box-shadow: 0 0 0 1px rgba(127, 203, 147, 0.25), var(--shadow); }
.price-tag {
  position: absolute;
  top: -12px;
  left: 26px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
}
.price {
  font-family: var(--font-head);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  margin: 2px 0 10px;
}
.price-card p { margin-bottom: 20px; flex: 1; }
.price-card .price { color: var(--white); margin: 2px 0 10px; flex: none; }
.pricing-note { text-align: center; font-size: 14px; color: var(--muted); margin: 20px auto 0; max-width: 600px; }

/* FAQ */
.faq { display: grid; gap: 8px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color var(--ease);
}
.faq details[open] { border-color: rgba(127, 203, 147, 0.4); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--green-bright);
  border-bottom: 2px solid var(--green-bright);
  transform: rotate(45deg) translateY(-3px);
  transition: transform var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

/* Contact */
.contact {
  background: linear-gradient(180deg, var(--bg-alt), rgba(46, 107, 63, 0.08));
  border-top: 1px solid var(--border);
}
.contact-inner {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px;
  align-items: start;
}
.contact-intro h2 { margin-bottom: 12px; }
.contact-intro p { color: var(--muted); }
.contact-email { margin-top: 20px; }
.contact-email span { font-size: 14px; }
.contact-email a { font-weight: 600; word-break: break-word; display: inline-block; padding: 10px 0; }

.form-card { padding: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field .optional { font-weight: 400; color: var(--muted); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: #6E7C74; }
.field textarea { resize: vertical; min-height: 100px; }
.field select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%237FCB93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field select option { background: var(--surface); color: var(--text); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(127, 203, 147, 0.2);
}
.field [aria-invalid="true"] { border-color: #F07A6E; }
.field-error { font-size: 13px; color: #F59A90; margin: 0; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-status { margin: 12px 0 0; font-size: 14px; min-height: 1.6em; }
.form-status.error { color: #F59A90; }

.form-success { text-align: center; padding: 32px 8px; }
.form-success .check { width: 52px; height: 52px; margin: 0 auto 16px; }
.form-success .check svg { width: 26px; height: 26px; }
.form-success p { font-size: 18px; font-weight: 600; margin: 0; color: var(--white); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; background: var(--bg); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
}
.footer-copy { margin: 0; color: var(--muted); font-size: 14px; }
.site-footer .email-link { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; min-height: 44px; }

/* 404 */
.not-found {
  min-height: calc(100vh - var(--bar-h) - 12px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 0;
}
.not-found .logo-mark { width: 72px; height: 72px; border-radius: 16px; margin: 0 auto 20px; }
.not-found p { color: var(--muted); max-width: 420px; margin: 0 auto 24px; }

/* Reveal on scroll (only when JS has run and motion is allowed) */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 500ms ease, transform 500ms ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}

/* ---------- Breakpoints ---------- */

@media (max-width: 1024px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { gap: 32px; }
  .hero-fern { right: -2%; }
}

@media (max-width: 768px) {
  :root { --section: 44px; }

  h1 { font-size: 34px; }
  h2 { font-size: 25px; margin-bottom: 18px; }
  h3 { font-size: 17px; }

  .menu-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px;
    background: #0E1210;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
    display: none;
  }
  .site-nav.open { display: flex; }
  .nav-list { flex-direction: column; margin: 0; gap: 2px; }
  .nav-list a { width: 100%; min-height: 46px; font-size: 16px; }
  .header-cta { min-height: 46px; }

  .hero { padding: 36px 0 16px; }
  .hero + .section { padding-top: 32px; }
  .hero-subhead { font-size: 16px; }
  .hero-fern { right: -90px; opacity: 0.08; }

  .steps { grid-template-columns: 1fr; gap: 12px; }
  .portfolio { grid-template-columns: 1fr; }
  .portfolio-card:only-child { flex-direction: column; }
  .portfolio-card:only-child img { width: 100%; border-right: 0; border-bottom: 1px solid var(--border); }
  .portfolio-card:only-child .portfolio-body { padding: 18px 22px 20px; }
  .pricing { grid-template-columns: minmax(0, 480px); }
  .pricing .price-card + .price-card { margin-top: 10px; }
  .contact-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .site-header { padding: 8px 12px 0; }
  .features { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card, .card.price-card { padding: 20px; }
  .hero-buttons .btn { flex: 1 1 100%; }
}
