/* VAPT.COM.AU shared styles. Loaded by every page.
   Theme: corporate light. Soft white pages, deep navy text, emerald accent,
   with dark navy kept for high-contrast moments (terminal, CTA, footer). */

:root {
  --bg: #f6f8fb;
  --bg-2: #eef2f8;
  --panel: #ffffff;
  --panel-2: #f0f4f9;
  --line: #dde5f0;
  --text: #14213b;
  --muted: #4c5d7d;
  --green: #0e9f6e;
  --green-2: #0b7d57;
  --green-dim: rgba(14, 159, 110, 0.12);
  --dark: #0e1626;
  --dark-2: #121c31;
  --dark-line: #223052;
  --dark-text: #e8ecf5;
  --dark-muted: #93a1bd;
  --font-head: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "DM Sans", "Segoe UI", -apple-system, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 14px;
  --maxw: 1120px;
  --shadow-soft: 0 1px 2px rgba(20, 33, 59, 0.06), 0 8px 24px rgba(20, 33, 59, 0.06);
  --shadow-lift: 0 12px 32px rgba(20, 33, 59, 0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  display: block;
  margin-bottom: 14px;
}

/* ---------- Navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-nav .nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.nav-cta {
  color: #ffffff;
  background: var(--green);
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 700;
}
.nav-links a.nav-cta:hover { background: var(--green-2); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    padding: 10px 22px 18px;
    box-shadow: var(--shadow-soft);
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: none; padding-top: 16px; }
  .nav-links a.nav-cta { display: inline-block; text-align: center; }
}

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

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--green); color: #ffffff; }
.btn-primary:hover { background: var(--green-2); }

.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--green); color: var(--green-2); }

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 70px;
  background:
    radial-gradient(ellipse 60% 50% at 70% 0%, rgba(14, 159, 110, 0.08), transparent),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

/* 3D scene canvas injected by hero3d.js */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero > .container,
.page-hero > .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero p.lead {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 20px 0 30px;
  max-width: 34em;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* Terminal mock panel: stays dark on the light theme, deliberately */
.term {
  background: var(--dark);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  box-shadow: 0 30px 60px rgba(14, 22, 38, 0.35);
  animation: float3d 9s ease-in-out infinite;
  transform-style: preserve-3d;
}

@keyframes float3d {
  0%, 100% { transform: perspective(1100px) rotateX(2deg) rotateY(-4deg) translateY(0); }
  50% { transform: perspective(1100px) rotateX(-2deg) rotateY(3deg) translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .term { animation: none; }
}

.term-bar {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--dark-line);
  background: var(--dark-2);
}
.term-bar i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--dark-line);
}
.term-bar i:first-child { background: #2fd79a; }
.term-body { padding: 18px 20px; line-height: 1.9; color: var(--dark-muted); }
.term-body .tp { color: #2fd79a; }
.term-body .tc { color: var(--dark-text); }

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

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

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); margin-top: 14px; }

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card-grid.two { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) { .card-grid, .card-grid.two { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 2px solid var(--green);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-soft);
}
.card h3 { color: var(--text); }
.card p { color: var(--muted); font-size: 0.96rem; flex: 1; }
.card .card-link { font-family: var(--font-mono); font-size: 0.85rem; }

a.card { color: inherit; transition: transform 0.18s ease-out, border-color 0.15s ease, box-shadow 0.18s ease-out; }
a.card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--green-2); }

/* 3D tilt (driven by site.js on hover-capable devices) */
.card, .blog-card, .step {
  transform-style: preserve-3d;
  transition: transform 0.18s ease-out, border-color 0.15s ease, box-shadow 0.18s ease-out;
}
.card.tilting, .blog-card.tilting {
  border-color: var(--green-2);
  box-shadow: var(--shadow-lift), 0 0 24px rgba(14, 159, 110, 0.10);
}
.card-grid, .blog-grid, .steps { perspective: 1200px; }

.card .icon {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-soft);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 12px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.93rem; }

/* ---------- Feature list ---------- */

.feature-list { list-style: none; display: grid; gap: 16px; }
.feature-list li {
  padding-left: 30px;
  position: relative;
  color: var(--muted);
}
.feature-list li::before {
  content: ">";
  font-family: var(--font-mono);
  color: var(--green);
  position: absolute;
  left: 0;
}
.feature-list li b, .feature-list li strong { color: var(--text); font-weight: 600; }

/* ---------- Blog cards ---------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: inherit;
  box-shadow: var(--shadow-soft);
}
.blog-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--green-2); }
.blog-card .meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--green);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.blog-card h3 { font-size: 1.15rem; }
.blog-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.blog-card .read-more { font-family: var(--font-mono); font-size: 0.85rem; color: var(--green-2); }

/* ---------- FAQ ---------- */

.faq-list { display: grid; gap: 14px; max-width: 780px; }
.faq-list details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
}
.faq-list summary {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--green);
  position: absolute;
  right: 0;
  top: 0;
}
.faq-list details[open] summary::after { content: "-"; }
.faq-list details p { color: var(--muted); margin-top: 14px; }
.faq-list details p + p { margin-top: 10px; }

/* ---------- Forms ---------- */

.contact-form { display: grid; gap: 16px; max-width: 640px; }
.contact-form label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  display: grid;
  gap: 8px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  width: 100%;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-dim);
}
.contact-form textarea { min-height: 140px; resize: vertical; }

/* ---------- Article shell ---------- */

.article-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 22px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 52px;
  align-items: start;
}
@media (max-width: 980px) {
  .article-shell { grid-template-columns: 1fr; }
  .article-aside { display: none; }
}

.article-main { min-width: 0; }

.article-head { margin-bottom: 34px; }
.article-head .meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}
.article-head h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.article-head .standfirst { color: var(--muted); font-size: 1.12rem; margin-top: 16px; }

.article-body > p { margin-bottom: 20px; }
.article-body h2 {
  margin: 44px 0 16px;
  font-size: 1.5rem;
  scroll-margin-top: 90px;
}
.article-body h3 { margin: 30px 0 12px; scroll-margin-top: 90px; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; color: var(--text); }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--green); }
.article-body figure { margin: 30px 0; }
.article-body figcaption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}
.article-body blockquote {
  border-left: 2px solid var(--green);
  padding: 4px 0 4px 20px;
  color: var(--muted);
  margin: 0 0 20px;
}
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 0.95rem;
  background: var(--panel);
}
.article-body th, .article-body td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--line);
}
.article-body th {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--green-2);
  background: var(--panel-2);
}
.article-body td { color: var(--muted); }
.table-scroll { overflow-x: auto; margin: 0 0 24px; }
.table-scroll table { margin: 0; }

/* Table of contents (populated by site.js) */
.article-aside { position: sticky; top: 90px; }
.toc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
}
.toc .toc-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.toc ol { list-style: none; display: grid; gap: 9px; }
.toc a { color: var(--muted); font-size: 0.9rem; line-height: 1.4; display: block; }
.toc a:hover { color: var(--text); text-decoration: none; }

/* Author bar */
.author-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin: 44px 0;
}
.author-bar .avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--green-dim);
  border: 1px solid var(--green);
  color: var(--green-2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.author-bar .who strong { display: block; font-size: 0.98rem; }
.author-bar .who span { color: var(--muted); font-size: 0.88rem; }

/* More from the blog (populated by site.js) */
.more-posts { margin: 44px 0; }
.more-posts h2 { font-size: 1.3rem; margin-bottom: 20px; }
.more-posts .blog-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .more-posts .blog-grid { grid-template-columns: 1fr; } }

/* ---------- CTA strip: dark navy accent moment ---------- */

.cta-strip {
  background: linear-gradient(135deg, var(--dark-2) 0%, var(--dark) 100%);
  border: 1px solid var(--dark-line);
  border-top: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 40px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  margin: 30px 0;
  box-shadow: var(--shadow-lift);
}
.cta-strip h2 { font-size: 1.4rem; margin-bottom: 8px; color: var(--dark-text); }
.cta-strip p { color: var(--dark-muted); max-width: 34em; }
.cta-strip .cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-strip .btn-ghost { border-color: var(--dark-line); color: var(--dark-text); }
.cta-strip .btn-ghost:hover { border-color: var(--green); color: #2fd79a; }

/* ---------- Page hero (inner pages) ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 60% at 80% 0%, rgba(14, 159, 110, 0.07), transparent),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}
.page-hero p.lead { color: var(--muted); font-size: 1.12rem; margin-top: 18px; max-width: 40em; }

/* ---------- Prose blocks on plain pages ---------- */

.prose { max-width: 760px; }
.prose p { margin-bottom: 18px; color: var(--muted); }
.prose h2 { margin: 40px 0 14px; }
.prose h3 { margin: 26px 0 10px; }
.prose ul, .prose ol { margin: 0 0 18px 24px; color: var(--muted); }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--green); }

/* ---------- Footer: dark navy ---------- */

.site-footer {
  border-top: 1px solid var(--dark-line);
  background: var(--dark);
  padding: 56px 0 30px;
  margin-top: 40px;
}
.site-footer .brand { color: var(--dark-text); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2fd79a;
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-grid ul { list-style: none; display: grid; gap: 9px; }
.footer-grid ul a { color: var(--dark-muted); font-size: 0.92rem; }
.footer-grid ul a:hover { color: var(--dark-text); text-decoration: none; }
.footer-grid .about-col p { color: var(--dark-muted); font-size: 0.92rem; margin-top: 12px; max-width: 26em; }

.footer-bottom {
  border-top: 1px solid var(--dark-line);
  margin-top: 44px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--dark-muted);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

/* ---------- Fade-up animation ---------- */

.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

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

.err-wrap {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 22px;
}
.err-wrap .code {
  font-family: var(--font-mono);
  font-size: 5rem;
  color: var(--green);
}
.err-wrap p { color: var(--muted); margin: 14px 0 26px; }

/* ---------- Imagery ---------- */

.card-figure {
  background: linear-gradient(180deg, #f4f7fb 0%, #e9eff8 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 6px;
}
.card-figure img { width: 100%; height: 148px; object-fit: contain; }

.blog-card .thumb {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 4px;
}
.blog-card .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

.media-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 52px;
  align-items: center;
}
@media (max-width: 900px) { .media-split { grid-template-columns: 1fr; } }

.media-frame {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}
.media-frame img { width: 100%; }

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero-art img { width: 100%; }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; }
}

.inline-art {
  margin: 34px 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}
.inline-art img { width: 100%; }
.inline-art figcaption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 14px;
  text-align: center;
}

.skyline-band {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-2) 100%);
  padding-top: 30px;
}
.skyline-band img { width: 100%; max-width: none; display: block; }

/* ---------- Contact form status ---------- */

.form-status { display: none; padding: 12px 16px; border-radius: 10px; font-size: 0.95rem; }
.form-status.ok {
  display: block;
  background: var(--green-dim);
  border: 1px solid var(--green);
  color: var(--green-2);
}
.form-status.err {
  display: block;
  background: rgba(224, 82, 82, 0.09);
  border: 1px solid #e05252;
  color: #b23c3c;
}
