/* ── Tecknosys shared design tokens + utilities ────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

/* ── Color palette ───────────────────────────────────────────────────────────── */
:root {
  --charcoal: #1e2227;
  --charcoal-mid: #2d3440;
  --charcoal-light: #3d4654;

  /* brand green — matches the supplied logo artwork (#75bd43) */
  --gecko: #75bd43;
  --gecko-dark: #5d9f35;
  --gecko-deeper: #4a7f26;
  --gecko-light: #e9f3e2;
  --gecko-pale: #f0f8eb;

  --silver: #8a959f;
  --steel: #c8d2dc;
  --steel-light: #dde6ee;

  --cream: #f7f8fa;
  --white: #ffffff;

  --text: #1e2227;
  --text-muted: #5a6570;
  --text-light: #8a959f;

  --border: #dde3ea;
  --border-dark: #c4cdd6;

  --red: #c0392b;
  --red-bg: #fdf2f0;
  --green-admin: #1a7a4a;

  /* ── Typography ─────────────────────────────────────────────────────────── */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  /* ── Spacing & shape ─────────────────────────────────────────────────────── */
  --radius: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --max-width: 1200px;

  /* ── Shadows ─────────────────────────────────────────────────────────────── */
  --shadow-sm: 0 1px 4px rgba(30, 34, 39, 0.07);
  --shadow-md: 0 4px 16px rgba(30, 34, 39, 0.1);
  --shadow-lg: 0 8px 32px rgba(30, 34, 39, 0.13);

  /* ── Transitions ─────────────────────────────────────────────────────────── */
  --transition: 0.2s ease;

  /* ── NiceSelect accent ───────────────────────────────────────────────────── */
  --ns-accent: var(--gecko);
  --ns-accent-shadow: rgba(117, 189, 67, 0.25);
}

/* ── Reset ───────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--gecko-dark);
  text-decoration: none;
}
a:hover {
  color: var(--gecko);
}
button,
input,
select,
textarea {
  font-family: inherit;
}
ul,
ol {
  list-style: none;
}
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  color: var(--text);
}

/* ── Layout utilities ────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow {
  max-width: 860px;
}
.section {
  padding: 5rem 0;
}
.section-sm {
  padding: 3rem 0;
}
.section-lg {
  padding: 7rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 3.5rem 0;
  }
  .section-lg {
    padding: 4.5rem 0;
  }
}

.flex-row {
  display: flex;
  flex-direction: row;
}
.flex-col {
  display: flex;
  flex-direction: column;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-gap {
  gap: 1rem;
}
.flex-wrap {
  flex-wrap: wrap;
}
.flex-1 {
  flex: 1;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.justify-center {
  justify-content: center;
}
.d-inline {
  display: inline;
}
.w-full {
  width: 100%;
}
.w-auto {
  width: auto;
}
.clickable {
  cursor: pointer;
}
.nowrap {
  white-space: nowrap;
}
.pre {
  white-space: pre-wrap;
}
.resize-y {
  resize: vertical;
}
.scroll-x {
  overflow: auto;
}
.list-plain {
  list-style: none;
}

/* ── Gap scale (compose with .flex-row / .flex-col / .grid-*) ─────────────────── */
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.gap-6 {
  gap: 1.5rem;
}

/* ── Spacing scale ───────────────────────────────────────────────────────────── */
.m-0 {
  margin: 0;
}
.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-sm {
  margin-bottom: 0.75rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-md {
  margin-bottom: 1.25rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}
.mb-5 {
  margin-bottom: 2.5rem;
}
.mt-1 {
  margin-top: 0.5rem;
}
.mt-sm {
  margin-top: 0.75rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}
.mt-5 {
  margin-top: 2.5rem;
}
.mt-6 {
  margin-top: 3rem;
}
.leading {
  line-height: 1.75;
}
.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Typography utilities ────────────────────────────────────────────────────── */
.text-center {
  text-align: center;
}
.text-sm {
  font-size: 0.875rem;
}
.text-xs {
  font-size: 0.8rem;
}
.text-lg {
  font-size: 1.125rem;
}
.text-xl {
  font-size: 1.25rem;
}
.text-muted {
  color: var(--text-muted);
}
.text-light {
  color: var(--text-light);
}
.text-gecko {
  color: var(--gecko);
}
.text-white {
  color: #fff;
}
.fw-500 {
  font-weight: 500;
}
.fw-600 {
  font-weight: 600;
}
.fw-700 {
  font-weight: 700;
}
.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ── Section headings ────────────────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gecko);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 52ch;
}
.section-header {
  margin-bottom: 3rem;
}
.section-header.center {
  text-align: center;
}
.section-header.center .section-desc {
  margin: 0 auto;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gecko);
  color: #fff;
}
.btn-primary:hover {
  background: var(--gecko-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(117, 189, 67, 0.35);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--gecko);
  border-color: var(--gecko);
}
.btn-outline:hover {
  background: var(--gecko);
  color: #fff;
  transform: translateY(-1px);
}
.btn-dark {
  background: var(--charcoal);
  color: #fff;
}
.btn-dark:hover {
  background: var(--charcoal-mid);
  color: #fff;
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}
.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-nz {
  background: var(--gecko-light);
  color: var(--gecko-deeper);
}
.badge-new {
  background: #fff3cd;
  color: #856404;
}
.badge-service {
  background: var(--steel-light);
  color: var(--charcoal-mid);
}

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    box-shadow var(--transition),
    transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-body {
  padding: 1.5rem;
}
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--cream);
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.form-control {
  display: block;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--gecko);
  box-shadow: 0 0 0 3px rgba(117, 189, 67, 0.18);
}
.form-control::placeholder {
  color: var(--text-light);
}
textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-success {
  background: var(--gecko-light);
  color: var(--gecko-deeper);
  border: 1px solid #b6e09a;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.form-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #f5c6c6;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* ── Conditional form fields (CLAUDE.md pattern) ─────────────────────────────── */
.conditional {
  opacity: 0.38;
  transition: opacity 0.2s ease;
}
.conditional.active {
  opacity: 1;
}
.conditional textarea,
.conditional input {
  background: var(--gecko-pale);
  cursor: not-allowed;
}
.conditional.active textarea,
.conditional.active input {
  background: var(--white);
  cursor: auto;
}

/* ── Date/file inputs ────────────────────────────────────────────────────────── */
input[type="date"] {
  color-scheme: light;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

input[type="file"]::file-selector-button {
  background: var(--gecko);
  color: white;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 0.75rem;
  transition: background 0.15s;
}
input[type="file"]:hover::file-selector-button {
  background: var(--gecko-dark);
}

/* ── Alert / admin states ────────────────────────────────────────────────────── */
.alert-success {
  background: var(--gecko-light);
  color: var(--gecko-deeper);
  border: 1px solid #b6e09a;
  border-radius: var(--radius);
  padding: 0.9rem 1.25rem;
  font-weight: 500;
}
.alert-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #f5c6c6;
  border-radius: var(--radius);
  padding: 0.9rem 1.25rem;
  font-weight: 500;
}

/* ── Misc ────────────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.hidden {
  display: none !important;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Responsive helpers ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}
@media (min-width: 769px) {
  .show-mobile {
    display: none !important;
  }
}

/* ── Print ───────────────────────────────────────────────────────────────────── */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    font-size: 11pt;
    color: #000;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}

/* ── Site credit (subtle designer attribution) ─────────────────────────────── */
.site-credit {
  text-align: center;
  font-size: .72rem;
  padding: .7rem 1rem;
  opacity: .5;
}
/* Scoped under `footer` so the inherited footer-text colour beats any site-wide
   `a:hover` rule — without this, hover could recolour the link to the background. */
footer .site-credit a { color: inherit; text-decoration: none; }
footer .site-credit a:hover,
footer .site-credit a:focus { color: inherit; text-decoration: underline; }
