/*
 * ddgbc.com — shared styles for the static pages.
 * System fonts on purpose: a privacy page that pulls a web font from a CDN
 * would hand every visitor's IP address to that CDN.
 */
:root {
  --paper: #f6f7fb;
  --surface: #ffffff;
  --ink: #141833;
  --muted: #565c7a;
  --line: #dcdfea;
  --brand: #4f46e5;
  --brand-ink: #ffffff;
  --brand-soft: #ebeafd;
  /* The ddgbc logo's notification dot; used for nothing else. */
  --signal: #ef4444;
  --keep: #0f766e;
  --leave: #b45309;
  /* Home page phone illustration: wallpaper and placeholder app tiles. */
  --wall-1: #eceeff;
  --wall-2: #fbeef1;
  --ph-1: rgba(79, 70, 229, 0.16);
  --ph-2: rgba(239, 68, 68, 0.13);
  --ph-3: rgba(20, 24, 51, 0.09);

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-plate: 28px;
  --radius-control: 999px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1120;
    --surface: #121a2e;
    --ink: #e6e8f2;
    --muted: #a3a9c4;
    --line: #26304a;
    --brand: #8b85ff;
    --brand-ink: #0b1120;
    --brand-soft: #1c2142;
    --signal: #ff6b6b;
    --keep: #5eead4;
    --leave: #fbbf24;
    --wall-1: #1a1f3d;
    --wall-2: #2a1830;
    --ph-1: rgba(139, 133, 255, 0.22);
    --ph-2: rgba(255, 107, 107, 0.2);
    --ph-3: rgba(230, 232, 242, 0.1);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--brand);
  text-underline-offset: 0.18em;
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- header / footer ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 32px;
  height: 32px;
}

/* Product pages (QRStudio) start their header with "ddgbc / Product": the way back home. */
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

.home-link:hover {
  color: var(--ink);
}

.home-link svg {
  width: 30px;
  height: 30px;
}

.crumb-sep {
  color: var(--line);
  font-size: 1.375rem;
  font-weight: 300;
}

@media (max-width: 480px) {
  .home-link span {
    display: none;
  }
}

/* ddgbc logo, inline so it follows the theme. Standalone copies: assets/ddgbc-*.svg. */
.brand svg.logo {
  width: auto;
  height: 40px;
}

.logo .lg-tile {
  fill: var(--brand);
}

.logo .lg-d {
  stroke: var(--brand-ink);
}

.logo .lg-ink {
  stroke: var(--ink);
}

.logo .lg-brand {
  stroke: var(--brand);
}

.logo .lg-signal {
  fill: var(--signal);
}

.lang {
  display: flex;
  gap: 4px;
  font-size: 0.9375rem;
}

.lang a,
.lang span {
  padding: 4px 10px;
  border-radius: var(--radius-control);
  text-decoration: none;
}

.lang span {
  background: var(--brand-soft);
  color: var(--ink);
  font-weight: 600;
}

.site-footer {
  margin-top: 96px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* A pseudo-element, so the rule spans the content column rather than the gutters. */
.site-footer::before {
  content: '';
  display: block;
  border-top: 1px solid var(--line);
  margin-bottom: 28px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 12px;
}

.site-footer p {
  margin: 0;
}

/* ---------- type ---------- */

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 13ch;
}

h2 {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 750;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 700;
}

.lead {
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  color: var(--muted);
  max-width: 34em;
  margin: 24px 0 0;
}

/* ---------- buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-control);
  border: 2px solid var(--brand);
  background: var(--brand);
  color: var(--brand-ink);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button[aria-disabled='true'] {
  cursor: default;
  color: var(--muted);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding-top: clamp(32px, 7vw, 88px);
  padding-bottom: clamp(8px, 3vw, 40px);
}

/* The QR is a real, scannable code for the web app — the one bold element. */
.qr-plate {
  justify-self: end;
  width: 100%;
  max-width: 340px;
  margin: 0;
}

.qr-plate .plate {
  padding: 22px;
  background: #ffffff;
  border-radius: var(--radius-plate);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(20, 24, 51, 0.35);
}

.qr-plate img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
}

.qr-plate figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

/* On a phone the visitor is already where the QR would take them. */
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .qr-plate {
    display: none;
  }
}

/* ---------- sections ---------- */

.section {
  padding-top: 56px;
  border-top: 1px solid var(--line);
  margin-top: 56px;
}

.section > h2 {
  margin-bottom: 28px;
}

.section-intro {
  color: var(--muted);
  max-width: var(--measure);
  margin: -12px 0 28px;
}

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 40px;
  margin: 0;
}

.spec dt {
  font-weight: 700;
  margin-bottom: 6px;
}

.spec dd {
  margin: 0;
  color: var(--muted);
}

/* "What stays on the phone / what leaves it" — the honest version of a privacy pitch. */
.ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
}

.ledger > div {
  padding: 24px 28px 28px;
}

.ledger > div + div {
  border-left: 1px solid var(--line);
}

.ledger h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.ledger h3::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--keep);
}

.ledger .leaves h3::before {
  background: var(--leave);
}

.ledger ul {
  margin: 0;
  padding-left: 1.1em;
}

.ledger li + li {
  margin-top: 8px;
}

.ledger p {
  margin: 16px 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.ledger-note {
  margin: 20px 0 0;
  max-width: var(--measure);
  color: var(--muted);
}

@media (max-width: 760px) {
  .ledger {
    grid-template-columns: 1fr;
  }
  .ledger > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px 40px;
}

.platforms p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* ---------- home (site root: / in English, /ro/ in Romanian) ---------- */

.home-nav {
  display: flex;
  align-items: center;
  gap: 8px 22px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.home-nav > a {
  color: var(--muted);
  text-decoration: none;
}

.home-nav > a:hover {
  color: var(--ink);
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 40px;
  padding-top: clamp(16px, 4vw, 40px);
  padding-bottom: clamp(48px, 7vw, 80px);
}

/* The logo's notification dot, reused as the page's one recurring mark. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 650;
}

.kicker::before {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 22%, transparent);
}

.home-hero h1 {
  margin-top: 22px;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 820;
}

.sig {
  color: var(--signal);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: clamp(48px, 7vw, 72px);
}

.pillar {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.pillar h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pillar h3::before {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
}

.pillar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.home-apps {
  display: grid;
  gap: 20px;
  padding-bottom: clamp(24px, 4vw, 40px);
  scroll-margin-top: 24px;
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px 48px;
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
}

.app-card .info {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.app-card .top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-card .top svg,
.app-card .top img {
  flex: none;
  width: 64px;
  height: 64px;
}

/* Raster app icons (other projects' own artwork): rounded like the SVG ones, with a hairline
   so a white icon background does not dissolve into a white card. */
.app-card .top img,
.tile img {
  display: block;
  border-radius: 28%;
  outline: 1px solid var(--line);
  outline-offset: -1px;
}

.tile img {
  width: 100%;
  height: auto;
}

.app-card .made-for {
  font-size: 0.9375rem;
}

/* EU-funded project results must show the emblem with the funding statement. */
.funding {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.funding img {
  flex: none;
  width: 54px;
  height: 36px;
}

.app-card .funding p {
  max-width: none;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.funding b {
  display: block;
  color: var(--ink);
  font-size: 0.875rem;
}

.app-card h3 {
  font-size: 1.75rem;
  letter-spacing: -0.025em;
}

.app-card h3 a {
  color: inherit;
  text-decoration: none;
}

.app-card p {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
}

.app-card .sub {
  margin-top: 4px;
}

.app-card .actions {
  margin-top: 4px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 4px 11px;
  border-radius: var(--radius-control);
  background: var(--brand-soft);
  font-size: 0.8125rem;
  font-weight: 650;
}

.next-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px clamp(20px, 3vw, 36px);
  border: 1.5px dashed var(--line);
  border-radius: 28px;
}

.next-card .slot {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 1.625rem;
  font-weight: 300;
}

.next-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Phone illustrations, drawn in CSS: a home screen (hero) and QRStudio scanning (app card).
   Decorative and aria-hidden; the camera view keeps its own dark colours in both themes. */
.phone {
  justify-self: center;
  width: 270px;
  max-width: 100%;
  aspect-ratio: 9 / 19;
  margin: 0;
  padding: 9px;
  border-radius: 44px;
  background: #0b0d1a;
  box-shadow: 0 40px 70px -34px rgba(20, 24, 51, 0.55);
}

.phone .scr {
  position: relative;
  height: 100%;
  padding: 12px 16px;
  overflow: hidden;
  border-radius: 36px;
  background: linear-gradient(160deg, var(--wall-1), var(--wall-2));
}

.phone .status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
}

.phone .isl {
  width: 74px;
  height: 20px;
  border-radius: 12px;
  background: #0b0d1a;
}

.phone .home {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 12px;
  margin-top: 30px;
}

.tile {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.tile i {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--ph-3);
}

.tile i.a {
  background: var(--ph-1);
}

.tile i.b {
  background: var(--ph-2);
}

.tile b {
  display: block;
  width: 70%;
  height: 5px;
  border-radius: 3px;
  background: var(--ph-3);
}

.tile svg {
  width: 100%;
  height: auto;
}

.tile small {
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1;
}

.tile .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 2.5px var(--wall-1);
}

.phone .dock {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 26px;
  background: var(--ph-3);
}

.phone .dock i {
  display: block;
  aspect-ratio: 1;
  border-radius: 28%;
  background: var(--ph-3);
}

.phone .scr.cam {
  padding: 12px 14px;
  background: radial-gradient(90% 60% at 50% 35%, #2b3256, #0d1122);
}

.cam .status {
  color: #e6e8f2;
}

.viewfinder {
  position: absolute;
  top: 22%;
  left: 50%;
  width: 66%;
  aspect-ratio: 1;
  transform: translateX(-50%);
}

.viewfinder .code {
  position: absolute;
  inset: 17%;
  padding: 7%;
  border-radius: 6px;
  background: #ffffff;
}

.viewfinder .code svg {
  width: 100%;
  height: 100%;
  fill: #141833;
}

.viewfinder .c {
  position: absolute;
  width: 26%;
  height: 26%;
  border: 4px solid #ffffff;
}

.viewfinder .c1 {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 18px;
}

.viewfinder .c2 {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 18px;
}

.viewfinder .c3 {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 18px;
}

.viewfinder .c4 {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 18px;
}

.scanline {
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 2px;
  background: #8b85ff;
  box-shadow: 0 0 12px 3px rgba(139, 133, 255, 0.7);
  animation: scan 2.6s ease-in-out infinite alternate;
}

@keyframes scan {
  from {
    top: 18%;
  }
  to {
    top: 82%;
  }
}

.sheet {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 26px;
  background: #ffffff;
  color: #141833;
}

.sheet small {
  color: #565c7a;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sheet b {
  font-size: 14px;
}

.sheet .safe {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e6f4f2;
  color: #0f766e;
  font-size: 11px;
  font-weight: 700;
}

.sheet .acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sheet .acts span {
  padding: 8px;
  border-radius: 12px;
  background: #ebeafd;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.sheet .acts span:first-child {
  background: #4f46e5;
  color: #ffffff;
}

/* ECoDN-HUB Equipment AR: the camera has recognised a piece of kit and shows its card. */
.phone .scr.ar {
  background: radial-gradient(90% 60% at 50% 35%, #34444c, #0e1418);
}

.target {
  position: absolute;
  top: 21%;
  left: 50%;
  width: 62%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
}

.target svg {
  position: absolute;
  inset: 16%;
  width: 68%;
  height: 68%;
}

.ar-tag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  color: #141833;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5);
}

.ar-tag::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #22c55e;
  vertical-align: 1px;
}

.sheet p {
  margin: 0;
  color: #565c7a;
  font-size: 11.5px;
  line-height: 1.4;
}

.sheet .acts.three {
  grid-template-columns: repeat(3, 1fr);
}

.sheet .acts.three span {
  padding: 7px 2px;
  font-size: 10px;
}

.app-card .phone {
  width: 230px;
}

@media (max-width: 760px) {
  .home-hero,
  .app-card {
    grid-template-columns: 1fr;
  }
  .home-hero .phone {
    width: 220px;
  }
  .app-card .phone {
    width: 210px;
  }
  .pillars {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 420px) {
  .home-nav .opt {
    display: none;
  }
}

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

/* ---------- legal / long-form ---------- */

/* Left-aligned with the header; each block keeps a readable measure. */
.doc {
  padding-top: clamp(24px, 5vw, 56px);
}

.doc > * {
  max-width: var(--measure);
}

.doc h1 {
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  max-width: none;
}

.doc .meta {
  color: var(--muted);
  margin: 16px 0 0;
}

.doc .summary {
  margin: 32px 0 8px;
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--brand-soft);
}

.doc .summary p {
  margin: 0;
}

.doc .summary p + p {
  margin-top: 10px;
}

.doc h2 {
  font-size: 1.5rem;
  margin: 48px 0 12px;
  scroll-margin-top: 24px;
}

.doc h3 {
  margin: 28px 0 8px;
}

.doc p,
.doc li {
  max-width: var(--measure);
}

.doc ul {
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: 6px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.9688rem;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

.doc th {
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
}

.doc .toc {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  columns: 2 220px;
  column-gap: 32px;
}

.doc .toc li {
  break-inside: avoid;
  margin: 0 0 6px;
}

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

.notfound {
  padding-top: clamp(48px, 10vw, 120px);
}

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