:root {
  color-scheme: light;
  --orange: #f79400;   /* sampled from the logo background */
  --brown: #a96106;    /* sampled from the logo cupcake wrapper */
  --ink: #1c1b19;
  --quiet: #5f5b53;
  --page: #fbfaf7;
  --sand: #f2ede3;
  --white: #ffffff;
  --rule: #e6e1d6;
  --header-height: 84px;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: clamp(32px, 5vw, 72px);
}

* { box-sizing: border-box; }

html { scroll-padding-top: var(--header-height); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 18px/1.55 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; }

h2 {
  font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprite { position: absolute; }

/* Layout */

.container,
.columns,
.site-header__inner {
  width: 100%;
  max-width: 1296px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.columns--top { align-items: start; }

.band { padding-block: clamp(72px, 10vw, 136px); }
.band--sand { background: var(--sand); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--orange);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  min-height: var(--header-height);
}

.logo img {
  width: auto;
  height: 44px;
}

.menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 32px;
}

.menu a {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

.menu a:hover { text-decoration-line: underline; }

.menu a.menu__button {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
}

.menu a.menu__button:hover {
  text-decoration-line: none;
  background: #000;
}

/* Hero */

.hero {
  display: flex;
  align-items: stretch;
  min-height: min(calc(100svh - var(--header-height)), 800px);
  padding-block: clamp(16px, 3vw, 40px) clamp(40px, 6vw, 72px);
  background: var(--orange);
}

.hero .columns { gap: clamp(20px, 3vw, 40px); }

.headline-box {
  display: flex;
  align-items: center;
  padding: clamp(28px, 3.4vw, 48px);
  border-radius: 20px;
  background: var(--ink);
  color: var(--page);
}

.headline-box h1 {
  font-size: clamp(3rem, 5.7vw, 5.1rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.headline-box em {
  color: var(--orange);
  font-style: normal;
  white-space: nowrap;
}

/* Chart */

.chart {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3vw, 36px);
  border-radius: 20px;
  background: var(--white);
}

.chart__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.chart__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chart__note,
.chart__axis {
  color: var(--quiet);
  font-size: 0.875rem;
}

.chart__plot {
  position: relative;
  flex: 1;
  min-height: 260px;
}

.chart__reveal,
.chart__reveal svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chart__grid line {
  stroke: var(--rule);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart__area { fill: var(--orange); opacity: 0.22; }

.chart__line {
  fill: none;
  stroke: var(--brown);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* Sits on the last data point: x 588/600, y 188/300 of the SVG viewBox */
.chart__end {
  position: absolute;
  left: 98%;
  top: 62.667%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--brown);
  transform: translate(-50%, -50%);
}

/* Markers sit on data points of the line, as percentages of the SVG viewBox */
.chart__marker {
  --stem: 40px;
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

/* Stem lengths stack the labels as a staircase above the falling line */

/* x 61.25/600, y 66/300: the peak */
.chart__marker--scan {
  --stem: 18px;
  left: 10.208%;
  top: 22%;
}

/* x 98/600, y 109.5/300 */
.chart__marker--housekeeping {
  --stem: 24px;
  left: 16.333%;
  top: 36.492%;
}

/* x 294/600, y 167.7/300 */
.chart__marker--rightsized {
  --stem: 24px;
  left: 49%;
  top: 55.901%;
}

.chart__marker::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 1.5px;
  height: var(--stem);
  background: var(--ink);
  transform: translateX(-50%);
}

.chart__callout {
  position: absolute;
  bottom: calc(100% + var(--stem));
  left: -6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--page);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

/* Pulled left so this label stays inside the plot on phones */
.chart__marker--rightsized .chart__callout { left: -40px; }

.chart__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1.5px solid var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .chart__reveal { animation: reveal 1.4s cubic-bezier(.3, .1, .3, 1) both; }
  .chart__end { animation: appear 0.3s 1.3s both; }
  /* Delays match when the line's reveal reaches each marker */
  .chart__marker--scan { animation: appear 0.3s 0.17s both; }
  .chart__marker--housekeeping { animation: appear 0.3s 0.23s both; }
  .chart__marker--rightsized { animation: appear 0.3s 0.46s both; }
}

@keyframes reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* How it works */

.prose {
  max-width: 40em;
  margin-top: 24px;
}

.prose p + p { margin-top: 1em; }

.section-intro {
  position: sticky;
  top: calc(var(--header-height) + 32px);
}

.section-intro p {
  max-width: 28em;
  margin-top: 20px;
  color: var(--quiet);
}

.steps { counter-reset: step; }

.steps li {
  position: relative;
  padding: 0 0 48px 88px;
  counter-increment: step;
}

.steps li:last-child { padding-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--orange);
  font-size: 1.75rem;
  font-weight: 700;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 68px;
  bottom: 8px;
  left: 29px;
  width: 2px;
  background: var(--rule);
}

.steps h3 { padding-top: 15px; }

.steps p {
  margin-top: 8px;
  color: var(--quiet);
}

/* Security & privacy */

.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px var(--gap);
  margin-top: clamp(40px, 5vw, 64px);
}

.security-grid li {
  display: flex;
  gap: 20px;
}

.lock {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--orange);
}

.lock svg {
  width: 28px;
  height: 28px;
}

.security-grid p {
  margin-top: 6px;
  color: var(--quiet);
}

/* Sample findings */

.sample {
  margin-top: clamp(32px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--white);
  /* Show the whole results image and fade out over the last rows of the
     recommendations table, so it reads as continuing below */
  aspect-ratio: 2249 / 1301;
  -webkit-mask-image: linear-gradient(#000 75%, transparent);
  mask-image: linear-gradient(#000 75%, transparent);
}

.sample img {
  width: 100%;
  height: auto;
}

/* Get started */

.get-started {
  padding-block: clamp(56px, 7vw, 96px);
  background: var(--orange);
}

.get-started h2 {
  font-size: clamp(3rem, 8.6vw, 6.9rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.scan-link {
  display: block;
  padding: clamp(32px, 5vw, 72px) clamp(28px, 3.4vw, 48px);
  border-radius: 20px;
  background: var(--ink);
  color: var(--page);
  text-align: center;
  text-decoration: none;
}

.scan-link__end {
  display: inline-block;
  white-space: nowrap;
}

.scan-link svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 0.2em;
  color: var(--orange);
  vertical-align: -0.12em;
  transition: transform 0.15s;
}

.scan-link:hover svg { transform: translateX(0.12em); }

/* Single column on tablets and phones */

@media (max-width: 860px) {
  body { font-size: 17px; }

  .site-header { position: static; }
  html { scroll-padding-top: 16px; }

  .site-header__inner {
    flex-wrap: wrap;
    padding-block: 16px;
  }

  .logo img { height: 36px; }

  .menu { gap: 4px 20px; }
  .menu a { font-size: 0.9375rem; }

  .hero { min-height: 0; }

  .chart__callout {
    padding: 3px 8px;
    font-size: 0.75rem;
  }

  .headline-box h1 { font-size: min(12.2vw, 5.1rem); }

  .columns,
  .security-grid { grid-template-columns: minmax(0, 1fr); }

  .section-intro { position: static; }

  .steps li { padding-left: 76px; }

  .get-started h2 { font-size: 11.5vw; }

  .scan-link { text-align: left; }
}
