/*
Theme Name: DVNZ Website
Theme URI: https://dvnz.nz/
Author: DVNZ
Description: Custom homepage theme for Digital Voice New Zealand.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: dvnz-website
*/

:root {
  color-scheme: dark;
  --bg: #11161f;
  --panel: #171d28;
  --panel-soft: rgba(23, 29, 40, 0.96);
  --line: rgba(207, 216, 230, 0.16);
  --text: #eef3fb;
  --muted: #aeb8c8;
  --soft: #d4dbea;
  --green: #7bd477;
  --teal: #55c7d4;
  --blue: #5ba7ff;
  --amber: #e5bd5e;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% -10%, rgba(91, 167, 255, 0.13), transparent 34rem),
    linear-gradient(180deg, #11161f 0%, #141a24 48%, #11161f 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem clamp(1rem, 4vw, 3rem);
  background: rgba(22, 31, 48, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 17rem;
}

.brand-logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.45rem;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(0.45rem, 2.2vw, 1.1rem);
  color: var(--soft);
  font-size: 0.92rem;
}

.nav-links a {
  padding: 0.42rem 0.12rem;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  border-color: var(--blue);
}

.header-link {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.28rem;
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
  font-size: 0.9rem;
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: 68vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: grayscale(0.28) saturate(0.68) contrast(0.9);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(17, 22, 31, 0.99), rgba(17, 22, 31, 0.92) 54%, rgba(17, 22, 31, 0.74)),
    linear-gradient(180deg, rgba(17, 22, 31, 0.18), rgba(17, 22, 31, 1));
}

.hero-inner,
.section,
.footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: end;
  padding: 7.5rem 0 clamp(2.4rem, 6vh, 4rem);
}

.hero-copy {
  max-width: 46rem;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.35rem, 4.6vw, 4.4rem);
  line-height: 1.05;
  max-width: 13ch;
}

h2 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.65rem, 3vw, 2.7rem);
  line-height: 1.12;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
}

p {
  color: var(--soft);
  line-height: 1.65;
}

.hero-copy > p {
  max-width: 44rem;
  font-size: 1.08rem;
}

.hero-actions,
.community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 0.28rem;
  background: rgba(255, 255, 255, 0.055);
  color: var(--soft);
  font-weight: 700;
}

.button.primary {
  border-color: rgba(91, 167, 255, 0.5);
  background: #1d4f91;
  color: #f1fff0;
}

.notice,
.info-card,
.note-grid article {
  border: 1px solid var(--line);
  border-radius: 0.28rem;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.notice {
  padding: 1.15rem;
  border-color: rgba(91, 167, 255, 0.28);
}

.notice h2 {
  font-size: 1.25rem;
}

.notice ol {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--soft);
  line-height: 1.75;
}

.section {
  padding: clamp(3.4rem, 7vw, 5.6rem) 0;
}

.section-heading {
  max-width: 45rem;
  margin-bottom: 1.35rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 30rem);
  gap: 1.25rem;
  align-items: end;
}

.mode-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.mode-strip span {
  min-height: 4rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.28rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
  font-weight: 750;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.info-card {
  position: relative;
  min-height: 14.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.1rem;
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}

.info-card:hover {
  transform: translateY(-0.18rem);
  border-color: rgba(91, 167, 255, 0.48);
}

.info-card.feature {
  background:
    linear-gradient(145deg, rgba(91, 167, 255, 0.16), rgba(85, 199, 212, 0.08)),
    var(--panel-soft);
}

.info-card em {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(229, 189, 94, 0.34);
  border-radius: 0.25rem;
  color: #dbeaff;
  background: rgba(91, 167, 255, 0.14);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}

.info-card span {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.info-card strong {
  margin-top: 0.45rem;
  font-size: 1.3rem;
}

.info-card p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.two-column,
.community {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(18rem, 1fr);
  gap: 1.4rem;
  align-items: start;
}

.link-list {
  display: grid;
  gap: 0.65rem;
}

.link-list a {
  display: grid;
  grid-template-columns: 0.36fr 1fr;
  gap: 1rem;
  min-height: 4.5rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.28rem;
  background: rgba(255, 255, 255, 0.04);
}

.link-list span {
  color: var(--muted);
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.note-grid article {
  padding: 1rem;
  box-shadow: none;
}

.note-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.community {
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  max-width: 34rem;
  margin-top: 1.4rem;
}

.hero-stats div {
  min-height: 4.7rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
}

.hero-stats span,
.hero-stats strong {
  display: block;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-stats strong {
  margin-top: 0.35rem;
  color: var(--text);
  font-size: 1.35rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  gap: 1.25rem;
  padding-top: 0;
}

.docs-sidebar {
  position: sticky;
  top: 5.25rem;
  align-self: start;
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 0;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.docs-sidebar strong,
.docs-sidebar a {
  padding: 0.25rem 0 0.25rem 0.9rem;
}

.docs-sidebar strong {
  color: var(--soft);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.docs-sidebar a:hover {
  color: var(--blue);
}

.docs-main {
  display: grid;
  gap: 0.85rem;
}

.docs-callout {
  position: relative;
  padding: 1rem 1rem 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left-width: 0.28rem;
  border-radius: 0.28rem;
  background: rgba(255, 255, 255, 0.04);
}

.docs-callout p:last-child {
  margin-bottom: 0;
}

.docs-callout a {
  color: var(--blue);
  font-weight: 700;
}

.docs-callout.note {
  border-left-color: var(--blue);
}

.docs-callout.info {
  border-left-color: var(--teal);
}

.docs-callout.help {
  border-left-color: var(--amber);
}

.callout-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.community-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer a {
  color: var(--soft);
}

.page-hero {
  padding: 9rem 0 3.4rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 0%, rgba(91, 167, 255, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.page-hero-inner,
.page-content {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 14ch;
}

.page-content {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.page-card {
  min-height: 12rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.28rem;
  background: var(--panel-soft);
}

.page-card strong {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--text);
  font-size: 1.18rem;
}

.page-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.wide-list {
  display: grid;
  gap: 0.75rem;
}

.wide-list a,
.wide-list div {
  display: grid;
  grid-template-columns: 0.28fr 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 4.7rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.28rem;
  background: rgba(255, 255, 255, 0.04);
}

.wide-list span {
  color: var(--muted);
}

@media (max-width: 920px) {
  .site-header {
    position: absolute;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero-inner,
  .intro,
  .two-column,
  .community,
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .header-link {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 10rem;
  }

  h1 {
    max-width: none;
    font-size: 2.6rem;
  }

  .mode-strip,
  .card-grid,
  .note-grid,
  .hero-stats,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .wide-list a,
  .wide-list div {
    grid-template-columns: 1fr;
  }

  .link-list a {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .footer {
    flex-direction: column;
  }
}
