/* SweType, swetype.se
 *
 * One page, no JavaScript, nothing loaded from anywhere but this site.
 * Typefaces: Newsreader for headings, Public Sans for everything else, both served from fonts/.
 * The green is the app's own accent, so the site and the app look like one thing.
 * Corner radii: interactive things are pills, pictures are 12px, the little windows in the
 * install steps are 10px, nothing else is rounded.
 */

:root {
  --paper:      #f6f5f3;
  --band:       #edece8;
  --surface:    #ffffff;
  --chrome:     #f2f1ee;
  --ink:        #101012;
  --ink-2:      #4c4c53;
  --ink-3:      #68686f;
  --line:       #e0ded9;
  --line-soft:  #eae8e4;
  --green:      #0a7a36;
  --green-deep: #075c28;
  --mac-blue:   #0b6bdc;
  --on-cta:     #f7f7f6;
  --cta:        #101012;
  --cta-hover:  #2c2c31;
  --shadow:     0 1px 2px rgb(40 34 24 / .05), 0 18px 44px rgb(40 34 24 / .12);
  --shadow-sm:  0 1px 2px rgb(40 34 24 / .06), 0 7px 20px rgb(40 34 24 / .08);
  --grain:      .034;
  --gutter:     clamp(20px, 5vw, 64px);
  --measure:    34em;
  --bar:        72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #0c0c0d;
    --band:       #151517;
    --surface:    #18181b;
    --chrome:     #212125;
    --ink:        #f2f2f3;
    --ink-2:      #b3b3bb;
    --ink-3:      #8c8c95;
    --line:       #27272b;
    --line-soft:  #1f1f23;
    --green:      #43e884;
    --green-deep: #6cf0a1;
    --mac-blue:   #3b83f7;
    --on-cta:     #0a0a0a;
    --cta:        #f2f2f3;
    --cta-hover:  #d9d9dd;
    --shadow:     0 1px 2px rgb(0 0 0 / .5), 0 20px 50px rgb(0 0 0 / .55);
    --shadow-sm:  0 1px 2px rgb(0 0 0 / .45), 0 8px 22px rgb(0 0 0 / .42);
    --grain:      .026;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A faint grain over everything, so the paper reads as paper and not as a flat fill. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.014em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

section[id] { scroll-margin-top: calc(var(--bar) + 14px); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cta);
  color: var(--on-cta);
  padding: 12px 18px;
  z-index: 10;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- top ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--bar);
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.top-inner {
  display: contents;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.012em;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }

.top nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  font-size: 15.5px;
}
.top nav a {
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .18s ease;
}
.top nav a:hover { color: var(--ink); }
.top nav .nav-cta {
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
}
.top nav .nav-cta:hover { border-color: var(--green); color: var(--green); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(40px, 6vh, 80px) 0 clamp(52px, 8vh, 96px) var(--gutter);
  max-width: 1600px;
  margin: 0 auto;
}

h1 {
  font-size: clamp(2.65rem, 6.1vw, 4.6rem);
  line-height: 1.1;
  letter-spacing: -0.026em;
  margin: 0 0 20px;
  padding-bottom: 2px;
}
h1 em {
  font-style: italic;
  color: var(--green);
  display: inline-block;
  padding-bottom: .06em;
}

.lede {
  font-size: clamp(1.09rem, 1.5vw, 1.24rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 24em;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin-top: clamp(26px, 4vh, 40px);
}

.cta {
  display: inline-block;
  background: var(--cta);
  color: var(--on-cta);
  text-decoration: none;
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: -0.006em;
  padding: 14px 28px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .18s ease, transform .12s ease;
}
.cta:hover { background: var(--cta-hover); }
.cta:active { transform: translateY(1px); }

.quiet-link {
  color: var(--green);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  padding-bottom: 1px;
  transition: border-color .18s ease;
}
.quiet-link:hover { border-bottom-color: var(--green); }

.hero-meta {
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 30em;
}

.hero-shot { margin: 0; }
.hero-shot img {
  width: min(134%, 1240px);
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* ---------- the gesture band ---------- */

.band {
  background: var(--band);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: clamp(56px, 9vh, 104px) var(--gutter);
}
.band-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}
.band h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.16;
  max-width: 16em;
  margin: 0 auto;
}
.pill {
  margin: clamp(26px, 4vh, 44px) auto clamp(20px, 3vh, 32px);
  max-width: 620px;
}
.band-note {
  color: var(--ink-2);
  max-width: 30em;
  margin: 0 auto;
}

/* ---------- why it exists ---------- */

.why {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(26px, 6vw, 92px);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(60px, 10vh, 112px) var(--gutter) clamp(30px, 5vh, 56px);
}
.why h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.13;
  max-width: 12em;
}
.why-body p { color: var(--ink-2); max-width: var(--measure); }
.why-body p + p { margin-top: 15px; }
.why-body .first { color: var(--ink); font-size: 1.09rem; line-height: 1.55; }

/* ---------- picture beside text ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(30px, 5vw, 76px);
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(50px, 8vh, 104px) var(--gutter);
}
.split-shot { margin: 0; }
.split-shot img {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.split-text h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.14;
  margin-bottom: 18px;
  max-width: 14em;
}
.split-text p { color: var(--ink-2); max-width: var(--measure); }
.split-text p + p { margin-top: 15px; }

/* ---------- price ---------- */

.price {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(24px, 3vh, 40px) var(--gutter) clamp(60px, 9vh, 104px);
}
.price h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  margin-bottom: clamp(26px, 4vh, 40px);
}
.tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--line);
  padding-top: clamp(26px, 4vh, 38px);
}
.tier + .tier {
  border-left: 1px solid var(--line);
  padding-left: clamp(28px, 5vw, 64px);
}
.tier-amount {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}
.tier-amount .per {
  display: block;
  font-family: 'Public Sans', sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-top: 6px;
}
.tier-when {
  color: var(--green);
  font-size: 15px;
  font-weight: 600;
  margin: 10px 0 14px;
}
.tier p:last-child { color: var(--ink-2); max-width: 26em; }

/* ---------- install ---------- */

.install {
  background: var(--band);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: clamp(56px, 9vh, 104px) var(--gutter);
}
.install-head, .steps {
  max-width: 1120px;
  margin: 0 auto;
}
.install-head h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  margin-bottom: 14px;
}
.install-head .lede { max-width: 30em; }
.install-head .req {
  color: var(--ink-3);
  font-size: 15px;
  max-width: 24em;
  line-height: 1.45;
}

.install-note {
  max-width: 1120px;
  margin: clamp(22px, 3vh, 30px) auto 0;
  padding: 16px 20px;
  border-left: 2px solid var(--green);
  background: color-mix(in srgb, var(--green) 7%, transparent);
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
  border-radius: 0 8px 8px 0;
}

.steps {
  list-style: none;
  counter-reset: step;
  margin: clamp(34px, 5vh, 56px) auto 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 320px);
  /* A third, empty row swallows whatever height the picture has over the text, so the
     heading and its paragraph stay together instead of being pulled apart. */
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(16px, 2.6vw, 44px);
  row-gap: 8px;
  align-items: start;
  padding: clamp(26px, 4vh, 36px) 0;
  border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  grid-column: 1;
  grid-row: 1;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--green);
}
.steps h3 {
  grid-column: 2;
  grid-row: 1;
  font-size: 1.28rem;
  line-height: 1.3;
}
.steps li > p {
  grid-column: 2;
  grid-row: 2;
  color: var(--ink-2);
  max-width: var(--measure);
}

/* ---------- the little windows beside each step ---------- */

.step-fig {
  grid-column: 3;
  grid-row: 1 / -1;
  margin: 0;
  align-self: start;
}

.fig-hint {
  margin-top: 11px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-3);
}
.fig-hint b { color: var(--ink-2); font-weight: 600; }

.mock {
  font-size: 11.5px;
  line-height: 1.42;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}
.mock + .mock { margin-top: 10px; }
.mock p { margin: 0; text-wrap: initial; }

.mock-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 10px;
  background: var(--chrome);
  border-bottom: 1px solid var(--line-soft);
}
.mock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: .3;
  flex: none;
}
.mock-bar p {
  margin-left: 7px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.mock-body { padding: 12px 13px 14px; }

.mock-h {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.mock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0 2px;
}
.mock-item > div { min-width: 0; }
.mock-item p { color: var(--ink-2); }
.mock-item .mock-strong { color: var(--ink); font-weight: 600; }
.mock-meta { color: var(--ink-3); font-size: 10.5px; margin-top: 1px; }

.mock-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
}
.mock-btn {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
}
.mock-btn.is-default {
  background: var(--mac-blue);
  border-color: var(--mac-blue);
  color: #fff;
  font-weight: 600;
}
.is-marked { box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 36%, transparent); }

.mock-alert { padding: 17px 16px 15px; text-align: center; }
.mock-alert img { margin: 0 auto 10px; border-radius: 7px; }
.mock-alert .mock-title { font-weight: 600; font-size: 12px; line-height: 1.35; color: var(--ink); }
.mock-alert .mock-sub { color: var(--ink-3); margin-top: 5px; }
.mock-alert .mock-row { justify-content: center; }

.mock-drag {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 20px 14px 18px;
  text-align: center;
}
.mock-tile img, .mock-tile svg { margin: 0 auto; display: block; }
.mock-tile p { margin-top: 7px; font-size: 10.5px; color: var(--ink-2); }
.mock-arrow { color: var(--ink-3); display: block; }

.mock-switch {
  width: 27px;
  height: 16px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  flex: none;
}
.mock-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / .3);
}
.mock-switch.is-on { background: var(--mac-blue); }
.mock-switch.is-on::after { left: auto; right: 2px; }

.mock-chip {
  font-size: 9.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--green-deep);
  background: color-mix(in srgb, var(--green) 14%, transparent);
  white-space: nowrap;
  flex: none;
}

/* ---------- questions ---------- */

.faq {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 100px) var(--gutter) clamp(50px, 8vh, 88px);
}
.faq h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  margin-bottom: clamp(26px, 4vh, 40px);
}
.qa {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 3.6vw, 46px) clamp(30px, 5vw, 76px);
  border-top: 1px solid var(--line);
  padding-top: clamp(26px, 4vh, 38px);
}
.qa h3 {
  font-size: 1.17rem;
  line-height: 1.32;
  margin-bottom: 7px;
}
.qa p { color: var(--ink-2); }
.qa a { color: var(--green); }

/* ---------- foot ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding: clamp(44px, 6vh, 68px) var(--gutter) clamp(40px, 6vh, 60px);
}
.foot-inner { max-width: 1120px; margin: 0 auto; }
.foot-brand {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.012em;
}
.foot-line { color: var(--ink-2); margin-top: 2px; }
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin: 22px 0 26px;
  font-size: 15.5px;
}
.foot-nav a {
  color: var(--ink-2);
  text-decoration: none;
  transition: color .18s ease;
}
.foot-nav a:hover { color: var(--ink); }
.foot-small { color: var(--ink-3); font-size: 14.5px; max-width: 46em; }
.foot-small a { color: var(--ink-2); }

/* ---------- reading pages ---------- */

.doc {
  max-width: 40em;
  margin: 0 auto;
  padding: clamp(36px, 6vh, 64px) var(--gutter) clamp(56px, 9vh, 96px);
}
.doc h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
  margin-bottom: 10px;
}
.doc .lede { max-width: none; margin-bottom: clamp(28px, 4vh, 40px); }
.doc h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  margin: clamp(32px, 5vh, 46px) 0 12px;
}
.doc h3 { font-size: 1.18rem; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.2em; margin: 14px 0; }
.doc li + li { margin-top: 9px; }
.doc a { color: var(--green); }
.doc .updated { color: var(--ink-3); font-size: 14.5px; }
.doc .terms { border-top: 1px solid var(--line); margin-top: clamp(30px, 5vh, 44px); padding-top: 8px; }
.doc .terms dt { font-weight: 600; color: var(--ink); margin-top: 18px; }
.doc .terms dd { margin: 4px 0 0; color: var(--ink-2); }

/* ---------- narrow ---------- */

@media (max-width: 1080px) {
  .steps li { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 272px); }
}

@media (max-width: 940px) {
  body { font-size: 16.5px; }
  :root { --bar: 62px; }
  .top nav a:not(.nav-cta) { display: none; }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 30px var(--gutter) 46px;
    max-width: none;
  }
  h1 { font-size: clamp(2.3rem, 10vw, 3.1rem); }
  .lede { max-width: none; }
  .hero-shot { margin: 0 calc(var(--gutter) * -1) 0 0; }
  .hero-shot img { width: 118%; max-width: none; border-radius: 12px 0 0 12px; border-right: 0; }

  .why { grid-template-columns: 1fr; gap: 22px; padding: 54px var(--gutter) 26px; }
  .why h2 { max-width: none; }

  .split { grid-template-columns: 1fr; gap: 30px; padding: 48px var(--gutter); }
  .split-text h2, .band h2 { max-width: none; }

  .tiers { grid-template-columns: 1fr; gap: 0; }
  .tier + .tier {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding-top: 28px;
  }

  .steps li {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    grid-template-rows: auto;
    column-gap: 14px;
    row-gap: 6px;
  }
  .steps li::before { font-size: 1.45rem; }
  .step-fig {
    grid-column: 2;
    grid-row: auto;
    margin-top: 16px;
    max-width: 330px;
  }

  .qa { grid-template-columns: 1fr; gap: 26px; }
}

/* Folder and rows inside the little windows, plus a tap target big enough for a thumb. */

.ic-folder { color: var(--mac-blue); }

.mock-item + .mock-item {
  border-top: 1px solid var(--line-soft);
  margin-top: 8px;
  padding-top: 11px;
}

.mock-tile { display: block; }

.top nav .nav-cta { position: relative; }
.top nav .nav-cta::after {
  content: "";
  position: absolute;
  inset: -15px -8px;
}
