/*
 * Pyflx: insight article page.
 * Values follow the client's "Insight article Tile story" mockup: a hero
 * in the card's colour, the article across the hero's 1040px column, the
 * steps as phone sketches, a baseline card and a dark closing card.
 */

main {
  background-color: var(--color-cloud);
}

.article-back {
  font-size: 16px;
  color: var(--color-brand-jet);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 1. Hero ------------------------------------------------------------------ */

/* The hero takes its card's colour from Insights, dimmed 10% with Pure
   White text as the cards are (client). Each article names its card's
   colour with a modifier, e.g. article-hero--orange for an orange card. */
.article-hero {
  padding: 0 40px;
  color: var(--color-paper);
  background-color: var(--hero-colour, #ff4103);
  background-image: linear-gradient(rgb(0 0 0 / 0.1), rgb(0 0 0 / 0.1));
}

.article-hero--orange { --hero-colour: #ff4103; } /* Pop Orange */
.article-hero--lime { --hero-colour: #9dfb1c; } /* Lime Green */
.article-hero--purple { --hero-colour: #6c4cf5; } /* Pop Purple */
.article-hero--navy { --hero-colour: #1c2d5a; } /* Navy Blue */
.article-hero--gold { --hero-colour: #ffc107; } /* Gold Yellow */
.article-hero--pink { --hero-colour: #e58fbc; } /* Pink */
.article-hero--magenta { --hero-colour: #91298c; } /* Magenta */
.article-hero--light-purple { --hero-colour: #ad8fff; } /* Light Purple */
.article-hero--turquoise { --hero-colour: #00c2a8; } /* Turquoise */

.article-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 72px 0 88px; /* no site header on articles (client) */
}

.article-hero__mark {
  width: 56px;
  height: 56px;
}

.article-hero__label,
.article-baseline__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #3d3d3d;
}

.article-hero .article-hero__label {
  color: inherit;
}

.article-hero h1 {
  max-width: 900px;
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.02;
  text-wrap: balance;
}

.article-hero__lead {
  max-width: 720px;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.4;
}

.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 16px;
}

.article-hero__links-label {
  margin-left: 8px;
}

.article-hero__links {
  display: flex;
  gap: 8px;
}

.article-hero__links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgb(255 255 255 / 0.5);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.article-hero__links a:hover,
.article-hero__links a:focus-visible {
  background-color: rgb(255 255 255 / 0.2);
}

.article-hero__links svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 2. Article ---------------------------------------------------- */

/* The article sits under the hero's text, on its left edge. */
.article-layout {
  max-width: 1040px;
  margin: 0 auto;
  padding: 96px 40px 0;
  box-sizing: content-box;
}

/* The full width of the hero's text column (client: was 720px). */
.article-body {
  font-size: 20px;
  line-height: 1.65;
  color: #1e1e1e;
}

.article-body section {
  padding: 48px 0;
  border-bottom: 1px solid #d9d7d2;
}

.article-body section:first-child {
  padding-top: 0;
}

.article-body section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.article-body h2 {
  margin-bottom: 16px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-brand-jet);
}

.article-body p + p {
  margin-top: 20px;
}

/* 3. Steps: a phone sketch beside each numbered step ------------------------- */

.article-steps {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin: 32px 0 40px;
  padding: 0;
  list-style: none;
}

.article-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
}

.article-step__text {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.article-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-brand-jet);
  border-radius: 14px;
  background-color: var(--color-brand-accent);
}

.phone {
  display: flex;
  flex: 0 0 172px;
  flex-direction: column;
  gap: 9px;
  height: 340px;
  padding: 12px 12px 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-brand-jet);
  border: 2.5px solid var(--color-brand-jet);
  border-radius: 30px;
  background-color: var(--color-paper);
  box-shadow: 6px 6px 0 rgb(17 17 17 / 0.08);
}

.phone svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone__notch {
  align-self: center;
  width: 44px;
  height: 6px;
  margin-bottom: 4px;
  border-radius: 999px;
  background-color: var(--color-brand-jet);
}

.phone__label {
  margin-top: 8px;
}

.phone__line {
  height: 7px;
  border-radius: 4px;
  background-color: #d9d9d9;
}

.phone__line--ink {
  background-color: var(--color-brand-jet);
}

/* Instagram profile: avatar, three stat columns, bio lines, link, posts. */
.phone__profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone__avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-brand-jet);
  border-radius: 999px;
  background-color: var(--color-brand-grey-light);
}

.phone__stat {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.phone__stat::before,
.phone__stat::after {
  content: "";
  width: 70%;
  height: 6px;
  border-radius: 4px;
  background-color: var(--color-brand-jet);
}

.phone__stat::after {
  width: 90%;
  height: 5px;
  background-color: #d9d9d9;
}

.phone__pill {
  align-self: flex-start;
  padding: 3px 10px;
  border: 2px solid var(--color-brand-jet);
  border-radius: 999px;
  background-color: var(--color-brand-accent);
}

.phone__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: auto;
}

.phone__cell {
  aspect-ratio: 1;
  border: 1.5px solid var(--color-brand-jet);
  border-radius: 4px;
  background-color: #ededed;
}

.phone__cell--dark {
  background-color: #d9d9d9;
}

/* Upload or camera. */
.phone__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: auto 0 40px;
}

.phone__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border: 2px solid var(--color-brand-jet);
  border-radius: 12px;
}

.phone__btn--lime {
  background-color: var(--color-brand-accent);
}

.phone__btn svg {
  width: 22px;
  height: 22px;
}

/* Tile catalogue. */
.phone__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.phone__tile {
  position: relative;
  aspect-ratio: 1;
  border: 1.5px solid var(--color-brand-jet);
  border-radius: 6px;
  background: #e6e6e6;
}

.phone__tile--diagonal {
  background: repeating-linear-gradient(45deg, #d9d9d9 0 6px, #f5f5f5 6px 12px);
}

.phone__tile--picked {
  border-width: 3px;
  background: repeating-linear-gradient(90deg, #cfcfcf 0 2px, #f2f2f2 2px 14px);
  box-shadow: 0 0 0 3px var(--color-brand-accent);
}

.phone__tile--picked svg {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  padding: 2px;
  fill: var(--color-brand-jet);
  stroke: none;
  border: 1.5px solid var(--color-brand-jet);
  border-radius: 999px;
  background-color: var(--color-paper);
}

.phone__tile--dark {
  background: #bdbdbd;
}

.phone__tile--grid {
  background:
    repeating-linear-gradient(0deg, #d9d9d9 0 2px, #f5f5f5 2px 12px),
    repeating-linear-gradient(90deg, #d9d9d9 0 2px, #f5f5f5 2px 12px);
  background-blend-mode: multiply;
}

.phone__tile--light {
  background: #ededed;
}

.phone__foot {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Room photo: wall, floor, sofa and a picture frame. */
.phone__room {
  position: relative;
  flex: none;
  height: 128px;
  overflow: hidden;
  border: 1.5px solid var(--color-brand-jet);
  border-radius: 8px;
  background-color: var(--color-brand-grey-light);
}

.phone__room span {
  position: absolute;
  border: 1.5px solid var(--color-brand-jet);
}

.phone__floor {
  inset: auto -2px -2px;
  height: 52px;
  background-color: #e6e6e6;
}

.phone__room--tiled .phone__floor {
  background:
    repeating-linear-gradient(90deg, #9a9a9a 0 1.5px, transparent 1.5px 22px),
    repeating-linear-gradient(0deg, #9a9a9a 0 1.5px, transparent 1.5px 14px),
    var(--color-paper);
}

.phone__sofa {
  left: 14px;
  bottom: 30px;
  width: 78px;
  height: 40px;
  border-radius: 6px 6px 2px 2px;
  background-color: var(--color-paper);
}

.phone__frame {
  left: 22px;
  bottom: 58px;
  width: 26px;
  height: 18px;
  border-radius: 4px;
  background-color: var(--color-paper);
}

/* Before half of the comparison, and the slider between the halves. */
.phone__room .phone__before {
  inset: auto 50% -2px -2px;
  height: 52px;
  background-color: #cfcfcf;
}

.phone__room .phone__divider {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  border: 0;
  background-color: var(--color-brand-jet);
}

.phone__divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-brand-jet);
  border-radius: 999px;
  background-color: var(--color-brand-accent);
}

.phone__toggle {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.phone__chip {
  flex: 1;
  padding: 10px 4px;
  text-align: center;
  border: 2px solid var(--color-brand-jet);
  border-radius: 10px;
}

.phone__chip--on {
  background-color: var(--color-brand-accent);
}

.phone__apply {
  margin-top: auto;
  padding: 10px;
  text-align: center;
  color: var(--color-paper);
  border-radius: 10px;
  background-color: var(--color-brand-jet);
}

.phone__caption {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

.phone__icons {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.phone__icons span {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 30px;
  border: 1.5px solid var(--color-brand-jet);
  border-radius: 8px;
}

.phone__icons svg {
  width: 16px;
  height: 16px;
}

/* 4. Baseline card ------------------------------------------------------------ */

.article-baseline {
  margin-top: 28px;
  padding: 36px 40px;
  border: 1px solid rgb(255 255 255 / 0.9);
  border-radius: 28px;
  background-color: rgb(255 255 255 / 0.7);
  box-shadow: 0 20px 50px rgb(17 17 17 / 0.1);
}

.article-baseline__title {
  margin-bottom: 16px;
  font-size: 13px;
  color: #5e5e5e;
}

.article-baseline ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 22px;
  list-style: disc;
}

/* 5. Closing call to action ------------------------------------------------- */

.article-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 120px 40px;
}

.article-cta__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  align-self: stretch;
  padding: 72px 80px;
  color: var(--color-paper);
  border-radius: 28px;
  background-color: #1c1a19;
}

.article-cta__card h2 {
  max-width: 640px;
  font-size: clamp(36px, 3.9vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  color: var(--color-canary);
}

/* The mockup's 300px white rule under the heading. */
.article-cta__card h2::after {
  content: "";
  display: block;
  width: min(300px, 100%);
  height: 2px;
  margin-top: 24px;
  background-color: var(--color-paper);
}

.article-cta__card p {
  max-width: 620px;
  font-size: 22px;
  line-height: 1.55;
}

.article-cta__card .button {
  margin-top: 8px;
}

.article-cta > .article-back {
  font-size: 18px;
}

/* 6. Policy page ------------------------------------------------------------ */

/* privacy.html: the article layout on a light hero, with lists and a
   table in the reading column. */
.article-hero--light {
  color: var(--color-brand-jet);
  background-color: var(--color-cloud);
  background-image: none;
}

.article-hero--light .article-hero__inner {
  padding-bottom: 0;
}

.article-body ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
  padding-left: 26px;
  list-style: disc;
}

.article-body ul + p {
  margin-top: 20px;
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The table keeps its columns and scrolls sideways on small screens. */
.policy-table {
  margin: 28px 0;
  overflow-x: auto;
  border: 1px solid #d9d7d2;
  border-radius: 16px;
  background-color: var(--color-paper);
}

.policy-table table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 18px;
  line-height: 1.45;
  text-align: left;
}

.policy-table th,
.policy-table td {
  padding: 14px 18px;
  vertical-align: top;
  border-bottom: 1px solid #d9d7d2;
}

.policy-table th + th,
.policy-table td + td {
  border-left: 1px solid #d9d7d2;
}

.policy-table tr:last-child td {
  border-bottom: 0;
}

.policy-table th {
  font-weight: 600;
  color: #5e5e5e;
  background-color: #f1efea;
}

.article-layout > .article-back {
  display: inline-block;
  margin: 72px 0 120px;
  font-size: 18px;
}

/* 7. Smaller screens ------------------------------------------------------- */

@media (max-width: 700px) {
  .article-hero {
    padding: 0 20px;
  }

  .article-hero__inner {
    padding: 32px 0 56px;
  }

  .article-layout {
    padding: 64px 20px 0;
  }

  .article-body {
    font-size: 18px;
  }

  .article-body h2 {
    font-size: 30px;
  }

  .article-steps {
    gap: 48px;
  }

  .article-baseline {
    padding: 28px 24px;
  }

  .article-cta {
    padding: 80px 16px;
  }

  .article-cta__card {
    padding: 48px 24px;
  }

  .article-cta__card p {
    font-size: 18px;
  }

  .policy-table table {
    font-size: 16px;
  }

  .article-layout > .article-back {
    margin: 56px 0 80px;
  }
}
