/* Keepo landing page. Sections appear in page order; JS hooks are [data-*] attributes. */

@keyframes kp-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

[data-tilt] {
  transform-origin: 50% 0;
}

#rates,
#compare,
#features,
#about,
#download {
  scroll-margin-top: 96px;
}

/* ---- Currency coin (position and pose are driven by motion.js) ---- */
.coin {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 260px;
  z-index: 60;
  pointer-events: none;
  perspective: 1000px;
  will-change: transform;
  transform-origin: 50% 50%;
  opacity: 0;
}

.coin__shadow {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 100%;
  height: 44px;
  margin-top: 22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.16) 55%, rgba(0, 0, 0, 0));
  filter: blur(6px);
  opacity: 0;
}

.coin__spin {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.coin__edge {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--kp-edge1);
  transform: translateZ(calc(var(--i) * 3px));
}

.coin__edge:nth-child(even) {
  background: var(--kp-edge2);
}

.coin__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
}

.coin__face--gbp {
  background: var(--kp-deep);
  color: #fff;
  transform: translateZ(13px);
  box-shadow: inset 0 0 0 10px var(--kp-deep2), inset 0 0 0 11px rgba(255, 255, 255, 0.18);
}

.coin__face--inr {
  background: #fff;
  color: var(--sp-content-primary);
  transform: rotateY(180deg) translateZ(13px);
  box-shadow: inset 0 0 0 10px #f1f1f1, inset 0 0 0 11px var(--sp-content-primary);
}

.coin__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.coin__symbol {
  font-family: var(--sp-font-display);
  font-weight: 800;
  font-size: 150px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.coin__code {
  font-family: var(--sp-font-mono);
  font-size: 14px;
  letter-spacing: 0.24em;
}

.coin__face--gbp .coin__code {
  opacity: 0.7;
}

.coin__face--inr .coin__code {
  color: var(--sp-content-secondary);
}

/* ---- Legal bar and header ---- */
.legal-bar {
  background: var(--kp-deep);
  color: #fff;
  font-size: 13px;
  line-height: 18px;
  padding: 10px 24px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  text-align: center;
}

.legal-bar strong {
  font-weight: 600;
}

.legal-bar a,
.legal-bar a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sp-border-soft);
}

.site-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* Empty on purpose: the coin docks here at the end of the journey */
.brand__slot {
  width: 34px;
  height: 34px;
  display: inline-block;
  flex: none;
}

.brand__name {
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---- Hero ---- */
.hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  min-height: calc(100vh - 110px);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  align-items: center;
  gap: 48px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
}

.rate-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--sp-r-pill);
  background: var(--kp-tint);
  font-size: 14px;
  font-weight: 500;
}

.rate-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sp-content-success);
  animation: kp-pulse 1.6s ease-in-out infinite;
}

.rate-chip__rate {
  font-family: var(--sp-font-mono);
}

.rate-chip__live {
  color: var(--sp-content-secondary);
}

.hero__title {
  margin: 0;
  font-family: var(--sp-font-display);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 116px);
  line-height: 1;
  letter-spacing: var(--sp-display-tracking);
  text-wrap: balance;
}

.hero__title span {
  display: block;
}

/* Second line of the launch hero is set in the AI-voice serif (upright, 400) */
.hero__title .hero__title-ai {
  font-family: var(--sp-font-ai);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero__lede {
  margin: 0;
  font-size: 20px;
  line-height: 30px;
  color: var(--sp-content-secondary);
  max-width: 460px;
  text-wrap: pretty;
}

.store-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store,
.store:hover {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--kp-deep);
  color: #fff;
  padding: 12px 24px 12px 20px;
  border-radius: var(--sp-r-pill);
  text-decoration: none;
}

.store__icon {
  font-size: 24px;
}

.store__icon--apple {
  font-size: 28px;
}

.store__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store__small {
  font-size: 11px;
  opacity: 0.75;
}

.store__big {
  font-size: 17px;
  font-weight: 600;
}

.hero__stage {
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* ---- Journey: pinned stage scrubbed by scroll ---- */
.journey {
  height: 340vh;
  position: relative;
  background: var(--kp-tint);
}

.journey__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.journey__texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("../img/journey-texture.webp");
  background-size: 523px auto;
  background-repeat: repeat;
  mix-blend-mode: multiply;
  opacity: 0.9;
}

.journey__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--kp-tint);
  opacity: 0.55;
}

.journey__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.1);
}

.polaroids {
  position: absolute;
  inset: 0;
  pointer-events: none;
  perspective: 1000px;
}

.polaroid {
  position: absolute;
  top: var(--top);
  width: clamp(180px, 18vw, 290px);
  margin: 0;
  background: #fff;
  padding: 14px 14px 0;
  box-sizing: border-box;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.14), 0 10px 18px -4px rgba(0, 0, 0, 0.22), 0 28px 48px -12px rgba(0, 0, 0, 0.3);
  transform: rotate(var(--rot));
  will-change: transform, opacity;
}

.polaroid--uk {
  left: var(--edge);
}

.polaroid--in {
  right: var(--edge);
}

.polaroid__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  background: var(--sp-border-soft);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.polaroid__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid__caption {
  font-size: 15px;
  line-height: 20px;
  font-weight: 500;
  color: #3a3a38;
  padding: 10px 2px 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.journey__title {
  position: absolute;
  left: 0;
  right: 0;
  top: 9vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  text-align: center;
}

.journey__heading {
  margin: 0;
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.journey__arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.journey__arc-base {
  fill: none;
  stroke: #d6d6d6;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1 0;
}

.journey__arc-fill {
  fill: none;
  stroke: var(--kp-deep);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100 100;
  stroke-dashoffset: 100;
}

.journey__line {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 85%;
  height: 2px;
  margin-top: -1px;
}

.journey__dot {
  position: absolute;
  top: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.journey__dot--start {
  left: -6px;
  background: var(--kp-deep);
}

.journey__dot--end {
  right: -6px;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--sp-content-primary);
}

.journey__pill {
  position: absolute;
  top: -18px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  background: #fff;
  color: var(--sp-content-primary);
  padding: 8px 14px;
  border-radius: var(--sp-r-pill);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--sp-border-soft);
  z-index: 2;
}

.journey__pill--start {
  right: 100%;
  margin-right: 100px;
}

.journey__pill--end {
  left: 100%;
  margin-left: 100px;
}

.journey__result {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 0 24px;
}

.journey__amount {
  display: flex;
  justify-content: center;
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* Amounts: currency sign at half size on the baseline, figures tabular */
.amount {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.amount__sym {
  font-family: var(--sp-font-primary);
  font-size: 0.5em;
  font-weight: 600;
  opacity: 0.8;
  margin-right: 2px;
}

.journey__captions {
  position: relative;
  height: 24px;
  width: 100%;
}

.journey__caption {
  position: absolute;
  inset: 0;
  font-size: 17px;
  color: var(--sp-content-secondary);
}

.journey__caption--arrive {
  opacity: 0;
}

/* ---- Rates calculator ---- */
.calc {
  max-width: 1240px;
  margin: 0 auto;
  padding: 128px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 64px;
  align-items: center;
}

.calc__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.calc__title {
  margin: 0;
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.calc__lede {
  margin: 0;
  font-size: 19px;
  line-height: 29px;
  color: var(--sp-content-secondary);
  max-width: 440px;
  text-wrap: pretty;
}

.calc__copy .btn {
  margin-top: 8px;
}

.calc__card {
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--sp-shadow-card), 0 0 0 1px var(--sp-border-soft);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.guarantee {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--sp-r-pill);
  background: var(--sp-bg-success-subtle);
  color: var(--sp-content-success);
  font-size: 13px;
  font-weight: 500;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-size: 14px;
  color: var(--sp-content-secondary);
}

.field__box {
  display: flex;
  align-items: center;
  border: 1px solid var(--sp-border-input);
  border-radius: var(--sp-r-pill);
  padding: 0 24px;
  height: 64px;
  gap: 12px;
}

.field__box:focus-within {
  border-color: var(--sp-content-primary);
  box-shadow: inset 0 0 0 1px var(--sp-content-primary);
}

.field__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font: 700 28px var(--sp-font-display);
  letter-spacing: -0.02em;
  color: var(--sp-content-primary);
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.field__currency {
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-chip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--kp-deep);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coin-chip--outline {
  background: #fff;
  color: var(--sp-content-primary);
  box-shadow: inset 0 0 0 1.5px var(--sp-content-primary);
}

.fees {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--sp-border-soft);
  font-size: 14px;
}

.fees__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.fees__row--total {
  font-weight: 600;
}

.fees__label {
  color: var(--sp-content-secondary);
}

.fees__row--total .fees__label {
  color: inherit;
}

.fees__value {
  font-family: var(--sp-font-mono);
  font-weight: 400;
}

.speed {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.calc__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calc__note {
  margin: 0;
  font-size: 12px;
  line-height: 17px;
  color: var(--sp-content-tertiary);
}

/* ---- Provider comparison ---- */
.compare {
  background: var(--kp-tint);
  padding: 128px 24px;
}

.compare__inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.compare__head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compare__title {
  margin: 0;
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.compare__scroller {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-x: auto;
}

.cmp {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmp__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.6fr;
  gap: 16px;
  min-width: 620px;
}

.cmp__head {
  padding: 0 24px;
  font-size: 13px;
  color: var(--sp-content-secondary);
}

.cmp__head > :last-child {
  text-align: right;
}

.cmp__row {
  align-items: center;
  padding: 20px 24px;
  border-radius: 18px;
  background: #fff;
}

.cmp__row--keepo {
  padding: 22px 24px;
  background: var(--kp-deep);
  color: #fff;
}

.cmp__name {
  font-weight: 600;
  font-size: 18px;
}

.cmp__logo {
  display: block;
  width: auto;
  height: 22px;
}

.cmp__row--keepo .cmp__name {
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.cmp__mono {
  font-family: var(--sp-font-mono);
  color: var(--sp-content-secondary);
}

.cmp__row--keepo .cmp__mono {
  color: inherit;
}

.cmp__gets {
  text-align: right;
  font-family: var(--sp-font-mono);
  font-weight: 500;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.cmp__keepo-gets {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.cmp__keepo-amount {
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cmp__save {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--sp-r-pill);
  background: var(--sp-content-success);
  color: #fff;
}

.cmp__foot {
  margin: 8px 0 0;
  padding: 0 24px;
  font-size: 13px;
  color: var(--sp-content-tertiary);
}

/* ---- Features ---- */
.features {
  max-width: 1240px;
  margin: 0 auto;
  padding: 128px 24px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.features__title {
  margin: 0;
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.features__title-line {
  display: block;
}

/* Five-sided drum: each word sits on one face and the drum steps 72 degrees */
.drum-window {
  display: block;
  height: 1.3em;
  overflow: hidden;
  perspective: 1400px;
  color: var(--kp-accent);
}

.drum {
  display: block;
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transform: translateZ(-0.9em) rotateX(0deg);
  transition: transform 800ms var(--sp-ease-elegant);
}

.drum__face {
  position: absolute;
  inset: 0;
  line-height: 1.3em;
  white-space: nowrap;
  backface-visibility: hidden;
  transform: rotateX(calc(var(--n) * -72deg)) translateZ(0.9em);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.feature {
  background: var(--kp-tint);
  border-radius: 22px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 240px;
}

.feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--kp-deep);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.feature__title {
  margin: auto 0 0;
  font-size: 24px;
  font-family: var(--sp-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature__text {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--sp-content-secondary);
}

.feature__text a {
  color: var(--kp-accent);
}

/* ---- About ---- */
.about {
  background: var(--kp-deep);
  color: #fff;
  padding: 128px 24px;
}

.about__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 56px;
  align-items: start;
}

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about__title {
  margin: 0;
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.03em;
}

.about__lede {
  margin: 0;
  font-size: 19px;
  line-height: 29px;
  color: #cfcfcd;
  max-width: 460px;
  text-wrap: pretty;
}

.about__cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fact {
  background: var(--kp-deep2);
  border-radius: 22px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fact--light {
  background: #fff;
  color: var(--sp-content-primary);
}

.fact__value {
  font-family: var(--sp-font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fact__text {
  font-size: 16px;
  line-height: 24px;
  color: #cfcfcd;
}

.fact--light .fact__text {
  color: var(--sp-content-secondary);
}

/* ---- Footer ---- */
.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 32px;
  font-size: 15px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__col--brand {
  gap: 8px;
}

.site-footer__brand {
  font-family: var(--sp-font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.site-footer__tagline {
  color: var(--sp-content-secondary);
}

.site-footer__meta {
  color: var(--sp-content-tertiary);
  font-size: 13px;
}

.site-footer__legal {
  border-top: 1px solid var(--sp-border-soft);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  color: var(--sp-content-secondary);
}

.site-footer__legal-muted {
  color: var(--sp-content-tertiary);
}

/* ---- Small screens ---- */
@media (max-width: 759px) {
  .polaroids {
    display: none;
  }

  .journey__pill {
    top: -54px;
    margin: 0;
  }

  .journey__pill--start {
    right: auto;
    left: 0;
    transform: translateX(-50%);
  }

  .journey__pill--end {
    left: auto;
    right: 0;
    transform: translateX(50%);
  }
}

@media (max-width: 720px) {
  .nav__link {
    display: none;
  }
}

/* ---- Reduced motion: no pulse, no smooth scroll, no drum turn (motion.js handles the rest) ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rate-chip__dot {
    animation: none;
  }

  .drum,
  .btn {
    transition: none;
  }
}
