/*
 * app.whatsairborne.com
 *
 * Palette and typography lifted from the marketing site's styles.css so the
 * two read as one product. Deliberately a separate, much smaller file rather
 * than a copy of that stylesheet: this site is four pages of forms, and
 * carrying two thousand lines of marketing layout would mean every change
 * over there could break a sign-in page nobody thought to check.
 *
 * If the palette changes on the marketing site, these values need changing by
 * hand. That is the cost of not sharing, and it is the cheaper of the two.
 */

:root {
  --paper:        #efece3;
  --paper-lift:   #f7f4ec;
  --paper-deep:   #e5e1d4;
  --ink:          #10161b;
  --ink-soft:     #444c54;
  --ink-faint:    #6d7378;
  --rule:         rgba(26, 22, 12, 0.16);
  --rule-strong:  rgba(26, 22, 12, 0.36);
  --signal:       #8a5510;

  --sky-top:      #3f63bd;
  --sky-bottom:   #527ac9;
  --sky-ink:      #f7efdd;
  --sky-ink-soft: rgba(247, 239, 221, 0.72);

  --display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --head:    "Instrument Serif", "Fraunces", ui-serif, Georgia, serif;
  --label:   "Jost", "Futura", ui-sans-serif, system-ui, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--label);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ shell */
/*
 * Lifted from the marketing site's masthead so the two read as one site.
 * Someone arriving here from whatsairborne.com, or from a QR on a television,
 * should not feel handed off to a different company — the address bar will say
 * app.whatsairborne.com and that is fine, but the furniture should not change.
 *
 * The markup is repeated in each page rather than generated, because this
 * project has no build step. If you change the nav, change it in every page:
 * index, signin, signup, pair, buy, order-complete.
 */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4.5rem;
  padding: 0 var(--gutter);
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.wordmark img {
  width: clamp(150px, 17vw, 210px);
  height: auto;
  display: block;
}

.masthead nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
  align-items: center;
}

.masthead nav a {
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.masthead nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.masthead nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* The account entry sits apart from the pages: it is a state, not a section. */
.masthead nav a.account { color: var(--ink); }

.nav-toggle {
  display: none;
  margin: 0 0 0 auto;
  width: auto;
  background: none;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-family: var(--label);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
}

.nav-toggle:hover { background: none; }

@media (max-width: 760px) {
  .masthead nav {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    z-index: 20;
  }
  .masthead nav.open { display: flex; }
  .masthead nav a { padding-block: 0.75rem; width: 100%; }
  .nav-toggle { display: block; }
}


/* ------------------------------------------------------------------- hero */
/*
 * The sky band.
 *
 * Same gradient and same ink as the .band sections on the marketing site, used
 * the same way: a full-width band inside a paper page rather than a coloured
 * page. The masthead stays on paper so the furniture does not change between
 * the two sites.
 *
 * The clouds are new — the marketing site's weatherfx does rain and snow and
 * nothing else — so they are built here in the same spirit: slow, faint, and
 * two layers at different speeds so there is some depth rather than a single
 * sheet sliding past.
 */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom));
  color: var(--sky-ink);
  padding: clamp(2.5rem, 9vw, 4.5rem) 0 clamp(2.25rem, 8vw, 4rem);
  isolation: isolate;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero.narrow .hero-inner { max-width: 34rem; }

.hero h1 { margin: 0 0 0.5rem; color: var(--sky-ink); }

.hero .lede {
  margin: 0;
  color: var(--sky-ink-soft);
  max-width: 34rem;
}

/*
 * Two cloud layers, drifting.
 *
 * Background-position rather than transform on an element, so nothing is
 * composited above the text and there is no extra markup to repeat across six
 * pages. Far layer is smaller, fainter and slower; near layer larger and
 * quicker. The two periods are deliberately not multiples of each other, so
 * the pattern does not visibly repeat.
 */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: -10% -20%;
  z-index: 1;
  pointer-events: none;
  background-repeat: repeat-x;
}

.hero::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='620' height='200' viewBox='0 0 620 200'%3E%3Cg fill='%23ffffff' fill-opacity='0.13'%3E%3Cellipse cx='110' cy='120' rx='84' ry='30'/%3E%3Cellipse cx='160' cy='104' rx='56' ry='30'/%3E%3Cellipse cx='68' cy='108' rx='44' ry='24'/%3E%3Cellipse cx='420' cy='72' rx='96' ry='28'/%3E%3Cellipse cx='474' cy='58' rx='58' ry='26'/%3E%3Cellipse cx='372' cy='60' rx='46' ry='22'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 620px auto;
  background-position: 0 20%;
  animation: drift-far 190s linear infinite;
}

.hero::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='880' height='240' viewBox='0 0 880 240'%3E%3Cg fill='%23ffffff' fill-opacity='0.2'%3E%3Cellipse cx='190' cy='160' rx='132' ry='40'/%3E%3Cellipse cx='262' cy='138' rx='84' ry='38'/%3E%3Cellipse cx='124' cy='142' rx='66' ry='30'/%3E%3Cellipse cx='660' cy='96' rx='118' ry='34'/%3E%3Cellipse cx='722' cy='78' rx='70' ry='30'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 880px auto;
  background-position: 0 78%;
  animation: drift-near 118s linear infinite;
}

@keyframes drift-far  { to { background-position: 620px 20%; } }
@keyframes drift-near { to { background-position: 880px 78%; } }

/*
 * Reduced motion stops the drift and keeps the clouds.
 *
 * They are scenery, not information, so removing them would change the page
 * for no reason — but a slow horizontal crawl is exactly what somebody with
 * vestibular trouble has asked not to be shown.
 */
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after { animation: none; }
}

/* Content sits on paper under the band. */
main { padding-top: clamp(1.75rem, 5vw, 2.75rem); }

main {
  max-width: 30rem;
  margin: 0 auto;
  padding: clamp(2rem, 8vw, 4.5rem) var(--gutter) 4rem;
}

main.wide { max-width: 44rem; }

/* ------------------------------------------------------------------- type */

h1 {
  font-family: var(--head);
  font-weight: 400;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: 1.12;
  margin: 0 0 0.6rem;
}

h2 {
  font-family: var(--head);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 2.5rem 0 0.75rem;
}

.lede {
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

.small {
  font-size: 0.88rem;
  color: var(--ink-faint);
}

a { color: var(--signal); }

/* ------------------------------------------------------------------ forms */

label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

input {
  width: 100%;
  padding: 0.85rem 0.9rem;
  font-family: var(--label);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--paper-lift);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
}

input:focus {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
}

/*
 * The code field. Wide tracking and a large size because these are digits
 * being copied off a phone screen by somebody who is already mildly annoyed.
 */
input.code {
  font-size: 1.6rem;
  letter-spacing: 0.35em;
  text-align: center;
  padding-left: 0.5em;
}

button {
  margin-top: 1.1rem;
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--label);
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--paper-lift);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
}

button:hover { background: #1d262d; }

button[disabled] {
  opacity: 0.45;
  cursor: default;
}

button.quiet {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--rule-strong);
}

/*
 * A provider that does not work yet.
 *
 * Shown rather than hidden, and disabled rather than clickable. Somebody
 * looking for a Google button needs to know the answer is "not yet" rather
 * than "not here" — but a button that looks live and does nothing is worse
 * than no button at all.
 */
.provider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.8rem 0.9rem;
  border: 1px dashed var(--rule-strong);
  border-radius: 2px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 0.95rem;
  cursor: default;
}

.provider .soon {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 2rem 0 1.2rem;
  color: var(--ink-faint);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* --------------------------------------------------------------- messages */

.note {
  margin-top: 1.2rem;
  padding: 0.8rem 0.9rem;
  border-left: 3px solid var(--rule-strong);
  background: var(--paper-lift);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.note.bad { border-left-color: var(--signal); }

[hidden] { display: none !important; }

/* ----------------------------------------------------------------- panels */

.panel {
  border: 1px solid var(--rule);
  background: var(--paper-lift);
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.9rem;
}

.panel h3 {
  font-family: var(--head);
  font-weight: 400;
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
}

.pairing-code {
  font-family: var(--label);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  margin: 0.4rem 0 0;
}

/*
 * A device that has not checked in.
 *
 * There is no styling here for "probably fine". Either a unit has reported
 * and the time it reported is shown, or it has not and that is shown instead.
 */
.stale { color: var(--signal); }
