/* AMI-ES public site. Colours follow the app skin. */
:root {
  --bg: #f7f9fd;
  --surface: #ffffff;
  --pill: #c8dbf1;
  --pill-soft: #e9f1fa;
  --primary: #5b8fbe;
  --primary-dark: #3f6f9c;
  --accent: #f5c77e;
  --accent-dark: #c88a30;
  --text: #1f3550;
  --muted: #4d6480;
  --border: #d5e2f0;
  --radius: 22px;
  --shadow: 0 8px 24px rgba(63, 111, 156, 0.10);
}

* { box-sizing: border-box; }

html { font-size: 112.5%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--primary-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 249, 253, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap;
}
.logo {
  display: inline-block;
  padding: 4px 22px;
  border: 4px solid var(--primary);
  border-radius: 999px;
  background: var(--surface);
  color: #111;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--pill); }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
.hero h1 { font-size: 2.3rem; line-height: 1.2; margin: 0 0 16px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 24px; }
.hero-card {
  background: var(--pill);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.hero-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hero-card li {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface);
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 600;
}
.chip {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent);
  display: grid; place-items: center;
  font-size: 1.3rem;
}

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: none;
  font-size: 1rem;
}
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: var(--pill); color: var(--text); }
.btn.secondary:hover { background: #b6cfeb; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
section { padding: 40px 0; }
section h2 { font-size: 1.7rem; margin: 0 0 8px; }
section .intro { color: var(--muted); margin: 0 0 24px; max-width: 720px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 10px 0 6px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--primary); }
.card .more { display: inline-block; margin-top: 12px; color: var(--primary-dark); font-weight: 700; }
.card.soon { opacity: 0.75; }
.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--pill-soft);
  color: var(--muted);
}

.band {
  background: var(--pill);
  border-radius: 32px;
  padding: 32px;
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.band h2 { margin: 0 0 6px; }
.band p { margin: 0; color: var(--text); }

/* Help pages */
.breadcrumb { font-size: 0.95rem; color: var(--muted); margin: 28px 0 8px; }
.page-title { font-size: 2rem; margin: 0 0 8px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; padding: 0; list-style: none; }
.toc a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--pill-soft);
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
}
.toc a:hover { background: var(--pill); }

.tuto {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin: 24px 0;
  scroll-margin-top: 90px;
}
.tuto h3 { margin: 0 0 4px; font-size: 1.3rem; }
.tuto .meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 12px; }
.tuto .app-hint { color: var(--muted); font-size: 0.9rem; margin: 12px 0 0; }
.tuto ol { padding-left: 1.3em; margin: 12px 0; }
.tuto ol li { margin: 6px 0; }
.tip {
  background: #fff7e8;
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 12px;
}
.tip p { margin: 0; }
.tip p + p, .intro p + p { margin-top: 0.6em; }
div.intro { max-width: 760px; margin: 0 0 16px; }
div.intro p { margin: 0; }

/* Portrait phone frame for the clips. */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  background: var(--pill);
  border: 8px solid #2b3c52;
  border-radius: 34px;
  overflow: hidden;
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.video-frame .placeholder {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 20px;
  color: var(--text);
}
.video-frame .placeholder .play {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface);
  display: grid; place-items: center;
  font-size: 1.6rem; color: var(--primary);
}
.video-frame.missing video { display: none; }
.video-frame.missing .placeholder { display: flex; }

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

@media (max-width: 760px) {
  html { font-size: 106%; }
  .hero { padding: 32px 0 16px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 1.8rem; }
  .tuto { grid-template-columns: minmax(0, 1fr); }
  .video-frame { max-width: 240px; margin: 0 auto; }
  .band { padding: 24px; }
}

/* Privacy policy */
.privacy { max-width: 820px; padding-bottom: 40px; }
.privacy h2 { margin: 32px 0 10px; font-size: 1.3rem; }
.privacy .muted { color: var(--muted); margin-top: 0; }
.privacy .table-wrap { overflow-x: auto; }
.privacy table { width: 100%; border-collapse: collapse; background: var(--surface); }
.privacy th, .privacy td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.privacy th { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Home: hero with the teaser */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hero-home {
  position: relative;
  overflow: hidden;
  padding: 56px 0 64px;
  background:
    radial-gradient(600px 420px at 85% 20%, rgba(245, 199, 126, 0.28), transparent 70%),
    radial-gradient(700px 520px at 10% 90%, rgba(91, 143, 190, 0.20), transparent 70%),
    linear-gradient(180deg, #eef4fb 0%, var(--bg) 100%);
}
.hero-home .wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 48px; }
.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
}
.hero-home h1 { font-size: 2.8rem; letter-spacing: -0.01em; }
.hl {
  white-space: nowrap;
  background: linear-gradient(transparent 62%, rgba(245, 199, 126, 0.65) 62%);
  padding: 0 4px;
}
.trust {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  color: var(--muted); font-size: 0.92rem;
}
.trust li::before { content: "✓"; color: var(--primary); font-weight: 800; margin-right: 6px; }

.hero-phone { margin: 0; justify-self: center; width: min(320px, 100%); }
.phone {
  position: relative;
  aspect-ratio: 9 / 16;
  border: 10px solid #22344b;
  border-radius: 40px;
  overflow: hidden;
  background: #e8f0fa;
  box-shadow: 0 30px 60px rgba(31, 53, 80, 0.25), 0 8px 18px rgba(31, 53, 80, 0.15);
  transform: rotate(2deg);
}
.phone video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-controls { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.ctrl {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit; font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
}
.ctrl:hover { background: var(--pill-soft); }
.ctrl[aria-pressed="true"] { background: var(--pill); }

/* Home: feature rows with screenshots */
.feature {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  margin: 24px 0;
  padding: 24px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.feature.reverse { grid-template-columns: minmax(0, 1fr) 200px; }
.feature.reverse img { order: 2; }
.feature img {
  width: 100%; height: auto;
  aspect-ratio: 9 / 13;
  object-fit: cover;
  object-position: top;
  border-radius: 24px;
  border: 6px solid #22344b;
  box-shadow: 0 14px 30px rgba(31, 53, 80, 0.18);
}
.feature h3 { font-size: 1.6rem; margin: 14px 0 10px; }
.feature p { margin: 0; color: var(--muted); font-size: 1.08rem; max-width: 520px; }
.grid.mini { margin-top: 24px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }

/* Home: screenshot strip */
.gallery-section { background: linear-gradient(180deg, var(--bg), #eaf1f9 50%, var(--bg)); }
.gallery {
  list-style: none; margin: 0 auto; padding: 8px 20px 24px;
  max-width: 1080px;
  display: flex; gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.gallery li { flex: 0 0 180px; scroll-snap-align: center; text-align: center; }
.gallery img {
  width: 100%; height: auto;
  border-radius: 20px;
  border: 5px solid #22344b;
  box-shadow: var(--shadow);
}
.gallery span { display: block; margin-top: 8px; font-weight: 600; color: var(--muted); }

.values .card h3 { margin-top: 0; }

@media (max-width: 760px) {
  .hero-home h1 { font-size: 2rem; }
  .hero-home .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-phone { width: min(260px, 100%); }
  .phone { transform: none; }
  .feature, .feature.reverse { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 22px; }
  .feature img, .feature.reverse img { order: 0; max-width: 220px; margin: 0 auto; }
  .hl { white-space: normal; }
}
