/* Myola Digital — one-page site.
   Plain HTML/CSS/JS, no build step.
   Palette: "Waikato Signal" — deep forest, river blue, warm off-white. */

:root {
  --bg: #f6f3ea; /* warm off-white */
  --surface: #fffdf7;
  --surface-2: #efeadb;
  --border: #d8d2bf;
  --text: #16261c; /* deep forest, near-black */
  --muted: #45564a;
  --forest: #1f4535; /* deep forest */
  --forest-strong: #16311f;
  --river: #1f6078; /* river blue */
  --river-strong: #184c64;
  --on-dark: #f6f3ea;
  --wrap: 60rem;
  --radius: 12px;
  --transition: 160ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--forest-strong);
}

h1 {
  font-size: clamp(2rem, 1.3rem + 3.2vw, 3rem);
}

h2 {
  font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.1rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--river);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--river-strong);
}

:focus-visible {
  outline: 2px solid var(--river);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--forest);
  color: var(--on-dark);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 234, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--forest-strong);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--forest);
  color: var(--on-dark);
}

.brand-mark svg {
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--forest-strong);
}

.site-nav .btn:hover {
  text-decoration: none;
}

/* Keep the primary CTA's light text: `.site-nav a` would otherwise win on
   specificity and drop it to --muted, killing contrast on the forest fill. */
.site-nav .btn-primary,
.site-nav .btn-primary:hover {
  color: var(--on-dark);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--forest);
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.975rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--forest);
  color: var(--on-dark);
}

.btn-primary:hover {
  background: var(--forest-strong);
  color: var(--on-dark);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--forest-strong);
}

.btn-ghost:hover {
  border-color: var(--forest);
  color: var(--forest-strong);
}

.btn-small {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
}

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

.section {
  padding: clamp(3rem, 2rem + 6vw, 5.5rem) 0;
}

.section-alt {
  background: var(--surface-2);
  border-block: 1px solid var(--border);
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--river);
}

.lede {
  max-width: 52ch;
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem);
  color: var(--text);
}

.support {
  max-width: 52ch;
  color: var(--muted);
}

.section-lede {
  max-width: 60ch;
  color: var(--muted);
}

.centered {
  margin-inline: auto;
  text-align: center;
}

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

.hero {
  padding-top: clamp(3.5rem, 2rem + 8vw, 6rem);
}

.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* ---------- Service cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-index {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--river);
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.975rem;
}

/* ---------- Approach ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-index {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0 0 0.9rem;
  border-radius: 8px;
  background: var(--forest);
  color: var(--on-dark);
  font-weight: 700;
}

.step h3 {
  margin-bottom: 0.4rem;
}

.step p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.975rem;
}

/* ---------- Contact ---------- */

.contact {
  max-width: 52ch;
}

.contact .area {
  color: var(--muted);
}

.contact .btn {
  margin-top: 0.5rem;
}

/* ---------- 404 ---------- */

.not-found {
  text-align: center;
  min-height: 55vh;
  display: grid;
  align-content: center;
}

.not-found .btn {
  margin-top: 0.5rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.footer-inner p {
  margin: 0;
}

/* ---------- Responsive ---------- */

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

  .header-inner {
    position: relative;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
  }

  .cards,
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .btn:hover {
    transform: none;
  }
}
