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

/* Stylesheet for /celsius-toolkit/ 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-video-title: min(69.36px, 11.79vw);
  --fs-inside-title: min(69.35px, 14.2vw);
  --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);

  /* One blank line between paragraphs, as in Canva's text boxes. */
  --gap-line: 1.36em;

  --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;
}

/* The <picture> wrapper from the responsiveImage shortcode must not affect layout. */
picture {
  display: contents;
}

picture > source {
  display: none;
}

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

b {
  font-weight: 700;
}

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

.bullets {
  padding-left: 1.7em;
  list-style: disc;
}

/* ---------- 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 sections the button has a dark outline and dark text. */
.btn--outlined {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 117px;
}

.hero__body {
  display: grid;
  grid-template-columns: minmax(0, 595fr) minmax(0, 647fr);
  column-gap: 27px;
  align-items: start;
  /* On the 1440px design the text starts at x=111 and the photo ends 60px from the right edge. */
  margin: 0 max(16px, 50% - 660px) 0 max(16px, 50% - 609px);
  padding-bottom: 52px;
}

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

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

.hero__tagline {
  margin-top: 10px;
  font-size: var(--fs-quote);
  font-weight: 900;
  line-height: .97;
  color: var(--coral);
}

.hero__lead {
  margin-top: var(--gap-line);
}

.hero__tagline + .hero__lead {
  margin-top: 46px;
}

.hero__text .btn {
  margin: 81px 0 0 12px;
}

/* Canva shows the middle-left of the 3:2 photo in a nearly square frame. */
.hero__photo {
  width: 100%;
  aspect-ratio: 647 / 679;
  margin-top: 46px;
  object-fit: cover;
  object-position: 24% 50%;
  border-radius: var(--radius-photo);
}

/* ---------- Testimonials ---------- */
.testimonial {
  text-align: center;
}

.testimonial--victoria {
  padding: 54px 0 66px;
  background: var(--cream);
  color: var(--ink);
}

.testimonial--vancouver {
  padding: 62px 0 53px;
}

.testimonial__intro {
  font-size: var(--fs-eyebrow);
  line-height: 1.375;
}

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

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

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

.testimonial--vancouver img {
  margin: 17px auto 33px;
  object-position: 0% 50%;
}

.testimonial cite {
  font-style: italic;
}

/* ---------- "I just threw everything into Koinly" ---------- */
.familiar {
  margin: 0 16px 0 max(16px, 50% - 603px);
  padding: 83px 0 59px;
}

.familiar__title {
  font-size: var(--fs-quote);
  font-weight: 900;
  line-height: .97;
}

.familiar__text {
  max-width: 800px;
  margin: 38px 0 0 11px;
}

.familiar__text > * + * {
  margin-top: var(--gap-line);
}

.familiar .btn {
  margin: 52px 0 0 3px;
}

/* ---------- How it works ---------- */
.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 53px 16px 35px;
  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;
}

/* Three cards in the first row, two in the second, all 416px squares. */
.steps__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 33px 13px;
  width: 100%;
  max-width: calc(3 * 416 * var(--u) + 26px);
  margin: 65px 0 40px;
}

/* The hand-drawn frame is the white frame used on /crypto-tax-guide/, masked and filled dark here. */
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(416 * var(--u));
  max-width: 100%;
  aspect-ratio: 1;
}

.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 > *,
.step > :where(picture) > :where(img) {
  position: relative;
}

.step__number {
  position: absolute;
  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));
}

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

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

.step--gather .step__icon {
  width: calc(167 * var(--u));
  margin: calc(42 * var(--u)) 0 calc(18 * var(--u)) calc(34 * var(--u));
}

.step--calculate .step__icon {
  width: calc(127 * var(--u));
  margin: calc(50 * var(--u)) 0 calc(22 * var(--u));
}

.step--calculate .step__text {
  margin-top: calc(31 * var(--u));
}

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

.step--fix .step__icon {
  width: calc(211 * var(--u));
  margin: calc(49 * var(--u)) 0 calc(18 * var(--u));
}

.step--fix .step__title {
  line-height: calc(29 * var(--u));
}

.step--fix .step__text {
  margin-top: calc(18 * var(--u));
}

.step--review .step__number {
  top: calc(-31 * var(--u));
  left: calc(-27 * var(--u));
}

.step--review .step__icon {
  width: calc(184 * var(--u));
  margin: calc(72 * var(--u)) 0 calc(32 * var(--u));
}

/* Canva lets the longest line run almost up to the frame. */
.step--review .step__text {
  max-width: calc(100% - 20 * var(--u));
}

.step--cra .step__number {
  top: calc(-33 * var(--u));
  left: calc(-36 * var(--u));
  width: calc(100 * var(--u));
}

.step--cra .step__icon {
  width: calc(138 * var(--u));
  margin: calc(46 * var(--u)) 0 calc(29 * var(--u));
}

/* In the second row Canva leaves 80px between the two cards. */
@media (min-width: 1307px) {
  .step--cra {
    margin-left: 67px;
  }
}

/* ---------- About ---------- */
.about {
  padding: 64px 0 65px;
  background: var(--cream);
  color: var(--ink);
}

.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, 544fr);
  column-gap: 35px;
  align-items: start;
  width: min(1219px, 100% - 32px);
  margin: 43px 0 0 max(16px, 50% - 664px);
}

.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: 9px;
  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: 25px;
}

.about__text p + p {
  margin-top: var(--gap-line);
}

/* Google's Montserrat runs a little wider than Canva's; keep Canva's lines on desktop. */
.about__text p {
  white-space: nowrap;
}

.about__text .btn {
  margin: 26px 0 0 6px;
}

/* ---------- Understand the Celsius loss calculation ---------- */
.video {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 61px 16px 42px;
}

.video__title {
  font-size: var(--fs-video-title);
  font-weight: 900;
  line-height: .98;
  text-align: center;
}

.video__player {
  display: block;
  width: min(1010px, 100%);
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 60px 0 79px;
  border: 0;
}

/* ---------- What's inside ---------- */
.inside {
  padding: 76px 16px 29px max(16px, 50% - 606px);
  background: var(--cream);
  color: var(--ink);
}

.inside__title {
  font-size: var(--fs-inside-title);
  font-weight: 900;
  line-height: .98;
  text-transform: uppercase;
  color: var(--coral);
}

.inside__lead {
  margin-top: 25px;
}

.inside__list {
  max-width: 800px;
  margin-top: var(--gap-line);
}

.inside__list li + li {
  margin-top: var(--gap-line);
}

.inside__block {
  margin: 45px 0 0 14px;
}

.inside__subtitle {
  font-size: var(--fs-quote);
  font-weight: 900;
  line-height: .97;
  color: var(--coral);
}

.inside__subtitle + p {
  margin-top: 21px;
}

.inside__block .bullets {
  margin-top: var(--gap-line);
}

.inside__block .lines {
  overflow-wrap: anywhere;
}

.inside .btn {
  margin: 42px 0 0 26px;
}

/* ---------- Only for Canadians ---------- */
.fine-print {
  padding: 75px 0 70px;
}

.fine-print__text {
  margin: 0 16px 0 max(16px, 50% - 606px);
}

.fine-print__title {
  font-size: var(--fs-body);
  font-weight: 700;
  line-height: 1.36;
}

.fine-print__text > * + * {
  margin-top: var(--gap-line);
}

.fine-print__text > .fine-print__follow-on {
  margin-top: 0;
}

/* ---------- 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 hero title, the step cards and real line breaks (.lines) keep theirs. */
  br {
    display: none;
  }

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

  .hero__text,
  .about__text {
    display: grid;
  }

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

  .about__text p {
    white-space: normal;
  }
}

/* ---------- Tablet: side-by-side cards no longer fit ---------- */
@media (max-width: 1100px) {
  .about__tagline {
    white-space: normal;
    flex-wrap: wrap;
  }
}

/* ---------- 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 {
    border-width: 3px;
  }

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

  .hero {
    padding-top: 32px;
  }

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

  .hero__title {
    margin-top: 19px;
  }

  .hero__tagline {
    margin-top: 8px;
  }

  .hero__tagline + .hero__lead {
    margin-top: 17px;
  }

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

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

  .testimonial--victoria {
    padding: 43px 0 53px;
  }

  .testimonial--vancouver {
    padding: 50px 0 42px;
  }

  .testimonial__quote {
    margin-top: 7px;
  }

  .testimonial--vancouver .testimonial__quote {
    margin-top: 9px;
  }

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

  .testimonial--vancouver cite {
    display: block;
    margin-top: 14px;
  }

  .familiar {
    margin: 0 max(16px, 50% - 280px);
    padding: 67px 0 47px;
  }

  .familiar__text {
    margin: 17px 0 0;
  }

  .familiar .btn {
    margin: 14px 0 0;
  }

  /* Canva's phone design shrinks the five cards to 116px with 6px text; they are stacked
     at 80% of their desktop size instead, so the text stays readable. */
  .steps {
    padding: 42px 16px 28px;
  }

  .steps__list {
    flex-direction: column;
    align-items: center;
    gap: 43px;
    margin: 65px 0 20px;
  }

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

  .about__tagline {
    flex-wrap: nowrap;
    white-space: nowrap;
  }

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

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

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

  .about__text {
    padding-top: 14px;
  }

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

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

  .video__player {
    width: 100%;
    margin: 21px 0 22px;
  }

  .inside {
    padding: 61px max(16px, 50% - 280px) 24px;
  }

  .inside__lead {
    margin-top: 20px;
  }

  .inside__list {
    margin-top: 22px;
  }

  .inside__block {
    margin: 17px 0 0;
  }

  .inside__subtitle + p {
    margin-top: 16px;
  }

  .inside .btn {
    margin: 14px 0 0;
  }

  .fine-print {
    padding: 59px 0 57px;
  }

  .fine-print__text {
    margin: 0 max(16px, 50% - 280px);
  }
}

/* ---------- Very narrow phones ---------- */
@media (max-width: 360px) {

  /* The 333px step cards shrink to the viewport. */
  :root {
    --u: calc((100vw - 32px) / 416);
  }

  .btn {
    white-space: normal;
    text-align: center;
  }

  .step br {
    display: none;
  }

  .about__tagline {
    flex-wrap: wrap;
    white-space: normal;
  }
}
