/* angeladvice.com: shared styles for every page. Everything is served from this site, so the pages make no requests
   to anyone else. Colours are the app's own (ios/AngelAdvice/Theme.swift): cream, paper, parchment, gold and ink.
   Georgia for everything, from the system; no font files. Light only. Mobile first; wider screens only get more room. */

:root {
  color-scheme: light;
  --cream: #faf3e1;
  --paper: #fffbf0;
  --parchment: #f1e9d7;
  --rule: #d9ccab;
  --gold: #b9902f;
  --gold-bright: #d4a747;
  --ink: #2a2420;
  --heading: #231a12;
  --muted: #6b5a3d;
  /* Gold darkened for links, so they keep enough contrast on cream (about 5:1). */
  --link: #7d5f17;
  --link-hover: #231a12;
  --serif: Georgia, "Times New Roman", Times, serif;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  color: var(--heading);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 1.6rem + 2.2vw, 2.75rem);
  margin: 0 0 0.35em;
  letter-spacing: 0.005em;
}

h2 {
  font-size: clamp(1.4rem, 1.25rem + 0.9vw, 1.75rem);
  margin: 2.4em 0 0.6em;
}

h3 {
  font-size: 1.2rem;
  font-style: italic;
  margin: 1.8em 0 0.4em;
}

h1,
h2,
h3,
[id] {
  scroll-margin-top: 1rem;
}

p,
ul,
ol,
dl,
table {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.4rem;
}

strong {
  font-weight: 700;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--gold);
}

.skip-link:focus {
  top: 1rem;
}

/* Header: the same on every page. The brand on the left goes home. */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header .bar {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--heading);
  text-decoration: none;
}

.brand:hover {
  color: var(--heading);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid var(--rule);
}

.brand-name {
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--heading);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

/* Documents: privacy, terms, support. */
.doc {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1rem 3.5rem;
}

.meta {
  color: var(--muted);
  font-size: 0.97rem;
  font-style: italic;
}

.lead {
  font-size: 1.15rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  border-radius: 6px;
  padding: 1.1rem 1.25rem 0.35rem;
  margin: 1.75rem 0;
}

.card > h2:first-child {
  margin-top: 0.2em;
}

.toc {
  background: var(--parchment);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem 1.25rem 0.6rem;
  margin: 1.75rem 0 2.25rem;
}

.toc h2 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.toc ol {
  margin: 0 0 0.5rem;
  padding-left: 1.6rem;
}

.toc li + li {
  margin-top: 0.15rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}

thead th {
  background: var(--parchment);
  font-weight: 700;
}

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li + li {
  margin-top: 0.6rem;
}

address {
  font-style: normal;
  margin: 0 0 1rem;
}

blockquote {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--paper);
  border-left: 3px solid var(--gold);
  font-style: italic;
}

/* Footer: the same on every page, with the product's fine print. */
.site-footer {
  background: var(--parchment);
  border-top: 1px solid var(--rule);
  padding: 1.75rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.site-footer .inner {
  max-width: 46rem;
  margin: 0 auto;
}

.site-footer ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--heading);
}

.fine-print {
  margin: 0 0 0.75rem;
}

.company {
  margin: 0;
}

/* Home. */
.hero-image {
  background: #120d09;
}

.hero-image img {
  display: block;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}

.intro {
  text-align: center;
  padding-top: 2.5rem;
}

/* On the home page the intro runs straight into "What's inside". */
.intro + .doc {
  padding-top: 0;
}

.intro + .doc > h2:first-child {
  margin-top: 1em;
}

.app-icon {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto 1.25rem;
  border-radius: 22%;
  border: 1px solid var(--rule);
  box-shadow: 0 6px 18px rgb(35 26 18 / 0.15);
}

/* Not found: one card back where the icon would be. */
.lone-card {
  display: block;
  width: 112px;
  margin: 0 auto 1.25rem;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgb(35 26 18 / 0.18);
}

.intro h1 {
  font-size: clamp(2.4rem, 1.9rem + 3vw, 3.25rem);
  margin-bottom: 0.2em;
}

.presenter {
  color: var(--muted);
  font-style: italic;
  margin: 0 0 1.25rem;
}

.tagline {
  font-size: 1.2rem;
  max-width: 30rem;
  margin: 0 auto 1.5rem;
}

.coming-soon {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--paper);
  color: var(--heading);
  letter-spacing: 0.04em;
}

.small {
  font-size: 0.95rem;
  color: var(--muted);
}

.ornament {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.6em;
  margin: 2.5rem 0 0;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features li {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.1rem 1.25rem 0.4rem;
}

.features li + li {
  margin-top: 1rem;
}

.features h3 {
  margin-top: 0;
  font-style: normal;
}

.cards {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem 0 0.5rem;
}

.cards img {
  width: calc((100% - 2.25rem) / 4);
  max-width: 140px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgb(35 26 18 / 0.18);
}

.caption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

@media (min-width: 40em) {
  body {
    font-size: 1.125rem;
  }

  .doc {
    padding: 3rem 1.5rem 4.5rem;
  }

  .site-header .bar {
    padding: 0.9rem 1.5rem;
  }

  .site-footer {
    padding: 2rem 1.5rem 3rem;
  }

  .toc ol {
    columns: 2;
    column-gap: 2.5rem;
  }

  .features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .features li + li {
    margin-top: 0;
  }
}

@media print {
  .skip-link,
  .site-nav,
  .toc,
  .hero-image {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-header,
  .site-footer,
  .card {
    background: none;
    border: 0;
  }

  a {
    color: #000;
  }

  a[href^="http"]::after,
  a[href^="mailto:"]::after {
    content: " (" attr(href) ")";
  }
}
