/* =========================================================
   ImpARial landing page
   Palette: #55BAF9 background · black & white text
   ========================================================= */

:root {
  --blue:        #55BAF9;
  --ink:         #000000;
  --paper:       #ffffff;

  --ink-70:      rgba(0, 0, 0, .70);
  --ink-55:      rgba(0, 0, 0, .55);
  --ink-12:      rgba(0, 0, 0, .12);
  --ink-08:      rgba(0, 0, 0, .08);
  --paper-75:    rgba(255, 255, 255, .75);
  --paper-55:    rgba(255, 255, 255, .55);
  --paper-18:    rgba(255, 255, 255, .18);

  --shadow-sm:   0 2px 6px rgba(0, 0, 0, .10);
  --shadow-md:   0 14px 34px -16px rgba(0, 0, 0, .38), 0 2px 6px rgba(0, 0, 0, .08);
  --shadow-lg:   0 30px 60px -24px rgba(0, 0, 0, .50), 0 3px 10px rgba(0, 0, 0, .12);

  --r-sm:  14px;
  --r-md:  22px;
  --r-lg:  30px;
  --r-xl:  40px;

  --wrap:   1140px;
  --gutter: 1.5rem;

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

/* ---------- reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--blue);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 800;
  text-wrap: balance;
}

p { margin: 0; }

a { color: inherit; }

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

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */

.wrap {
  width: min(var(--wrap), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}
.wrap-narrow { width: min(760px, 100% - (var(--gutter) * 2)); }

.section { padding-block: clamp(3.5rem, 7.5vw, 5.75rem); }

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}

.eyebrow {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin-bottom: 1rem;
}

.section-head h2 { font-size: clamp(1.95rem, 4.6vw, 3.1rem); }

.section-head .sub {
  margin-top: 1.15rem;
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  color: var(--ink-70);
  max-width: 40rem;
  text-wrap: pretty;
}

.section-head-invert .eyebrow { color: var(--paper-55); }
.section-head-invert h2      { color: var(--paper); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.btn-sm { padding: .62rem 1.15rem; font-size: .92rem; }

.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { transform: translateY(-2px); }

.text-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: .9rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
  transition: opacity .18s ease;
}
.text-link:hover { opacity: .6; }

/* ---------- store badges ----------
   Official artwork, used unmodified per Apple's and Google's guidelines.
   Both render their badge art at 48px tall (Apple min 40, Google min 28)
   and carry 12px of clear space, a quarter of the badge height.
   Google's PNG has that clear space baked in (41px around 168px art);
   Apple's SVG is the bare badge, so .badge-apple adds it as padding.
   The row is pulled back 12px so the artwork lines up with the text above. */

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2rem;
  margin-left: -12px;
}
.store-row-center { justify-content: center; margin-left: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform .18s ease;
}
.badge:hover { transform: translateY(-2px); }
.badge img { display: block; width: 100%; height: auto; }

.badge-apple { padding: 12px; width: 168px; }   /* 144 badge + 12 clear space each side */
.badge-play  { width: 185px; }                  /* Google PNG, clear space included */

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(85, 186, 249, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, .07);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  margin-right: auto;
}
.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}
.brand-name {
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -.025em;
}
.brand-ar { color: var(--paper); }

.nav { display: flex; gap: 1.7rem; }
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink-70);
  transition: color .18s ease;
}
.nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(2.75rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
  overflow-x: hidden;
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 7.2vw, 4.6rem);
  letter-spacing: -.045em;
}

.hero .lede {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1.9vw, 1.28rem);
  color: var(--ink-70);
  max-width: 34rem;
  text-wrap: pretty;
}

.hero-note {
  margin-top: 1.4rem;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink-70);
}

/* fanned screenshots */
.hero-visual { display: flex; justify-content: center; }

.fan { display: grid; place-items: center; }
.fan > * { grid-area: 1 / 1; }

.shot {
  margin: 0;
  background: var(--paper);
  padding: 6px;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}
.shot img { display: block; width: 100%; border-radius: 20px; }

.shot-main  { width: min(310px, 74vw); z-index: 3; }
.shot-side  { width: min(226px, 58vw); }
.shot-left  { transform: translateX(-62%) rotate(-10deg); z-index: 1; }
.shot-right { transform: translateX(62%)  rotate(10deg);  z-index: 2; }

/* ---------- stats ---------- */

.stats { padding-bottom: clamp(1rem, 3vw, 2rem); }

.stat-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ink-12);
  border: 1px solid var(--ink-12);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.stat-list li {
  background: rgba(255, 255, 255, .86);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.stat-list b {
  display: block;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
}
.stat-list span {
  display: block;
  margin-top: .4rem;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-70);
}

/* ---------- feature cards ---------- */

.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--ink);
  color: var(--paper);
  margin-bottom: 1.35rem;
}
.icon svg { width: 27px; height: 27px; }

.card h3 { font-size: 1.22rem; letter-spacing: -.02em; }
.card p {
  margin-top: .7rem;
  color: var(--ink-70);
  font-size: .97rem;
  text-wrap: pretty;
}

/* ---------- how it works (black slab) ---------- */

.slab {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  box-shadow: var(--shadow-lg);
}
.slab .section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }

.steps {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  counter-reset: step;
}
.steps li { position: relative; }

.step-no {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--paper-55);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 1.15rem;
}
.steps h3 { font-size: 1.22rem; color: var(--paper); }
.steps p {
  margin-top: .65rem;
  color: var(--paper-75);
  font-size: .97rem;
  text-wrap: pretty;
}

/* ---------- screenshot gallery ---------- */

.gallery {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block: .5rem 1.75rem;
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .32) rgba(255, 255, 255, .45);
  -webkit-overflow-scrolling: touch;
}
.gallery .shot {
  flex: 0 0 auto;
  width: min(258px, 66vw);
  scroll-snap-align: center;
}
.gallery::-webkit-scrollbar { height: 9px; }
.gallery::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .45);
  border-radius: 999px;
}
.gallery::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .32);
  border-radius: 999px;
}

/* ---------- unit categories ---------- */

.units {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
}

.unit {
  background: var(--paper);
  border-radius: var(--r-md);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.unit h3 { font-size: 1.12rem; }
.unit .pairs {
  margin-top: .6rem;
  font-size: .92rem;
  color: var(--ink-70);
  flex: 1 1 auto;
  text-wrap: pretty;
}
.unit .eq {
  margin-top: 1.25rem;
  align-self: flex-start;
  background: var(--ink);
  color: var(--paper);
  padding: .45rem .85rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.unit .eq b { font-weight: 800; }

.unit-cta {
  background: transparent;
  border: 2px dashed rgba(0, 0, 0, .3);
  box-shadow: none;
}

/* ---------- use cases ---------- */

.cases {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
}
.case {
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  padding: 1.7rem 1.5rem;
}
.case h3 { font-size: 1.15rem; }
.case p {
  margin-top: .7rem;
  font-size: .95rem;
  color: var(--ink-70);
  text-wrap: pretty;
}

/* ---------- faq ---------- */

#faq .section-head { text-align: center; margin-inline: auto; }
#faq .section-head .sub { margin-inline: auto; }

.faq {
  background: var(--paper);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.faq details { border-bottom: 1px solid var(--ink-08); }
.faq details:last-child { border-bottom: 0; }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.3rem 3.25rem 1.3rem 1.6rem;
  font-weight: 700;
  font-size: 1.03rem;
  position: relative;
  transition: background-color .18s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: rgba(0, 0, 0, .03); }

.faq summary::after,
.faq summary::before {
  content: "";
  position: absolute;
  right: 1.6rem;
  top: 50%;
  width: 14px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .22s ease;
}
.faq summary::before { transform: translateY(-50%) rotate(90deg); }
.faq summary::after  { transform: translateY(-50%); }
.faq details[open] summary::before { transform: translateY(-50%) rotate(0deg); }

.faq details p {
  padding: 0 3.25rem 1.45rem 1.6rem;
  color: var(--ink-70);
  font-size: .97rem;
  margin-top: -.2rem;
  text-wrap: pretty;
}

/* ---------- download cta ---------- */

/* White card, not black: the official store badges are black artwork that
   may not be recoloured, so they need a light surface to sit on. */
.cta {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--r-xl);
  padding: clamp(2.75rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-icon {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-md);
}
.cta h2 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  color: var(--ink);
}
.cta p {
  margin: 1.15rem auto 0;
  max-width: 34rem;
  color: var(--ink-70);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  text-wrap: pretty;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--ink-12);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-inner {
  display: grid;
  gap: 1.75rem;
}
.footer-brand p {
  margin-top: .4rem;
  color: var(--ink-70);
  font-size: .95rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
}
.footer-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: .93rem;
  color: var(--ink-70);
  transition: color .18s ease;
}
.footer-nav a:hover { color: var(--ink); }

.copyright {
  font-size: .85rem;
  color: var(--ink-55);
}

/* =========================================================
   Responsive
   ========================================================= */

/* small phones */
@media (max-width: 26rem) {
  :root { --gutter: 1.15rem; }
}

/* ≥ 34rem: stats become a 4-up row */
@media (min-width: 34rem) {
  .stat-list { grid-template-columns: repeat(4, 1fr); }
}

/* ≥ 48rem: footer spreads out */
@media (min-width: 48rem) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 2rem 3rem;
  }
  .footer-nav { justify-content: flex-end; max-width: 30rem; }
  .copyright { grid-column: 1 / -1; }
}

/* ≥ 60rem: hero side by side, nav visible */
@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: 1.05fr .95fr;
  }
  .hero-copy { padding-right: 1rem; }
}

/* the fanned side screenshots need room */
@media (max-width: 74rem) {
  .shot-side { display: none; }
}

/* hide in-page nav where it would crowd the bar */
@media (max-width: 62rem) {
  .nav { display: none; }
}

@media (max-width: 22rem) {
  .header-cta { display: none; }
  .brand { margin-right: 0; }
}

/* ---------- motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .gallery, .hero-visual { display: none; }
  body { background: #fff; }
  .slab, .cta { background: #fff; color: #000; box-shadow: none; border: 1px solid #000; }
  .slab .section-head h2, .cta h2, .steps h3 { color: #000; }
  .steps p, .cta p { color: #333; }
}
