/* =========================================================
   Exacivique — Base stylesheet
   ========================================================= */

:root {
  --color-primary: #000091;
  --color-bg: #FDFCF9;
  --color-accent: #E1000F;
  --color-white: #FFFFFF;

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font-stack);
  background-color: var(--color-bg);
  color: var(--color-primary);
  line-height: 1.5;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* Mobile-first breakpoints */
@media (min-width: 600px) {
  .container {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: 2rem;
  }
}

/* ---------- Utilities ---------- */
.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;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  min-height: 44px;
  min-width: 44px;
  line-height: 1.2;
}

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

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--color-accent);
}

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

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background-color: var(--color-primary);
  color: var(--color-white);
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-white);
  border-bottom: 1px solid rgba(0, 0, 145, 0.1);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
}

.site-header__logo img {
  height: 36px;
  width: auto;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  margin-inline: auto;
}

.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-white);
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 145, 0.1);
  display: none;
}

.site-nav--open {
  display: flex;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-nav__list a {
  text-decoration: none;
  font-weight: 500;
}

.site-nav__cta {
  width: 100%;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    padding: 0;
    border-bottom: none;
    background-color: transparent;
  }

  .site-nav__list {
    flex-direction: row;
    gap: 2rem;
  }

  .site-nav__cta {
    width: auto;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding-block: 2.5rem;
  margin-top: 3rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
}

.site-footer__tagline {
  font-weight: 600;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.site-footer__list a {
  color: var(--color-white);
  text-decoration: underline;
}

.site-footer__copyright {
  font-size: 0.875rem;
  opacity: 0.9;
}

.site-footer__disclaimer {
  font-size: 0.75rem;
  opacity: 0.75;
  max-width: 640px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .site-footer__inner {
    text-align: left;
  }

  .site-footer__list {
    flex-direction: row;
    gap: 2rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 2.5rem;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero__title {
  font-size: 1.875rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero__subtext {
  font-size: 1.0625rem;
  margin-bottom: 1.5rem;
  max-width: 42ch;
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero__ctas .btn {
  width: 100%;
}

.hero__disclaimer {
  font-size: 0.75rem;
  color: rgba(0, 0, 145, 0.7);
}

.hero__media img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

@media (min-width: 768px) {
  .hero__inner {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }

  .hero__content {
    flex: 1;
  }

  .hero__media {
    flex: 1;
  }

  .hero__title {
    font-size: 2.75rem;
  }

  .hero__ctas {
    flex-direction: row;
  }

  .hero__ctas .btn {
    width: auto;
  }
}

/* ---------- Problem ---------- */
.problem {
  padding-block: 2.5rem;
  background-color: var(--color-white);
}

.problem__inner {
  max-width: 60ch;
}

.problem__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.problem__body {
  margin-bottom: 1rem;
}

.problem__closing {
  font-weight: 600;
}

/* ---------- Solution ---------- */
.solution {
  padding-block: 2.5rem;
}

.solution__title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 30ch;
}

.solution__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.solution-card {
  background-color: var(--color-white);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 145, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.solution-card__title {
  font-size: 1.125rem;
}

@media (min-width: 600px) {
  .solution__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .solution__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Screenshots ---------- */
.screenshots {
  padding-block: 2.5rem;
  background-color: var(--color-white);
}

.screenshots__title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.screenshots__grid {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.screenshot-card {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
  text-align: center;
}

.screenshot-card__frame {
  aspect-ratio: 300 / 533;
  border-radius: 1.25rem;
  border: 8px solid var(--color-primary);
  overflow: hidden;
  background-color: var(--color-bg);
}

.screenshot-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screenshot-card__caption {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
}

@media (min-width: 768px) {
  .screenshots__grid {
    overflow-x: visible;
    flex-wrap: wrap;
    justify-content: center;
  }

  .screenshot-card {
    width: 240px;
  }
}

/* ---------- Why Exacivique ---------- */
.why {
  padding-block: 2.5rem;
}

.why__title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.why__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.why-card {
  background-color: var(--color-white);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 145, 0.08);
}

.why-card__icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.5rem;
}

.why-card__title {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 600px) {
  .why__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .why__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Who is it for ---------- */
.who {
  padding-block: 2.5rem;
  background-color: var(--color-white);
}

.who__inner {
  max-width: 60ch;
}

.who__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.who__body {
  margin-bottom: 1rem;
}

.who__list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.who__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

/* ---------- Official Resources ---------- */
.resources {
  padding-block: 2.5rem;
}

.resources__inner {
  max-width: 60ch;
}

.resources__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.resources__body {
  margin-bottom: 1.25rem;
}

.resources__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resources__list a {
  text-decoration: underline;
  font-weight: 500;
}

/* ---------- Download CTA ---------- */
.download-cta {
  padding-block: 3rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
}

.download-cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.download-cta__title {
  font-size: 1.5rem;
}

.download-cta__body {
  max-width: 42ch;
}

.download-cta__badge img {
  width: 215px;
  height: auto;
}

/* ---------- iOS coming soon ---------- */
.ios-soon {
  padding-block: 2.5rem;
  text-align: center;
}

.ios-soon__title {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
}

.ios-soon__body {
  margin-bottom: 1.25rem;
}

.ios-soon__cta {
  cursor: default;
  opacity: 0.85;
}

/* ---------- FAQ ---------- */
.faq {
  padding-block: 2.5rem;
  background-color: var(--color-white);
}

.faq__inner {
  max-width: 70ch;
}

.faq__title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid rgba(0, 0, 145, 0.12);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
}

.faq-item__question {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.faq-item__question::after {
  content: "+";
  font-size: 1.25rem;
  flex-shrink: 0;
}

.faq-item[open] .faq-item__question::after {
  content: "−";
}

.faq-item__answer {
  margin-top: 0.75rem;
}

/* ---------- Legal pages ---------- */
.legal {
  padding-block: 2.5rem;
}

.legal__inner {
  max-width: 720px;
}

.legal__title {
  font-size: 1.5rem;
  margin-bottom: 0.375rem;
}

.legal__subtitle {
  color: rgba(0, 0, 145, 0.7);
  margin-bottom: 1.25rem;
}

.legal-meta {
  font-size: 0.85rem;
  color: rgba(0, 0, 145, 0.7);
  background-color: var(--color-white);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 1.4em;
}

.legal-toc {
  background-color: var(--color-white);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 1.2em 0 2em;
}

.legal-toc h2 {
  margin-top: 0;
  font-size: 1rem;
}

.legal-toc ol {
  list-style: decimal;
  margin: 0.4em 0 0;
  padding-left: 1.2em;
}

.legal-toc li {
  margin: 0.25em 0;
}

.legal h2 {
  font-size: 1.15rem;
  margin: 2.2em 0 0.5em;
  border-bottom: 2px solid rgba(0, 0, 145, 0.12);
  padding-bottom: 6px;
}

.legal h3 {
  font-size: 1rem;
  margin: 1.4em 0 0.4em;
}

.legal p,
.legal ul,
.legal ol {
  margin: 0.6em 0;
}

.legal ul,
.legal ol {
  list-style: disc;
  padding-left: 1.3em;
}

.legal li {
  margin: 0.3em 0;
}

.legal a {
  text-decoration: underline;
}

.legal-box {
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0.9em 0;
  font-size: 0.95rem;
}

.legal-box--summary {
  background-color: var(--color-white);
}

.legal-box--warn {
  background-color: #fff6e5;
  border: 1px solid #e8b93a;
}

.legal-box--ok {
  background-color: #eaf5ee;
  border: 1px solid #3a9a5c;
}

.legal-note {
  font-size: 0.85rem;
  color: rgba(0, 0, 145, 0.7);
}

.legal-placeholder {
  background-color: #fdecea;
  border: 1px dashed #c0392b;
  color: #8a2f24;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8em 0;
  font-size: 0.92rem;
}

.legal th,
.legal td {
  border: 1px solid rgba(0, 0, 145, 0.12);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.legal th {
  background-color: var(--color-white);
}

.legal-backtotop {
  display: inline-block;
  margin-top: 1.2em;
  font-size: 0.85rem;
}

.legal-footer {
  margin-top: 3em;
  padding-top: 1.2em;
  border-top: 1px solid rgba(0, 0, 145, 0.12);
  font-size: 0.8rem;
  color: rgba(0, 0, 145, 0.7);
}

.legal-footer__links {
  margin-top: 0.8em;
}

/* ---------- Consent banner ---------- */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background-color: var(--color-white);
  border-top: 1px solid rgba(0, 0, 145, 0.15);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.consent-banner__inner {
  max-width: 1200px;
  margin-inline: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.consent-banner__text {
  font-size: 0.875rem;
  margin: 0;
}

.consent-banner__actions {
  display: flex;
  gap: 0.75rem;
}

.consent-banner__actions .btn {
  flex: 1;
}

@media (min-width: 768px) {
  .consent-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
  }

  .consent-banner__text {
    max-width: 60ch;
  }

  .consent-banner__actions .btn {
    flex: none;
  }
}
