/* FixrLink landing page. One dark studio theme: the film is a car in a dark room, so the page is dark around it.
   Brand: charcoal #2B2E33, tool yellow #FFC21A, Atkinson Hyperlegible. Yellow buttons carry charcoal words. Sizes stay large (18px body, 60px buttons) for older eyes. */

:root {
  --bg: #070d19;
  --bg-2: #0b1426;
  --ink: #f6f2ec;
  --ink-soft: #c3cbd9;
  --line: rgba(246, 242, 236, 0.16);
  --charcoal: #2b2e33;
  --yellow: #ffc21a;
  --yellow-dark: #e5a800;
  --yellow-text: #ffc21a; /* yellow reads on the dark background (12:1); never on white */
  --glass: rgba(7, 13, 25, 0.62);
  --radius: 16px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --gutter: clamp(20px, 5vw, 72px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--yellow-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 50;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
}
.skip:focus {
  top: calc(12px + var(--safe-top));
}

/* ---------- The film ---------- */

.film {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #02060e; /* the studio's own darkest tone, so the film's faded edge disappears into it */
  overflow: hidden;
}

/* On wide screens the film slides right and its left edge melts into the dark room, so the words get the empty left side. */
.film-stage {
  position: absolute;
  inset: 0;
}
@media (min-aspect-ratio: 5/4) {
  .film-stage {
    left: clamp(0px, 30vw - 60px, 520px);
  }
  .film-stage > * {
    position: absolute;
    inset: 0;
    transform: scale(0.8);
    transform-origin: 88% 58%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26%, #000 97%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0, #000 26%, #000 97%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
    mask-composite: intersect;
  }
}

.film-poster img,
.film-frames img,
.film-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.film-video {
  opacity: 0;
  transition: opacity 400ms ease;
}
.film.is-playing .film-video {
  opacity: 1;
}

.film-frames img {
  opacity: 0;
  transition: opacity 700ms ease;
}
.film-frames img.is-on {
  opacity: 1;
}

/* Keeps the words readable over the car. Strength follows the chapter (--shade, set by app.js). */
.film-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 13, 25, calc(0.55 + var(--shade, 0.25))) 0%, rgba(7, 13, 25, calc(0.15 + var(--shade, 0.25))) 42%, rgba(7, 13, 25, 0) 70%),
    linear-gradient(180deg, rgba(7, 13, 25, 0.55) 0%, rgba(7, 13, 25, 0) 18%, rgba(7, 13, 25, 0) 78%, rgba(7, 13, 25, 0.7) 100%);
}

.film-load {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 30;
  pointer-events: none;
  transition: opacity 500ms ease;
}
.film-load span {
  display: block;
  height: 100%;
  width: calc(var(--load, 0) * 100%);
  background: var(--yellow);
  transition: width 200ms linear;
}
.film-load.is-done {
  opacity: 0;
}

/* ---------- Top bar ---------- */

.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(14px + var(--safe-top)) var(--gutter) 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-height: 48px;
}
/* The square is part of the icon drawing; the thin ring only keeps its edge visible on the dark page. */
.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: block;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.logo-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}
.logo-word {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bar-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(246, 242, 236, 0.1);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.bar-cta:active {
  transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
  .bar-cta:hover {
    background: rgba(246, 242, 236, 0.18);
  }
}

/* ---------- Chapter rail (computers) ---------- */

.rail {
  position: fixed;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: none;
  flex-direction: column;
  gap: 6px;
}
.rail a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 40px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.rail a::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid currentColor;
  transition: background-color 200ms ease, transform 200ms var(--ease-out);
}
.rail a span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(7, 13, 25, 0.72);
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 200ms ease, transform 200ms var(--ease-out);
}
.rail a.is-on {
  color: var(--ink);
}
.rail a.is-on::after {
  background: var(--yellow);
  border-color: var(--yellow);
  transform: scale(1.25);
}
.rail a.is-on span,
.rail:hover a span,
.rail a:focus-visible span {
  opacity: 1;
  transform: none;
}
@media (min-width: 1100px) {
  .rail {
    display: flex;
  }
}

/* ---------- Chapters ---------- */

.track {
  position: relative;
  z-index: 10;
}

.chapter {
  position: relative;
}
/* How long each chapter lasts while scrolling. Longer = the film moves slower there. */
.chapter-hero {
  height: 150vh;
}
.chapter-reliable {
  height: 300vh;
}
.chapter-services {
  height: 260vh;
}
.chapter-download .stage {
  height: 170vh;
}

.copy {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(96px + var(--safe-top)) var(--gutter) calc(48px + var(--safe-bottom));
}
.js .copy-inner {
  opacity: var(--o, 0);
  transform: translateY(calc((1 - var(--o, 0)) * 28px));
  will-change: opacity, transform;
}
.js .chapter-hero .copy-inner {
  --o: 1;
}
.copy-inner {
  width: 100%;
  max-width: 36rem;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--yellow-text);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}
.chapter-hero .copy-inner {
  max-width: 40rem;
}
h1 {
  font-size: clamp(2.75rem, 5vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(2.25rem, 4.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.2rem;
  line-height: 1.3;
}

.lead {
  margin: 22px 0 0;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 32rem;
  text-wrap: pretty;
}
.lead-small {
  font-size: 1.125rem;
  margin-top: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 28px;
  border-radius: 14px;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--yellow);
  color: var(--charcoal);
}
.btn-quiet {
  border-color: rgba(246, 242, 236, 0.45);
  color: var(--ink);
  background: rgba(7, 13, 25, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--yellow-dark);
  }
  .btn-quiet:hover {
    background: rgba(246, 242, 236, 0.08);
    border-color: var(--ink);
  }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(28px + var(--safe-bottom));
  transform: translateX(-50%);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: var(--cue, 1);
  transition: opacity 300ms ease;
}
.scroll-cue-line {
  width: 1.5px;
  height: 44px;
  background: linear-gradient(180deg, transparent, var(--ink-soft));
  transform-origin: top;
  animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue {
  0% {
    transform: scaleY(0);
    opacity: 1;
  }
  60% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* The three reasons to trust FixrLink */
.proof {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}
.proof li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.proof-num {
  font-weight: 700;
  color: var(--yellow-text);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.proof p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.rating {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(246, 242, 236, 0.07);
  border: 1px solid var(--line);
}
.stars {
  color: var(--yellow-text);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.rating-text {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}
.rating-score {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

/* ---------- Download ---------- */

.chapter-download .copy-inner {
  max-width: 40rem;
}
.get {
  margin-top: 32px;
  display: grid;
  gap: 12px;
  justify-items: start;
}
.get-note {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-soft);
}
.also-label {
  margin: 30px 0 12px;
  font-size: 1rem;
  color: var(--ink-soft);
}
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 18px 8px 14px;
  border-radius: 14px;
  background: #000;
  border: 1.5px solid rgba(246, 242, 236, 0.4);
  color: #fff;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms var(--ease-out);
}
.store svg {
  flex: none;
}
.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.store-small {
  font-size: 0.8125rem;
}
.store-big {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.store:active {
  transform: scale(0.97);
}
@media (hover: hover) and (pointer: fine) {
  a.store:hover {
    border-color: #fff;
  }
}
.store-lg {
  min-height: 76px;
  padding: 10px 26px 10px 20px;
  gap: 14px;
}
.store-lg .store-small {
  font-size: 0.95rem;
}
.store-lg .store-big {
  font-size: 1.65rem;
}
.store.is-soon {
  opacity: 0.62;
  border-style: dashed;
  cursor: default;
}

.foot {
  position: relative;
  padding: 40px var(--gutter) calc(40px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(7, 13, 25, 0.88);
  color: var(--ink-soft);
  font-size: 1rem;
}
.foot p {
  margin: 0;
}
.foot a {
  color: var(--ink);
  font-weight: 700;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 14px !important;
}

/* ---------- Phones and tall screens: the car sits low, the words sit on a glass card up top ---------- */

@media (max-aspect-ratio: 4/5) {
  .film-shade {
    background: linear-gradient(180deg, rgba(7, 13, 25, 0.75) 0%, rgba(7, 13, 25, 0.25) 30%, rgba(7, 13, 25, 0) 55%, rgba(7, 13, 25, 0.35) 100%);
  }
  .copy {
    align-items: flex-start;
    padding-top: calc(84px + var(--safe-top));
  }
  .chapter-hero .copy-inner {
    padding-top: 2vh;
  }
  .chapter-reliable .copy-inner,
  .chapter-services .copy-inner,
  .chapter-download .copy-inner {
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px 20px 24px;
  }
  .chapter-download .copy {
    align-items: flex-end;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 18px;
  }
  .bar {
    padding-top: calc(10px + var(--safe-top));
    padding-bottom: 10px;
  }
  .logo-mark {
    width: 38px;
    height: 38px;
  }
  .logo-word {
    font-size: 1.25rem;
  }
  h2 {
    font-size: 2rem;
  }
  .eyebrow {
    font-size: 0.875rem;
    margin-bottom: 10px;
  }
  .lead {
    margin-top: 14px;
  }
  .actions {
    margin-top: 24px;
  }
  .actions .btn {
    flex: 1 1 100%;
  }
  /* Phones: the reasons shrink to their headings so the car stays in view below the card while it turns. */
  .proof {
    margin-top: 14px;
    gap: 10px;
  }
  .proof li {
    grid-template-columns: 34px 1fr;
    gap: 8px;
    padding-top: 10px;
  }
  .proof h3 {
    font-size: 1.125rem;
  }
  .proof p,
  .rating-more {
    display: none;
  }
  .rating {
    margin-top: 14px;
    padding: 10px 14px;
    gap: 12px;
  }
  .stars {
    font-size: 1.05rem;
  }
  .chapter-services .lead-small {
    display: none;
  }
  .get,
  .get .store-lg,
  .get .btn {
    width: 100%;
  }
  .get .store-lg {
    justify-content: center;
  }
  .also-label {
    margin-top: 20px;
  }
}

/* Short screens (a phone turned sideways, a small laptop): tighten so the reasons still fit. */
@media (max-height: 640px) and (min-aspect-ratio: 4/5) {
  .copy {
    padding-top: 80px;
    padding-bottom: 16px;
  }
  .proof {
    gap: 10px;
    margin-top: 16px;
  }
  .proof li {
    padding-top: 10px;
  }
  .proof p,
  .rating {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue-line {
    animation: none;
  }
  .js .copy-inner {
    transform: none;
  }
}

/* ---------- Contact us: a button at the bottom right, and the form it opens ---------- */

.contact-open {
  position: fixed;
  right: var(--gutter);
  bottom: calc(20px + var(--safe-bottom));
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px 0 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(246, 242, 236, 0.45);
  background: rgba(7, 13, 25, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 200ms ease, transform 200ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
}
.contact-open svg {
  color: var(--yellow-text);
}
.contact-open:active {
  transform: scale(0.97);
}
.contact-open.is-away {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.foot-contact {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .contact-open:hover {
    background: rgba(246, 242, 236, 0.1);
    border-color: var(--ink);
  }
}

html.contact-on {
  overflow: hidden;
}
.contact {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: calc(16px + var(--safe-top)) var(--gutter) calc(20px + var(--safe-bottom));
}
.contact[hidden] {
  display: none;
}
.contact-scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.55);
}
.contact-card {
  position: relative;
  width: min(420px, 100%);
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-2);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  transform-origin: bottom right;
  animation: contact-in 220ms var(--ease-out);
}
@keyframes contact-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
.contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.contact-head h2 {
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}
.contact-x {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.contact-lead {
  margin: 6px 0 0;
  color: var(--ink-soft);
}
.contact-app {
  margin: 10px 0 0;
  font-size: 1rem;
  color: var(--ink-soft);
}
.contact-app a {
  color: var(--yellow-text);
  font-weight: 700;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: 1rem;
  font-weight: 700;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid rgba(246, 242, 236, 0.28);
  border-radius: 12px;
  background: rgba(246, 242, 236, 0.06);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 400;
}
.contact-form select option {
  background: var(--bg-2);
}
.contact-form textarea {
  min-height: 112px;
  resize: vertical;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--yellow-text);
  box-shadow: 0 0 0 3px rgba(255, 194, 26, 0.25);
}
.contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-error {
  margin: 12px 0 0;
  color: #ffb4a8;
  font-weight: 700;
}
.contact-error:empty {
  display: none;
}
.contact-send {
  width: 100%;
  margin-top: 16px;
}
.contact-send:disabled {
  opacity: 0.7;
  cursor: progress;
}
.contact-small {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.contact-small a {
  color: var(--ink);
  font-weight: 700;
}
.contact-done:focus {
  outline: none;
}
.contact-done-title {
  margin: 14px 0 6px;
  font-size: 1.3rem;
  font-weight: 700;
}
.contact-done-text {
  margin: 0;
  color: var(--ink-soft);
}
.contact-done .btn {
  width: 100%;
  margin-top: 20px;
}

/* Phones: the button sits closer to the corner, the Scroll hint moves to the left to make room for it, and the form
   comes up from the bottom as a sheet. */
@media (max-width: 600px) {
  .contact-open {
    right: 16px;
    bottom: calc(16px + var(--safe-bottom));
  }
  .scroll-cue {
    left: var(--gutter);
    transform: none;
    align-items: flex-start;
  }
  .contact {
    padding: calc(24px + var(--safe-top)) 0 0;
  }
  .contact-card {
    width: 100%;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    padding-bottom: calc(24px + var(--safe-bottom));
    transform-origin: bottom center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-card {
    animation: none;
  }
  .contact-open {
    transition: none;
  }
}
