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

/* Stylesheet for /crypto-tax-guide/ only. Don't link it from other pages. */

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

  --fs-display: min(74.67px, 15.3vw);
  --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;
}

.bullets {
  padding-left: 36px;
  list-style: disc;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px 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);
}

/* ---------- Hero ---------- */
.hero__body {
  display: grid;
  grid-template-columns: minmax(0, 685fr) minmax(0, 511fr);
  column-gap: clamp(32px, 5.7vw, 82px);
  align-items: start;
  /* On the 1440px design the text starts at x=125 and the photo ends 37px from the right edge. */
  margin: 82px max(16px, 50% - 683px) 0 max(16px, 50% - 595px);
  padding-bottom: 61px;
}

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

.hero__title {
  margin-top: 23px;
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: 1.058;
}

.hero__lead {
  margin: 22px 0 29px;
}

.hero__text .btn {
  margin: 27px 0 0 6px;
}

.hero__photo {
  width: 100%;
  aspect-ratio: 511 / 591;
  margin-top: 31px;
  object-fit: cover;
  border-radius: var(--radius-photo);
}

/* ---------- Testimonial ---------- */
.testimonial {
  padding: 65px 0 40px;
  background: var(--cream);
  color: var(--ink);
  text-align: center;
}

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

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

.testimonial cite {
  font-style: italic;
}

/* ---------- Most free guides give you the rules ---------- */
.rules {
  padding: 76px 0 44px;
}

.rules__body {
  display: flex;
  flex-direction: column;
  align-items: start;
  width: min(var(--wrap), 100% - 32px);
  margin-inline: auto;
}

.rules__title {
  font-size: var(--fs-display);
  font-weight: 900;
  line-height: .91;
  text-transform: uppercase;
}

.rules__subtitle {
  margin-top: 8px;
  font-size: var(--fs-quote);
  font-weight: 600;
  line-height: 1.375;
}

.rules__intro {
  margin: 43px 0 29px;
}

.rules__body .bullets {
  margin-bottom: 29px;
}

.rules__body .btn {
  margin: 65px 0 0 80px;
}

/* ---------- Skip straight to your answers ---------- */
.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 77px 16px 94px;
  text-align: center;
}

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

.steps__intro {
  margin-top: 24px;
  font-size: var(--fs-quote);
  line-height: 1.375;
}

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

/* A hand-drawn frame that stretches with the card. */
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 1;
  padding-bottom: calc(24 * var(--u));
  background: url("/assets/img/frame-hand-drawn.png") center / 100% 100% no-repeat;
}

.step__number {
  position: absolute;
  top: calc(-29 * var(--u));
  left: 0;
  width: calc(99 * var(--u));
}

.step:first-child .step__number {
  left: calc(-9 * var(--u));
  width: calc(100 * var(--u));
}

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

.step__icon--qa {
  width: calc(131 * var(--u));
  margin: calc(39 * var(--u)) 0 calc(30 * var(--u));
}

.step__icon--clipboard {
  width: calc(115 * var(--u));
  margin: calc(50 * var(--u)) 0 calc(31 * var(--u));
}

.step__icon--next {
  width: calc(126 * var(--u));
  margin: calc(45 * var(--u)) 0 calc(25 * var(--u));
}

.step__title {
  display: flex;
  align-items: center;
  min-height: calc(46 * var(--u));
  font-size: calc(21.33 * var(--u));
  font-weight: 700;
  line-height: calc(23 * var(--u));
}

.step__text {
  width: fit-content;
  max-width: calc(100% - 40 * var(--u));
  margin-top: calc(22 * var(--u));
  font-size: calc(21.33 * var(--u));
  line-height: calc(29 * var(--u));
  text-align: left;
}

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

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

.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, 544fr);
  column-gap: clamp(32px, 4.2vw, 60px);
  align-items: start;
  width: min(1244px, 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;
  object-position: 50% 46.5%;
}

.photo-caption {
  position: absolute;
  left: 0;
  right: 43px;
  bottom: 39px;
  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 {
  padding-top: 28px;
}

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

.about__text .btn {
  margin: 117px 0 0 -10px;
}

/* ---------- 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. */
  p:not(.step__text) br,
  h1 br,
  h2 br {
    display: none;
  }

  .hero__text {
    display: grid;
  }

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

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

  .about__text {
    display: grid;
  }

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

/* ---------- Tablet: three square cards no longer fit side by side ---------- */
@media (max-width: 1100px) {
  .steps__list {
    grid-template-columns: minmax(0, 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;
    --u: .8px;
  }

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

  .hero__body {
    display: block;
    width: auto;
    max-width: var(--wrap);
    margin: 22px max(16px, 50% - 280px) 0;
    padding-bottom: 50px;
  }

  .hero__title {
    margin-top: 18px;
  }

  .hero__lead {
    margin: 18px 0 23px;
  }

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

  .hero__photo {
    margin-top: 16px;
  }

  .testimonial {
    padding: 49px 0 32px;
  }

  .testimonial img {
    margin: 16px auto 13px;
  }

  .rules {
    padding: 57px 0 34px;
  }

  .rules__title {
    font-size: min(29.9px, 7.67vw);
  }

  .rules__subtitle {
    margin-top: 4px;
    font-size: 12.8px;
  }

  .rules__intro {
    margin: 12px 0 23px;
  }

  .bullets {
    padding-left: 29px;
  }

  .rules__body .bullets {
    margin-bottom: 24px;
  }

  .rules__body .btn {
    margin-top: 17px;
  }

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

  .steps__intro {
    margin-top: 19px;
  }

  .steps__list {
    gap: 39px;
    margin: 40px 0 20px;
  }

  .about {
    padding: 51px 0 65px;
  }

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

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

  .about__photo img {
    object-position: 50% 0;
  }

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

  .about__text {
    padding-top: 13px;
    /* Canva's phone text box is 359px wide from x=18, a little wider than the photo. */
    margin: 0 -3px 0 2px;
  }

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

  .about__text .btn {
    margin-top: 32px;
    margin-left: -2px;
  }
}

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

  .step__text br {
    display: none;
  }
}
