/* IQ Brain homepage — Cursor-like restyle (blocks preserved) */

.mf-brand-iq-level .ih-page {
  --ih-blue: #171717;
  --ih-ink: #171717;
  --ih-muted: #525252;
  /* Aged paper / old-film base (ref: warm grainy text panel) */
  --ih-bg: #f1ebe0;
  --ih-card: #faf6ee;
  --ih-radius: 16px;
  --ih-shadow: none;
  --ih-border: rgba(23, 23, 23, 0.09);
}

.mf-brand-iq-level .ih-page .blue {
  color: var(--ih-ink);
}

/* Page canvas: warm aged tone */
body.mf-brand-iq-level.mf-page--single {
  background: #f1ebe0;
}

body.mf-brand-iq-level.mf-page--single .mf-header {
  background: rgba(241, 235, 224, 0.88);
}

body.mf-brand-iq-level.mf-page--single .mf-footer--bo {
  background: #ebe4d6;
}

/*
 * Old-film overlays (fixed, non-interactive; below sticky header z=100):
 * ::before — fine grain
 * ::after  — visible dust flecks + hairline scratches + vignette
 */
body.mf-brand-iq-level.mf-page--single::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.38;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  background-repeat: repeat;
  animation: ih-film-grain 0.9s steps(2, end) infinite;
}

body.mf-brand-iq-level.mf-page--single::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 81;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    /* dust + hair scratches */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='480' viewBox='0 0 480 480'%3E%3Cg fill='%231a1712'%3E%3Ccircle cx='18' cy='42' r='1.4'/%3E%3Ccircle cx='67' cy='19' r='1'/%3E%3Ccircle cx='112' cy='88' r='1.8'/%3E%3Ccircle cx='156' cy='31' r='0.9'/%3E%3Ccircle cx='201' cy='120' r='1.5'/%3E%3Ccircle cx='248' cy='55' r='1.1'/%3E%3Ccircle cx='295' cy='162' r='2'/%3E%3Ccircle cx='340' cy='74' r='1.2'/%3E%3Ccircle cx='388' cy='140' r='1.6'/%3E%3Ccircle cx='430' cy='28' r='1'/%3E%3Ccircle cx='44' cy='190' r='1.3'/%3E%3Ccircle cx='98' cy='230' r='1.7'/%3E%3Ccircle cx='145' cy='178' r='0.9'/%3E%3Ccircle cx='190' cy='255' r='1.4'/%3E%3Ccircle cx='236' cy='210' r='1.1'/%3E%3Ccircle cx='282' cy='278' r='1.9'/%3E%3Ccircle cx='330' cy='225' r='1.2'/%3E%3Ccircle cx='375' cy='300' r='1.5'/%3E%3Ccircle cx='420' cy='248' r='1'/%3E%3Ccircle cx='25' cy='320' r='1.6'/%3E%3Ccircle cx='72' cy='365' r='1.2'/%3E%3Ccircle cx='120' cy='340' r='2.1'/%3E%3Ccircle cx='168' cy='395' r='1.1'/%3E%3Ccircle cx='215' cy='350' r='1.4'/%3E%3Ccircle cx='265' cy='410' r='1.8'/%3E%3Ccircle cx='312' cy='368' r='1'/%3E%3Ccircle cx='360' cy='430' r='1.5'/%3E%3Ccircle cx='408' cy='385' r='1.2'/%3E%3Ccircle cx='455' cy='455' r='1.7'/%3E%3Ccircle cx='450' cy='180' r='1.3'/%3E%3Ccircle cx='50' cy='450' r='1.1'/%3E%3Ccircle cx='180' cy='60' r='0.8'/%3E%3Ccircle cx='310' cy='15' r='1.4'/%3E%3Ccircle cx='400' cy='200' r='0.9'/%3E%3C/g%3E%3Cg stroke='%231a1712' stroke-linecap='round' fill='none'%3E%3Cpath d='M42 0 L48 480' stroke-width='1.1' opacity='0.45'/%3E%3Cpath d='M128 0 L119 480' stroke-width='0.7' opacity='0.35'/%3E%3Cpath d='M210 0 L218 480' stroke-width='1.4' opacity='0.5'/%3E%3Cpath d='M305 0 L298 480' stroke-width='0.8' opacity='0.32'/%3E%3Cpath d='M390 0 L402 480' stroke-width='1.2' opacity='0.42'/%3E%3Cpath d='M455 0 L448 480' stroke-width='0.6' opacity='0.28'/%3E%3Cpath d='M0 95 L480 88' stroke-width='0.55' opacity='0.22'/%3E%3Cpath d='M0 240 L480 248' stroke-width='0.7' opacity='0.26'/%3E%3Cpath d='M0 380 L480 372' stroke-width='0.5' opacity='0.2'/%3E%3Cpath d='M80 0 L95 220' stroke-width='0.9' opacity='0.38'/%3E%3Cpath d='M350 180 L338 480' stroke-width='1' opacity='0.4'/%3E%3Cpath d='M160 300 L480 285' stroke-width='0.65' opacity='0.24'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(
      ellipse 85% 75% at 50% 40%,
      transparent 55%,
      rgba(40, 32, 20, 0.14) 100%
    );
  background-size: 520px 520px, auto;
  background-repeat: repeat, no-repeat;
  animation: ih-film-dust 2.4s steps(3, end) infinite;
}

@keyframes ih-film-grain {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-1.5%, 1%);
  }
  100% {
    transform: translate(1%, -0.5%);
  }
}

@keyframes ih-film-dust {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(-0.8%, 0.4%);
  }
  66% {
    transform: translate(0.6%, -0.5%);
  }
  100% {
    transform: translate(0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mf-brand-iq-level.mf-page--single::before,
  body.mf-brand-iq-level.mf-page--single::after {
    animation: none;
  }
}

/* Hero */
.ih-hero {
  padding: 2rem 0 1.5rem;
  background: var(--ih-bg);
  overflow: visible;
}

.ih-hero__grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  overflow: visible;
}

@media (min-width: 900px) {
  .ih-hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2rem 2.5rem;
  }
}

.ih-hero__title {
  font-family: var(--mf-display);
  font-size: clamp(2.35rem, 6vw, 3.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ih-ink);
  margin: 0 0 0.5rem;
}

.ih-hero__subtitle {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 500;
  color: var(--ih-muted);
  margin: 0 0 1.75rem;
  letter-spacing: -0.015em;
}

.ih-hero__actions {
  margin-bottom: 1.75rem;
}

.ih-offer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 30rem;
}

.ih-offer-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 1.02rem;
  color: var(--ih-muted);
  padding: 0.75rem 0;
  border-top: 1px solid var(--ih-border);
}

.ih-offer-list li:last-child {
  border-bottom: 1px solid var(--ih-border);
}

.ih-offer-list__check {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.1rem;
  color: var(--ih-ink);
}

.ih-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.ih-hero__figure {
  --ih-hero-circle: #949d83;
  position: relative;
  width: min(100%, 360px);
  display: grid;
  place-items: center;
  overflow: visible;
}

@media (min-width: 900px) {
  .ih-hero__figure {
    width: min(100%, 400px);
  }
}

/* CSS circle — larger than shoulders; person overlaps top & bottom */
.ih-hero__circle {
  position: absolute;
  z-index: 0;
  width: 125%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ih-hero-circle);
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ih-hero__person {
  position: relative;
  z-index: 1;
  display: block;
  width: 88%;
  height: auto;
  margin: 0 auto;
  border-radius: 0;
  background: transparent;
  transform: translateX(-20px);
}

/* Latest results / countries */
.ih-results {
  background: transparent;
  border-top: 1px solid var(--ih-border);
  border-bottom: 1px solid var(--ih-border);
  padding: 3rem 0;
}

.ih-results__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ih-muted);
  margin: 0 0 1rem;
  text-align: center;
}

.ih-results__track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.ih-results__track::-webkit-scrollbar {
  display: none;
}

.ih-results__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.ih-result-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 200px;
  padding: 0.75rem 0.9rem;
  background: var(--ih-card);
  border-radius: 999px;
  border: 1px solid var(--ih-border);
}

.ih-result-card img {
  width: 38px;
  height: 25px;
  object-fit: cover;
  border-radius: 3px;
}

.ih-result-card__info {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.ih-result-card__name {
  font-weight: 600;
  color: var(--ih-ink);
}

.ih-result-card__meta {
  color: var(--ih-muted);
}

.ih-result-card__score {
  font-weight: 650;
  color: var(--ih-ink);
}

/* Sections common */
.ih-section {
  padding: 3.5rem 0;
}

.ih-section--alt {
  background: #efefee;
}

.ih-section__head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.25rem;
}

.ih-section__head h2 {
  font-family: var(--mf-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--ih-ink);
  margin: 0 0 0.75rem;
}

.ih-section__lead {
  font-size: 1.05rem;
  color: var(--ih-muted);
  margin: 0;
  line-height: 1.55;
}

.ih-section__cta {
  text-align: center;
  margin-top: 2rem;
}

/* How high IQ */
.ih-high-iq__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .ih-high-iq__grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

.ih-high-iq__text p {
  color: var(--ih-muted);
  line-height: 1.65;
  margin: 0 0 1rem;
}

.ih-high-iq__graph {
  background: var(--ih-card);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-radius);
  padding: 1rem;
}

.ih-high-iq__graph img {
  width: 100%;
  height: auto;
  display: block;
}

/* Sharp brain */
.ih-sharp__steps {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .ih-sharp__steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.ih-sharp-card {
  display: block;
  padding: 1.5rem 1.25rem;
  background: var(--ih-card);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-radius);
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.ih-sharp-card__row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.ih-sharp-card__body {
  min-width: 0;
}

.ih-sharp-card:hover {
  border-color: rgba(23, 23, 23, 0.22);
  background: #fafafa;
  transform: translateY(-1px);
}

.ih-sharp-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  color: var(--ih-ink);
}

.ih-sharp-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ih-ink);
}

.ih-sharp-card p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--ih-muted);
  line-height: 1.45;
}

/* Skills grid */
.ih-skills__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.ih-skill-card {
  background: var(--ih-card);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-radius);
  padding: 1.35rem;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s;
}

.ih-skill-card:hover {
  border-color: rgba(23, 23, 23, 0.2);
}

.ih-skill-card--featured {
  border-color: var(--ih-ink);
  box-shadow: inset 0 0 0 1px var(--ih-ink);
}

.ih-skill-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ih-ink);
}

.ih-skill-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
  color: var(--ih-muted);
}

.ih-skill-card__meta strong {
  color: var(--ih-ink);
}

.ih-skill-card__stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--ih-muted);
  margin-top: auto;
  padding-top: 0.5rem;
}

.ih-skill-card .mf-btn {
  margin-top: 0.5rem;
  align-self: flex-start;
}

/* Example question */
.ih-example__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  width: 100%;
}

.ih-example__below {
  width: 100%;
  max-width: 40rem;
  text-align: center;
}

.ih-example__below .mf-btn {
  margin-inline: auto;
}

.ih-example-puzzle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  background: var(--ih-card);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-radius);
  padding: 1.25rem 1rem 1rem;
  box-shadow: none;
  flex-wrap: wrap;
}

.ih-example-puzzle__feedback {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  flex: 0 0 100%;
  padding: 0.65rem 0.85rem;
  border-radius: calc(var(--ih-radius) - 4px);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.3;
}

.ih-example-puzzle__feedback[hidden] {
  display: none;
}

.ih-example-puzzle__feedback--correct {
  background: rgba(22, 101, 52, 0.1);
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.25);
}

.ih-example-puzzle__feedback--incorrect {
  background: rgba(185, 28, 28, 0.08);
  color: #991b1b;
  border: 1px solid rgba(185, 28, 28, 0.22);
}

.ih-example-puzzle__feedback-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .ih-example-puzzle {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.25rem;
    padding: 1rem 1.25rem;
  }
}

.ih-example-puzzle__main {
  flex: 1 1 auto;
  min-width: 0;
  background: #fafafa;
  border-radius: calc(var(--ih-radius) - 4px);
  padding: 0.75rem;
  overflow: hidden;
}

.ih-example-puzzle__main img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .ih-example-puzzle__main {
    flex: 0 1 auto;
    padding: 0.5rem 0.65rem;
  }

  .ih-example-puzzle__main img {
    max-width: min(320px, 42vw);
  }
}

@media (min-width: 900px) {
  .ih-example-puzzle__main img {
    max-width: 360px;
  }
}

.ih-example-puzzle__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  flex: 0 1 auto;
  align-content: center;
}

@media (min-width: 640px) {
  .ih-example-puzzle__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    flex: 0 0 auto;
    width: min(100%, 11.5rem);
  }
}

.ih-example-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.45rem 0.3rem 0.55rem;
  border: 1px solid var(--ih-border);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.ih-example-option:disabled {
  cursor: default;
}

.ih-example-option:hover:not(:disabled) {
  border-color: rgba(23, 23, 23, 0.28);
  background: #fff;
  transform: translateY(-1px);
}

.ih-example-option--highlight {
  border-color: var(--ih-ink);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ih-ink);
}

.ih-example-option--selected {
  border-color: rgba(23, 23, 23, 0.35);
  background: #fff;
}

.ih-example-option--correct {
  border-color: #166534;
  background: rgba(22, 101, 52, 0.08);
  box-shadow: inset 0 0 0 1px #166534;
}

.ih-example-option--wrong {
  border-color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
  box-shadow: inset 0 0 0 1px #b91c1c;
}

.ih-example-option__label {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--ih-ink);
  line-height: 1;
}

@media (min-width: 640px) {
  .ih-example-option {
    padding: 0.35rem 0.25rem 0.45rem;
    flex: 0 0 auto;
  }

  .ih-example-option__label {
    font-size: 0.7rem;
  }
}

.ih-example-option img {
  display: block;
  width: 100%;
  max-width: 71px;
  height: auto;
  aspect-ratio: 71 / 50;
}

@media (min-width: 640px) {
  .ih-example-option img {
    max-width: 56px;
  }
}

@media (min-width: 900px) {
  .ih-example-option img {
    max-width: 64px;
  }
}

.ih-example__copy {
  color: var(--ih-muted);
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

/* Statistics — interactive charts */
.ih-stats-interactive {
  background: var(--ih-bg);
}

.ih-stats__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .ih-stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .ih-stats__grid .ih-stats-block--age {
    grid-column: 1 / -1;
  }
}

.ih-stats-card {
  background: var(--ih-card);
  border: 1px solid var(--ih-border);
  border-radius: var(--ih-radius);
  padding: 1.35rem 1.1rem 1.1rem;
  box-shadow: none;
  transition: border-color 0.25s ease;
}

.ih-stats-card:hover {
  border-color: rgba(23, 23, 23, 0.2);
}

.ih-stats-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ih-ink);
  margin: 0 0 1rem;
  text-align: center;
  line-height: 1.35;
}

.ih-chart-wrap {
  position: relative;
  width: 100%;
}

.ih-chart-wrap--study {
  height: min(420px, 70vh);
}

.ih-chart-wrap--donut {
  height: min(340px, 55vh);
  max-width: 380px;
  margin-inline: auto;
}

.ih-chart-wrap--age {
  height: min(280px, 45vh);
  max-width: 820px;
  margin-inline: auto;
}

.ih-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Bottom CTA */
.ih-bottom-cta {
  padding: 3.75rem 0;
  background: #171717;
  text-align: center;
  color: #fff;
}

.ih-bottom-cta h2 {
  font-family: var(--mf-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 1.25rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.ih-bottom-cta .mf-btn--outline-light {
  background: #fff;
  color: #171717;
  border-color: #fff;
}

.ih-bottom-cta .mf-btn--outline-light:hover {
  background: #f1ebe0;
  color: #0a0a0a;
}
