/* Design tokens and layout reproduced from fontproofer.com. */

:root {
  --fallback-fonts: "Avenir Next", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-text: 'Cantilever, by Peter Nowell', var(--fallback-fonts);
  --font-headline: 'Lucette Ultrabold, by Alice Savoie', var(--fallback-fonts);

  --color-fp-blue: #488cf8;
  --color-pnd-blue: #456cf7;
  --color-text-selection-bg: rgba(72, 140, 248, .2);
  --color-prominent: #1e1e1f;
  --color-primary: #2a2a2b;
  --color-text: rgba(42, 42, 43, .78);
  --color-secondary: rgba(42, 42, 43, .6);
  --color-tertiary: rgba(42, 42, 43, .35);
  --color-quaternary: rgba(42, 42, 43, .25);
  --color-white-bg: #fff;
  --color-box-bg: rgba(0, 0, 0, .02);
  --color-box-border: rgba(0, 0, 0, .2);
  --color-ui-control-accent: var(--color-fp-blue);
  --color-hero-top: #f7f8fc;
  --card-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 8px 40px rgba(0, 0, 0, .1);

  --header-height: 52px;
  --container-radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-pnd-blue: #587dff;
    --color-text-selection-bg: rgba(72, 140, 248, .25);
    --color-prominent: #fff;
    --color-primary: #e5e8f0;
    --color-text: rgba(229, 232, 240, .82);
    --color-secondary: rgba(229, 232, 240, .65);
    --color-tertiary: rgba(229, 232, 240, .4);
    --color-quaternary: rgba(229, 232, 240, .3);
    --color-hero-top: #15181c;
    --color-white-bg: #22262d;
    --color-box-bg: rgba(255, 255, 255, .08);
    --color-box-border: rgba(255, 255, 255, .2);
    --card-shadow: inset 0 0 0 .5px rgba(229, 232, 240, .1), 0 8px 40px rgba(0, 0, 0, .1);
  }
}

/* Base */

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--color-hero-top);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.2;
  color: var(--color-text);
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-feature-settings: "liga" 1, "ss09" 1, "ss16" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--color-text-selection-bg); }

h1, h2, h3, h4 { margin: 0; color: var(--color-primary); cursor: default; }
h1, h2 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 36px;
  line-height: 1.05;
}
h3 { font-size: 19px; font-weight: 500; }
p { line-height: 1.35; }
ul, ol { margin: 0; }

a {
  color: currentcolor;
  text-decoration-color: var(--color-quaternary);
  transition: text-decoration-color .2s;
}
a:hover, a:active, a:focus { text-decoration-color: currentcolor; }

.caption { font-size: 13px; }

@media (max-width: 767px) { h1, h2 { font-size: 32px; } }
@media (max-width: 399px) { h1, h2 { font-size: 28px; } }

/* Buttons */

.ui-button {
  position: relative;
  z-index: 0;
  display: inline-block;
  border-radius: 100px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  padding: 14px 30px 14px;
  background: var(--color-ui-control-accent);
  border: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .02ch;
  color: #fff;
  cursor: pointer;
}
.ui-button::before {
  content: "";
  position: absolute;
  top: 1px; bottom: 1px; left: 1px; right: 1px;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 6px 50px 5px var(--color-ui-control-accent), 0 5px 10px 1px var(--color-ui-control-accent);
  opacity: .4;
  transition: 1s ease;
}
.ui-button:hover::before, .ui-button:active::before, .ui-button:focus::before {
  transition: .5s ease;
  box-shadow: 0 4px 16px 2px var(--color-ui-control-accent), 0 2px 5px 1px var(--color-ui-control-accent);
  opacity: .4;
}
.ui-button:focus-visible { outline: 2px solid var(--color-ui-control-accent); outline-offset: 3px; }
.ui-button[disabled] { opacity: .5; cursor: default; }
.ui-button[disabled]::before { display: none; }
.ui-button.size-medium { padding: 5px 18px 6px; font-size: 15px; }
.ui-button.style-border {
  background: none;
  border: 1px solid currentcolor;
  box-shadow: none;
  color: currentcolor;
  font-weight: 400;
  letter-spacing: 0;
}
.ui-button.style-border::before { display: none; }

/* Header */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  height: var(--header-height);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(150%) blur(30px);
}
.site-header::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  background: var(--color-hero-top);
  opacity: .7;
}
.main-navigation {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 32px;
  font-size: 15px;
  transition: .5s;
}
.main-navigation a {
  position: relative;
  line-height: 1;
  text-decoration: none;
  transition: .2s;
}
.main-navigation a:hover, .main-navigation a:active, .main-navigation a:focus { color: var(--color-primary); outline: none; }
.main-navigation a:not(.ui-button) { padding: 5px 8px; margin-top: -1px; }
@media (max-width: 809px) { .main-navigation { column-gap: calc(5.3vw - 8px); } }
@media (max-width: 470px) {
  .main-navigation { font-size: 13px; column-gap: calc(4.8vw - 8px); }
  .main-navigation a.ui-button { padding-left: 8px; padding-right: 8px; font-size: inherit; }
}

/* Content card (as on fontproofer.com/terms) */

main.content-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.custom-layout {
  width: calc(100% - 10px * 2);
  max-width: calc(670px + 6vw * 2);
  padding: clamp(80px, 10vh, 120px) 6vw;
  margin: calc(var(--header-height, 58px) + clamp(20px, 5vh, 60px)) 10px clamp(40px, 10vh, 80px);
  background: var(--color-white-bg);
  box-shadow: var(--card-shadow);
  text-align: center;
}
.custom-layout > * + * { margin-top: 1.5em; }
.custom-layout h1 { margin-bottom: .6em; }
.custom-layout .intro { max-width: 34em; margin-left: auto; margin-right: auto; }
/* The plans page is wider than a text page, to fit three columns. */
.custom-layout.plans-layout { max-width: calc(1000px + 6vw * 2); }
.custom-layout .notice { max-width: 34em; margin-left: auto; margin-right: auto; color: var(--color-secondary); }
.custom-layout .notice.is-error { color: #dc1278; }
.custom-layout .notice.is-success { color: var(--color-primary); font-size: 15px; }

/* Plans */

.plans {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 2.5em;
}
.plan {
  flex: 1 1 260px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 28px 30px;
  border-radius: var(--container-radius);
  background: var(--color-box-bg);
  box-shadow: 0 0 0 1px var(--color-box-border) inset;
}
.plan .app-icon { width: 72px; height: 72px; }
.plan h3 { font-size: 21px; }
.plan .price {
  margin: 0;
  color: var(--color-primary);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  min-height: 1em;
}
.plan .price .period { font-size: 15px; font-weight: 400; color: var(--color-secondary); }
.plan .price.is-loading { color: var(--color-tertiary); }
.plan .features {
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: 15px;
  line-height: 1.35;
  color: var(--color-text);
}
.plan .features li { position: relative; padding-left: 1.4em; margin: .45em 0; }
.plan .features li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: .55em; height: .55em;
  border-radius: 50%;
  background: var(--color-ui-control-accent);
  opacity: .8;
}
.plan .summary { margin: -6px 0 0; font-size: 15px; color: var(--color-secondary); }
.plan .features { flex: 1; width: 100%; }
.plan .ui-button { margin-top: 8px; }

/* The sliding scale (one-time purchase): a slider across the tiers. Every tier is the same license. */
.plan .tiers { width: 100%; }
.plan .tier-name {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-primary);
}
.plan .tier-slider {
  display: block;
  width: 100%;
  margin: 0;
  accent-color: var(--color-ui-control-accent);
  cursor: pointer;
}
.plan .tier-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-tertiary);
}
.plan .tier-labels span { cursor: pointer; transition: color .2s; }
.plan .tier-labels span:hover, .plan .tier-labels span.is-selected { color: var(--color-primary); }
.plan .status { margin: 0; min-height: 1.2em; color: var(--color-secondary); }
.plan .status.is-error { color: #dc1278; }
.plan .status.is-success { color: var(--color-primary); }

.custom-layout .fine-print { color: var(--color-secondary); max-width: 34em; margin-left: auto; margin-right: auto; }

/* Footer */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: 30px;
  background-image:
    radial-gradient(circle at 50% 6.3%, rgba(248, 249, 252, .05) 0%, rgba(245, 246, 249, 0) 55%),
    linear-gradient(180deg, #2b2f38 0%, #14161a 100%);
  --color-primary: #e5e8f0;
  --color-text: #e5e8f0;
  --color-secondary: rgba(229, 232, 240, .55);
  color: var(--color-text);
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  row-gap: 30px;
  width: 100%;
  max-width: 1060px;
  padding: 30px 20px;
  text-align: center;
}
.footer-content hr {
  height: 1px;
  margin: 0 8px;
  border: none;
  background: rgba(229, 232, 240, .12);
}
.footer-content p:first-child { margin-top: 0; }
.footer-content p:last-child { margin-bottom: 0; }
.footer-navigation {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: baseline;
  gap: 12px;
}
.footer-navigation a { position: relative; transition: .2s; }
.footer-navigation a:hover, .footer-navigation a:active, .footer-navigation a:focus { opacity: .75; }
.footer-navigation .ui-button { font-size: inherit; }
.footer-navigation a:not(.ui-button) { padding: 8px; line-height: 1; text-decoration: none; }
.footer-legal { color: var(--color-text); }
.footer-legal p { margin: .5em 0; }
.footer-legal a { text-decoration-color: rgba(255, 255, 255, .28); }
.footer-legal .policies { font-size: 15px; font-weight: 500; }
.footer-type-credits { color: var(--color-secondary); }
.footer-type-credits .all-caps-subheading {
  margin-top: -.3em;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: .15em;
}
.footer-type-credits a { text-decoration-color: rgba(255, 255, 255, .28); }
.footer-type-credits a:hover, .footer-type-credits a:active, .footer-type-credits a:focus { color: var(--color-text); }
.footer-fine-print { color: var(--color-secondary); }
.footer-fine-print p { margin: .5em 0; }
.footer-fine-print a { text-decoration-color: rgba(255, 255, 255, .28); }
.footer-fine-print .prominent { color: var(--color-text); }
.footer-fine-print .full-margin-below { margin-bottom: 30px; }
@media (max-width: 500px) { .footer-fine-print p br { display: none; } }
