@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* Stylesheet for /dfy/ only. Don't link it from other pages. */

/* ---------- Tokens ---------- */
:root {
  --ink: #062526;
  --sky: #a7d2dd;
  --coral: #f47068;
  --cream: #fff4f0;
  --white: #fff;
  --black: #000;

  --fs-display: min(74.67px, 15.3vw);
  --fs-investor: min(74.67px, 12.14vw);
  --fs-quote: clamp(25.6px, 2.22vw, 32px);
  --fs-eyebrow: clamp(19.2px, 1.67vw, 24px);
  --fs-body: clamp(17px, 1.48vw, 21.33px);
  --fs-small: clamp(14.9px, 1.3vw, 18.67px);
  --fs-tagline: min(32px, 3.44vw);

  --radius-photo: clamp(24px, 2.8vw, 40px);
  --wrap: 1232px;

  /* Step cards are drawn at 416px on desktop and scaled to 80% on the phone. */
  --u: 1px;
}

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

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: var(--fs-body);
  /* Canva's "regular" Montserrat renders like Google's 500. */
  font-weight: 500;
  line-height: 1.36;
  color: var(--cream);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

b {
  font-weight: 700;
}

.wrap {
  width: min(var(--wrap), 100% - 32px);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 4px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.btn--cta {
  min-height: 72px;
  width: min(537px, 100%);
  padding: 0 24px;
  border-color: var(--cream);
  background: var(--coral);
  color: var(--cream);
  font-size: var(--fs-eyebrow);
}

/* On the cream section the button has a black outline and dark text. */
.btn--outlined {
  border-color: var(--black);
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero__body {
  display: grid;
  grid-template-columns: minmax(0, 663fr) minmax(0, 588fr);
  column-gap: clamp(24px, 2.85vw, 41px);
  align-items: start;
  /* On the 1440px design the text starts at x=111 and the photo ends 37px from the right edge. */
  margin: 117px max(16px, 50% - 683px) 0 max(16px, 50% - 609px);
  padding-bottom: 54px;
}

.eyebrow {
  font-size: var(--fs-eyebrow);
  line-height: 1.375;
  letter-spacing: .036em;
  text-transform: uppercase;
  color: var(--coral);
}

.hero__title {
  margin: 37px 0 38px -7px;
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 1.018;
  text-transform: uppercase;
  color: var(--white);
}

/* Google's Montserrat runs a little wider than Canva's; keep Canva's line breaks on desktop. */
.hero__text p,
.investor__text p {
  white-space: nowrap;
}

.hero__text p + p {
  margin-top: 29px;
}

.hero__text .btn {
  margin-top: 30px;
}

/* Canva crops the top and bottom of the 588 × 734 photo. */
.hero__photo {
  width: 100%;
  aspect-ratio: 588 / 679;
  margin-top: 46px;
  object-fit: cover;
  object-position: 50% 51%;
  border-radius: var(--radius-photo);
}

/* ---------- Testimonials ---------- */
.testimonial {
  background: var(--cream);
  color: var(--ink);
  text-align: center;
}

.testimonial--vancouver {
  padding: 63px 0 65px;
}

.testimonial--calgary {
  padding: 78px 0 52px;
}

.testimonial p {
  font-size: var(--fs-quote);
  line-height: 1.375;
}

.testimonial--vancouver p {
  line-height: 1.5625;
}

/* Canva shows the middle of a landscape photo inside the circle. */
.testimonial img {
  width: clamp(148px, 12.85vw, 185px);
  aspect-ratio: 1;
  margin: 35px auto 39px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial--calgary img {
  margin: 44px auto 35px;
}

.testimonial cite {
  font-style: italic;
}

/* ---------- You're an investor. Not a bookkeeper ---------- */
.investor {
  padding: 60px 16px 73px;
}

.investor__title {
  font-size: var(--fs-investor);
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
}

.investor__title span {
  display: block;
}

.investor__title-accent {
  line-height: 1.165;
  color: var(--coral);
}

.investor__title-rest {
  line-height: .925;
}

/* On the 1440px design the text column is 12px right of centre. */
.investor__text {
  width: min(774px, 100%);
  margin: 40px auto 0 max(0px, 50% - 375px);
}

.investor__text p + p {
  margin-top: 29px;
}

/* ---------- This is what investing looks like ---------- */
.investing {
  display: flex;
  flex-direction: column;
  align-items: start;
  margin: 0 16px 0 max(16px, 50% - 578px);
  padding: 76px 0 69px;
}

.investing__title {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: .978;
}

.investing__subtitle {
  margin-top: 29px;
  font-size: var(--fs-quote);
  font-weight: 900;
  line-height: .97;
  color: var(--sky);
}

.investing__text {
  max-width: 766px;
  margin-top: 45px;
}

.investing__text p + p {
  margin-top: 29px;
}

.investing .btn {
  margin: 64px 0 0 11px;
}

/* ---------- How it works ---------- */
.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 53px 16px 79px;
  background: var(--cream);
  color: var(--ink);
  text-align: center;
}

.steps__title {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: .99;
  text-transform: uppercase;
}

.steps__list {
  display: grid;
  grid-template-columns: repeat(3, calc(416 * var(--u)));
  justify-content: center;
  gap: 13px;
  width: 100%;
  margin: 65px 0 82px;
}

/* The hand-drawn frame is the white frame used on /crypto-tax-guide/, masked and filled dark here.
   Everything inside is placed as in Canva, in 416px-card units. */
.step {
  position: relative;
  aspect-ratio: 1;
  text-align: left;
}

.step::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  -webkit-mask: url("/assets/img/frame-hand-drawn.png") center / 100% 100% no-repeat;
  mask: url("/assets/img/frame-hand-drawn.png") center / 100% 100% no-repeat;
}

.step > * {
  position: absolute;
}

.step__number {
  z-index: 1;
  top: calc(-34 * var(--u));
  left: 0;
  width: calc(99 * var(--u));
}

.step__title {
  font-size: calc(21.33 * var(--u));
  font-weight: 700;
  line-height: calc(23 * var(--u));
  text-align: center;
}

.step__text {
  font-size: calc(21.33 * var(--u));
  line-height: calc(29 * var(--u));
  white-space: nowrap;
}

.step--apply .step__number {
  top: calc(-29 * var(--u));
  left: calc(-12 * var(--u));
  width: calc(100 * var(--u));
}

.step--apply .step__icon {
  top: calc(37 * var(--u));
  left: calc(132 * var(--u));
  width: calc(126 * var(--u));
}

.step--apply .step__title {
  top: calc(227 * var(--u));
  left: calc(28 * var(--u));
  width: calc(340 * var(--u));
}

.step--apply .step__text {
  top: calc(290 * var(--u));
  left: calc(28 * var(--u));
}

.step--review .step__icon {
  top: calc(42 * var(--u));
  left: calc(138 * var(--u));
  width: calc(140 * var(--u));
}

.step--review .step__title {
  top: calc(215 * var(--u));
  left: calc(12 * var(--u));
  width: calc(391 * var(--u));
}

.step--review .step__text {
  top: calc(261 * var(--u));
  left: calc(46 * var(--u));
}

.step--next .step__number {
  width: calc(94 * var(--u));
}

.step--next .step__icon {
  top: calc(37 * var(--u));
  left: calc(133 * var(--u));
  width: calc(160 * var(--u));
}

.step--next .step__title {
  top: calc(206 * var(--u));
  left: calc(52 * var(--u));
  width: calc(320 * var(--u));
  line-height: calc(29 * var(--u));
}

.step--next .step__text {
  top: calc(249 * var(--u));
  left: calc(62 * var(--u));
}

/* ---------- About ---------- */
.about {
  padding: 64px 0 101px;
}

.about__title {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: .99;
  text-transform: uppercase;
  text-align: center;
}

.about__tagline {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
  font-size: var(--fs-tagline);
  font-weight: 700;
  line-height: 1.375;
  white-space: nowrap;
}

.about__tagline img {
  height: 1.8em;
  width: auto;
  /* The tall emoji must not make the line taller than the text.
     Its transparent right edge sits under the start of "Crypto", as in Canva. */
  position: relative;
  top: .125em;
  margin: -.22em -.375em -.22em .59em;
}

.about__body {
  display: grid;
  grid-template-columns: minmax(0, 640fr) minmax(0, 549fr);
  column-gap: clamp(32px, 3.75vw, 54px);
  align-items: start;
  width: min(1243px, 100% - 32px);
  margin: 70px 0 0 max(16px, 50% - 683px);
}

.about__photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 640 / 662;
  border-radius: var(--radius-photo);
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-caption {
  position: absolute;
  left: 0;
  right: 43px;
  bottom: 24px;
  padding: 14px 8px 14px 17px;
  border-radius: 10px;
  background: rgb(6 37 38 / .85);
  font-size: var(--fs-small);
  line-height: 1.07;
  letter-spacing: .036em;
  color: var(--cream);
}

.about__text p + p {
  margin-top: 29px;
}

.about__text .btn {
  margin: 41px 0 0 12px;
}

/* ---------- Below the full desktop width ---------- */
@media (max-width: 1280px) {

  /* Canva's hard line breaks only fit the full 1440px design; below it text wraps naturally.
     The step cards keep theirs: they are drawn at a fixed size. */
  br {
    display: none;
  }

  .step br,
  .site-footer br {
    display: inline;
  }

  .hero__text p,
  .investor__text p {
    white-space: normal;
  }

  .hero__text,
  .about__text {
    display: grid;
  }

  .hero__text .btn,
  .about__text .btn,
  .investing .btn {
    margin-left: 0;
    justify-self: center;
  }

  .investing .btn {
    align-self: center;
  }
}

/* ---------- Tablet: side-by-side cards no longer fit ---------- */
@media (max-width: 1100px) {
  .steps__list {
    grid-template-columns: calc(416 * var(--u));
    gap: calc(48 * var(--u));
  }
}

/* ---------- Phone layout (Canva's 390px design) ---------- */
@media (max-width: 800px) {

  /* Canva's phone design is 390px wide; on larger phones and small tablets keep it from ballooning. */
  :root {
    --wrap: 560px;
    /* 80% of the desktop card, or less when a 333px card doesn't fit. */
    --u: min(.8px, (100vw - 32px) / 416);
  }

  .btn {
    border-width: 3px;
  }

  .btn--cta {
    width: 100%;
    max-width: 560px;
    min-height: 58px;
  }

  /* The last button is smaller on the phone design. */
  .btn--small {
    min-height: 48px;
    font-size: 16px;
  }

  .hero__body {
    display: block;
    margin: 32px max(16px, 50% - 280px) 0;
    padding-bottom: 43px;
  }

  .hero__title {
    margin: 19px 0 19px;
  }

  .hero__text p + p {
    margin-top: 23px;
  }

  .hero__text .btn {
    margin-top: 14px;
  }

  .hero__photo {
    aspect-ratio: 359 / 415;
    margin-top: 15px;
  }

  .testimonial--vancouver {
    padding: 51px 0 52px;
  }

  .testimonial--calgary {
    padding: 62px 0 43px;
  }

  .testimonial img,
  .testimonial--calgary img {
    margin: 13px auto;
  }

  .testimonial--vancouver img {
    margin-top: 11px;
  }

  .investor {
    padding: 48px max(16px, 50% - 280px) 58px;
  }

  .investor__text {
    width: auto;
    margin: 20px 0 0;
  }

  .investor__text p + p {
    margin-top: 23px;
  }

  .investing {
    margin: 0 max(16px, 50% - 280px);
    padding: 60px 0 53px;
  }

  .investing__subtitle {
    margin-top: 24px;
  }

  .investing__text {
    margin-top: 16px;
  }

  .investing__text p + p {
    margin-top: 23px;
  }

  .investing .btn {
    margin-top: 18px;
  }

  .steps {
    padding: 43px 16px 62px;
  }

  .steps__list {
    gap: 43px;
    margin: 50px 0 23px;
  }

  .about {
    padding: 52px 0 81px;
  }

  .about__body {
    display: block;
    width: auto;
    margin: 20px max(16px, 50% - 280px) 0;
  }

  .about__photo {
    aspect-ratio: 359 / 546;
  }

  .photo-caption {
    left: 15px;
    right: 16px;
    bottom: 19px;
    padding: 11px 20px 11px 22px;
  }

  .about__text {
    padding-top: 14px;
  }

  .about__text p + p {
    margin-top: 23px;
  }

  .about__text .btn {
    margin-top: 14px;
  }
}

/* ---------- Very narrow phones ---------- */
@media (max-width: 360px) {
  .btn {
    white-space: normal;
    text-align: center;
  }
}
