/* Tokens mirrored from libs/shared-styles (Inter + SPA ground/ink + slate CTAs).
   Inter itself is loaded via <link> in index.html so it does not block CSS parsing. */
:root {
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-subtle: #64748b;
  --band-white: #ffffff;
  --band-grey: #f1f5f9; /* slate-100 — reads as a distinct band next to white */
  --border: #e2e8f0;
  --border-dashed: #cbd5e1;
  --primary: #1e293b; /* slate-800 */
  --primary-hover: #0f172a; /* slate-900 */
  --primary-active: #334155; /* slate-700 */
  --primary-contrast: #ffffff;
  --focus: #334155;
  --wrap: 52rem;
  --pad-x: 1.5rem;
  --band-y: clamp(3.5rem, 8vw, 5.5rem);
}

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

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    Helvetica,
    Arial,
    sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--band-white);
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

/* Icon sprite host — symbols are referenced via <use>, never rendered directly. */
.sprite {
  display: none;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2 * var(--pad-x)));
  margin-inline: auto;
}

.band {
  padding-block: var(--band-y);
  border-top: 1px solid var(--border);
}

.band--white {
  background: var(--band-white);
}

.band--grey {
  background: var(--band-grey);
}

/* Hero */
.hero {
  padding-block: clamp(4rem, 10vw, 6.5rem) var(--band-y);
  border-top: none;
}

.hero__logo {
  width: min(16rem, 72vw);
  height: auto;
  margin-bottom: 2rem;
}

.hero__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.hero__lede {
  margin: 0;
  max-width: 40rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* App sections */
.app {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.app__icon {
  width: 4rem;
  height: 4rem;
  border-radius: 0.85rem;
}

/* Matches vehicle-tablet-pwa header: cyan KFZ badge + app icon */
.app__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.app__kfz-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 0.85rem;
  background: #0891b2; /* cyan-600 — same as om-app-logo-badge palette="cyan" */
  border: 1px solid #0e7490; /* cyan-700 */
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.18),
    0 2px 6px rgba(15, 23, 42, 0.1);
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow:
    0 1px 4px rgba(15, 23, 42, 0.6),
    0 2px 19px rgba(15, 23, 42, 0.6);
}

.app__body {
  min-width: 0;
}

.app h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.app__tldr {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--primary);
  color: var(--primary-contrast);
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--primary:active {
  background: var(--primary-active);
}

.btn--secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}

.btn--secondary:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}

.btn--secondary:active {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

/* Dialogs */
.modal {
  padding: 0;
  border: none;
  border-radius: 1rem;
  background: transparent;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  color: inherit;
}

.modal::backdrop {
  background: rgb(15 23 42 / 0.45);
}

.modal__panel {
  width: min(calc(28rem + 100px), calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: var(--band-white);
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgb(15 23 42 / 0.18);
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
}

.modal__header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.35rem -0.35rem 0 0;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--ink-subtle);
  cursor: pointer;
  flex-shrink: 0;
}

.modal__close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.modal__close:hover {
  background: var(--band-grey);
  color: var(--ink);
}

.modal__close:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.modal__body {
  padding: 0.85rem 1.25rem 1.35rem;
}

.modal__body > p {
  margin: 0 0 1.15rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.info-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 0.85rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: var(--band-grey);
  border: 1px solid var(--border);
}

.info-callout__icon {
  display: grid;
  place-items: start;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.05rem;
  color: var(--ink-subtle);
}

.info-callout__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.info-callout__body {
  min-width: 0;
}

.info-callout__body h4 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.steps li + li {
  margin-top: 0.4rem;
}

.steps strong {
  font-weight: 600;
  color: var(--ink);
}

.info-callout__hint {
  margin: 0.75rem 0 0;
  color: var(--ink-subtle);
  line-height: 1.5;
}

/* Placeholder for apps that do not exist yet */
.upcoming {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.5rem;
  align-items: center;
  padding: 1.75rem;
  border: 1px dashed var(--border-dashed);
  border-radius: 1rem;
}

.upcoming__icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 0.85rem;
  background: var(--band-white);
  color: var(--ink-subtle);
}

.upcoming__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.upcoming__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.upcoming__text {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-subtle);
  line-height: 1.55;
}

/* Footer */
.footer {
  padding-block: 2.5rem;
}

.footer__meta {
  margin: 0;
  color: var(--ink-subtle);
}

.footer__meta a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer__meta a:hover {
  color: var(--ink-muted);
}

.footer__meta a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Entrance — restrained; off when reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .hero .wrap,
  .app,
  .upcoming,
  .footer .wrap {
    animation: rise 0.55s ease both;
  }

  .app {
    animation-delay: 0.06s;
  }

  .band--white .app {
    animation-delay: 0.12s;
  }

  .upcoming {
    animation-delay: 0.16s;
  }

  .footer .wrap {
    animation-delay: 0.2s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 36rem) {
  .app,
  .upcoming {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .upcoming {
    padding: 1.35rem;
  }

  .app__icon,
  .app__kfz-badge {
    width: 3.25rem;
    height: 3.25rem;
  }

  .app__kfz-badge {
    font-size: 1.05rem;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .modal__actions .btn {
    width: 100%;
  }
}
