/* Every page (frame in Layout.astro): the footer, and the look
   of the ordinary pages (body.page-body). The landing page adds
   landing.css, which sets its own page base. */

* {
  box-sizing: border-box;
}

html {
  background: #020820;
}

body.page-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", sans-serif;
  line-height: 1.55;
  color: #eef7ff;
  background:
    radial-gradient(
      90% 480px at 50% 0%,
      rgba(78, 121, 168, 0.55) 0%,
      rgba(47, 86, 127, 0.25) 55%,
      rgba(2, 8, 32, 0) 100%
    ),
    #020820;
}

/* The logotype sits in the window's top left on every page but the landing
   page, where it reads as the way back home. */
.site-head {
  padding: 20px 24px 0;
}

.site-home {
  display: block;
  width: fit-content;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.site-home:hover,
.site-home:focus-visible {
  opacity: 1;
}

.site-head .brand-logo {
  display: block;
  width: 132px;
  aspect-ratio: 488 / 128;
  background: linear-gradient(to bottom, #ffffff 0%, #9ec8eb 100%);
  -webkit-mask: var(--img-fbadio) center / contain no-repeat;
  mask: var(--img-fbadio) center / contain no-repeat;
}

.page-main {
  flex: 1;
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.page-title {
  margin: 0 0 24px;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.page-content h2 {
  margin: 32px 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.page-content h3 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.page-content p,
.page-content li {
  color: rgba(238, 247, 255, 0.88);
  font-size: 1rem;
}

/* The "Effective <date>" line under a page title (paragraph class "meta"). */
.page-content p.meta {
  margin-top: -12px;
  color: rgba(225, 239, 251, 0.62);
  font-size: 0.95rem;
}

.page-content ul,
.page-content ol {
  padding-left: 1.25em;
}

.page-content a {
  color: #cfe6ff;
  text-underline-offset: 2px;
}

.page-content a:hover {
  color: #fff;
}

.page-content code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

/* Forms (for a contact form block or plugin). */
.page-content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.page-content textarea,
.page-content select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(225, 239, 251, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #eef7ff;
  font: inherit;
}

.page-content input:focus,
.page-content textarea:focus,
.page-content select:focus {
  outline: 2px solid #8cc4ff;
  outline-offset: 1px;
}

.page-content button,
.page-content input[type="submit"] {
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #12304f;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Help page ---------- */

.page-content h2[id] {
  scroll-margin-top: 24px;
  margin-top: 48px;
}

.page-content ol li + li,
.page-content ul li + li {
  margin-top: 6px;
}

.help-contents {
  margin: 28px 0 8px;
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.help-contents ol {
  margin: 0;
  columns: 2;
  column-gap: 32px;
}

.help-contents li + li {
  margin-top: 0;
}

.help-contents a {
  text-decoration: none;
}

/* A picture: a crop of the fake Facebook page (--cx/--cy/--cw/--ch in its
   1440x900 pixels, scaled by --s from the help page's script), the Mac
   app's guide, or a box for a screenshot to come. */
.help-shot {
  position: relative;
  margin: 20px 0 24px;
  overflow: hidden;
  border-radius: 12px;
  background: #f0f2f5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.help-shot > iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  border: 0;
  pointer-events: none;
  transform: scale(var(--s, 0.5)) translate(calc(var(--cx) * -1px), calc(var(--cy) * -1px));
  transform-origin: 0 0;
}

.help-shot.help-guide {
  aspect-ratio: 500 / 320;
  background: none;
}

.help-guide > iframe {
  width: 100%;
  height: 100%;
  transform: none;
}

.help-todo {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 7;
  padding: 24px;
  border: 1.5px dashed rgba(200, 225, 255, 0.32);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  color: rgba(225, 239, 251, 0.5);
  font-size: 0.9rem;
  text-align: center;
}

.help-key {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 8px 0 4px;
  padding: 0;
  list-style: none;
}

.page-content .help-key li + li {
  margin-top: 0;
}

.help-key li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 3px;
  background: var(--sw);
}

@media (max-width: 600px) {
  .help-contents ol {
    columns: 1;
  }
}

/* The placement pictures (the popup's own art) with their names. */
.help-places {
  display: grid;
  gap: 18px;
  margin: 16px 0 8px;
}

.help-places dt {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.help-places dd {
  margin: 6px 0 0;
  color: rgba(238, 247, 255, 0.8);
}

.place-art svg {
  display: block;
  width: min(306px, 100%);
  height: auto;
}

.place-art.show-left .fbadio-flower-right,
.place-art.show-right .fbadio-flower-left {
  display: none;
}

/* ---------- Tip page ---------- */

.tip-lede {
  font-size: 1.15rem;
}

.tip-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 10px;
}

.tip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 14px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #12304f;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.page-content a.tip-button {
  color: #12304f;
}

.tip-button.tip-suggested {
  background: #0866ff;
  box-shadow: 0 8px 24px rgba(8, 102, 255, 0.35);
}

.page-content a.tip-button.tip-suggested,
.tip-button.tip-suggested {
  color: #fff;
}

a.tip-button:hover {
  transform: translateY(-1px);
}

/* Not ready yet: its payment link isn't filled in (Tip.astro). */
.tip-button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-content .tip-pay {
  margin-top: 0;
  color: rgba(225, 239, 251, 0.62);
  font-size: 0.9rem;
}

/* ---------- Holding page, before launch ---------- */

.holding {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 40px;
  text-align: center;
}

.holding-name {
  margin: 0 0 22px;
}

.holding-name .brand-logo {
  display: block;
  width: min(300px, 70vw);
  aspect-ratio: 488 / 128;
  background: linear-gradient(to bottom, #ffffff 0%, #9ec8eb 100%);
  -webkit-mask: var(--img-fbadio) center / contain no-repeat;
  mask: var(--img-fbadio) center / contain no-repeat;
}

.holding-line {
  margin: 0;
  font-size: 1.15rem;
  color: rgba(238, 247, 255, 0.88);
}

.holding-soon {
  margin: 14px 0 36px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ec8eb;
}

.holding-form {
  display: grid;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.holding .field {
  display: grid;
  gap: 8px;
}

.holding .label {
  font-size: 0.95rem;
  font-weight: 600;
}

.holding-row {
  display: flex;
  gap: 10px;
}

.holding input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem; /* 16px keeps iOS from zooming in on focus */
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(225, 239, 251, 0.18);
  border-radius: 10px;
}

.holding input[type="email"]:focus {
  outline: 2px solid #8cc4ff;
  outline-offset: 1px;
  border-color: transparent;
}

.holding [aria-invalid="true"] {
  border-color: #ff6b6b;
}

.holding .send {
  padding: 12px 24px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: #0866ff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.holding .send:hover {
  background: #2f80ff;
}

.holding .send:focus-visible {
  outline: 2px solid #eef7ff;
  outline-offset: 3px;
}

.holding .field-error {
  margin: 0;
  font-size: 0.9rem;
  color: #ff9a9a;
}

.holding .hint {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(225, 239, 251, 0.55);
}

.holding .hint a {
  color: rgba(225, 239, 251, 0.75);
  text-underline-offset: 2px;
}

.holding-sent {
  margin: 0;
  color: rgba(238, 247, 255, 0.88);
}

/* Filled only by bots; kept off-screen rather than display:none, which
   some bots check for. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 480px) {
  .holding-row {
    flex-direction: column;
  }
}

/* ---------- Footer (every page; the landing page also pins a copy) ---------- */

/* The footer's tip link and its dot sit in one wrapper. */
.footer-links .tip-only {
  display: contents;
}

.license-note {
  margin: 0;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(225, 239, 251, 0.38);
}

.license-note a {
  color: rgba(225, 239, 251, 0.55);
  text-decoration: none;
  white-space: nowrap;
}

.license-note a:hover {
  color: rgba(225, 239, 251, 0.85);
}

.license-note .footer-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 600px) {
  .license-note {
    justify-content: center;
    text-align: center;
    font-size: 0.62rem;
    padding-inline: 16px;
  }

  .license-note .license-credit {
    flex-basis: 100%;
  }

  .license-note .footer-links {
    margin-left: 0;
  }
}
