/*
 * adsumus.ch — marketing site styles.
 * Colours, type and shape come from tokens.css, a copy of
 * static/brand/tokens.css (kept identical by marketing/marketing.test.js).
 * No web fonts: the brand's system font stack. Two scripts:
 * assets/theme.js (the light/dark switch) and assets/presence.js (the
 * attendance squares behind the hero).
 */

:root {
  --page-max: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-gap: clamp(3.5rem, 8vw, 6rem);
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px rgb(0 0 0 / 0.08);
  --shadow-shot: 0 2px 6px rgb(0 0 0 / 0.08), 0 24px 60px rgb(0 0 0 / 0.16);
  --surface: #ffffff;
  --tint: var(--color-secondary-50);
  --ink: var(--color-surface-950);
  --ink-muted: var(--color-surface-700);
  --line: var(--color-surface-100);
  --accent: var(--color-primary-500);
  --accent-strong: var(--color-primary-700);
  --accent-ink: #ffffff;
  --focus: var(--color-primary-600);
  color-scheme: light dark;
}

/* Dark: the device's setting unless the visitor picked light, or the
   visitor's pick (classes set by assets/theme.js) */
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --surface: var(--color-surface-900);
    --tint: #261316;
    --ink: var(--color-surface-50);
    --ink-muted: var(--color-surface-300);
    --line: var(--color-surface-800);
    --accent: var(--color-primary-500);
    --accent-strong: var(--color-primary-300);
    --focus: var(--color-primary-300);
    --bg: var(--color-surface-950);
  }
}

:root.dark {
  --surface: var(--color-surface-900);
  --tint: #261316;
  --ink: var(--color-surface-50);
  --ink-muted: var(--color-surface-300);
  --line: var(--color-surface-800);
  --accent: var(--color-primary-500);
  --accent-strong: var(--color-primary-300);
  --focus: var(--color-primary-300);
  --bg: var(--color-surface-950);
  color-scheme: dark;
}

:root.light {
  color-scheme: light;
}

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

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

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

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

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

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 5.2vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-base);
}

.skip-link:focus {
  top: 1rem;
}

/* Grid and flex children may shrink below their content (screenshots carry
   width attributes of 1280px); without this a single-column grid on a phone
   grows to the image's intrinsic width. */
.hero .wrap > *,
.feature > *,
.pricing > *,
.contact > *,
.pains > *,
.grid-3 > *,
.trust > *,
.steps > * {
  min-width: 0;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.2rem;
  margin-right: auto;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.site-nav {
  display: none;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--ink-muted);
  font-weight: 500;
}

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

@media (min-width: 56rem) {
  .site-nav {
    display: flex;
  }
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-target);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color var(--duration-fast),
    border-color var(--duration-fast),
    transform var(--duration-fast);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

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

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

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

.btn-secondary:hover {
  border-color: var(--ink);
}

.btn-small {
  min-height: 2.5rem;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Hero -------------------------------------------------------------------- */

.hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0 var(--section-gap);
  background:
    radial-gradient(
      60rem 30rem at 85% -10%,
      color-mix(in srgb, var(--accent) 14%, transparent),
      transparent 70%
    ),
    var(--bg);
}

.hero .wrap {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 60rem) {
  .hero .wrap {
    grid-template-columns: 1fr 1.15fr;
  }
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.75rem;
}

.lead {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--ink-muted);
  max-width: 38rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0.75rem;
}

.cta-note {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.hero-visual {
  position: relative;
  padding-bottom: 2.5rem;
}

.shot {
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-shot);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.shot-phone {
  border-radius: 1.6rem;
  border: 6px solid var(--color-surface-900);
  background: var(--color-surface-900);
}

.shot-phone img {
  border-radius: 1.1rem;
}

.hero-visual .shot-desktop {
  width: 92%;
}

.hero-visual .shot-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34%;
  max-width: 15rem;
}

/* Sections ---------------------------------------------------------------- */

.section {
  padding: var(--section-gap) 0;
}

.section-tint {
  background: var(--tint);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section-head p {
  color: var(--ink-muted);
  font-size: 1.1rem;
}

.pains {
  display: grid;
  gap: 1rem;
}

@media (min-width: 48rem) {
  .pains {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-container);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.card p:last-child {
  margin-bottom: 0;
}

.card .before {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

/* Feature rows: text + screenshot, alternating */

.feature {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

@media (min-width: 56rem) {
  .feature {
    grid-template-columns: 1fr 1.1fr;
  }

  .feature.reverse .feature-text {
    order: 2;
  }
}

.feature-text h3 {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
}

.feature-text > p {
  color: var(--ink-muted);
  font-size: 1.1rem;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.55rem;
}

.ticks li {
  position: relative;
  padding-left: 1.9rem;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 75% no-repeat;
}

.feature-visual {
  display: flex;
  justify-content: center;
}

.feature-visual .shot-phone {
  width: min(19rem, 72%);
}

.feature-visual .duo {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  gap: 1rem;
  align-items: end;
  width: 100%;
}

/* Smaller feature grid */

.grid-3 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 40rem) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-container);
  background: var(--color-secondary-100);
  margin-bottom: 0.9rem;
  font-size: 1.35rem;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) .icon {
    background: #3a1d22;
  }
}

:root.dark .icon {
  background: #3a1d22;
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card .muted,
.muted {
  color: var(--ink-muted);
}

.small {
  font-size: 0.92rem;
}

/* Trust */

.trust {
  display: grid;
  gap: 1rem;
}

@media (min-width: 48rem) {
  .trust {
    grid-template-columns: repeat(2, 1fr);
  }
}

.trust .card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1rem;
  align-items: start;
}

.trust .icon {
  grid-row: span 2;
  margin: 0;
}

/* Steps */

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 56rem) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 3.25rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.steps li.card {
  padding-top: 4.5rem;
}

/* Pricing */

.pricing {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .pricing {
    grid-template-columns: 1.2fr 1fr;
  }
}

.pricing .card {
  border: 2px solid var(--accent);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* FAQ */

.faq {
  max-width: 48rem;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.25rem 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.5rem 1rem 0;
  position: relative;
  font-weight: 600;
  font-size: 1.1rem;
  min-height: var(--touch-target);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 0.25rem;
  top: 0.75rem;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent-strong);
  transition: transform var(--duration-fast);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details > div {
  padding: 0 0 1rem;
  color: var(--ink-muted);
}

/* Contact form */

.contact {
  display: grid;
  gap: 2rem;
}

@media (min-width: 56rem) {
  .contact {
    grid-template-columns: 1fr 1.3fr;
  }
}

form .field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

form .row {
  display: grid;
  gap: 0 1rem;
}

@media (min-width: 40rem) {
  form .row {
    grid-template-columns: 1fr 1fr;
  }
}

label,
legend {
  font-weight: 600;
  font-size: 0.95rem;
}

.req {
  color: var(--accent-strong);
}

input[type='text'],
input[type='email'],
select,
textarea {
  font: inherit;
  width: 100%;
  min-height: var(--touch-target);
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-surface-300);
  border-radius: var(--radius-base);
  background: var(--surface);
  color: var(--ink);
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-top: 0.4rem;
}

.checks label {
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: var(--touch-target);
}

.checks input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: var(--ink-muted);
}

/* Simple text pages (Impressum, Datenschutz, Danke) */

.prose {
  max-width: 46rem;
  padding: clamp(2.5rem, 6vw, 4rem) 0 var(--section-gap);
}

.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.placeholder {
  background: var(--color-warning-200);
  color: var(--color-surface-950);
  padding: 0 0.25rem;
  border-radius: 0.2rem;
}

/* Language switch in the header: DE ⇄ EN (the full name is its label) */
.lang-switch {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.lang-switch:hover {
  color: var(--ink);
}

/* Light/dark switch in the header; only with JavaScript (theme.js adds .js),
   the moon in light mode, the sun in dark mode */
.theme-toggle {
  display: none;
}

.js .theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

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

.theme-toggle .icon-sun,
:root.dark .theme-toggle .icon-moon {
  display: none;
}

:root.dark .theme-toggle .icon-sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) .theme-toggle .icon-moon {
    display: none;
  }

  :root:not(.light) .theme-toggle .icon-sun {
    display: block;
  }
}

/* Very narrow phones: the logo alone, tighter header */
@media (max-width: 24rem) {
  .site-header .wrap {
    gap: 0.6rem;
  }

  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Presence grid ------------------------------------------------------------
   The app's attendance squares behind the hero, drawn by assets/presence.js
   on a canvas: strongest towards the top right, faint behind the text, with
   a cone of light that follows the mouse. */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

.presence {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Phones: the header button says only "Demo" */
.btn-short {
  display: none;
}

@media (max-width: 30rem) {
  .btn-long {
    display: none;
  }

  .btn-short {
    display: inline;
  }
}
