/* Marketing page styling.
   Loaded after base.css, only on the public pages. The signed-in pages load
   app.css instead, because there is no reason to send a visitor reading the
   privacy policy the styles for a billing table.

   Every colour here comes from a variable defined in base.css, which is
   where the contrast checking happens. Nothing in this file introduces a new
   colour value, so nothing in this file can quietly fail an audit. */

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

.hero { padding: 60px 0 48px; }
.heroGrid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .heroGrid { grid-template-columns: 1.15fr .85fr; gap: 56px; }
}

.hero h1 { margin-bottom: .35em; }

/* The one sentence under the headline. Larger than body text because it is
   doing the actual explaining and most visitors read only this far. */
.heroLede {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 1.6em;
}

.heroPoints { list-style: none; padding: 0; margin: 26px 0 0; }
.heroPoints li {
  position: relative;
  padding-left: 30px;
  margin-bottom: .6em;
  font-size: .98rem;
}
/* A tick drawn in CSS rather than loaded as an image, so it costs no
   request and inherits the text colour in both themes. */
.heroPoints li::before {
  content: "";
  position: absolute;
  left: 4px; top: .42em;
  width: 13px; height: 7px;
  border-left: 2.5px solid var(--ok);
  border-bottom: 2.5px solid var(--ok);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- *
 * Phone screenshots
 *
 * The images are real screenshots of the app at 390 CSS pixels wide,
 * captured at twice that in real pixels so they stay sharp on a good
 * screen. width and height are declared on the <img> so the browser can
 * reserve the space before the file arrives and the page does not jump.
 * ---------------------------------------------------------------- */

.phone {
  margin: 0;
  max-width: 300px;
  justify-self: center;
}
.phone img {
  display: block;
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  background: #14181d;
}
.phone figcaption {
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

.shotRow { display: grid; gap: 30px; }
@media (min-width: 760px) { .shotRow { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .shotRow--3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------------------------------------------------------------- *
 * Section headings
 * ---------------------------------------------------------------- */

.sectionHead { max-width: 44em; margin-bottom: 34px; }
.sectionHead h2 { margin-top: 0; }
.sectionHead p { color: var(--muted); margin-bottom: 0; }

/* A short label above a heading, for scanning. Not a heading itself, so it
   is not marked up as one. */
.eyebrow {
  display: block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .7em;
}

/* ---------------------------------------------------------------- *
 * Feature cards
 * ---------------------------------------------------------------- */

.feature h3 { display: flex; align-items: baseline; gap: 9px; }
.feature p:last-child { margin-bottom: 0; }
.feature .fine { display: block; margin-top: .8em; }

/* ---------------------------------------------------------------- *
 * The offline explanation
 *
 * This gets its own treatment because it is the single thing that sells the
 * product to someone working underground or two hours from town.
 * ---------------------------------------------------------------- */

.offline {
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--raised);
}
.offlineSteps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 18px;
}
@media (min-width: 760px) { .offlineSteps { grid-template-columns: repeat(3, 1fr); } }
.offlineSteps li {
  counter-increment: step;
  padding-top: 42px;
  position: relative;
  margin: 0;
  font-size: .95rem;
}
.offlineSteps li::before {
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 800;
  font-size: .95rem;
}
.offlineSteps b { display: block; margin-bottom: .25em; }

/* ---------------------------------------------------------------- *
 * Pricing
 * ---------------------------------------------------------------- */

/* The monthly / yearly switch. Radio buttons rather than a toggle, because
   a radio group is announced correctly by a screen reader and works with
   the arrow keys for free. The inputs themselves are hidden from sight but
   never from the accessibility tree. */
.billingToggle {
  display: inline-flex;
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 8px;
  background: var(--raised);
}
.billingToggle input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
}
.billingToggle label {
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.billingToggle input:checked + label {
  background: var(--amber);
  color: var(--amber-ink);
}
/* The ring has to appear on the visible label, because the input it belongs
   to is not on screen. */
.billingToggle input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.planGrid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 700px) { .planGrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .planGrid { grid-template-columns: repeat(4, 1fr); } }

.plan {
  background: var(--raised);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow);
}
.plan--featured { border-color: var(--amber); border-width: 2px; }

.plan h3 { margin: 0 0 2px; font-size: 1.25rem; }
.planSeats { color: var(--muted); font-size: .88rem; margin: 0 0 18px; }

.planPrice { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.planAmount { font-size: 2.1rem; font-weight: 800; line-height: 1; }
.planPer { color: var(--muted); font-size: .88rem; }
.planSecond { color: var(--muted); font-size: .85rem; min-height: 1.4em; margin: 0 0 18px; }

.planSummary { font-size: .93rem; margin-bottom: 18px; }

.planList { list-style: none; padding: 0; margin: 0 0 22px; font-size: .9rem; }
.planList li { position: relative; padding-left: 24px; margin-bottom: .45em; }
.planList li::before {
  content: "";
  position: absolute;
  left: 2px; top: .4em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}

/* Pushes the button to the bottom so every card's button lines up, however
   much text is above it. */
.plan .btn { margin-top: auto; width: 100%; }

/* A small flag on the recommended card. */
.planTag {
  align-self: flex-start;
  background: var(--amber);
  color: var(--amber-ink);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* Shown only if the live prices from the API turn out to differ from the
   ones written into the page. In normal operation nobody ever sees it. */
.priceStale { margin-top: 20px; }

/* The GST and currency note under the cards. Without this it sits flush
   against the grid and reads as part of the last plan rather than as a
   statement about all of them. */
#priceFine { margin-top: 26px; }

/* ---------------------------------------------------------------- *
 * Frequently asked questions
 * ---------------------------------------------------------------- */

.faq { border-top: 1px solid var(--hair); }
.faq details {
  border-bottom: 1px solid var(--hair);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 4px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--muted);
  flex: 0 0 auto;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:focus-visible { outline-offset: -2px; }
.faq .answer { padding: 0 4px 18px; }
.faq .answer > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- *
 * Call to action strip
 * ---------------------------------------------------------------- */

.cta {
  background: var(--panel);
  border-block: 1px solid var(--hair);
  padding: 52px 0;
  text-align: center;
}
.cta h2 { margin-top: 0; }
.cta p { color: var(--muted); max-width: 36em; margin: 0 auto 24px; }
.cta .btnRow { justify-content: center; }

/* ---------------------------------------------------------------- *
 * Steps, used on the support page
 * ---------------------------------------------------------------- */

.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li {
  counter-increment: s;
  position: relative;
  padding-left: 46px;
  margin-bottom: 26px;
}
.steps > li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: -2px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid var(--amber);
  color: var(--ink);
  font-weight: 800;
  font-size: .9rem;
}
.steps h3 { margin: 0 0 .3em; font-size: 1.02rem; }
.steps > li > :last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- *
 * Forms on the contact page
 * ---------------------------------------------------------------- */

.formCard {
  background: var(--raised);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  max-width: 620px;
}

/* Where a status message appears after submitting. It is a live region, so
   a screen reader announces the result without the focus having to move. */
.formStatus { margin-top: 18px; }
.formStatus:empty { display: none; }
