/*
 * Perinatologie marketing stylesheet — pixel-aligned with perinatologie-next
 * (OpenSans, 8px radius, neutral200 borders, 1280px container).
 */

:root {
  --maxw: 1280px;
  --ink: #2D3554;
  --ink-strong: #000000;
  --brand: #6FCF97;
  --brand-strong: #3D4875;
  --accent: #E4506B;
  --paper: #F7F8FC;
  --radius: 8px;
  --tint: #F7F8FC;
  --line: #EDEFF7; /* $neutral200 — live card/button border */
  --muted: #6A749D; /* $neutral600 */
  --text: #3D4875; /* $neutral700 */
  --font: OpenSansRegular, Helvetica, sans-serif;
  --font-semi: OpenSansSemiBold, Helvetica, sans-serif;
  --font-light: OpenSansLight, Helvetica, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  line-height: 1.65;
  font-size: 16px;
}

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

a { color: var(--brand-strong); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (max-width: 960px) {
  .container { padding-inline: 5%; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: inset 0 -1px 0 #EDEFF7;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
}

.site-header__logo { height: 32px; width: auto; }
.site-header__wordmark {
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 1.25rem;
  color: var(--ink);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 14px;
  text-decoration: none;
}

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

.site-header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.site-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.site-header__mobile { border-top: 1px solid var(--line); background: #fff; }
.site-header__mobile ul { list-style: none; margin: 0; padding: 12px 20px; display: grid; gap: 6px; }
.site-header__mobile a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-semi);
  font-weight: normal;
  padding: 8px 0;
  display: block;
}

@media (max-width: 960px) {
  .site-nav { display: none; }
  .site-header__toggle { display: flex; }
}

/* ---------- Buttons (live .btn / .btn-primary) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 19px 12px 16px;
  border-radius: 8px;
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(21, 26, 50, 0.05);
  background: #fff;
  color: var(--text);
}
.btn--primary {
  background: #fff;
  color: var(--brand);
  border-color: var(--line);
}
.btn--primary:hover { filter: brightness(0.98); }
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

/* ---------- Page / prose — live .h4 / .h6 ---------- */
.page {
  color: var(--text);
  font-family: var(--font);
}

/* Live .article: content pages are a centered 60% column (not the home layout). */
.page:not(:has(atlas-features)) {
  width: 60%;
  max-width: var(--maxw);
  margin: 30px auto;
}
@media (max-width: 720px) {
  .page:not(:has(atlas-features)) { width: 100%; }
}

.page :is(h1, h2, h3, h4) {
  color: var(--ink-strong);
  font-family: var(--font-semi);
  font-weight: normal;
  letter-spacing: 0;
  line-height: 30px;
}

/* Live main titles are .h4: 22/30 */
.page h1,
.page h2 {
  font-size: 22px;
  line-height: 30px;
  margin: 20px 0 70px;
}
.page h3 {
  font-size: 16px;
  line-height: 26px;
  color: var(--text);
  margin: 20px 0 12px;
}
.page p { margin: 0 0 1em; }
.page ul, .page ol { margin: 0 0 1em; padding-left: 1.2em; }
.page li { margin: 0.3em 0; }
.page a { color: var(--brand-strong); font-weight: normal; }
.page > :is(h1, h2, h3, p, ul, ol, table, figure) {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (max-width: 720px) {
  .page h1,
  .page h2 { margin: 30px 0 60px; }
}

/* ---------- Hero = live main-title + w-50 h6 (NOT a marketing band) ---------- */
atlas-hero {
  display: block;
  background: #fff;
  padding: 80px 0 0;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}
/* Content/article pages: hero is just the .h4 title — no extra band padding */
.page:not(:has(atlas-features)) atlas-hero {
  max-width: none;
  margin: 0;
  padding: 0;
}
atlas-hero > * {
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}
/* Beat .page h1 / .page p specificity */
.page atlas-hero h1 {
  max-width: none;
  width: 100%;
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 22px;
  line-height: 30px;
  color: var(--ink-strong);
  margin: 0 0 30px;
  padding: 0;
}
.page:not(:has(atlas-features)) atlas-hero h1 {
  margin: 20px 0 60px;
}
.page atlas-hero p {
  /* Content pages (legal, contact, …): full width — live .article-text */
  max-width: none;
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
  margin: 0;
  padding: 0;
}
/* Homepage only: live .w-50 lead under the main title */
.page:has(atlas-features) atlas-hero p {
  max-width: 50%;
}
/* Homepage has no hero CTA; content pages (demo, contact) may have one */
.page atlas-hero a {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding: 12px 19px 12px 16px;
  border-radius: 8px;
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 14px;
  text-decoration: none;
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(21, 26, 50, 0.05);
}
.page:has(atlas-features) atlas-hero a { display: none; }

@media (max-width: 720px) {
  atlas-hero { padding-top: 30px; }
  .page atlas-hero h1 { margin-bottom: 30px; }
  .page:has(atlas-features) atlas-hero p { max-width: 100%; }
}

/* ---------- Feature cards = live .card-list .card ---------- */
atlas-features {
  display: grid;
  gap: 20px 10px;
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--maxw);
  margin: 30px auto 40px;
  padding-inline: 20px;
}
/* 5-card grids (methode details) wrap to more columns */
atlas-features:has(> :nth-child(4)) {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

feature-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 20px 15px;
  min-height: 170px;
  box-shadow: 0 4px 8px rgba(21, 26, 50, 0.05);
}

feature-card .card-icon {
  display: block;
  width: 24px;
  height: 24px;
  margin: 4px 0 0;
}

.page feature-card h3 {
  margin: 20px 0 0;
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 16px;
  line-height: 26px;
  color: var(--text);
}
/* No fake green dots — live uses SVG icons */
.page feature-card h3::before { content: none; display: none; }

.page feature-card p {
  margin: 5px 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 24px;
  color: var(--muted);
}
.page feature-card p:last-child { margin-bottom: 0; }

/* Live Realtime icon */
.pulsating-circle {
  position: relative;
  width: 20px;
  height: 20px;
  margin-top: 12px;
  margin-left: 10px;
}
.pulsating-circle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 15px;
  background-color: #AAE3C1;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  animation: pulse-dot 1.7s cubic-bezier(0.455, 0.03, 0.515, 0.955) -0.4s infinite;
}
@keyframes pulse-dot {
  0% { transform: scale(0.8); }
  50% { transform: scale(1); }
  100% { transform: scale(0.8); }
}

@media (max-width: 720px) {
  atlas-features { grid-template-columns: 1fr; padding-top: 15px; }
}

/* ---------- CTA = live .banner ---------- */
atlas-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 30px auto;
  padding: 30px 7.5% 30px 30px;
  border-radius: 8px;
  background: #6FCF97 !important;
  color: #fff !important;
  text-align: left;
}
atlas-cta > :is(h1, h2, h3, p) {
  margin: 0;
  padding: 0;
}
atlas-cta :is(h1, h2, h3) {
  color: #fff !important;
  margin: 0;
  padding: 21px 0;
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 22px;
  line-height: 30px;
  max-width: 36rem;
}
atlas-cta > p:has(> a) {
  margin-left: auto;
  max-width: none;
}
.page atlas-cta a {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 12px 19px 12px 16px;
  border-radius: 8px;
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 14px;
  text-decoration: none;
  background: #fff !important;
  color: #6FCF97 !important;
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(21, 26, 50, 0.05);
  white-space: nowrap;
}
.page atlas-cta a:hover {
  background: #fff !important;
  color: #3D4875 !important;
}

@media (max-width: 720px) {
  atlas-cta { display: block; padding: 24px 20px; }
  atlas-cta > p:has(> a) { margin: 16px 0 0; }
  atlas-cta :is(h1, h2, h3) { padding-top: 5px; }
}

/* ---------- Method figure — live is bare img.img-fluid, no card chrome ---------- */
.method-figure {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto 36px;
  padding-inline: 20px;
}
.method-figure img {
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.page p.method-description-heading {
  max-width: var(--maxw);
  margin: 70px auto 80px;
  padding-inline: 20px;
  text-align: center;
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .method-description-heading { margin: 40px auto 50px; }
}

/* ---------- Timeline ---------- */
.timeline {
  max-width: var(--maxw);
  margin: 20px auto 40px;
  padding: 0 20px;
  display: grid;
  gap: 12px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.timeline-item strong {
  color: var(--accent);
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 1.1rem;
  line-height: 1.3;
}
.timeline-item div {
  color: var(--muted);
  font-size: 14px;
  line-height: 24px;
}

@media (max-width: 560px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Partners ---------- */
.partners-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  max-width: var(--maxw);
  margin: 12px auto 36px;
  padding-inline: 20px;
}
.partners-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(21, 26, 50, 0.05);
}
.partners-grid a:hover { border-color: var(--brand); }
.partners-grid img {
  max-height: 40px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.page > h3 {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
  color: var(--text);
  font-size: 16px;
  line-height: 26px;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-semi);
  font-weight: normal;
}

/* ---------- News ---------- */
.news-grid {
  display: grid;
  gap: 20px 10px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: var(--maxw);
  margin: 16px auto 28px;
  padding-inline: 20px;
}
.news-grid a {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(21, 26, 50, 0.05);
}
.news-grid a:hover { border-color: var(--brand); }
.news-grid img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--tint);
}
.news-grid h3 {
  margin: 0;
  padding: 14px 16px 16px;
  font-size: 16px;
  line-height: 26px;
  color: var(--text);
  font-family: var(--font-semi);
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 820px;
  margin: 20px auto 48px;
  padding-inline: 20px;
  display: grid;
  gap: 10px;
}
.faq-list details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  box-shadow: 0 4px 8px rgba(21, 26, 50, 0.05);
}
.faq-list summary {
  cursor: pointer;
  font-family: var(--font-semi);
  font-weight: normal;
  color: var(--text);
}
.faq-list details[open] summary { margin-bottom: 10px; }
.faq-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 24px;
}

/* ---------- Article ---------- */
.article-meta {
  max-width: var(--maxw);
  margin: 0 auto 1.25em;
  padding-inline: 20px;
  color: var(--muted);
  font-size: 14px;
}
.article-hero {
  display: block;
  max-width: var(--maxw);
  margin: 0 auto 1.5em;
  padding-inline: 20px;
}
.article-hero img { width: 100%; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c7cfe0;
  margin-top: 64px;
  padding: 56px 0 24px;
  font-family: var(--font);
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.site-footer__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 2fr 1fr 1fr;
}
.site-footer__wordmark {
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 1.25rem;
  color: #fff;
  display: block;
  margin-bottom: 12px;
}
.site-footer h2 {
  font-family: var(--font-semi);
  font-weight: normal;
  font-size: 14px;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.4;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

[x-cloak] { display: none !important; }

/* Reveal-on-scroll */
html.has-reveal :is(feature-card, atlas-cta, atlas-trust) {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
html.has-reveal :is(feature-card, atlas-cta, atlas-trust).in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.has-reveal :is(feature-card, atlas-cta, atlas-trust) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
