/**
 * pedema.de — brand layer over the shared site CSS (fonts, base, layout,
 * themes). Loaded last.
 *
 * Brand tokens apply only in the default palette: the color-blind and
 * red-green themes keep their own primary, because at equal specificity this
 * later file would otherwise override them.
 */

:root {
  /* Product accents as TEXT colours (≥ 4.5:1 on --color-bg and
     --color-bg-elevated). They stay in every palette: they name a product,
     not an interaction. */
  --pd-mapidu-accent: #8a6b00;
  --pd-didema-accent: #047857;
  --pd-bezel: #1c1c1e;
  --pd-shot-shadow: 0 28px 56px -24px rgba(26, 22, 18, 0.28);
}

:root[data-theme="dark"] {
  --pd-mapidu-accent: #c9a227;
  --pd-didema-accent: #2dd4bf;
  --pd-bezel: #2c2c2e;
  --pd-shot-shadow: 0 28px 56px -24px rgba(0, 0, 0, 0.6);
}

/* Ruby of the wordmark (2026-09-13). Dark: the same OKLCH hue, lightened to
   ≥ 4.5:1 on --color-bg-elevated — the wordmark's #b53033 reaches only 3:1. */
:root:not(.color-blind):not(.red-green) {
  --color-primary: #960519;
  --color-primary-text: #960519;
  --color-primary-contrast: #ffffff;
  --color-brand-subtle: rgba(150, 5, 25, 0.06);
  --focus-ring: 0 0 0 3px rgba(150, 5, 25, 0.35);
}

:root[data-theme="dark"]:not(.color-blind):not(.red-green) {
  --color-primary: #eb635f;
  --color-primary-text: #eb635f;
  --color-primary-contrast: #111418;
  --color-brand-subtle: rgba(235, 99, 95, 0.12);
  --focus-ring: 0 0 0 3px rgba(235, 99, 95, 0.4);
}

/* The "Standard" palette tile previews this site's own primary. */
.pref-palette-bar--default-1 {
  background: #960519;
}

/* Hero */
.pd-hero {
  padding-block: var(--space-3xl);
  text-align: center;
}

.pd-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Brand lockups (css/brand-lockup.css) take only their width from here; the
   tagline scales with it. The bottom margin clears the tagline's descenders,
   which hang below the image box. */
.pd-hero-lockup {
  width: min(100%, 30rem);
  margin: 0 auto var(--space-2xl);
}

.pd-hero .section-eyebrow {
  margin-bottom: var(--space-md);
}

.pd-hero .hero-title {
  max-width: 44rem;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
}

.pd-hero .hero-subtitle {
  max-width: 40rem;
}

.pd-hero .hero-actions {
  justify-content: center;
  margin-bottom: 0;
}

/* Mission */
.pd-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-pillar {
  padding: var(--space-xl);
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
}

.pd-pillar-title {
  margin: 0 0 var(--space-sm);
  font-size: 1.125rem;
  font-weight: 600;
}

.pd-pillar-text {
  margin: 0;
  color: var(--color-text-muted);
}

/* Product sections */
.pd-product {
  overflow-x: clip;
  text-align: center;
}

.pd-product--mapidu {
  background: var(--color-bg-elevated);
}

.pd-product-header {
  max-width: 44rem;
  margin: 0 auto var(--space-2xl);
}

.pd-product-name {
  margin: 0;
  line-height: 0;
}

/* A product wordmark is 5.5–8rem tall; the width follows from its viewBox
   (IMAGE_BOX in pedema-render.js). */
.pd-product-lockup {
  margin: 0 auto var(--space-xl);
}

.pd-product--mapidu .pd-product-lockup {
  width: calc(clamp(5.5rem, 16vw, 8rem) * 1475 / 438);
}

.pd-product--didema .pd-product-lockup {
  width: calc(clamp(5.5rem, 16vw, 8rem) * 1569 / 447);
}

.pd-status {
  display: inline-block;
  margin: 0 0 var(--space-md);
  padding: var(--space-xs) var(--space-md);
  border: var(--border-hairline) solid currentColor;
  border-radius: var(--radius-full);
  color: var(--pd-didema-accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pd-product-eyebrow {
  margin: 0 0 var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pd-product--mapidu .pd-product-eyebrow {
  color: var(--pd-mapidu-accent);
}

.pd-product--didema .pd-product-eyebrow {
  color: var(--pd-didema-accent);
}

.pd-product-title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.pd-product-text {
  max-width: 38rem;
  margin: 0 auto var(--space-xl);
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

.pd-product-text:last-child {
  margin-bottom: 0;
}

/* Mapidu stage: desktop screenshot with a phone in front of it */
.pd-stage {
  position: relative;
  max-width: 62rem;
  margin-inline: auto;
  padding-bottom: var(--space-xl);
}

.pd-shot-desktop {
  margin: 0 12% 0 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--border-hairline) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--pd-shot-shadow);
}

.pd-shot-desktop img,
.pd-gallery-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.pd-shot-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(6.5rem, 22%, 12.5rem);
  aspect-ratio: 1 / 2;
  margin: 0;
  padding: 0.35rem;
  background: var(--pd-bezel);
  border-radius: 1.75rem;
  box-shadow: var(--pd-shot-shadow);
}

.pd-shot-phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 1.45rem;
}

/* Didema gallery: the first image spans the row, two below it */
.pd-gallery {
  display: grid;
  gap: var(--space-xl) var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

@media (min-width: 720px) {
  .pd-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .pd-gallery-item:first-child {
    grid-column: 1 / -1;
  }
}

.pd-gallery-figure {
  margin: 0;
}

.pd-gallery-frame {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--border-hairline) solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--pd-shot-shadow);
}

.pd-gallery-caption {
  margin-top: var(--space-sm);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* Without JavaScript */
.pd-noscript {
  padding-block: var(--space-2xl);
}

/* Scroll reveal */
.pd-reveal {
  opacity: 0;
  transform: translateY(1rem);
  transition:
    opacity 400ms var(--ease-out),
    transform 400ms var(--ease-out);
}

.pd-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion-override]) .pd-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

:root[data-motion-override="reduce"] .pd-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media print {
  .pd-reveal {
    opacity: 1;
    transform: none;
  }
}
