/*
  The features page.

  Set in the app's own faces and colours, so the page looks like the product it describes. The rest
  of the site keeps the theme in main.css; everything here is scoped under .ft so the two do not
  touch.
*/

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/Archivo.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/BricolageGrotesque.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}

.ft {
  --ft-paper: #f1f3f0;
  --ft-surface: #ffffff;
  --ft-ink: #131a17;
  --ft-ink-2: #566159;
  --ft-ink-3: #7c8880;
  --ft-rule: #d7ddd8;
  --ft-rule-strong: #b9c2bc;
  --ft-accent: #1b5a93;
  --ft-accent-deep: #164b7b;
  --ft-money: #14664a;

  --ft-face: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ft-display: "Bricolage Grotesque", var(--ft-face);

  --ft-container: 1140px;
  --ft-gutter: clamp(1.25rem, 4vw, 2.5rem);
  --ft-s2: 1rem;
  --ft-s3: 1.5rem;
  --ft-s4: 2rem;
  --ft-s5: 3rem;
  --ft-s6: 4rem;
  --ft-section: clamp(3.5rem, 8vw, 7rem);

  /* How far a device hangs below the photograph it stands in front of. */
  --ft-overhang: clamp(3rem, 7vw, 6.5rem);

  /* Light comes from the top left, so every device casts its shadow down and to the right. */
  --ft-shadow-device:
    0 2.5rem 4.5rem -1.5rem rgb(19 26 23 / 55%),
    0 0.9rem 1.8rem -0.75rem rgb(19 26 23 / 35%);

  /* The sticky header is 4.5rem tall; paint paper up behind it rather than leaving a white band. */
  margin-top: -4.5rem;
  padding-top: 4.5rem;
  font-family: var(--ft-face);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ft-ink-2);
  background: var(--ft-paper);
  -webkit-font-smoothing: antialiased;
}

.ft :where(h1, h2, h3) {
  margin: 0;
  font-family: var(--ft-display);
  font-weight: 700;
  color: var(--ft-ink);
  letter-spacing: -0.02em;
}

.ft :where(p, ul) {
  margin: 0;
}

.ft :where(a) {
  color: var(--ft-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.ft :where(a):hover {
  color: var(--ft-accent-deep);
}

.ft :focus-visible {
  outline: 3px solid var(--ft-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.ft-wrap {
  max-width: var(--ft-container);
  margin: 0 auto;
  padding: 0 var(--ft-gutter);
}

/* Buttons and links ------------------------------------------------------------------------ */

.ft-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  border-radius: 10px;
  font: 600 1rem/1 var(--ft-face);
  color: #fff;
  background: var(--ft-accent);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.ft-btn:hover {
  color: #fff;
  background: var(--ft-accent-deep);
  text-decoration: none;
}

.ft-btn--light {
  color: var(--ft-ink);
  background: #fff;
}

.ft-btn--light:hover {
  color: var(--ft-ink);
  background: var(--ft-paper);
}

.ft-more {
  font-weight: 600;
}

/* Hero ------------------------------------------------------------------------------------- */

.ft-hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.ft-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--ft-s4) var(--ft-gutter);
  align-items: start;
}

.ft-hero h1 {
  grid-column: 1 / span 8;
  font-size: clamp(2.75rem, 6.2vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 12ch;
  text-wrap: balance;
}

.ft-hero__aside {
  grid-column: 9 / span 4;
  padding-top: 0.5rem;
}

.ft-hero__lead {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.5;
}

.ft-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ft-s3);
  margin-top: var(--ft-s4);
}

/* A photograph with a device standing in front of it ---------------------------------------- */

.ft-scene {
  position: relative;
}

.ft-scene__photo {
  display: block;
  width: 100%;
  height: clamp(22rem, 60vw, 42rem);
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

.ft-scene__stage {
  position: absolute;
  inset: 0;
  max-width: var(--ft-container);
  margin: 0 auto;
  padding: 0 var(--ft-gutter);
  pointer-events: none;
}

.ft-scene__stage > .ft-scene__device {
  position: absolute;
  bottom: calc(var(--ft-overhang) * -1);
  right: var(--ft-gutter);
  width: clamp(10.5rem, 21vw, 17rem);
  pointer-events: auto;
}

.ft-scene__stage > .ft-scene__device--left {
  right: auto;
  left: var(--ft-gutter);
}

.ft-scene__stage > .ft-scene__device--wide {
  width: clamp(18rem, 44vw, 36rem);
}

/* The device hangs over the section below, so that section starts lower to make room. */
.ft-scene + .ft-chapter,
.ft-scene + .ft-list {
  padding-top: calc(var(--ft-overhang) + var(--ft-section));
}

/* Chapters --------------------------------------------------------------------------------- */

.ft-chapter {
  padding: var(--ft-section) 0;
}

.ft-chapter + .ft-chapter {
  padding-top: 0;
}

.ft-chapter__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--ft-s5) var(--ft-gutter);
  align-items: center;
}

.ft-chapter__text {
  grid-column: 1 / span 5;
}

.ft-chapter__device {
  grid-column: 6 / span 7;
}

.ft-chapter--flip .ft-chapter__text {
  grid-column: 8 / span 5;
}

.ft-chapter--flip .ft-chapter__device {
  grid-column: 1 / span 7;
  grid-row: 1;
}

.ft-chapter h2 {
  font-size: clamp(1.9rem, 3.3vw, 2.75rem);
  line-height: 1.04;
  max-width: 16ch;
  text-wrap: balance;
}

.ft-chapter__intro {
  margin-top: var(--ft-s3);
  font-size: 1.125rem;
}

.ft-tag {
  display: inline-block;
  vertical-align: 0.35em;
  margin-left: 0.5rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--ft-rule-strong);
  border-radius: 999px;
  font: 600 0.8125rem/1.2 var(--ft-face);
  letter-spacing: 0;
  color: var(--ft-ink-2);
  white-space: nowrap;
}

/* Ruled rows, one point each. The rule groups; no boxes. */
.ft-points {
  list-style: none;
  padding: 0;
  margin-top: var(--ft-s4);
  border-top: 1px solid var(--ft-rule);
}

.ft-points li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--ft-rule);
}

.ft-points strong {
  font-weight: 600;
  color: var(--ft-ink);
}

/* Devices ---------------------------------------------------------------------------------- */

/* Phone: a titanium rim, a black bezel, then the screen with its status bar and island. */
.ft-phone {
  position: relative;
  aspect-ratio: 390 / 844;
  padding: 1.1%;
  border-radius: 16% / 7.4%;
  background: linear-gradient(160deg, #7a7f86 0%, #3a3e44 35%, #4b5057 65%, #1d2024 100%);
  box-shadow: var(--ft-shadow-device);
}

.ft-phone::before,
.ft-phone::after {
  content: "";
  position: absolute;
  width: 1.2%;
  background: #4b5057;
  border-radius: 2px;
}

.ft-phone::before {
  left: -1.1%;
  top: 21%;
  height: 7%;
  box-shadow: 0 130% 0 0 #4b5057;
}

.ft-phone::after {
  right: -1.1%;
  top: 25%;
  height: 11%;
}

.ft-phone__bezel {
  height: 100%;
  padding: 2.6%;
  border-radius: 15.5% / 7.1%;
  background: #05070a;
}

.ft-phone__screen {
  position: relative;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 13% / 6%;
  overflow: hidden;
  background: var(--ft-surface);
}

.ft-phone__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 7%;
  padding: 0 8.5% 0 9.5%;
  font: 600 4.3cqw/1 var(--ft-face);
  color: var(--ft-ink);
  background: var(--ft-surface);
}

.ft-phone__status svg {
  display: block;
  height: 3.2cqw;
  width: auto;
  fill: var(--ft-ink);
}

.ft-phone__status-icons {
  display: flex;
  align-items: center;
  gap: 1.6cqw;
}

.ft-phone__island {
  position: absolute;
  top: 1.9%;
  left: 50%;
  transform: translateX(-50%);
  width: 29%;
  height: 3.6%;
  border-radius: 999px;
  background: #000;
}

.ft-phone__screen img {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top;
}

/* Laptop: the lid seen from the front, then the base edge-on. */
.ft-laptop {
  position: relative;
  padding-bottom: 1.5%;
}

.ft-laptop__lid {
  position: relative;
  padding: 2.4% 2.4% 2.8%;
  border-radius: 1.7% / 2.8%;
  background: linear-gradient(180deg, #23262b, #0f1113);
  box-shadow: inset 0 0 0 1px #3d4147, var(--ft-shadow-device);
}

.ft-laptop__screen {
  aspect-ratio: 16 / 10;
  border-radius: 0.6% / 1%;
  overflow: hidden;
  background: var(--ft-surface);
}

.ft-laptop__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.ft-laptop__notch {
  position: absolute;
  top: 2.4%;
  left: 50%;
  transform: translateX(-50%);
  width: 11%;
  height: 2.3%;
  border-radius: 0 0 6px 6px;
  background: #0f1113;
}

.ft-laptop__base {
  position: relative;
  width: 114%;
  margin-left: -7%;
  height: clamp(7px, 0.9vw, 13px);
  border-radius: 0 0 12px 12px / 0 0 100% 100%;
  background: linear-gradient(180deg, #e2e5e9 0%, #b8bcc2 55%, #8f949a 100%);
  box-shadow: 0 1px 0 #6f747a;
}

.ft-laptop__base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 15%;
  height: 40%;
  border-radius: 0 0 6px 6px;
  background: #9a9fa5;
}

.ft-laptop__base::after {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: -1.2rem;
  height: 1.2rem;
  background: radial-gradient(ellipse at 50% 0%, rgb(19 26 23 / 32%), transparent 72%);
}

/* Tablet, held landscape. */
.ft-tablet {
  position: relative;
  aspect-ratio: 1180 / 820;
  padding: 2.6%;
  border-radius: 4.2% / 6%;
  background: linear-gradient(160deg, #7a7f86 0%, #3a3e44 40%, #1d2024 100%);
  box-shadow: var(--ft-shadow-device);
}

.ft-tablet::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 1.05%;
  width: 0.55%;
  aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #0b0d10;
  box-shadow: inset 0 0 0 1px #2a2e33;
}

.ft-tablet__screen {
  height: 100%;
  border-radius: 2% / 2.9%;
  overflow: hidden;
  background: var(--ft-surface);
  box-shadow: 0 0 0 1.5% #05070a;
}

.ft-tablet__screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* A laptop with a phone standing in front of its right-hand corner. */
.ft-pair {
  position: relative;
  padding-bottom: 9%;
}

.ft-pair .ft-laptop {
  width: 90%;
}

.ft-pair .ft-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 25%;
}

/* A tablet with a phone in front of it. */
.ft-pair--tablet .ft-tablet {
  width: 84%;
}

.ft-pair--tablet .ft-phone {
  width: 24%;
}

/* The full list ---------------------------------------------------------------------------- */

.ft-list {
  padding: var(--ft-section) 0;
  border-top: 1px solid var(--ft-rule);
}

.ft-list h2 {
  font-size: clamp(1.9rem, 3.3vw, 2.75rem);
  line-height: 1.04;
}

.ft-list__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ft-s5) var(--ft-gutter);
  margin-top: var(--ft-s5);
}

.ft-list h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ft-list h3 .ft-tag {
  vertical-align: 0.2em;
}

.ft-list ul {
  list-style: none;
  padding: 0;
  margin-top: var(--ft-s2);
  border-top: 1px solid var(--ft-rule);
  font-size: 0.9375rem;
}

.ft-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--ft-rule);
}

/* Closing photograph with the call to action -------------------------------------------------- */

.ft-cta {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(22rem, 52vw, 34rem);
  color: #fff;
  isolation: isolate;
}

.ft-cta__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  z-index: -2;
}

.ft-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgb(19 26 23 / 82%) 0%, rgb(19 26 23 / 40%) 45%, rgb(19 26 23 / 0%) 78%);
}

.ft-cta .ft-wrap {
  width: 100%;
  padding-top: var(--ft-s6);
  padding-bottom: var(--ft-s6);
}

.ft-cta h2 {
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  line-height: 1.02;
  max-width: 16ch;
  text-wrap: balance;
}

.ft-cta p {
  margin-top: var(--ft-s3);
  font-size: 1.125rem;
  color: rgb(255 255 255 / 88%);
  max-width: 34em;
}

.ft-cta .ft-actions {
  margin-top: var(--ft-s4);
}

.ft-cta a:not(.ft-btn) {
  color: #fff;
}

.ft-credits {
  padding: var(--ft-s3) 0 var(--ft-s4);
  font-size: 0.8125rem;
  color: var(--ft-ink-3);
}

.ft-credits a {
  color: inherit;
}

/* Smaller screens -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  .ft-hero h1 {
    grid-column: 1 / -1;
  }

  .ft-hero__aside {
    grid-column: 1 / span 9;
  }

  .ft-chapter__text,
  .ft-chapter__device,
  .ft-chapter--flip .ft-chapter__text,
  .ft-chapter--flip .ft-chapter__device {
    grid-column: 1 / -1;
  }

  .ft-chapter--flip .ft-chapter__device {
    grid-row: auto;
  }

  .ft-chapter__device {
    padding: 0 6%;
  }

  .ft-list__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .ft-hero__aside {
    grid-column: 1 / -1;
  }

  .ft-scene__device {
    width: clamp(9rem, 38vw, 12rem);
  }

  .ft-scene__stage > .ft-scene__device--wide {
    width: 74vw;
  }

  .ft-chapter__device {
    padding: 0;
  }

  .ft-list__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ft-laptop__base {
    width: 110%;
    margin-left: -5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ft-btn {
    transition: none;
  }
}
