/* ============================================
   TextMaster → Acolad transition site
   Brand: TextMaster styling (header + body),
   Acolad styling (footer)
   ============================================ */

:root {
  /* TextMaster palette */
  --tm-navy: #0b2447;
  --tm-navy-dark: #071a36;
  --tm-navy-deep: #04122a;
  --tm-teal: #4ac2c8;
  --tm-teal-hover: #3ba7ad;
  --tm-pink: #e8356d;
  --tm-pink-hover: #cf265b;
  --tm-text: #1a1a1a;
  --tm-muted: #5a6478;
  --tm-bg-soft: #f6f8fb;
  --tm-border: #e3e8ef;

  /* Acolad palette (footer) */
  --ac-black: #111111;
  --ac-text: #f2f2f2;
  --ac-muted: #c9ccd1;

  --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1200px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* Skip link — accessibility / Lighthouse */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--tm-navy);
  color: #fff;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 600;
  z-index: 9999;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--tm-teal);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--tm-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--tm-teal); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--tm-border);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-transparent {
  background: transparent;
  border-bottom-color: transparent;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-lockup img { height: 40px; }

/* Logo swap rules — selectors scoped to .logo-lockup to outweigh the height rule */
.logo-lockup .logo-dark { display: block; }
.logo-lockup .logo-light { display: none; }

.site-header.is-transparent .logo-lockup .logo-dark { display: none; }
.site-header.is-transparent .logo-lockup .logo-light { display: block; }

/* Lang switcher color when over dark hero */
.site-header.is-transparent .lang-switcher a { color: rgba(255, 255, 255, 0.75); }
.site-header.is-transparent .lang-switcher a.active { color: #fff; }
.site-header.is-transparent .lang-switcher span { color: rgba(255, 255, 255, 0.3); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switcher {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--tm-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lang-switcher a { color: var(--tm-muted); }
.lang-switcher a.active { color: var(--tm-navy); font-weight: 600; }
.lang-switcher span { color: var(--tm-border); }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--tm-teal);
  color: #fff;
  border-color: var(--tm-teal);
}
.btn-primary:hover { background: var(--tm-teal-hover); border-color: var(--tm-teal-hover); }

.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-secondary:hover { background: #fff; color: var(--tm-navy); }

.btn-outline-dark {
  background: transparent;
  color: var(--tm-navy);
  border-color: var(--tm-navy);
}
.btn-outline-dark:hover { background: var(--tm-navy); color: #fff; }

.btn-pink {
  background: var(--tm-pink);
  color: #fff;
  border-color: var(--tm-pink);
  padding: 10px 24px;
}
.btn-pink:hover { background: var(--tm-pink-hover); border-color: var(--tm-pink-hover); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--tm-navy-deep) 0%, var(--tm-navy) 60%, #1a3a6e 100%);
  color: #fff;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.hero-content { max-width: 560px; }

.hero-image {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-image img {
  width: 115%;
  max-width: none;
  height: auto;
  margin-right: -15%;
  display: block;
}

.eyebrow {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tm-teal);
  margin-bottom: 16px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 20px;
}

.hero-sub {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.hero-login-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-decoration: underline;
}

/* ---------- Section basics ---------- */
section { padding: 80px 0; }

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px;
}

.section-eyebrow {
  color: var(--tm-teal);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin: 0 0 16px;
  color: var(--tm-navy);
  line-height: 1.2;
}

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

/* ---------- What to Expect ---------- */
.what-to-expect {
  background: var(--tm-bg-soft);
}

.expect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.expect-item {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--tm-border);
}

.expect-item .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tm-teal);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  font-weight: 700;
}

.expect-item h3 {
  font-size: 1.15rem;
  color: var(--tm-navy);
  margin: 0 0 8px;
}

.expect-item p {
  color: var(--tm-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Value props (Lia details) ---------- */
.value-props { background: #fff; }

.vp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.vp-card {
  padding: 28px;
  border: 1px solid var(--tm-border);
  border-radius: var(--radius);
}

.vp-card .arrow {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--tm-teal);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 18px;
}

.vp-card h3 {
  font-size: 1.1rem;
  color: var(--tm-navy);
  margin: 0 0 10px;
}

.vp-card p {
  color: var(--tm-muted);
  margin: 0;
  font-size: 0.95rem;
}

/* Lia feature list */
.lia-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  background: var(--tm-navy-deep);
  color: #fff;
  padding: 64px;
  border-radius: var(--radius);
}

.lia-split h3 {
  font-size: 1.8rem;
  line-height: 1.25;
  margin: 0 0 32px;
}

.lia-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.lia-feature {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.lia-feature::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--tm-teal);
  transition: width 0.3s ease;
}

.lia-feature.is-active::after { width: 100%; }

.lia-feature-title {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 16px 0;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  display: block;
  transition: color 0.2s ease;
}

.lia-feature-title:hover { color: #fff; }
.lia-feature.is-active .lia-feature-title { color: #fff; }

.lia-feature-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
  opacity: 0;
}

.lia-feature.is-active .lia-feature-detail {
  max-height: 240px;
  padding: 0 0 18px;
  opacity: 1;
}

.lia-feature-detail p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.55;
}

.lia-image {
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
}

.lia-image lottie-player {
  width: 100%;
  height: auto;
  display: block;
}

.lia-intro {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 28px;
}

/* ---------- Trust signals ---------- */
.trust {
  background: var(--tm-bg-soft);
  text-align: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 56px;
}

.stat .num {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--tm-navy);
  line-height: 1;
}

.stat .label {
  color: var(--tm-muted);
  font-size: 0.9rem;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 48px;
}

.logo-strip img {
  height: 56px;
  width: 140px;
  object-fit: contain;
  object-position: center;
  opacity: 0.75;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.logo-strip img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* ---------- FAQ ---------- */
.faq { background: #fff; }

.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--tm-border);
}

.faq-item summary {
  padding: 20px 40px 20px 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--tm-navy);
  font-size: 1.05rem;
  list-style: none;
  position: relative;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--tm-teal);
  font-weight: 400;
  line-height: 1;
}

.faq-item[open] summary::after { content: "\2212"; }

.faq-item p {
  padding: 0 0 20px;
  color: var(--tm-muted);
  margin: 0;
}

/* ---------- Final CTA band ---------- */
.final-cta {
  background: linear-gradient(135deg, var(--tm-navy) 0%, var(--tm-navy-dark) 100%);
  color: #fff;
  text-align: center;
}

.final-cta h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin: 0 0 12px;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 32px;
  font-size: 1.05rem;
}

.final-cta .hero-ctas { justify-content: center; margin-bottom: 0; }

/* ---------- Footer (Acolad-branded) ---------- */
.site-footer {
  background: var(--ac-black);
  color: var(--ac-text);
  padding: 64px 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.footer-brand img {
  height: 32px;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--ac-muted);
  font-size: 0.9rem;
  max-width: 340px;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ac-text);
  font-size: 0.95rem;
}

.footer-links a:hover { color: var(--tm-teal); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 24px;
  color: var(--ac-text);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

#ot-sdk-btn-floating-container { display: none; } /* CookiePro override if needed */

.cookie-settings {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  color: var(--ac-text);
  font-size: 0.95rem;
  text-decoration: none;
}
.cookie-settings:hover { color: var(--tm-teal); }

/* ---------- Scroll reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger child reveals when parent has .reveal-stagger */
.reveal-stagger > .reveal { transition-delay: 0s; }
.reveal-stagger.is-visible > .reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > .reveal:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > .reveal:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > .reveal:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > .reveal:nth-child(5) { transition-delay: 0.45s; }

/* Hero on-load animation: bypass IntersectionObserver, just play immediately */
.hero .reveal { animation: heroFloatIn 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both; opacity: 1; transform: none; transition: none; }
.hero .reveal:nth-child(1) { animation-delay: 0.05s; }
.hero .reveal:nth-child(2) { animation-delay: 0.15s; }
.hero .reveal:nth-child(3) { animation-delay: 0.25s; }
.hero .reveal:nth-child(4) { animation-delay: 0.35s; }
.hero .reveal:nth-child(5) { animation-delay: 0.45s; }
.hero-image.reveal { animation: heroImageIn 1s cubic-bezier(0.22, 0.61, 0.36, 1) both; animation-delay: 0.1s; opacity: 1; transform: none; transition: none; }

@keyframes heroFloatIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroImageIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero .reveal, .hero-image.reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .expect-grid, .vp-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .lia-split { grid-template-columns: 1fr; padding: 40px 24px; gap: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-image { display: none; }
  .footer-top { flex-direction: column; }
  section { padding: 56px 0; }
}

@media (max-width: 640px) {
  .logo-lockup .tagline { display: none; }
  .header-actions { gap: 12px; }
  .lang-switcher { display: none; }

  /* Hero + footer CTA buttons: full width on mobile */
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-ctas .btn {
    width: 100%;
    text-align: center;
  }

  /* Final CTA band: stack and stretch buttons */
  .final-cta .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .final-cta .hero-ctas .btn {
    width: 100%;
    text-align: center;
  }
}

/* FR + ES locales: constrain h1 size so longer strings stay within ~4 lines */
:lang(fr) .hero h1,
:lang(es) .hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
}
