/*
Theme Name: AIx
Theme URI: https://www.ai-explorer.com.au/
Author: AI Explorer
Description: Tenant-ready AIx presentation layer for native WordPress and Moda-compiled pages.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: aix
*/

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/hanken-grotesk-400.ttf") format("truetype");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/hanken-grotesk-500.ttf") format("truetype");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/hanken-grotesk-600.ttf") format("truetype");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/hanken-grotesk-700.ttf") format("truetype");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/hanken-grotesk-800.ttf") format("truetype");
}

:root {
  --aix-bg: #ffffff;
  --aix-bg-soft: #f6f7fb;
  --aix-bg-warm: #f7f5f1;
  --aix-navy: #0a1222;
  --aix-ink: #16233e;
  --aix-ink-muted: #475569;
  --aix-muted: #94a3b8;
  --aix-teal: #0b6b63;
  --aix-teal-bright: #33d6c2;
  --aix-teal-deep: #084e48;
  --aix-line: #e6e2da;
  --aix-line-cool: #e2e8f0;
  --aix-footer-muted: #9fb0c4;
  --aix-font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --aix-radius-md: 14px;
  --aix-radius-lg: 20px;
  --aix-radius-xl: 24px;
  --aix-shell: 1200px;
  --aix-content: 1120px;
  --aix-shadow: 0 1px 2px rgb(15 17 23 / 4%), 0 12px 32px -16px rgb(15 17 23 / 18%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--aix-bg);
  color: var(--aix-ink);
  font-family: var(--aix-font);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .aix-header {
  top: 32px;
}

a {
  color: var(--aix-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--aix-navy);
  box-shadow: var(--aix-shadow);
}

.aix-header {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 65px;
  border-bottom: 1px solid var(--aix-line);
  background: rgb(255 255 255 / 85%);
}

@supports (backdrop-filter: blur(14px)) {
  .aix-header {
    backdrop-filter: saturate(150%) blur(14px);
  }
}

.aix-header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, var(--aix-shell));
  min-height: 64px;
  margin-inline: auto;
  padding-inline: 24px;
  gap: 16px;
}

.aix-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.aix-brand img {
  display: block;
  width: auto;
  height: 34px;
}

.aix-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 26px;
}

.aix-menu {
  display: contents;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aix-menu .menu-item {
  position: relative;
  display: flex;
  margin: 0;
  list-style: none;
}

.aix-nav-link,
.aix-nav .menu-item > a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-block: 4px;
  color: var(--aix-ink-muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: color 160ms ease;
}

.aix-nav-link:hover,
.aix-nav-link:focus-visible,
.aix-nav .menu-item > a:hover,
.aix-nav .menu-item > a:focus-visible {
  color: var(--aix-teal);
}

.aix-nav-item {
  position: relative;
  display: flex;
}

.aix-menu .menu-item-has-children > a::after {
  color: var(--aix-muted);
  font-size: 0.68em;
  content: "▼";
  transform: translateY(-1px);
}

.aix-caret {
  color: var(--aix-muted);
  font-size: 0.72em;
  transform: translateY(-1px);
}

.aix-submenu,
.aix-menu .sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: -18px;
  min-width: 220px;
  margin: 0;
  padding: 8px;
  list-style: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-5px);
  border: 1px solid var(--aix-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--aix-shadow);
  transition:
    opacity 150ms ease,
    transform 150ms ease,
    visibility 150ms ease;
}

.aix-submenu::before,
.aix-menu .sub-menu::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 13px;
  content: "";
}

.aix-submenu a,
.aix-menu .sub-menu a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--aix-ink-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.aix-submenu a:hover,
.aix-submenu a:focus-visible,
.aix-menu .sub-menu a:hover,
.aix-menu .sub-menu a:focus-visible {
  background: var(--aix-bg-soft);
  color: var(--aix-teal);
}

.aix-nav-item:hover .aix-submenu,
.aix-nav-item:focus-within .aix-submenu,
.aix-menu .menu-item:hover > .sub-menu,
.aix-menu .menu-item:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.aix-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 41px;
  padding: 9.6px 17.6px;
  border-radius: 12px;
  background: var(--aix-teal);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.aix-nav-cta:hover,
.aix-nav-cta:focus-visible {
  background: var(--aix-teal-deep);
  color: #fff;
  transform: translateY(-1px);
}

.aix-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--aix-ink);
  cursor: pointer;
}

.aix-nav-toggle-bars,
.aix-nav-toggle-bars::before,
.aix-nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 99px;
  background: currentcolor;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

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

.aix-nav-toggle-bars::before,
.aix-nav-toggle-bars::after {
  position: absolute;
  top: 0;
  left: 0;
  content: "";
  transform-origin: center;
}

.aix-nav-toggle-bars::before {
  transform: translateY(-7px);
}

.aix-nav-toggle-bars::after {
  transform: translateY(7px);
}

.aix-nav-toggle[aria-expanded="true"] .aix-nav-toggle-bars {
  background: transparent;
}

.aix-nav-toggle[aria-expanded="true"] .aix-nav-toggle-bars::before {
  transform: translateY(0) rotate(45deg);
}

.aix-nav-toggle[aria-expanded="true"] .aix-nav-toggle-bars::after {
  transform: translateY(0) rotate(-45deg);
}

.aix-main {
  min-height: 60vh;
}

.aix-content-shell {
  width: min(calc(100% - 48px), 760px);
  margin-inline: auto;
  padding-block: clamp(56px, 8vw, 96px);
}

.aix-content-shell-wide {
  width: min(calc(100% - 48px), var(--aix-content));
}

.aix-page-header {
  margin-bottom: 32px;
}

.aix-page-title {
  max-width: 15ch;
  margin: 0;
  color: var(--aix-ink);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.aix-entry-content {
  color: var(--aix-ink-muted);
  font-size: 1.08rem;
}

.aix-entry-content > * {
  margin-block: 0 1.4em;
}

.aix-entry-content h2,
.aix-entry-content h3,
.aix-entry-content h4 {
  margin-block: 1.6em 0.55em;
  color: var(--aix-ink);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.aix-entry-content h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.aix-entry-content h3 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.aix-entry-content .wp-block-button__link {
  border-radius: 12px;
  background: var(--aix-teal);
  color: #fff;
  font-weight: 600;
}

.aix-empty-state {
  min-height: 52vh;
  background: var(--aix-bg-warm);
}

.aix-compiled-page .aix-main {
  overflow: clip;
}

.aix-compiled-page .aix-design-ir {
  margin-block: 0;
}

.aix-footer {
  background: var(--aix-navy);
  color: var(--aix-footer-muted);
}

.aix-footer-shell {
  width: min(100%, var(--aix-content));
  margin-inline: auto;
  padding: 56px 24px 40px;
}

.aix-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.aix-footer-logo {
  display: block;
  width: auto;
  height: 38px;
}

.aix-footer-tagline {
  max-width: 18rem;
  margin: 14px 0 0;
  color: var(--aix-footer-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.aix-footer-socials {
  display: flex;
  margin-top: 20px;
  gap: 12px;
}

.aix-footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgb(159 176 196 / 22%);
  border-radius: 50%;
  color: var(--aix-footer-muted);
  transition:
    border-color 160ms ease,
    color 160ms ease;
}

.aix-footer-socials a:hover,
.aix-footer-socials a:focus-visible {
  border-color: var(--aix-teal-bright);
  color: var(--aix-teal-bright);
}

.aix-footer-column h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.aix-footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.aix-header-cta-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aix-header-cta-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--aix-accent);
  color: #071526;
  font-weight: 700;
  text-decoration: none;
}

.aix-footer-column li + li {
  margin-top: 8px;
}

.aix-footer-column a {
  color: var(--aix-footer-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.aix-footer-column a:hover,
.aix-footer-column a:focus-visible {
  color: #fff;
}

.aix-footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid rgb(159 176 196 / 16%);
  color: #64748b;
  font-size: 0.8rem;
}

@media (max-width: 1120px) {
  .aix-nav {
    gap: 18px;
  }

  .aix-nav-link,
  .aix-nav .menu-item > a {
    font-size: 0.9rem;
  }

  .aix-nav-cta {
    padding-inline: 14px;
  }
}

@media (max-width: 980px) {
  .aix-nav-toggle {
    display: flex;
  }

  .aix-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: none;
    max-height: calc(100vh - 65px);
    margin: 0;
    padding: 8px 24px 20px;
    overflow-y: auto;
    border-bottom: 1px solid var(--aix-line);
    background: #fff;
    box-shadow: var(--aix-shadow);
  }

  .aix-nav[data-open="true"] {
    display: block;
  }

  .aix-menu {
    display: block;
  }

  .aix-menu .menu-item {
    display: block;
  }

  .aix-nav-link,
  .aix-nav .menu-item > a {
    display: flex;
    width: 100%;
    padding-block: 11px;
    font-size: 1rem;
  }

  .aix-nav-item {
    display: block;
  }

  .aix-submenu,
  .aix-menu .sub-menu {
    position: static;
    display: grid;
    min-width: 0;
    margin: -3px 0 5px 12px;
    padding: 0 0 0 12px;
    visibility: visible;
    opacity: 1;
    transform: none;
    border: 0;
    border-left: 1px solid var(--aix-line);
    border-radius: 0;
    box-shadow: none;
  }

  .aix-submenu a,
  .aix-menu .sub-menu a {
    padding-block: 7px;
  }

  .aix-nav-cta {
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 760px) {
  body.admin-bar .aix-header {
    top: 46px;
  }

  .aix-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .aix-footer-brand {
    grid-column: 1 / -1;
  }

  .aix-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .aix-header-shell {
    padding-inline: 24px;
  }

  .aix-content-shell,
  .aix-content-shell-wide {
    width: min(calc(100% - 40px), 760px);
  }

  .aix-footer-shell {
    padding: 44px 24px 32px;
  }

  .aix-footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .aix-footer-brand {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
