/* simplifig.app landing page.
 *
 * Concept: a printer's proof. The one bold element is the real sample figure
 * shown on a sheet with crop marks and dimension rules, because exact print
 * size is the product's point. Everything else stays quiet.
 */

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --table: #e6ebef;   /* light-table grey the sheet sits on */
  --paper: #ffffff;
  --ink: #17212b;
  --ink-2: #4f5d6b;   /* secondary text, 7.0:1 on --table */
  --rule: #c3ccd4;
  --blue: #0072b2;    /* Okabe-Ito blue: dimension rules, links, the one button */
  --blue-dark: #005a8c;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--table);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  font-feature-settings: 'tnum' 0;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--blue-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Header ------------------------------------------------------------ */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark img { width: 1.6rem; height: 1.6rem; }

.button {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}
.button:hover { background: var(--blue-dark); color: #fff; }

.button-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.button-quiet:hover { background: var(--ink); color: var(--paper); }

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

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-top: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: clamp(1rem, 3vw, 2.5rem);
}

h1 {
  font-size: var(--step-3);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 750;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: var(--measure);
  margin: 0 0 2rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }

.small-print {
  margin: 1.25rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-2);
}

/* The proof: the real figure on a sheet, with crop marks at its corners and
   dimension rules stating its printed size. Drawn in CSS so the marks stay on
   the sheet's corners at every width. */
.proof {
  margin: 0;
  padding: 1.75rem 3.25rem 3.75rem 1.75rem;
}

.sheet {
  position: relative;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(23, 33, 43, 0.06), 0 18px 40px -24px rgba(23, 33, 43, 0.35);
}
.sheet > img { width: 100%; height: auto; }

.crop-mark { position: absolute; width: 18px; height: 18px; }
.crop-mark::before,
.crop-mark::after { content: ''; position: absolute; background: var(--ink); }
.crop-mark::before { width: 14px; height: 1px; }
.crop-mark::after { width: 1px; height: 14px; }
.crop-mark.tl { top: -22px; left: -22px; }
.crop-mark.tl::before { top: 21px; left: 0; }
.crop-mark.tl::after { left: 21px; top: 0; }
.crop-mark.tr { top: -22px; right: -22px; }
.crop-mark.tr::before { top: 21px; right: 0; }
.crop-mark.tr::after { right: 21px; top: 0; }
.crop-mark.bl { bottom: -22px; left: -22px; }
.crop-mark.bl::before { bottom: 21px; left: 0; }
.crop-mark.bl::after { left: 21px; bottom: 0; }
.crop-mark.br { bottom: -22px; right: -22px; }
.crop-mark.br::before { bottom: 21px; right: 0; }
.crop-mark.br::after { right: 21px; bottom: 0; }

.dim { position: absolute; color: var(--blue); }
.dim .line { position: absolute; background: var(--blue); }
.dim .line::before,
.dim .line::after { content: ''; position: absolute; background: var(--blue); }
.dim .label {
  position: absolute;
  font-weight: 600;
  font-size: 0.8125rem;
  font-feature-settings: 'tnum' 1;
  line-height: 1;
  white-space: nowrap;
  background: var(--table);
  padding: 0 0.45rem;
}

.dim-w { left: 0; right: 0; top: calc(100% + 30px); height: 12px; }
.dim-w .line { left: 0; right: 0; top: 5.5px; height: 1.25px; transform-origin: center; }
.dim-w .line::before,
.dim-w .line::after { top: -5px; width: 1.25px; height: 11px; }
.dim-w .line::before { left: 0; }
.dim-w .line::after { right: 0; }
.dim-w .label { left: 50%; top: 0; transform: translate(-50%, -1px); }

.dim-h { top: 0; bottom: 0; left: calc(100% + 30px); width: 12px; }
.dim-h .line { top: 0; bottom: 0; left: 5.5px; width: 1.25px; transform-origin: center; }
.dim-h .line::before,
.dim-h .line::after { left: -5px; height: 1.25px; width: 11px; }
.dim-h .line::before { top: 0; }
.dim-h .line::after { bottom: 0; }
.dim-h .label { top: 50%; left: 6px; transform: translate(-50%, -50%) rotate(90deg); }

.proof figcaption {
  margin-top: 3.5rem;
  font-size: var(--step--1);
  color: var(--ink-2);
  max-width: 40rem;
}

@media (prefers-reduced-motion: no-preference) {
  .dim-w .line { animation: draw-w 1s 0.3s cubic-bezier(0.6, 0, 0.2, 1) both; }
  .dim-h .line { animation: draw-h 1s 0.45s cubic-bezier(0.6, 0, 0.2, 1) both; }
  .dim .label { animation: appear 0.35s 1.2s both; }
}
@keyframes draw-w { from { transform: scaleX(0); } }
@keyframes draw-h { from { transform: scaleY(0); } }
@keyframes appear { from { opacity: 0; } }

/* ---- Sections ---------------------------------------------------------- */

section { padding: clamp(3rem, 6vw, 5rem) 0; }
section + section { border-top: 1px solid var(--rule); }

h2 {
  font-size: var(--step-2);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 0.75rem;
  max-width: 24ch;
}

h3 {
  font-size: var(--step-1);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 650;
  margin: 0 0 0.5rem;
}

p { margin: 0 0 1rem; max-width: var(--measure); }

.section-intro { color: var(--ink-2); margin-bottom: clamp(2rem, 4vw, 3.5rem); }

/* Feature rows: text beside a zoomed crop of the same figure. */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
}
.feature + .feature { margin-top: clamp(3rem, 6vw, 5rem); }
.feature:nth-of-type(even) .crop-view { order: -1; }

.feature p { color: var(--ink-2); }
.feature ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  max-width: var(--measure);
}
.feature li { padding-left: 1.1rem; position: relative; margin-bottom: 0.35rem; }
.feature li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 7px;
  height: 2px;
  background: var(--blue);
}

.crop-view {
  margin: 0;
  background: var(--paper);
  padding: 1.25rem;
}
.crop-view svg {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 24rem;
  margin: 0 auto;
}
.crop-view figcaption {
  margin-top: 0.75rem;
  font-size: var(--step--1);
  color: var(--ink-2);
}

/* The four steps really are a sequence, so they are numbered. */
.steps {
  list-style: none;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.steps li::before {
  content: counter(step);
  display: block;
  font-weight: 700;
  font-size: var(--step-1);
  font-feature-settings: 'tnum' 1;
  color: var(--blue);
  margin-bottom: 0.35rem;
}
.steps p { color: var(--ink-2); font-size: 0.97rem; }

.screenshot {
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.screenshot img { width: 100%; height: auto; }

/* Checks: a plain two-column list of what is caught and why it matters. */
.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(2rem, 5vw, 4rem);
  margin: 0;
}
.checks div { border-top: 1px solid var(--rule); padding: 1.1rem 0 0.4rem; }
.checks dt { font-weight: 650; margin-bottom: 0.25rem; }
.checks dd { margin: 0 0 0.6rem; color: var(--ink-2); max-width: var(--measure); }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
}
.two-col p { color: var(--ink-2); }

/* Closing call to action, set on paper so it reads as the last page. */
.closing { background: var(--paper); border-top: 1px solid var(--rule); }
.closing .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.closing h2 { margin: 0 0 0.5rem; }
.closing-note { color: var(--ink-2); margin: 0; }

.site-footer {
  padding: 2rem 0 2.5rem;
  font-size: var(--step--1);
  color: var(--ink-2);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
.site-footer p { margin: 0; max-width: none; }

/* ---- Small screens ----------------------------------------------------- */

@media (max-width: 860px) {
  .hero .wrap,
  .feature,
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-of-type(even) .crop-view { order: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .proof { padding: 1.5rem 3rem 3.5rem 1.5rem; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .site-header .button { padding: 0.55rem 0.9rem; }
}
