/* ==========================================================================
   The Change Tool — landing page
   Desktop first; the phone layout lives in the media query at the bottom.
   ========================================================================== */

:root {
  --paper: #F2F1EC;
  --paper-rule: #E3E1D9;
  --ink: #161616;
  --ink-soft: #3D3B36;
  --ink-muted: #5A5850;
  --rule: #C9C6BC;
  --red: #D7261E;
  --orange: #F0913F;
  --yellow: #F3C94B;
  --white: #FFFFFF;

  --font-sans: 'Archivo', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-hand: 'Caveat', cursive;

  --container: 1120px;
  --gutter: 24px;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  /* Ruled-paper lines */
  background-image: linear-gradient(var(--paper-rule) 1px, transparent 1px);
  background-size: 100% 32px;
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

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

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

a {
  color: var(--ink);
}

a:hover {
  color: var(--red);
}

a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

svg {
  display: block;
}

mark {
  background: var(--orange);
  color: inherit;
  padding: 0 4px;
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* Line breaks that only apply on phones */
.break-mobile {
  display: none;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  padding: 16px 24px;
  border: 1.5px solid transparent;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  border-radius: 99px;
}

.button--small {
  padding: 12px 18px;
  font-size: 14px;
}

.button--red {
  background: var(--red);
  color: var(--white);
}

.button--red:hover {
  background: #B31D17;
  color: var(--white);
}

.button--dark {
  background: var(--ink);
  color: var(--paper);
}

.button--dark:hover {
  background: #000;
  color: var(--paper);
}

.button--outline {
  border-color: var(--ink);
  font-weight: 400;
}

.button--outline-light {
  border-color: var(--paper);
  color: var(--paper);
  font-weight: 400;
}

.button--outline-light:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.link-plain {
  display: inline-block;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-decoration: none;
}

/* ---------- Site header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px;
}

.wordmark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark__tld {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
}

.site-nav ul {
  display: flex;
  gap: 12px;
  align-items: center;
}

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

.hero {
  position: relative;
  /* padding-top: 48px; */
  padding-bottom: 96px;
}

.hero__heading {
  position: relative;
  padding-top: 128px;
}

/* The yellow sticky note */
.hero__note {
  position: absolute;
  top: 64px;
  left: 2px;
  z-index: 2;
  padding: 12px 18px;
  background: var(--yellow);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  font-family: var(--font-hand);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-6deg);
}

/* The hand-drawn arrow from the note to the heading */
.hero__arrow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.hero__arrow path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero__arrow--desktop {
  width: 340px;
  height: 140px;
}

.hero__arrow--mobile {
  display: none;
  width: 120px;
  height: 130px;
}

.hero__title {
  font-size: clamp(44px, 7.6vw, 104px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

/* Proofreader's insertion: a red caret with "gas-lit" written above it.
   Sizes are in em so they scale with the heading. */
.insert {
  position: relative;
  display: inline-block;
  width: 0.46em;
  height: 0;
}

.insert__caret {
  position: absolute;
  left: 0.124em;
  bottom: 0.39em;
  width: 0.29em;
  height: 0.32em;
  overflow: visible;
}

.insert__caret path {
  fill: none;
  stroke: var(--red);
  stroke-width: 5.5px;          /* matches the pen weight of the handwriting */
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.insert__word {
  position: absolute;
  left: 0.206em;
  bottom: 0.495em;
  white-space: nowrap;
  transform: translateX(-46%) rotate(-5deg);
}

.insert__ink {
  color: var(--red);
  font-family: var(--font-hand);
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0;
}

.hero__body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px;
  align-items: end;
  margin-top: 56px;
}

.hero__intro {
  max-width: 34em;
  font-size: 21px;
  line-height: 1.5;
}

/* ---------- Briefs ---------- */

.briefs {
  background: var(--orange);
  padding-block: 88px 104px;
}

.briefs__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--ink);
}

.briefs__title {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.briefs__kicker {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
}

.briefs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.brief-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  background: var(--paper);
}

.brief-card--good {
  background: var(--white);
  box-shadow: 10px 10px 0 var(--ink);
}

.brief-card__title {
  font-size: 26px;
  font-weight: 800;
}

.brief-card__art {
  width: 100%;
  height: auto;
}

.brief-card__text {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- Set yourself up for success ---------- */

.success {
  padding-top: 104px;
  padding-bottom: 64px;
}

.section-title {
  padding-bottom: 16px;
  border-bottom: 3px solid var(--ink);
  font-size: clamp(36px, 5.6vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.success__text {
  max-width: 34em;
  margin-top: 40px;
  font-size: 21px;
  line-height: 1.5;

  & p {
    padding: 0.85rem 0;
  }
}

/* ---------- Closing call to action ---------- */

.cta {
  padding-top: 32px;
  padding-bottom: 96px;
}

.cta__panel {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 56px 48px;
  background: var(--ink);
  color: var(--paper);
}

.cta__title {
  max-width: 16ch;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Keep the rule inside the content column */
.site-footer.container {
  width: min(calc(var(--container) - 2 * var(--gutter)), calc(100% - 2 * var(--gutter)));
  max-width: none;
  padding-inline: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
}

.site-footer li + li::before {
  content: "·";
  margin-inline: 8px;
}

.site-footer a {
  color: var(--ink-muted);
}

.site-footer a:hover {
  color: var(--red);
}

/* ==========================================================================
   Phone layout
   ========================================================================== */

@media (max-width: 640px) {

  .break-mobile {
    display: inline;
  }

  /* Header: wordmark + Login only; Create account leads the hero instead */
  .site-header {
    flex-wrap: nowrap;
    padding-block: 16px;
  }

  .wordmark {
    font-size: 19px;
  }

  .wordmark__tld {
    font-size: 12px;
  }

  .site-nav__cta {
    display: none;
  }

  .site-nav .link-plain {
    padding: 12px 4px 12px 12px;
  }

  /* Hero */
  .hero {
    padding-top: 32px;
    padding-bottom: 64px;
  }

  .hero__title {
    font-size: 42px;
    line-height: 1.3;
  }

  .insert__caret {
    left: 0.095em;
    bottom: 0.333em;
    width: 0.286em;
    height: 0.333em;
  }

  .insert__caret path {
    stroke-width: 2.4px;
  }

  .insert__word {
    left: 0.238em;
    bottom: 0.619em;
  }

  .insert__ink {
    font-size: 0.571em;   /* same size as the "Computer assisted" note */
    line-height: 1;
  }

  .hero__body {
    display: block;
    margin-top: 32px;
  }

  .hero__intro {
    font-size: 18px;
  }

  .actions {
    flex-direction: column;
  }

  .hero .actions {
    margin-top: 28px;
  }

  .button {
    display: block;
    padding-inline: 20px;
  }

  /* Briefs */
  .briefs {
    padding: 56px 20px 64px;
  }

  .briefs .container {
    padding-inline: 0;
  }

  .briefs__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 12px;
  }

  .briefs__title {
    font-size: 52px;
  }

  .briefs__kicker {
    font-size: 13px;
  }

  .briefs__grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 28px;
  }

  .brief-card {
    gap: 14px;
    padding: 20px;
  }

  .brief-card--good {
    margin-right: 6px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .brief-card__title {
    font-size: 22px;
  }

  /* Success */
  .success {
    padding-top: 64px;
    padding-bottom: 40px;
  }

  .section-title {
    padding-bottom: 12px;
    font-size: 34px;
    line-height: 1.02;
  }

  .success__text {
    margin-top: 24px;
    font-size: 18px;
    line-height: 1.55;
  }

  /* CTA */
  .cta {
    padding-top: 16px;
    padding-bottom: 56px;
  }

  .cta__panel {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 32px 24px;
  }

  .cta__title {
    max-width: none;
    font-size: 30px;
  }

  /* Footer */
  .site-footer {
    flex-direction: column;
    gap: 8px;
    padding-top: 20px;
  }
}

@media (max-width: 1200px) {
  .hero__heading {
    padding-top: 92px;
  }
  .hero__note {
    top: 38px;
    padding: 8px 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    font-size: 24px;
  }
  .hero__arrow--desktop {
    display: none;
  }

  .hero__arrow--mobile {
    display: block;
  }

  .hero__arrow path {
    stroke-width: 2.5;
  }
}