/* Adaptum website. Dark navy like the app; no web fonts, no external requests. */

:root {
  color-scheme: dark;
  --canvas: #111828;
  --canvas-2: #121a2b;
  --surface: #18223a;
  --line: #2a3654;
  --text: #f3f5f9;
  --muted: #8f98ac;       /* 6.1:1 on canvas, 5.4:1 on surface */
  --primary: #2e72e9;     /* brand blue: graphics and borders only (4.0:1 on canvas) */
  --link: #7fa8f5;        /* 7.4:1 on canvas */
  --teal: #23b3b0;        /* 6.9:1 on canvas */
  --focus: #7fe0dd;
  --mark-bg: #3a2f10;
  --mark-text: #ffd97a;   /* placeholders stand out on purpose */
  --radius: 14px;
  --wrap: 68rem;
  --prose: 42rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

main { flex: 1; outline: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--text);
  color: var(--canvas);
  border-radius: 8px;
  font-weight: 600;
}
.skip:focus { top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--canvas-2); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand img { width: auto; height: 2rem; flex: none; }

.lang ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.lang a {
  display: inline-block;
  min-width: 2.75rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.lang a:hover { color: var(--text); background: var(--surface); }
.lang a[aria-current="true"] { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* Landing */
.hero { padding: 4rem 0 2.5rem; text-align: center; }
.hero-logo { width: min(15rem, 66vw); height: auto; aspect-ratio: 1265 / 898; margin: 0 auto 2rem; display: block; overflow: visible; }
/* The final state is the default, so reduced motion (and no CSS animation support) shows the finished logo. */
.hero-logo .logo-outline { opacity: 0; }
.hero h1 { margin: 0; font-size: clamp(2.4rem, 8vw, 3.6rem); line-height: 1.1; letter-spacing: -0.02em; }
.hero .lead {
  max-width: 36rem;
  margin: 1.25rem auto 0;
  font-size: clamp(1.15rem, 3.4vw, 1.35rem);
  color: var(--text);
}

.facts {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.fact {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fact h2 { margin: 0 0 0.4rem; font-size: 1.1rem; line-height: 1.35; }
.fact p { margin: 0; color: var(--muted); }
.fact-icon { display: block; width: 2.25rem; height: 2.25rem; margin-bottom: 0.9rem; }

.also { max-width: 40rem; margin: 2.5rem auto 0; text-align: center; color: var(--muted); }

.soon {
  max-width: 40rem;
  margin: 2.5rem auto 4rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: var(--canvas-2);
}
.soon strong { display: block; font-size: 1.1rem; }
.soon p { margin: 0.35rem 0 0; color: var(--muted); }

/* Text pages */
.prose { max-width: calc(var(--prose) + 4rem); padding-top: 3rem; padding-bottom: 4rem; }
.prose h1 { margin: 0 0 0.5rem; font-size: clamp(1.9rem, 6vw, 2.5rem); line-height: 1.2; letter-spacing: -0.01em; }
.prose h2 { margin: 2.5rem 0 0.6rem; font-size: 1.3rem; line-height: 1.35; }
.prose h3 { margin: 1.75rem 0 0.4rem; font-size: 1.08rem; line-height: 1.4; }
.prose p, .prose ul, .prose ol, .prose dl, .prose address { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.35rem; }
.prose address { font-style: normal; }
.prose .meta { color: var(--muted); margin-bottom: 2rem; }
.prose .intro { font-size: 1.12rem; }

.toc {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toc h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.toc ol { margin: 0; }

.card {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.card p:last-child { margin-bottom: 0; }

.path { font-weight: 600; color: var(--text); white-space: normal; }

details {
  border-top: 1px solid var(--line);
  padding: 0.25rem 0;
}
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  padding: 0.85rem 0;
  font-weight: 600;
  list-style-position: outside;
}
details[open] summary { margin-bottom: 0.25rem; }

mark.ph {
  background: var(--mark-bg);
  color: var(--mark-text);
  padding: 0.05em 0.3em;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--canvas-2); color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { padding-top: 1.75rem; padding-bottom: 1.75rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--text); text-decoration: none; display: inline-block; padding: 0.3rem 0; }
.site-footer a:hover { text-decoration: underline; }
.site-footer a[aria-current="page"] { color: var(--link); }
.site-footer p { margin: 0; }
.site-footer a.publisher img { width: 1.25rem; height: 1.25rem; margin-right: 0.35rem; vertical-align: -0.3em; border-radius: 0.3rem; }

/* Imprint: the publisher's logo above the operator's details. */
.publisher-logo { margin: 1.5rem 0 1rem; }
.publisher-logo img { display: block; width: 9rem; height: auto; }

@media (min-width: 48rem) {
  .hero { padding: 6rem 0 3rem; }
  .facts { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
  .wrap { padding-left: 2rem; padding-right: 2rem; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* The landing logo draws itself the way it reads, bottom-left to upper-right: the outline strokes
     draw on (the swoosh a beat after the legs), the gradient fill fades in over them, then the ball
     drops into the A and settles with a small bounce. Same timing as the app's AdaptumLogo. */
  .hero-logo .logo-outline { animation: logo-outline 1.3s linear both; }
  .hero-logo .logo-outline path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: logo-draw 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
  .hero-logo .logo-outline .logo-swoosh-line { animation-delay: 0.16s; }
  .hero-logo .logo-fill { animation: logo-fill 0.42s linear 0.52s both; }
  .hero-logo .logo-ball { transform-box: fill-box; transform-origin: center; animation: logo-ball 0.9s 0.82s both; }
}

@keyframes logo-outline { 0%, 40% { opacity: 1; } 72%, 100% { opacity: 0; } }
@keyframes logo-draw { to { stroke-dashoffset: 0; } }
@keyframes logo-fill { from { opacity: 0; } to { opacity: 1; } }
@keyframes logo-ball {
  0% { opacity: 0; transform: translateY(-260%); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  12% { opacity: 1; }
  52% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
  68% { transform: translateY(-16%); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  82% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0.55, 0.45, 1); }
  91% { transform: translateY(-4%); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  100% { opacity: 1; transform: translateY(0); }
}

@media print {
  .site-header, .site-footer, .skip, .lang { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  mark.ph { background: #ffe; color: #000; }
}

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