/*
Theme Name: Kiwi Systems
Theme URI: https://www.kiwisystems.net
Author: Kiwi Systems
Author URI: https://www.kiwisystems.net
Description: Official WordPress theme for Kiwi Systems — AI-powered document processing and AP automation specialists based in New Zealand.
Version: 1.0.3
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Proprietary
License URI: https://www.kiwisystems.net
Text Domain: kiwisystems
Tags: dark, business, two-columns, custom-menu, featured-images, footer-widgets, full-width-template
*/

/* ─── RESET & BASE ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  color: #242424;
  background: #fff;
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* ─── VARIABLES ────────────────────────────────────── */
:root {
  --color-accent:       #04ab95;
  --color-accent-hover: #039985;
  --color-dark:         #1a1a2e;
  --color-dark2:        #141414;
  --color-body:         #242424;
  --color-muted:        #666;
  --color-light-bg:     #f9f9f9;
  --color-border:       #e8e8e8;
  --nav-height:         72px;
  --max-width:          1200px;
  --section-pad:        80px 0;
}

/* ─── NAVIGATION ───────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  height: var(--nav-height);
  background: rgba(10,10,26,0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  padding: 0 5%;
}
.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-title a {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
#primary-menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}
#primary-menu li a {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.78);
  padding: 6px 9px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  display: block;
}
#primary-menu li a:hover,
#primary-menu li.current-menu-item a { color: #fff; background: rgba(255,255,255,0.08); }

/* ─── PAGE HERO BANNER ─────────────────────────────── */
.page-hero {
  margin-top: var(--nav-height);
  background: var(--color-dark);
  padding: 80px 5% 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 100%, rgba(4,171,149,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  position: relative; z-index: 1;
}
.page-hero p {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.8;
  position: relative; z-index: 1;
}

/* ─── HERO (HOME) ──────────────────────────────────── */
.site-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: calc(var(--nav-height) + 60px) 5% 80px;
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video-wrap video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,26,0.65) 0%, rgba(10,10,26,0.48) 50%, rgba(10,10,26,0.70) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.hero-content .lead {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: rgba(255,255,255,0.88);
  max-width: 760px;
  margin: 0 auto 2.5rem;
  line-height: 1.85;
}

/* ─── LAYOUT HELPERS ───────────────────────────────── */
.section-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 5%;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: flex-start;
}

/* ─── TYPOGRAPHY ───────────────────────────────────── */
.section-label-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.6rem;
}
.section-h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--color-body);
  line-height: 1.25;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.section-h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--color-body);
  line-height: 1.3;
  margin-bottom: 1rem;
}
.section-body {
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}
.section-body strong { color: var(--color-body); font-weight: 600; }

/* ─── SECTIONS ─────────────────────────────────────── */
.ks-section { padding: var(--section-pad); }
.ks-section--white { background: #fff; }
.ks-section--light { background: var(--color-light-bg); }
.ks-section--dark  { background: var(--color-dark2); }

/* ─── BUTTONS ──────────────────────────────────────── */
.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  background: var(--color-accent);
  color: #fff;
  font-family: inherit; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: none; border-radius: 6px; cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-accent:hover { background: var(--color-accent-hover); color: #fff; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  font-family: inherit; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 6px; background: transparent; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--color-accent); color: #fff; }

/* ─── IMAGES ───────────────────────────────────────── */
.ks-img {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(0,0,0,0.10);
}
.ks-img img { width: 100%; display: block; }

/* ─── YOUTUBE THUMB ────────────────────────────────── */
.yt-thumb {
  position: relative; border-radius: 10px; overflow: hidden;
  background: #111; cursor: pointer;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  aspect-ratio: 16/9; display: block;
}
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.yt-thumb:hover img { transform: scale(1.03); }
.yt-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 64px; height: 64px;
  background: rgba(255,0,0,0.88);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.yt-play:hover { background: #ff0000; transform: translate(-50%,-50%) scale(1.09); }
.yt-play::after {
  content: ''; width: 0; height: 0;
  border-style: solid;
  border-width: 12px 0 12px 22px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

/* ─── EMAIL CAPTURE ────────────────────────────────── */
.email-capture {
  margin-top: 1.75rem;
  background: var(--color-light-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem;
}
.email-capture h4 {
  font-size: 0.95rem; font-weight: 700;
  color: var(--color-body); margin-bottom: 0.35rem;
}
.email-capture p { font-size: 0.8rem; color: var(--color-muted); margin-bottom: 1rem; }
.email-row { display: flex; gap: 8px; flex-wrap: wrap; }
.email-row input {
  flex: 1; min-width: 150px;
  padding: 10px 14px;
  border: 1px solid var(--color-border); border-radius: 6px;
  font-family: inherit; font-size: 0.85rem; color: var(--color-body);
  background: #fff; outline: none; transition: border-color 0.2s;
}
.email-row input:focus { border-color: var(--color-accent); }
.email-row input::placeholder { color: #bbb; }

/* ─── MARKETPLACE LINKS ────────────────────────────── */
.mkt-links { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.mkt-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--color-accent); font-size: 0.85rem; font-weight: 600;
  transition: opacity 0.2s;
}
.mkt-link:hover { opacity: 0.75; }
.mkt-link::before { content: '→'; }
.quote-text {
  font-size: 0.88rem; font-style: italic;
  color: var(--color-muted);
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem; margin: 1rem 0 1.5rem;
  line-height: 1.7;
}

/* ─── STATS ────────────────────────────────────────── */
.stats-grid { display: flex; gap: 1.5rem; margin: 2rem 0; }
.stat-item {
  flex: 1; text-align: center; padding: 1.25rem;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.stat-num {
  font-size: 2.8rem; font-weight: 800; color: var(--color-accent);
  line-height: 1; display: block; margin-bottom: 0.4rem;
}
.stat-label { font-size: 0.78rem; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ─── FEATURES LIST ────────────────────────────────── */
.features-list { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2rem; }
.feature-item { display: flex; gap: 1rem; align-items: flex-start; }
.feature-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 8px; background: rgba(4,171,149,0.10);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon svg {
  width: 22px; height: 22px; stroke: var(--color-accent);
  stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.feature-text h6 { font-size: 0.9rem; font-weight: 700; color: var(--color-body); margin-bottom: 0.3rem; }
.feature-text p { font-size: 0.85rem; color: var(--color-muted); line-height: 1.65; }

/* ─── CARDS GRID ───────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.ks-card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: 12px; padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.ks-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.09); border-color: rgba(4,171,149,0.35); }
.ks-card h6 { font-size: 0.92rem; font-weight: 700; color: var(--color-body); margin-bottom: 0.5rem; }
.ks-card p { font-size: 0.85rem; color: var(--color-muted); line-height: 1.65; }
.ks-card .card-icon {
  width: 42px; height: 42px; border-radius: 8px;
  background: rgba(4,171,149,0.10);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.ks-card .card-icon svg {
  width: 20px; height: 20px; stroke: var(--color-accent);
  stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round;
}

/* ─── PROJECT BLOCKS ───────────────────────────────── */
.project-block { margin-bottom: 3.5rem; }
.project-block:last-child { margin-bottom: 0; }
.project-block .two-col { align-items: center; }
.project-block .project-content h3 {
  font-size: 1.3rem; font-weight: 700; color: var(--color-body); margin-bottom: 0.75rem;
}
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tech-tag {
  display: inline-block; padding: 4px 10px;
  background: rgba(4,171,149,0.10); color: var(--color-accent);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; border-radius: 4px;
}

/* ─── PARTNERS ─────────────────────────────────────── */
.partners-row {
  display: flex; align-items: center; justify-content: center;
  gap: 2.5rem; flex-wrap: wrap;
}
.partner-tile { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.partner-logo-box {
  width: 175px; height: 88px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; display: flex;
  align-items: center; justify-content: center;
  padding: 1rem; transition: background 0.25s, border-color 0.25s;
}
.partner-logo-box:hover { background: rgba(255,255,255,0.10); border-color: rgba(4,171,149,0.4); }
.partner-logo-box img {
  max-width: 130px; max-height: 50px; object-fit: contain;
  filter: brightness(0) invert(1); opacity: 0.72; transition: opacity 0.25s;
}
.partner-logo-box:hover img { opacity: 1; }
.partner-name { font-size: 0.7rem; color: rgba(255,255,255,0.45); letter-spacing: 0.07em; text-transform: uppercase; }
.partners-title { color: #fff !important; text-align: center; margin-bottom: 0.75rem; }
.partners-intro { text-align: center; color: rgba(255,255,255,0.60) !important; max-width: 620px; margin: 0 auto 3rem !important; }

/* ─── CONTACT FORM ─────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: flex-start; }
.contact-form-card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: 12px; padding: 2.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.contact-form-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--color-body); margin-bottom: 1.5rem; }
.form-field { margin-bottom: 1.2rem; }
.form-field label {
  display: block; font-size: 0.74rem; font-weight: 600;
  color: var(--color-muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.4rem;
}
.form-field input,
.form-field textarea {
  width: 100%; padding: 11px 14px;
  background: var(--color-light-bg); border: 1px solid var(--color-border);
  border-radius: 7px; font-family: inherit; font-size: 0.9rem;
  color: var(--color-body); outline: none; transition: border-color 0.2s, background 0.2s;
  resize: vertical;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--color-accent); background: #fff; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #bbb; }
.form-field textarea { min-height: 130px; }
.form-field .req { color: var(--color-accent); }
.btn-submit {
  width: 100%; padding: 13px;
  background: var(--color-accent); color: #fff;
  font-family: inherit; font-size: 0.84rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  border: none; border-radius: 7px; cursor: pointer;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--color-accent-hover); }
.contact-img-wrap { border-radius: 10px; overflow: hidden; margin-top: 2rem; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.contact-img-wrap img { width: 100%; display: block; }

/* ─── FOOTER ───────────────────────────────────────── */
#site-footer {
  background: var(--color-dark2);
  padding: 60px 0 30px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 5%; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-logo-text { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 0.6rem; }
.footer-tagline { font-size: 0.9rem; font-weight: 700; color: rgba(255,255,255,0.45); margin-bottom: 1.25rem; }
.footer-newsletter { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-newsletter input {
  flex: 1; min-width: 130px; padding: 10px 12px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px; font-family: inherit; font-size: 0.82rem;
  color: #fff; outline: none; transition: border-color 0.2s;
}
.footer-newsletter input:focus { border-color: var(--color-accent); }
.footer-newsletter input::placeholder { color: rgba(255,255,255,0.32); }
.footer-newsletter button {
  padding: 10px 14px; background: var(--color-accent); border: none;
  border-radius: 6px; color: #fff; font-family: inherit;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; cursor: pointer; transition: background 0.2s; white-space: nowrap;
}
.footer-newsletter button:hover { background: var(--color-accent-hover); }
.footer-col h5 {
  font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.38);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col ul li a { font-size: 0.84rem; color: rgba(255,255,255,0.50); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--color-accent); }
.footer-contact-item { font-size: 0.84rem; color: rgba(255,255,255,0.50); margin-bottom: 0.35rem; }
.footer-contact-item a { color: rgba(255,255,255,0.50); transition: color 0.2s; }
.footer-contact-item a:hover { color: var(--color-accent); }
.footer-bottom {
  padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.76rem; color: rgba(255,255,255,0.28); }

/* ─── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 900px) {
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .two-col .col-img-first { order: -1; }
}
@media (max-width: 600px) {
  :root { --section-pad: 55px 0; }
  #primary-menu { display: none; }
  .stats-grid { flex-direction: column; }
  .footer-top { grid-template-columns: 1fr; }
  .partners-row { gap: 1.5rem; }
  .partner-logo-box { width: 140px; height: 70px; }
  .cards-grid { grid-template-columns: 1fr; }
}


/* ─── DROPDOWN MENU ─────────────────────────────────── */
#primary-menu .menu-item-has-children {
  position: relative;
}
#primary-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: rgba(10,10,26,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  padding: 8px 0;
  margin-top: 4px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  z-index: 1000;
  flex-direction: column;
  gap: 0;
}
#primary-menu .menu-item-has-children:hover > .sub-menu,
#primary-menu .menu-item-has-children:focus-within > .sub-menu {
  display: flex;
}
#primary-menu .sub-menu li {
  width: 100%;
}
#primary-menu .sub-menu li a {
  padding: 10px 18px;
  font-size: 0.72rem;
  border-radius: 0;
  white-space: nowrap;
}
#primary-menu .sub-menu li a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
/* Dropdown arrow indicator */
#primary-menu .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid rgba(255,255,255,0.5);
}
