/* ------------------------------------------------------------------
   The Contact and Features views. They are part of the
   landing view, not pages of their own: its text and the glasses make way
   for one of them while the scene behind carries on, so nothing reloads
   and nothing stops. views.js opens them and keeps the address in step.
------------------------------------------------------------------- */
/* a view shares the landing text's place; if it is taller than the screen it scrolls by itself (#app never does) */
/* The one that leaves goes at once and quickly; the one that arrives waits a moment for it, so the two are never read through each other. */
.hero__in { grid-area: 1 / 1; transition: opacity 0.4s ease 0.16s, transform 0.6s var(--ease) 0.16s, visibility 0s linear 0.16s; }
#app[data-page] .hero__in { opacity: 0; visibility: hidden; transform: translateY(-12px); pointer-events: none; transition: opacity 0.2s ease, transform 0.4s var(--ease), visibility 0s linear 0.2s; }
.sheet { grid-area: 1 / 1; align-self: stretch; justify-self: stretch; display: grid; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin;
  opacity: 0; visibility: hidden; transform: translateY(16px); pointer-events: none; transition: opacity 0.2s ease, transform 0.4s var(--ease), visibility 0s linear 0.2s;
  /* what scrolls out at the top or the bottom fades away there instead of being cut off */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }
#app[data-page='contact'] #sheet-contact, #app[data-page='features'] #sheet-features { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity 0.4s ease 0.16s, transform 0.6s var(--ease) 0.16s, visibility 0s linear 0.16s; }
/* While the loading screen is still up the forms are drawn once behind it (main.js, start): the first time a card's glass
   blur is drawn costs a slow frame, and there nobody sees it. The loading screen is made a hair less than opaque for that
   moment, or the browser would not bother to draw what is under it. */
#app.is-warming .hero, #app.is-warming .sheet { opacity: 1; visibility: visible; transition: none; }
#app.is-warming .loader { opacity: 0.999; }

.page__in { margin: auto; width: min(560px, 100%); display: grid; justify-items: center; text-align: center; padding: 18px 0 26px; }
/* (the form's title is an h2 at /, and the page's main heading, an h1, at its own address: tools/pages.mjs) */
.page__in h1, .page__in h2 { margin: 20px 0 0; font: 600 clamp(30px, 3.7vw, 48px) / 1.1 var(--hud-font); letter-spacing: 0.005em; text-wrap: balance; text-shadow: 0 1px 16px rgba(3, 5, 9, 0.7); outline: 0; }
.page__in h1 em, .page__in h2 em { font-style: normal; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.page__sub { margin: 16px 0 0; max-width: 520px; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.75; letter-spacing: 0.02em; color: rgba(244, 246, 248, 0.86); text-wrap: pretty; text-shadow: 0 1px 16px rgba(3, 5, 9, 0.7); }
/* the way back to the landing text, under the card */
.page__back { margin-top: 16px; height: 40px; font-size: 11px; }
.page__back svg { transform: scaleX(-1); } /* the arrow, pointing back */

/* ---------------------------------------------------------------- the card: the module card's glass */
.card { width: 100%; box-sizing: border-box; margin-top: 30px; padding: 26px 26px 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--glass); text-align: left;
  -webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03) inset; }

/* ---------------------------------------------------------------- the form */
.form { display: grid; gap: 18px; }
.form[hidden] { display: none; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; align-content: start; min-width: 0; } /* two fields side by side keep their boxes level when only one of them has a complaint under it */
.field__label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 600 11px/1 var(--hud-font); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.field__label small { font: 500 10.5px/1 var(--hud-font); letter-spacing: 0.06em; text-transform: none; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* A field is the buttons' dark glass. While it has the focus it wears their gradient outline. */
.field__box { position: relative; border-radius: 12px; background: rgba(24, 26, 32, 0.55); box-shadow: 0 0 0 1px var(--line) inset; transition: background 0.25s, box-shadow 0.25s; }
.field__box::before { content: ''; position: absolute; inset: 0; padding: 2px; border-radius: inherit; background: var(--logo); opacity: 0; pointer-events: none; transition: opacity 0.2s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.field__box:hover { background: rgba(34, 37, 45, 0.6); }
.field__box:focus-within { background: rgba(44, 47, 56, 0.62); box-shadow: none; }
.field__box:focus-within::before { opacity: 1; }
.field input, .field textarea { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 14px 16px; border: 0; outline: 0; border-radius: inherit; background: none; color: var(--ink);
  font: 400 14px/1.5 var(--hud-font); letter-spacing: 0.02em; user-select: text; -webkit-user-select: text; touch-action: auto; }
.field textarea { min-height: 150px; resize: vertical; line-height: 1.65; }
.field ::placeholder { color: var(--ink-3); opacity: 1; }
/* a browser's own colours for a field it has filled in would break the glass */
.field input:-webkit-autofill, .field input:-webkit-autofill:focus { -webkit-text-fill-color: var(--ink); caret-color: var(--ink); -webkit-box-shadow: 0 0 0 100px #191b21 inset; transition: background-color 9999s; }
.field.is-bad .field__box { box-shadow: 0 0 0 1px rgba(255, 110, 122, 0.85) inset; }
.field__err { margin: 0; font: 500 11.5px/1.45 var(--hud-font); letter-spacing: 0.02em; color: #ff97a0; }
.field__err:empty { display: none; }


.form__send { width: 100%; height: 50px; justify-content: center; gap: 10px; font-size: 13px; border-radius: 14px; }
.form__send svg { width: 18px; height: 18px; }
.form__send[disabled] { opacity: 0.65; cursor: progress; transform: none; }
.form__alert { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 110, 122, 0.1); box-shadow: 0 0 0 1px rgba(255, 110, 122, 0.55) inset; color: #ffd3d7; font-size: 12.5px; line-height: 1.6; letter-spacing: 0.02em; }
.form__alert:empty { display: none; }
.form__note { margin: 0; text-align: center; font-size: 11px; line-height: 1.7; letter-spacing: 0.02em; color: var(--ink-3); }
.form__note a { color: var(--ink-2); text-underline-offset: 3px; transition: color 0.2s; }
.form__note a:hover, .form__note a:focus-visible { color: var(--ink); }
/* shown only where the site is being tried out and nothing can really be sent (see forms.js) */
.form__preview { margin: 0; padding: 9px 12px; border-radius: 10px; border: 1px dashed rgba(244, 246, 248, 0.28); font-size: 11px; line-height: 1.55; letter-spacing: 0.02em; color: var(--ink-2); text-align: center; }
/* a decoy field no person sees or reaches; form-filling robots fill it in and give themselves away */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ---------------------------------------------------------------- once it has gone through */
.done { display: grid; justify-items: center; gap: 14px; padding: 16px 6px 6px; text-align: center; }
.done[hidden] { display: none; }
.done__mark { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--logo); color: #14080d; box-shadow: 0 10px 30px rgba(251, 81, 150, 0.35); }
.done__mark svg { width: 30px; height: 30px; }
.done h3 { margin: 6px 0 0; font: 600 22px/1.2 var(--hud-font); letter-spacing: 0.01em; outline: 0; }
.done p { margin: 0; max-width: 42ch; font-size: 13px; line-height: 1.75; letter-spacing: 0.02em; color: var(--ink-2); text-wrap: pretty; }
.done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.done__actions .pill { height: 44px; }

/* ---------------------------------------------------------------- the Features view: text to read */
/* What LifeHUD is and what each module does, in the module card's glass and its type: small headings in
   capitals, body text in the softer ink, and the modules as a list, name on the left, words on the right. */
.page__in--wide { width: min(840px, 100%); } /* (wide enough for the longest module's words to take two lines, like the rest) */
.read h3 { margin: 28px 0 0; font: 600 13px/1.3 var(--hud-font); letter-spacing: 0.18em; text-transform: uppercase; }
.read h3:first-child { margin-top: 0; }
.read p { margin: 12px 0 0; font-size: 13px; line-height: 1.75; letter-spacing: 0.02em; color: var(--ink-2); text-wrap: pretty; }
/* Every row of a list is as tall as its tallest one (two lines of words on a desk), so the list keeps one even step down
   the page: a module whose words fit on one line still takes the room of two. */
.read__list { margin: 14px 0 0; display: grid; gap: 13px; grid-auto-rows: 1fr; }
.read__item { display: grid; grid-template-columns: 172px 1fr; gap: 3px 18px; }
.read__item dt { font: 600 12.5px/1.7 var(--hud-font); letter-spacing: 0.04em; color: var(--ink); }
.read__item dd { margin: 0; font-size: 12.5px; line-height: 1.7; letter-spacing: 0.02em; color: var(--ink-2); text-wrap: pretty; }
.read__item dd b { font-weight: 600; color: var(--ink); }
.read a { color: var(--ink); text-underline-offset: 3px; transition: color 0.2s; }
.read a:hover, .read a:focus-visible { color: #fb5196; }

@media (max-width: 560px) {
  .read__list { grid-auto-rows: auto; } /* (name over words here, each as long as it is: evened out, a short one would be followed by a hole) */
  .read__item { grid-template-columns: 1fr; }
  .card { padding: 20px 18px 18px; border-radius: 18px; margin-top: 24px; }
  .form__row { grid-template-columns: 1fr; gap: 18px; }
  .field input, .field textarea { font-size: 16px; } /* smaller type makes a phone zoom the page in when the field is tapped */
}
@media (prefers-reduced-motion: reduce) {
  .hero__in, .sheet, .field__box, .field__box::before { transition-duration: 0.01s; }
}
