/* DAB AI — site styles. Mobile-first. */

:root {
  color-scheme: dark;
  --bg: #14161a;
  --bg-alt: #1b1e24;
  --surface: #20242b;
  --text: #e9e7e2;
  --muted: #a3a6ad;
  --border: #343943;
  --accent: #7fd1bd;
  --accent-hover: #93ddca;
  --focus: #8ab4f8;
  --error: #e5735f;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  --wrap: 68rem;
  --space: clamp(1rem, 3vw, 2rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

h3{
    text-transform: uppercase;
}

ul { list-style: none; padding-left: 0; }

ul li {
  position: relative;
  padding-left: calc(18px + 0.6em);
}

ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc((1.6em - 18px) / 2);
  width: 18px;
  height: 18px;
  background: url("media/Ring.png") center / contain no-repeat;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.wrap {
  width: min(100% - 2 * var(--space), var(--wrap));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 22, 26, 0.8);
  backdrop-filter: blur(8px);
  /*border-bottom: 1px solid var(--accent);*/
}

.header-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.logo-img {
  display: block;
  height: 4rem;
  width: auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
}

.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px 1px var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav a:not(.nav-cta):hover::after,
.nav a:not(.nav-cta)[aria-current]::after {
  opacity: 1;
  animation: nav-dot 2.4s ease-in-out infinite;
}

@keyframes nav-dot {
  0%   { left: 0; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nav a:not(.nav-cta)::after { animation: none !important; }
  .nav a:not(.nav-cta):hover::after,
  .nav a:not(.nav-cta)[aria-current]::after { opacity: 1; }
}

.nav a:hover,
.nav a[aria-current] { color: var(--text); }

.nav-cta[aria-current] { background: var(--accent-hover); }

.nav-cta {
  color: var(--surface) !important;
  background: var(--accent);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent-hover); }

/* Mobile navigation toggle (disclosure pattern). */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

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

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

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem 0 0.75rem;
    background: var(--bg);
    border-bottom: 1px solid var(--accent);
    box-shadow: var(--shadow);
  }

  .nav-toggle[aria-expanded="true"] + .nav { display: flex; }

  .nav a {
    width: 100%;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav a:last-child { border-bottom: 0; }
  .nav a:not(.nav-cta)::after { display: none; }
  .nav .nav-cta {
    justify-content: center;
    padding: 0.45rem 0.9rem;
    margin-top: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after { transition: none; }
}

.btn::after,
.nav-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 2px var(--accent-hover), 0 0 16px 4px rgba(127, 209, 189, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.btn:hover::after,
.nav-cta:hover::after,
.nav-cta[aria-current]::after {
  animation: nav-ring 1.8s ease-in-out infinite;
}

@keyframes nav-ring {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .btn::after,
  .nav-cta::after { animation: none !important; }
  .btn:hover::after,
  .nav-cta:hover::after,
  .nav-cta[aria-current]::after { opacity: 0.6; }
}

.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(120% 90% at 50% 0%, rgba(127, 209, 189, 0.18), transparent 60%),
    radial-gradient(90% 70% at 50% 100%, rgba(20, 22, 26, 0.9), transparent 70%),
    /*linear-gradient(to top, rgba(52, 57, 67, 0.5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(52, 57, 67, 0.8) 1px, transparent 1px),*/
    var(--bg);
    /*background-size: auto, auto, 80px 44px, 44px 44px, auto;*/
    text-align: center;
    padding-bottom: 60px;
}

/* Only the hero that carries the art needs the extra height. */
.hero:has(.hero-art) { min-height: 30rem; }

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero > :not(.hero-art) {
  position: relative;
  z-index: 1;
}


.eyebrow {
  font-family: var(--mono);
  /*font-size: 0.8rem;*/
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  /*margin: 0 0 0.75rem;*/
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 auto 1rem;
  max-width: 22ch;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.15rem);
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  background: var(--accent);
  color: var(--surface);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--surface);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--text);
  color: var(--text);
}

.section { padding: clamp(2.5rem, 5vw, 4rem) 0; text-align: center; }
.section-alt { background: var(--bg-alt); }

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.015em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.section-intro {
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto 1.75rem;
}

.centre { text-align: center; }
.centre p { margin-inline: auto; }

.grid-3 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid-2 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.principles-grid { text-align: left; }

.principles-grid .card {
  position: relative;
  overflow: hidden;
}

.principles-grid .card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 130px;
  height: 130px;
  background: url("media/Ring.png") center / contain no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

#pillars .card {
  position: relative;
  text-align: left;
}

.card .eyebrow {
  font-size: 0.75rem;
  margin: 0 0 0.4rem;
}

.card .card-link { margin-top: 0.9rem; }

#pillars .card ul {
  margin: 0.7rem 0 0;
  color: var(--muted);
}
#pillars .card li { margin: 0.25rem 0; }

#pillars .card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px 1px var(--accent);
  transform: translate(-50%, -50%);
  animation: card-orbit 8s linear infinite;
  pointer-events: none;
}

@keyframes card-orbit {
  0%   { top: 0;    left: 0; }
  25%  { top: 0;    left: 100%; }
  50%  { top: 100%; left: 100%; }
  75%  { top: 100%; left: 0; }
  100% { top: 0;    left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #pillars .card::after { display: none; }
}

.card-muted {
  margin-top: 1.5rem;
  background: var(--bg-alt);
  box-shadow: none;
}
.card-muted ul {
  display: inline-block;
  margin: 0.5rem 0 0;
  color: var(--muted);
  text-align: left;
}

.principles {
  margin: 0 auto;
  max-width: 40rem;
  text-align: left;
}
.principles li { margin-bottom: 0.65rem; color: var(--muted); }
.principles li strong { color: var(--text); }

.note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1.25rem;
}

/* Inline glossary terms — tooltips on hover and keyboard focus. */
.term {
  position: relative;
  border-bottom: 1px dotted var(--accent);
  cursor: help;
}

.tip {
  position: absolute;
  left: 50%;
  bottom: 100%;
  z-index: 60;
  width: max-content;
  max-width: min(18rem, 70vw);
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.65rem;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.term:hover > .tip,
.term:focus > .tip,
.term:focus-visible > .tip {
  opacity: 1;
  visibility: visible;
}

.steps {
  position: relative;
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  counter-reset: step;
}

.steps::before {
  content: "";
  position: absolute;
  top: 2.9rem;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(127, 209, 189, 0.4);
  z-index: -1;
}
.steps > li {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem;
  counter-increment: step;
  display: grid;
  gap: 0.6rem;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.steps > li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  z-index: 2;
}

.steps > li::before {
    content: counter(step);
    position: relative;
    z-index: 1;
    justify-self: start;
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    font-family: var(--mono);
    font-size: 8rem;
    font-weight: 700;
    line-height: 1;
    color: #ffffff1a;
}

.steps > li::after {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: 3.25rem;
  height: 3.25rem;
  background: url("media/Ring.png") center / contain no-repeat;
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}
.steps > li > span { font-weight: 700; }

.steps > li ul {
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.steps > li ul li { padding-left: 1.15em; }
.steps > li ul li::before {
  top: 0.4em;
  width: 0.7em;
  height: 0.7em;
}

@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(5, 1fr); }
}

.profile .avatar {
  position: relative;
  width: 16rem;
  height: 16rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  background: url("media/Ring.svg") center / contain no-repeat;
}

.profile .avatar::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px 1px var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.profile .avatar:hover::after,
.profile .avatar:focus-within::after {
  opacity: 1;
  animation: avatar-orbit 6s linear infinite;
}

@keyframes avatar-orbit {
  from { transform: translate(-50%, -50%) rotate(0turn) translateY(-7rem); }
  to   { transform: translate(-50%, -50%) rotate(1turn) translateY(-7rem); }
}

@media (prefers-reduced-motion: reduce) {
  .profile .avatar::after { animation: none !important; }
}

.profile-links {
    /* margin-top: 1.6rem; */
    padding-top: 20px;
}

.profile .avatar img {
  display: block;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
}

.profile-body { min-width: 0; }
.profile-body > :first-child { margin-top: 0; }
.profile-body p + p { margin-top: 0.55rem; }
.profile .quals {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.profile-body ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.5rem;
  margin: 0.9rem 0 0;
  padding: 0;
}
.profile-body li {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-body li::before { display: none; }
.profile .role {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.65rem !important;
}
.profile .tags {
  margin-top: 0.85rem !important;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.contact-form {
  max-width: 36rem;
  margin-inline: auto;
  display: grid;
  gap: 1rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-row { display: grid; gap: 0.35rem; }


input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  min-height: 44px;
  width: 100%;
}
label {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
}
textarea { min-height: 8rem; resize: vertical; }

.form-row label:has(+ [required])::after {
  content: " *";
  color: var(--error);
}

.form-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.form-note .req { color: var(--error); }

.field-error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--error);
}

.form-status {
  margin: 0;
  font-size: 0.95rem;
  color: var(--accent);
}
.form-status:empty { display: none; }

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
}

.form-alt {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.prose {
  max-width: 42rem;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  text-align: left;
}
.prose h1 { margin-top: 0; }
.prose h2 { margin-top: 2rem; font-size: 1.25rem; text-transform: none; }

.site-footer {
  border-top: 1px solid var(--accent);
  padding: 2rem 0;
  background-color: black;
}
.footer-inner { display: grid; gap: 0.75rem; }
.footer-logo {
  display: block;
  height: 1.75rem;
  width: auto;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover { color: var(--text); }
.footer-contact {
  margin: 0;
  font-size: 0.95rem;
}
.footer-contact a {
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-contact a:hover { color: var(--text); }
.fineprint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
