/* ---------- Design tokens ---------- */
:root {
  --dh-navy: #0a3d55;
  --dh-blue: #0f6b8f;
  --dh-teal: #2bb3a0;
  --dh-teal-soft: rgba(43, 179, 160, 0.12);
  --dh-surface: #f5f8fa;
  --dh-border: rgba(10, 61, 85, 0.12);
  --dh-radius: 14px;
  --dh-shadow: 0 1px 2px rgba(10, 40, 60, 0.06), 0 6px 20px rgba(10, 40, 60, 0.06);

  --md-primary-fg-color: var(--dh-navy);
  --md-primary-fg-color--light: var(--dh-blue);
  --md-primary-fg-color--dark: #062a3b;
  --md-accent-fg-color: var(--dh-teal);
  --md-typeset-a-color: var(--dh-blue);
}

[data-md-color-scheme="slate"] {
  --dh-surface: #1b2430;
  --dh-border: rgba(255, 255, 255, 0.09);
  --dh-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
  --md-default-bg-color: #121821;
  --md-typeset-a-color: #5cc8e6;
  --md-accent-fg-color: #4fd1bd;
}

/* ---------- Typography & rhythm ---------- */
.md-typeset {
  font-size: 0.82rem;
  line-height: 1.7;
}
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: var(--md-default-fg-color);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.md-typeset h1 { font-size: 2.1em; line-height: 1.2; margin-bottom: 0.6em; }
.md-typeset h2 { font-size: 1.45em; margin-top: 2em; }
.md-typeset h3 { font-size: 1.1em; margin-top: 1.6em; }
.md-typeset p,
.md-typeset ul,
.md-typeset ol { max-width: 46rem; }
.md-typeset li { margin-bottom: 0.35em; }

/* Tables: readable size, soft header */
.md-typeset table:not([class]) {
  font-size: 0.78rem;
  border-radius: var(--dh-radius);
  border: 1px solid var(--dh-border);
  box-shadow: none;
}
.md-typeset table:not([class]) th {
  background: var(--dh-surface);
  font-weight: 600;
}
.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th { padding: 0.75em 1em; vertical-align: top; }

/* ---------- Header & announcement bar ---------- */
.md-header, .md-tabs { background: var(--dh-navy); }
.md-header--shadow { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15); }
/* Wordmark logo: wide image, so give it room and hide the duplicate site name */
.md-header__button.md-logo { padding: 0.2rem 0.4rem; }
.md-header__button.md-logo img { height: 1.5rem; width: auto; }
@media (min-width: 76.25em) {
  .md-header__title .md-header__topic:first-child { display: none; }
}
.md-tabs__link { font-size: 0.72rem; font-weight: 500; opacity: 0.8; }
.md-tabs__link--active, .md-tabs__link:hover { opacity: 1; }

.md-banner { background: #062a3b; color: rgba(255, 255, 255, 0.85); }
.md-banner__inner { font-size: 0.68rem; margin: 0.45rem auto; }
.md-banner a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Shared components ---------- */
.eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-accent-fg-color);
  margin-bottom: 0.3rem;
}
.page-intro { margin-bottom: 1.5rem; }
.page-intro h1 { margin: 0 0 0.4em; }
.page-intro p { font-size: 1.05em; color: var(--md-default-fg-color--light); }

.md-typeset .md-button {
  border-radius: 999px;
  padding: 0.55em 1.4em;
  font-weight: 600;
  margin: 0.3rem 0.5rem 0.3rem 0;
}

/* Grid cards (Material) – softer look */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.1rem 1.2rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.md-typeset .grid.cards > ul > li:hover {
  transform: translateY(-2px);
  box-shadow: var(--dh-shadow);
  border-color: var(--md-accent-fg-color);
}
.md-typeset .grid.cards .lg { font-size: 1.6em; color: var(--md-accent-fg-color); vertical-align: middle; margin-right: 0.3em; }
.md-typeset .grid.cards p { margin: 0.5em 0 0; color: var(--md-default-fg-color--light); }
.md-typeset .grid.cards a { color: var(--md-default-fg-color); }
.md-typeset .grid.cards hr { display: none; }

/* ---------- Home ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3.2rem 2.4rem 2.6rem;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(43, 179, 160, 0.45), transparent 45%),
    radial-gradient(circle at 10% 110%, rgba(92, 200, 230, 0.35), transparent 50%),
    linear-gradient(135deg, #062a3b 0%, #0a3d55 45%, #0f6b8f 100%);
  margin-bottom: 1.6rem;
}
/* delta channels motif */
.hero::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -40px;
  width: 420px; height: 240px;
  background: url("logo-icon.png") no-repeat center / contain;
  opacity: 0.08;
  pointer-events: none;
}
.md-typeset .hero h1 { color: #fff; font-size: 2.8em; margin: 0.1em 0 0.3em; }
.md-typeset .hero__title { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.2em 0.45em; margin: 0.5em 0 0.6em; }
.md-typeset .hero__title img { height: 1.6em; width: auto; max-width: 100%; }
.md-typeset .hero__title span { font-weight: 300; letter-spacing: 0.02em; line-height: 1; opacity: 0.9; }
.hero .eyebrow { color: #7fe3d3; }
.hero__lead { font-size: 1.1em; max-width: 38rem; color: rgba(255, 255, 255, 0.88); margin-bottom: 1.4em; }
.md-typeset .hero .md-button { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.md-typeset .hero .md-button:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.md-typeset .hero .md-button--primary { background: #fff; color: var(--dh-navy); border-color: #fff; }
.md-typeset .hero .md-button--primary:hover { background: #e6f7f4; color: var(--dh-navy); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.stat {
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1rem 1.1rem;
}
.stat__value { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; color: var(--md-default-fg-color); line-height: 1.2; }
.stat__label { font-size: 0.72rem; color: var(--md-default-fg-color--light); }

.md-typeset .facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 1rem 0;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  overflow: hidden;
}
.md-typeset .facts > div {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--dh-border);
}
.md-typeset .facts > div:nth-child(odd) { border-right: 1px solid var(--dh-border); }
.md-typeset .facts > div:first-child { grid-column: 1 / -1; border-right: 0; background: var(--dh-surface); }
.md-typeset .facts dt {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-default-fg-color--light);
}
.md-typeset .facts dd { margin: 0.15em 0 0; font-weight: 500; }

.funding {
  margin-top: 2.4rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--md-accent-fg-color);
  background: var(--dh-teal-soft);
  border-radius: 0 var(--dh-radius) var(--dh-radius) 0;
  font-size: 0.78rem;
}
.funding p { margin: 0; max-width: none; }

/* ---------- Reports ---------- */
.stage {
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.4rem 1.6rem 0.6rem;
  margin: 1.4rem 0;
}
.md-typeset .stage h2 { margin-top: 0.3em; }
.badge {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2em 0.75em;
  border-radius: 999px;
  background: var(--dh-surface);
  color: var(--md-default-fg-color--light);
  border: 1px solid var(--dh-border);
}
.badge--done { background: var(--dh-teal-soft); color: #13806f; border-color: transparent; }
.badge--active { background: rgba(15, 107, 143, 0.12); color: var(--dh-blue); border-color: transparent; }
[data-md-color-scheme="slate"] .badge--done { color: #4fd1bd; }
[data-md-color-scheme="slate"] .badge--active { color: #5cc8e6; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.gallery img { width: 100%; height: 170px; object-fit: cover; border-radius: 10px; }

/* ---------- Team ---------- */
.person {
  display: inline-block;
  padding: 1rem 1.3rem;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  background: var(--dh-surface);
}
.person p { margin: 0; }

/* ---------- 3D & VR ---------- */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 1rem;
}
.model-card {
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  overflow: hidden;
  background: var(--md-default-bg-color);
  display: flex;
  flex-direction: column;
}
.model-card model-viewer { display: block; height: auto; }
.model-card model-viewer,
.model-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 70% 30%, rgba(43, 179, 160, 0.35), transparent 55%),
    linear-gradient(135deg, #062a3b, #0f6b8f);
}
.model-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
}
.model-placeholder__icon { width: 3rem; height: 3rem; fill: currentColor; opacity: 0.9; }
.model-placeholder__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2em 0.8em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}
.model-card__body { padding: 0.9rem 1.1rem 1.1rem; }
.md-typeset .model-card__body h3 { margin: 0 0 0.3em; font-size: 0.95rem; }
.md-typeset .model-card__body p { margin: 0 0 0.7em; font-size: 0.76rem; color: var(--md-default-fg-color--light); }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.15em 0.65em;
  border-radius: 999px;
  background: var(--dh-teal-soft);
  color: var(--md-default-fg-color--light);
}
.ar-button {
  position: absolute;
  bottom: 0.8rem; left: 50%;
  transform: translateX(-50%);
  padding: 0.45em 1.1em;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--dh-navy);
  font: 600 0.7rem/1 var(--md-text-font-family);
  box-shadow: var(--dh-shadow);
  cursor: pointer;
}

/* ---------- Footer ---------- */
.md-footer { background: var(--dh-navy); }
.md-footer-meta { background: #062a3b; }
.md-copyright { font-size: 0.66rem; }

/* ---------- Responsive ---------- */
@media (max-width: 76.1875em) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 44.9375em) {
  .hero { padding: 2.2rem 1.3rem 1.8rem; border-radius: 16px; }
  .md-typeset .hero h1 { font-size: 2.1em; }
  .md-typeset .facts { grid-template-columns: 1fr; }
  .md-typeset .facts > div:nth-child(odd) { border-right: 0; }
  .stage { padding: 1.1rem 1rem 0.4rem; }
}

/* Card titles that are not links */
.md-typeset .grid.cards strong { color: var(--md-default-fg-color); }
/* More, narrower cards per row */
.md-typeset .grid.cards > ul { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

/* Featured WebXR app card on the 3D & VR page */
.model-card--app {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.model-card__media { position: relative; display: block; overflow: hidden; background: #07131f; }
.model-card__media img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.3s ease; }
.model-card__media:hover img { transform: scale(1.03); }
.model-card__play {
  position: absolute; left: 50%; top: 50%;
  width: 4rem; height: 4rem; margin: -2rem 0 0 -2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--dh-shadow);
}
.model-card__play svg { width: 2rem; height: 2rem; fill: var(--dh-navy); margin-left: 0.2rem; }
.model-card--app .model-card__body { padding: 1.4rem 1.6rem; align-self: center; }
.md-typeset .model-card--app h3 { font-size: 1.25rem; margin: 0.6em 0 0.4em; }
.md-typeset .model-card--app .model-card__body p { font-size: 0.8rem; }
.md-typeset .model-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 1.1em 0 0; }
.md-typeset .model-card__actions .md-button { margin: 0; }
.model-card__size { font-size: 0.7rem; color: var(--md-default-fg-color--light); }
@media (max-width: 44.9375em) {
  .model-card--app { grid-template-columns: 1fr; }
  .model-card--app .model-card__body { padding: 1rem 1.1rem 1.2rem; }
}

/* App card: device list and vertical rhythm */
.md-typeset .model-card--app .model-card__body > * { margin-top: 0; margin-bottom: 0; }
.md-typeset .model-card--app .model-card__body > * + * { margin-top: 1rem; }
.md-typeset .model-card--app .model-card__body > .badge + h3 { margin-top: 0.7rem; }
.md-typeset .model-card--app h3 { margin: 0; line-height: 1.3; }
.md-typeset .model-card--app .model-card__body p { line-height: 1.65; }
.md-typeset .model-card ul.devices {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  border: 1px solid var(--dh-border);
  border-radius: 12px;
  background: var(--dh-surface);
  overflow: hidden;
}
.md-typeset .model-card ul.devices > li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--md-default-fg-color--light);
}
.md-typeset .model-card ul.devices > li + li { border-top: 1px solid var(--dh-border); }
.md-typeset .model-card ul.devices svg { flex: none; width: 1.25rem; height: 1.25rem; fill: var(--md-accent-fg-color); }
.md-typeset .model-card ul.devices span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.6rem; }
.md-typeset .model-card ul.devices strong { min-width: 6.5rem; font-size: 0.74rem; color: var(--md-default-fg-color); }


/* "How to use it" – instructions revealed on hover / focus / tap */
.md-typeset .howto-hint { font-size: 0.74rem; color: var(--md-default-fg-color--light); margin-top: -0.4rem; }
.howto {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: start;
  margin: 1rem 0 2rem;
}
.howto__card {
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 1.1rem 1.2rem;
  background: var(--md-default-bg-color);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.howto__card:hover,
.howto__card:focus,
.howto__card:focus-within {
  border-color: var(--md-accent-fg-color);
  box-shadow: var(--dh-shadow);
}
.howto__head { display: flex; align-items: center; gap: 0.8rem; }
.howto__head svg { flex: none; width: 2rem; height: 2rem; fill: var(--md-accent-fg-color); }
.howto__head strong { display: block; font-size: 0.9rem; color: var(--md-default-fg-color); }
.howto__head span { display: block; font-size: 0.7rem; color: var(--md-default-fg-color--light); }
.howto__head::after {
  content: "";
  margin-left: auto;
  width: 0.5rem; height: 0.5rem;
  border-right: 2px solid var(--md-default-fg-color--light);
  border-bottom: 2px solid var(--md-default-fg-color--light);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.howto__card:hover .howto__head::after,
.howto__card:focus .howto__head::after,
.howto__card:focus-within .howto__head::after { transform: rotate(-135deg); }
.md-typeset .howto__steps {
  margin: 0;
  padding-left: 1.2rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 0.74rem;
  line-height: 1.55;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
}
.md-typeset .howto__steps li { margin: 0 0 0.45em; }
.howto__card:hover .howto__steps,
.howto__card:focus .howto__steps,
.howto__card:focus-within .howto__steps {
  max-height: 30rem;
  opacity: 1;
  margin-top: 0.9rem;
}
@media (max-width: 44.9375em) {
  .howto { grid-template-columns: 1fr; }
}
