/* Digital Mind Agency · Design-System
 * Importiert + adaptiert aus oliver-albrecht-website/prototypes/brand-konzept-c.
 * Mediterranean Light / Premium. Teal auf hell, Gold auf dunkel.
 */

/* ---------- Fonts (self-hosted Geist) ---------- */
@font-face { font-family:'Geist'; font-style:normal; font-weight:400 800; font-display:swap;
  src:url('/assets/fonts/geist-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Geist'; font-style:normal; font-weight:400 800; font-display:swap;
  src:url('/assets/fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  /* Backgrounds */
  --bg: #FBF7F1;
  --bg-warm: #F4ECE0;
  --bg-cool: #EFEBE3;
  --surface: #FFFFFF;
  --surface-glass: rgba(255,255,255,0.72);
  --link: #084E4D;

  /* Text */
  --text: #0A2540;            /* Premium Navy, nie pures Schwarz */
  --ink: #0A2540;             /* Fixed dark canvas, including in dark mode */
  --text-muted: #475C73;
  --text-soft: #54677C;       /* WCAG AA: 4.97:1 auf --bg-warm (war #6B7F94, 3.52) */

  /* Accent: Deep Teal (Mediterranean) */
  --accent: #0C6E6D;
  --accent-bright: #0F8A88;
  --accent-hover: #0E8280;    /* WCAG AA: 4.64:1 mit Weiss. accent-bright gibt nur 4.19 und
                                 traegt darum keinen 16px-Buttontext, ist aber als Flaeche
                                 ohne Text (Icon-Ringe, Fokus-Outline) weiter in Ordnung. */
  --accent-deep: #084E4D;
  /* Accent as a foreground (borders, ticks, icons, text on a card). Dark theme
     swaps it to a light teal; --accent-deep stays a background colour. */
  --accent-ink: #084E4D;
  /* Edge of a control that is not chosen yet: 3:1 against --surface and --bg. */
  --control-edge: #8A7E69;
  --select-fill: color-mix(in srgb, var(--accent-ink) 10%, var(--surface));
  --accent-glow: rgba(12,110,109,0.18);
  --accent-soft: rgba(12,110,109,0.08);

  /* Gold (nur auf dunklem Grund, weil Teal auf Navy verschwindet) */
  --gold: #C99A5C;
  --gold-soft: #F0E0C7;
  /* Label colour on a gold or gold-soft fill. Light: the usual text. Dark: --text turns cream and would vanish on the pale gold. */
  --on-gold: var(--text);
  --gold-deep: #806026;       /* WCAG AA: 4.95:1 auf --bg-warm (war #A6803D, 3.10), Akzent-Labels auf hellem Grund */

  --success: #15803D;
  --warm: #B8462F;
  --error: #B83B3B;
  --error-bg: #FDF0F0;
  --border: #E8DFD0;
  --border-strong: #D4C9B5;

  /* Pfeil für native Selects (gleiche Technik wie partner.css, PR #206):
     ein SVG im background-image erbt kein currentColor, darum liegen die
     Strichfarben als Tokens in den data:-URIs beider Themes. Im hellen
     Zustand hat #475C73 auf --surface #FFFFFF ein Verhältnis von 6.89:1. */
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23475C73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  /* Text on the dark accent-deep panels (.band, dark promo boxes) */
  --on-dark: #EAF4F3;
  --on-dark-lead: #BFE0DD;
  --on-dark-soft: #CFE7E5;

  --shadow-card: 0 1px 2px rgba(10,37,64,0.04), 0 8px 24px -12px rgba(10,37,64,0.12);
  --shadow-lift: 0 4px 8px rgba(10,37,64,0.06), 0 24px 48px -16px rgba(10,37,64,0.18);

  --radius-sm: 8px; --radius: 10px; --radius-md: 12px; --radius-lg: 16px; --radius-btn: 7px;
  --field-radius: 10px; --field-pad: 13px 16px;
  /* Text fields read as a recess: a ground one step away from the card, an edge that holds 3:1 against it
     (light: control-edge on bg-warm 3.3:1), an inset shadow, a coloured edge plus ring on focus. */
  --field-bg: var(--bg-warm);
  --field-edge: var(--control-edge);
  --field-inset: inset 0 2px 4px rgba(10,37,64,0.10);
  --field-focus: var(--accent);

  --ease-premium: cubic-bezier(0.16,1,0.3,1);
  --ease-snap: cubic-bezier(0.2,0.8,0.2,1);
  --ease-back: cubic-bezier(0.34,1.56,0.64,1);

  --sans: 'Geist', system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
  /* --mono now aliases the modern sans (Geist): labels dropped the technical monospace
     2026-06. Kept as an alias so sub-pages/blog still referencing var(--mono) stay consistent. */
  --mono: var(--sans);

  /* Layout */
  --container: 1200px;
  --pad-x: clamp(24px, 5.2vw, 44px);
  /* One section rhythm and one width for highlighted boxes (Olli 20.10.2026):
     every section pads --section-y top and bottom, so two plain sections sit
     2 x --section-y apart; CTA/teaser boxes share --container-narrow (outer
     width incl. --pad-x), so their left edges line up down the page. */
  --section-y: clamp(48px, 7vw, 84px);
  --container-narrow: 1140px;
}

/* Visitor-selected dark palette. Explicit light remains the default site design. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #091E32;
  --bg-warm: #112C43;
  --bg-cool: #163750;
  --surface: #193B53;
  --surface-glass: rgba(25,59,83,0.9);
  --text: #F8F4EC;
  --text-muted: #D1DEE4;
  --text-soft: #C0D1DB;
  --link: #A7E7E1;
  --accent-bright: #7ACFCB;
  --accent-ink: #7ACFCB;
  --control-edge: #8FA8BA;
  --accent-glow: rgba(122,207,203,0.22);
  --accent-soft: rgba(122,207,203,0.14);
  --gold: #D9AB6F;
  --gold-soft: #ECD7AF;
  --on-gold: #1A1205;
  --field-bg: #071828;
  --field-inset: inset 0 2px 6px rgba(0,0,0,0.6);
  --field-focus: var(--accent-bright);
  --gold-deep: #F3CA8E;
  --border: #355269;
  --border-strong: #60798B;
  --error: #FF9B9B;
  --success: #7FDCA4;
  --warm: #FFA58F;
  --error-bg: #4A2630;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23D1DEE4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --shadow-card: 0 1px 3px rgba(0,0,0,.25), 0 8px 24px -12px rgba(0,0,0,.5);
  --shadow-lift: 0 4px 8px rgba(0,0,0,.2), 0 24px 48px -16px rgba(0,0,0,.6);
}

/* ---------- Base / Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
@media (min-width: 768px){ body { font-size: 19px; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link, var(--accent-deep)); text-decoration: none; }
h1,h2,h3,h4 { line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 700; }
/* No lonely last word: headings balance their lines, running text avoids a
   short last line where the browser can (Olli 20.10.2026, "for." alone). */
h1,h2,h3,h4 { text-wrap: balance; }
p,li,blockquote,dd { text-wrap: pretty; }
h1 { font-size: clamp(2rem, 6vw, 4.25rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
/* No global measure cap: a left-aligned block sitting next to/under
   full-width content (a card grid, a hero image) should run the container's
   width, not sit narrower than its neighbours for no visual reason. A
   deliberate reading measure (centred lead copy, a card/highlight box, the
   blog article body) is set on the specific selector that needs it, not
   here. See src/styles/blog.css (.article .lead, .bhead p, .magnet p,
   .cta-band/.cta-mid/.cta-end p) for the places a p still wants a narrower
   cap. */
p { margin: 0 0 1rem; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--text-soft); opacity: 1; }

/* ---------- Native Selects ----------
   Nur das geschlossene Feld wird gestaltet, die aufgeklappte Liste bleibt
   nativ (gehört dem Betriebssystem). Mehrfachauswahl und Listbox-Selects
   bleiben über :not([multiple]):not([size]) unberührt. Gilt für alle
   Seiten, die tokens.css laden; der Partner-Bereich überschreibt das mit
   seinen spezifischeren .p-select-Regeln und --p-select-arrow. Der Fokusring
   kommt aus dem globalen :focus-visible oben bzw. den Seiten-Regeln und
   bleibt von appearance:none unberührt. */
select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 16px center; /* 16px: bündig mit dem Textrand aus --field-pad. Ersetzt bewusst das ältere Ziel 12-14px (Olli, 2026-08-11), damit Pfeil und Text auf derselben Kante stehen. */
  background-size: 16px 16px;
  padding-right: 45px; /* 16px Rand + 16px Pfeil + 13px Abstand zum Text */
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--pad-x); }
/* fuller layout on large screens; laptops keep the 1200px reading column */
@media (min-width: 1500px){ :root { --container: 1340px; } }
.eyebrow { font: 600 1rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .55rem; max-width: none; }
.lead { font-size: clamp(1.05rem, 2.5vw, 1.3rem); color: var(--text-muted); }

/* ---------- Buttons (immer solid, keine Ghost-Buttons) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 14px 26px; border-radius: var(--radius-btn); border: 0; cursor: pointer;
  font: 600 1rem var(--sans); min-height: 48px;
  /* Emil-Polish: schnell, ease-out, dezent */
  transition: transform .22s var(--ease-premium), box-shadow .28s var(--ease-premium), background .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-primary:active { background: var(--accent-deep); transform: translateY(0) scale(.985); }
/* auf dunklem Grund: Gold */
.btn-gold { background: var(--gold); color: #1a1205; }
.btn-gold:hover { background: var(--gold-deep); color: #fff; }
/* Niedrige Prioritaet (Back/Zurueck in Wizards), eine Stufe leiser als Gold.
   Solid fill, keine Ghost-Variante (Hard Rule 2): --text-muted traegt 6.89:1
   gegen weissen Text und hebt sich mit 6.89:1 klar von --surface ab. */
.btn-tertiary { background: var(--text-muted); color: #fff; }
.btn-tertiary:hover { background: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
html[data-theme="dark"] :is(.eyebrow,.sec-head h2 em,.res-head h2 em,.brand-statement .accent,.cta-final h2 .accent,.cta-band h2 .accent,.pcard .go,.featured .go,.post .go,.hb-go,.hx-agent) { color:var(--link); }
html[data-theme="dark"] .btn-gold:hover { color:#1a1205; }
html[data-theme="dark"] .btn-tertiary { background:#425D73; }
html[data-theme="dark"] .btn-tertiary:hover { background:#60798B; }
html[data-theme="dark"] .path-card.is-new .path-icon { color:#1a1205; }
html[data-theme="dark"] :is(.incb-g li svg,.relb a .ar,.svc-group a svg,.ct-list svg) { color:var(--accent-bright); }
html[data-theme="dark"] :is(.off-card.featured,.path-card.is-new) { border-color:var(--accent-bright); }

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