/*
 * Feather's website. A cool, airy page in the light of a Mac desktop, with the app's own black
 * panel as the one dark object on it. Young Serif for display, Hanken Grotesk for everything else.
 */

@font-face {
  font-family: "Young Serif";
  src: url("/fonts/young-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --air: #e8edf5;
  --paper: #ffffff;
  --ink: #141830;
  --graphite: #5a6178;
  --mist: #8d94a8;
  --rule: #d2d9e6;
  --quill: #3a2fd1;
  --quill-hover: #2c22b3;
  --quill-wash: #dedbfb;
  --on-quill: #ffffff;
  --amber: #c24e0c;
  --green: #1d7a3e;
  --green-wash: #dcf1e3;
  --key: #f6f8fb;
  --key-edge: #c3cbda;
  /* The app's panel stays dark in both themes, as it does on macOS. */
  --panel: #0b0b0e;
  --panel-text: #f2f2f4;
  --panel-muted: #9c9ca5;
  --panel-line: rgba(255, 255, 255, 0.12);
  --panel-caret: #0a84ff;
  --shadow: 0 1px 2px rgba(20, 24, 48, 0.06), 0 12px 32px rgba(20, 24, 48, 0.08);
  --shadow-lift: 0 30px 80px rgba(11, 11, 14, 0.35), 0 6px 18px rgba(11, 11, 14, 0.2);

  --display: "Young Serif", ui-serif, Georgia, serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --air: #0e1120;
    --paper: #161a2c;
    --ink: #e9ecf6;
    --graphite: #a0a7bf;
    --mist: #6f7690;
    --rule: #283049;
    --quill: #8f84ff;
    --quill-hover: #a59cff;
    --quill-wash: #27235a;
    --on-quill: #0e1120;
    --amber: #ff9f5a;
    --green: #5fd38a;
    --green-wash: #13301f;
    --key: #1e2338;
    --key-edge: #343c5c;
    --panel: #000000;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--air);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main {
  flex: 1;
  width: min(var(--measure), 100%);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
::selection {
  background: var(--quill-wash);
}
a {
  color: var(--quill);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--quill-hover);
}
:focus-visible {
  outline: 2px solid var(--quill);
  outline-offset: 3px;
  border-radius: 6px;
}
p {
  margin: 0 0 16px;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

/* Keycaps */
kbd {
  display: inline-block;
  font: 600 0.72em/1 var(--sans);
  letter-spacing: 0.01em;
  color: var(--ink);
  padding: 0.38em 0.6em 0.42em;
  border-radius: 0.42em;
  background: var(--key);
  border: 1px solid var(--key-edge);
  box-shadow: inset 0 -2px 0 var(--key-edge);
  white-space: nowrap;
  vertical-align: 0.12em;
}
.keys {
  display: inline-flex;
  gap: 0.18em;
  white-space: nowrap;
}

/* Top bar and footer */
.topbar,
.footer {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(var(--measure), 100%);
  margin: 0 auto;
  padding: 22px var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  color: var(--ink);
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.glyph {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topnav,
.footer nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}
.topnav a,
.footer a {
  color: var(--graphite);
  text-decoration: none;
}
.topnav a:hover,
.footer a:hover {
  color: var(--ink);
}
.topnav .topnav-account {
  color: var(--ink);
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--paper);
}
.footer {
  margin-top: 96px;
  border-top: 1px solid var(--rule);
  padding-top: 26px;
  padding-bottom: 40px;
  font-size: 14px;
  color: var(--mist);
}
.footer span {
  margin-right: auto;
}

/* Buttons and forms */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: 600 16px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--quill);
  color: var(--on-quill);
}
.btn-primary:hover {
  background: var(--quill-hover);
  color: var(--on-quill);
}
.btn-quiet {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--rule);
}
.btn-quiet:hover {
  color: var(--ink);
  border-color: var(--mist);
}
.btn-block {
  width: 100%;
}
.link-button {
  font: inherit;
  color: var(--graphite);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-button:hover {
  color: var(--ink);
}
form {
  margin: 0;
}
.stack {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.field input {
  width: 100%;
  font: 400 16px var(--sans);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--air);
}
.field input::placeholder {
  color: var(--mist);
}
.field input:focus {
  outline: none;
  border-color: var(--quill);
  box-shadow: 0 0 0 3px var(--quill-wash);
}
.fineprint {
  font-size: 14px;
  color: var(--mist);
  margin: 16px 0 0;
}
.fineprint a {
  color: inherit;
}

/* Hero */
.hero {
  padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 3vw, 32px);
  max-width: 1040px;
}
.hero-title {
  font: 400 clamp(42px, 7.4vw, 84px)/1.02 var(--display);
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}
.hero-title kbd {
  font-size: 0.4em;
  vertical-align: 0.42em;
  border-radius: 0.38em;
  padding: 0.42em 0.62em 0.48em;
}
.hero-lede {
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.55;
  color: var(--graphite);
  max-width: 610px;
  margin-bottom: 32px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Demo: a Mail window with Feather's panel over it */
.demo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: clamp(24px, 5vw, 56px) 0 0;
}
.window {
  width: min(900px, 100%);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  color: var(--mist);
}
.lights {
  display: inline-flex;
  gap: 7px;
}
.lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--rule);
}
.window-title {
  flex: 1;
  text-align: center;
  margin-right: 47px;
  font-weight: 600;
}
.mail {
  padding: 24px clamp(18px, 4vw, 32px) 28px;
}
.mail-from {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  line-height: 1.3;
}
.mail-from b {
  display: block;
  font-weight: 650;
}
.mail-from small {
  color: var(--mist);
  font-size: 13px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--quill-wash);
  color: var(--quill);
  font-weight: 700;
}
.mail-body {
  font-size: 17px;
  color: var(--graphite);
  margin-bottom: 22px;
}
.mail-reply {
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--air);
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  background: var(--ink);
  vertical-align: -0.2em;
  animation: blink 1.06s steps(1) infinite;
}
.caret-light {
  background: var(--panel-caret);
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Feather's panel, drawn as the app draws it */
.panel {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 24px));
  margin-top: -72px;
  background: var(--panel);
  color: var(--panel-text);
  border: 1px solid var(--panel-line);
  border-radius: 22px;
  box-shadow: var(--shadow-lift);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.panel-prompt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
}
.panel-prompt .glyph {
  width: 22px;
  height: 22px;
  stroke-width: 1.6;
}
.panel-instruction {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 500;
}
.panel-key {
  color: var(--panel-muted);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--panel-line);
  box-shadow: none;
  font-size: 12px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.panel-reply {
  border-top: 1px solid var(--panel-line);
  padding: 18px 22px 20px;
}
.panel-reply p {
  margin: 0 0 14px;
  font-size: 17px;
  color: var(--panel-text);
  min-height: 3.2em;
}
.panel-hint {
  font-size: 13px;
  color: var(--panel-muted);
}
.panel-hint kbd {
  color: var(--panel-muted);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--panel-line);
  box-shadow: none;
  font-size: 11px;
}
.steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 34px;
  margin: 34px 0 0;
  padding: 0;
  font-size: 15px;
  color: var(--graphite);
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  transition: color 0.2s ease;
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 9px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  font-size: 12px;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.steps kbd {
  font-size: 12px;
}
.replay {
  margin-top: 16px;
  font: 600 14px var(--sans);
  color: var(--graphite);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.replay:hover {
  color: var(--ink);
}

/* States set by demo.js */
.demo.is-playing .steps li {
  color: var(--mist);
}
.demo .steps li.is-active {
  color: var(--ink);
}
.demo .steps li.is-active::before {
  background: var(--quill);
  border-color: var(--quill);
  color: var(--on-quill);
}
.panel.is-hidden {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  pointer-events: none;
}
.panel-key.is-pressed {
  background: var(--panel-caret);
  color: #fff;
}
.panel-reply.is-empty .panel-hint {
  visibility: hidden;
}
.mail-reply .caret {
  display: none;
}
.demo.is-field-focused .mail-reply .caret {
  display: inline-block;
}

/* Sections */
.section {
  margin-top: clamp(80px, 11vw, 136px);
}
.section-head {
  max-width: 760px;
  margin-bottom: 36px;
}
.section-head h2 {
  font: 400 clamp(30px, 4.2vw, 44px)/1.1 var(--display);
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.section-head p {
  color: var(--graphite);
  font-size: 18px;
  margin: 0;
}

.ask-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
}
.ask-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-size: 17px;
}
.ask-list .glyph {
  color: var(--quill);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--ink);
}
.facts > div {
  padding: 20px 28px 0 0;
}
.facts dt {
  font-weight: 650;
  margin-bottom: 6px;
}
.facts dd {
  margin: 0;
  color: var(--graphite);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.plan,
.plan-option {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.plan .btn,
.plan-option .btn {
  margin-top: auto;
}
.plan-featured {
  border-color: var(--quill);
  box-shadow: 0 0 0 1px var(--quill);
}
.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.plan-head h2,
.plan-head h3 {
  font: 400 28px/1.1 var(--display);
}
.plan-price {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.plan-price small {
  font-size: 14px;
  font-weight: 400;
  color: var(--mist);
}
.plan-list {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  color: var(--graphite);
  font-size: 15px;
}
.plan-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}
.plan-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 2px;
  border-radius: 1px;
  background: var(--quill);
}

/* Card pages: sign-in, account, messages */
.card-page {
  display: grid;
  place-items: start center;
  padding: clamp(24px, 8vw, 88px) 0 0;
}
.card {
  width: min(480px, 100%);
  padding: clamp(24px, 5vw, 36px);
  border-radius: 22px;
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.card-title {
  font: 400 32px/1.15 var(--display);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.card p {
  color: var(--graphite);
}
.card p strong {
  color: var(--ink);
  font-weight: 650;
  overflow-wrap: anywhere;
}
.who {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--graphite);
}
.who b {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.plan-current {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 4px;
}
.card .plan-current span {
  font: 400 40px/1.1 var(--display);
  color: var(--ink);
}
.plan-current small {
  font-size: 15px;
  color: var(--mist);
}
.meta {
  font-size: 15px;
  margin-bottom: 22px;
}
.meter {
  margin-bottom: 20px;
}
.meter-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  margin-bottom: 8px;
}
.meter-row span:last-child {
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
}
.track {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--air);
}
.fill {
  fill: var(--quill);
}
.fill-full {
  fill: var(--amber);
}
.card form + .fineprint {
  margin-top: 10px;
}
.meter + form {
  margin-top: 26px;
}
.plan-options {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}
.plan-options .plan-option {
  padding: 20px;
  border-radius: 16px;
}
.plan-options .plan-list {
  margin-bottom: 18px;
}
.notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green-wash);
  font-size: 15px;
}
.card .notice {
  color: var(--ink);
}
.notice::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
}

/* Prose: privacy */
.prose {
  max-width: 680px;
  padding: clamp(32px, 7vw, 80px) 0 0;
}
.prose h1 {
  font: 400 clamp(40px, 6vw, 60px)/1.05 var(--display);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.prose-lede {
  font-size: 21px;
  color: var(--graphite);
  margin-bottom: 40px;
}
.prose h2 {
  font: 400 26px/1.2 var(--display);
  margin: 40px 0 12px;
}
.prose p,
.prose ul {
  color: var(--graphite);
}
.prose ul {
  padding-left: 20px;
  margin: 0 0 16px;
}
.prose li {
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .plans,
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts > div {
    padding-right: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rule);
  }
  .ask-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .topbar {
    gap: 14px;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .topnav {
    gap: 14px;
    font-size: 14px;
  }
  .topnav a:not(.topnav-account):first-child {
    display: none;
  }
  .actions .btn {
    flex: 1 1 100%;
  }
  .panel {
    margin-top: -40px;
  }
  .panel-prompt {
    padding: 14px 16px;
    gap: 10px;
  }
  .panel-instruction {
    font-size: 15px;
  }
  .panel-key {
    display: none;
  }
  .panel-reply {
    padding: 14px 16px 16px;
    font-size: 15px;
  }
  .window-title {
    margin-right: 0;
    text-align: right;
  }
  .steps {
    flex-direction: column;
    align-items: flex-start;
    align-self: start;
  }
  .footer {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
  }
  .panel,
  .btn,
  .steps li,
  .steps li::before {
    transition: none;
  }
}
