/* SimplScan website. No external fonts, scripts or trackers: everything is served from this folder. */

:root {
  --indigo: #33346a;
  --indigo-deep: #232449;
  --paper: #f2f0ea;
  --paper-edge: #dcd9d0;
  --ink: #1c1d40;
  --ink-soft: #55577a;
  --ink-blue: #2b2f8c;
  --amber: #f6a723;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

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

/* ---------- Top bar ---------- */

.topbar {
  background: var(--indigo);
  color: var(--paper);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
}

.topnav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.95rem;
}

.topnav a {
  color: var(--paper);
}

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

.hero {
  background: var(--indigo);
  color: var(--paper);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-top: clamp(2.5rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 8vw, 6.5rem);
}

.hero h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.6rem);
  letter-spacing: -0.015em;
}

.hero .lede {
  max-width: 30rem;
  margin: 1.6rem 0 0;
  font-size: 1.2rem;
  line-height: 1.55;
  color: #dcdcf0;
}

.availability {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(242, 240, 234, 0.25);
  max-width: 30rem;
  font-size: 0.98rem;
  color: #dcdcf0;
}

.availability strong {
  color: var(--paper);
}

/* The sheet being scanned */

.scanbed {
  position: relative;
  justify-self: center;
  width: min(100%, 23rem);
  padding: 1.1rem;
}

.sheet {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  aspect-ratio: 210 / 297;
  padding: 11% 10% 9%;
  box-shadow: 0 1.6rem 3rem rgba(13, 14, 40, 0.55);
  transform: rotate(-2.2deg);
  font-family: var(--serif);
  font-size: clamp(0.62rem, 1.5vw, 0.8rem);
  line-height: 1.5;
  overflow: hidden;
}

.sheet .sender {
  font-size: 0.82em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--paper-edge);
  padding-bottom: 0.5em;
  margin-bottom: 2.2em;
}

.sheet .subject {
  font-weight: 600;
  font-size: 1.15em;
  margin-bottom: 1em;
}

.sheet p {
  margin: 0 0 0.9em;
}

.sheet .found {
  background: linear-gradient(transparent 55%, rgba(246, 167, 35, 0.5) 55%);
}

.sheet .sign {
  margin-top: 2.2em;
  font-style: italic;
  font-size: 1.5em;
  color: var(--ink-blue);
}

/* Amber light bar: passes over the sheet once when the page loads */
.sheet::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -12%;
  height: 12%;
  background: linear-gradient(
    to bottom,
    rgba(246, 167, 35, 0),
    rgba(246, 167, 35, 0.55) 70%,
    rgba(255, 214, 140, 0.95)
  );
  animation: scan 2.2s cubic-bezier(0.45, 0, 0.3, 1) 0.4s 1 both;
}

@keyframes scan {
  from {
    top: -12%;
  }
  to {
    top: 100%;
  }
}

/* Crop corners, as the scanner draws them around a detected page */
.corner {
  position: absolute;
  width: 1.7rem;
  height: 1.7rem;
  border: 3px solid var(--amber);
}

.corner.tl {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}
.corner.tr {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
}
.corner.bl {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
}
.corner.br {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
}

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

.band {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.band + .band {
  border-top: 1px solid var(--paper-edge);
}

.band h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  max-width: 22ch;
  margin-bottom: 0.8rem;
}

.band .intro {
  max-width: var(--measure);
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}

/* Situations: what the paper is, then what you do with it */

.cases {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cases li {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1rem 3rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--paper-edge);
}

.cases li:last-child {
  border-bottom: 1px solid var(--paper-edge);
}

.cases h3 {
  font-size: 1.4rem;
}

.cases p {
  margin: 0;
  max-width: var(--measure);
}

/* Ledger: what leaves the phone */

.ledger {
  width: 100%;
  border-collapse: collapse;
  max-width: 52rem;
}

.ledger th,
.ledger td {
  text-align: left;
  vertical-align: top;
  padding: 0.95rem 1.5rem 0.95rem 0;
  border-top: 1px solid var(--paper-edge);
}

.ledger thead th {
  border-top: 0;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.ledger tbody th {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  width: 38%;
}

.ledger tbody tr:last-child th,
.ledger tbody tr:last-child td {
  border-bottom: 1px solid var(--paper-edge);
}

.note {
  max-width: var(--measure);
  margin-top: 1.6rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Price */

.price {
  background: var(--indigo-deep);
  color: var(--paper);
  border-top: 0 !important;
}

.price h2 {
  max-width: 18ch;
}

.price p {
  max-width: var(--measure);
  color: #dcdcf0;
}

.price a {
  color: var(--paper);
}

/* Footer */

.foot {
  background: var(--indigo-deep);
  color: #c9c9e2;
  border-top: 1px solid rgba(242, 240, 234, 0.18);
  font-size: 0.93rem;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  justify-content: space-between;
  padding-top: 1.6rem;
  padding-bottom: 2rem;
}

.foot a {
  color: var(--paper);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

/* ---------- Legal pages ---------- */

.legal {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.legal h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin-bottom: 0.6rem;
}

.legal .stand {
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}

.legal h2 {
  font-size: 1.55rem;
  margin: 2.6rem 0 0.7rem;
}

.legal h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 650;
  margin: 1.6rem 0 0.4rem;
}

.legal p,
.legal ul,
.legal address,
.legal dl {
  max-width: 40rem;
}

.legal address {
  font-style: normal;
  margin-bottom: 1em;
}

.legal ul {
  padding-left: 1.2rem;
  margin: 0 0 1em;
}

.legal li {
  margin-bottom: 0.4em;
}

.legal dl {
  display: grid;
  grid-template-columns: minmax(8rem, 0.5fr) 1fr;
  gap: 0.35rem 1.5rem;
  margin: 0 0 1em;
}

.legal dt {
  color: var(--ink-soft);
}

.legal dd {
  margin: 0;
}

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

@media (max-width: 46rem) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .scanbed {
    width: min(100%, 19rem);
  }

  .cases li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .ledger thead {
    display: none;
  }

  .ledger tbody th,
  .ledger tbody td {
    display: block;
    width: 100%;
    padding-right: 0;
  }

  .ledger tbody td {
    border-top: 0;
    padding-top: 0;
  }

  .legal dl {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .legal dd {
    margin-bottom: 0.7rem;
  }

  .topnav {
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sheet::after {
    animation: none;
    display: none;
  }
}

@media print {
  .topbar,
  .foot,
  .scanbed {
    display: none;
  }

  body {
    background: #fff;
  }
}
