/*
 * The one stylesheet for app.myamira.com.
 *
 * This site replaced the Next.js web app on 28 September 2026. It has two
 * jobs: keep the legal pages at the addresses the App Store listing, build 109
 * and the 1.1.4 binary already point at, and hand a person who tapped a link
 * in an email back to the app. Nothing here needs a framework, so there is
 * none, and every page works with the script off.
 *
 * THE COLOURS ARE COPIED FROM src/design/tokens.ts, which stays the source.
 * This file and tokens.ts are the only two places a hex literal may be
 * written. If a palette value changes there, change it here in the same
 * commit. The names below are the token names in kebab case.
 *
 * The ground is cream because these are brand pages, the same reason sign in
 * keeps the cream in the app. The one button is nectarine with an ink label:
 * cream on nectarine measures 2.69 to 1 and fails, ink measures 5.16 and
 * passes, which is the choice src/design/primitives.tsx and the emails made.
 * Links are ink with a nectarine underline for the same reason: nectarine as
 * the colour of small text on cream is 2.69 to 1.
 *
 * Dark mode is the email's dark mode: ink ground, cream type, sand for the
 * secondary line (11 to 1, where warm grey on ink would be 2.9), and the
 * softer nectarine for the underline.
 */

:root {
  --nectarine: #D0837B;
  --nectarine-soft: #DC9B87;
  --cream: #FBF5EC;
  --ink: #2A2622;
  --sand: #EFD9C4;
  --sand-light: #F3E9DB;
  --warm-grey: #7A6A5E;

  --page: var(--cream);
  --text: var(--ink);
  --text-secondary: var(--warm-grey);
  --panel: var(--sand-light);
  --rule: rgba(42, 38, 34, 0.09);
  --rule-strong: rgba(42, 38, 34, 0.16);
  --underline: var(--nectarine);
  --accent: var(--nectarine);
  --accent-hover: var(--nectarine-soft);
  --on-accent: var(--ink);
  --focus: var(--ink);

  /* DM Sans first, then the phone's own sans, so a blocked font request
     still reads as a clean grotesque rather than Times. */
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* The app's body is 16 on a phone held close. A page read in a browser
     sits a little further away, so it goes up one point. */
  --body: 17px;
  --measure: 65ch;
  --gutter: 16px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: var(--ink);
    --text: var(--cream);
    --text-secondary: var(--sand);
    --panel: rgba(251, 245, 236, 0.06);
    --rule: rgba(251, 245, 236, 0.12);
    --rule-strong: rgba(251, 245, 236, 0.22);
    --underline: var(--nectarine-soft);
    --focus: var(--cream);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--body);
  line-height: 1.6;
  /* A long address or a URL must wrap, never push the page sideways. */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

/* ─── Frame ─────────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.site-header {
  padding-top: 20px;
  padding-bottom: 8px;
}

.wordmark {
  display: inline-block;
  font-size: 22px;
  line-height: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

main {
  flex: 1 0 auto;
  padding-top: 24px;
  padding-bottom: 56px;
}

.site-footer {
  padding-top: 24px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 8px;
}

.site-footer nav a {
  display: inline-block;
  line-height: 44px;
  color: var(--text);
}

.site-footer p {
  margin: 0;
}

/* ─── Type ──────────────────────────────────────────────────────────────── */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}

/* A link to a section from another page lands with room above it. */
[id] {
  scroll-margin-top: 24px;
}

/* The heading rung is 36 in the app. On a narrow phone it steps down so a
   three word title still fits on one or two lines. */
h1 {
  font-size: clamp(30px, 8vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

h2 {
  margin-top: 48px;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

h3 {
  margin-top: 28px;
  font-size: var(--body);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

p,
ul,
ol {
  margin: 12px 0 0;
}

/* Keeps a last word from sitting alone on its own line, where supported. */
p,
li,
dd {
  text-wrap: pretty;
}

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

li + li {
  margin-top: 8px;
}

strong {
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.meta {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

.lead {
  margin-top: 20px;
  font-size: 19px;
  line-height: 1.55;
}

.secondary {
  color: var(--text-secondary);
}

/* A short summary at the top of a long page, sunk one step warm the way a
   panel is in the app. No border and no shadow: the tone does the work. */
.panel {
  margin-top: 28px;
  padding: 20px;
  border-radius: 20px;
  background-color: var(--panel);
}

.panel h2 {
  margin-top: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.panel ul {
  margin-top: 12px;
}

/* A list of names and what each one does, for the processors and the like.
   A definition list rather than a table, because a table scrolls sideways on
   a phone and this must not. */
.facts {
  margin: 16px 0 0;
  padding: 0;
}

.facts > div {
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}

.facts > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 4px 0 0;
}

/* ─── Open the app ──────────────────────────────────────────────────────── */

.open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 24px;
}

.open .mark {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
}

.open h1 {
  max-width: 18ch;
}

.open .lead {
  margin-top: 16px;
  max-width: 40ch;
}

.actions {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* The one button. Pill, nectarine, ink label, and never smaller than the
   44 point touch target the app uses. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 32px;
  border-radius: 999px;
  background-color: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
  text-decoration: none;
  /* The same pill whether it is a link or the unsubscribe form's button:
     a button brings its own border, font and cursor, and loses them here. */
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.button:hover {
  background-color: var(--accent-hover);
}

.store-link {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  font-weight: 500;
}

.hint {
  margin: 0;
  max-width: 40ch;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }

  main {
    padding-top: 40px;
    padding-bottom: 80px;
  }

  .panel {
    padding: 24px 28px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: background-color 150ms ease;
  }
}
