/* Tivitti — lovetere.it/apps/tivitti
 *
 * Colour comes from the app's own tokens, `expo/src/constants/colors.ts`, which
 * `ios/design/tokens.json` and `Tivitti/Design/Theme.swift` mirror. Change it
 * there first, then here, so the site and the three clients stay one product.
 *
 * Type is a system stack rather than the app's Nunito: no TTF is committed in
 * any Tivitti repo, and the iOS client already substitutes SF Rounded for the
 * same reason. Loading a webfont from a third party would also put a request to
 * someone else's server on a privacy page, which is not a trade worth making
 * for a wordmark.
 */

:root {
  --table: #0a312c;
  --table-alt: #11463d;
  --table-rail: #061f1b;
  --panel: rgba(7, 25, 22, 0.78);
  --panel-border: rgba(255, 255, 255, 0.08);
  --slot: rgba(255, 255, 255, 0.06);
  --text: #f8f3ec;
  --text-muted: rgba(248, 243, 236, 0.72);
  --accent: #f6c667;
  --accent-strong: #ff8a5b;
  --accent-soft: rgba(246, 198, 103, 0.18);
  --tivitti: #af3b34;
  --tivitti-border: #d96c62;
  --shadow: rgba(0, 0, 0, 0.34);
}

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

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

body {
  margin: 0;
  padding: 0;
  background: var(--table-rail);
  background-image: radial-gradient(
    ellipse at 50% -10%,
    var(--table-alt) 0%,
    var(--table) 45%,
    var(--table-rail) 100%
  );
  background-attachment: fixed;
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

/* ---- header ------------------------------------------------------------ */

header.site {
  text-align: center;
  padding-bottom: 1.5rem;
}

.mark {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 1.25rem;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 2.5rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-weight: 800;
}

.tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ---- type -------------------------------------------------------------- */

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
}

h3 {
  margin: 1.75rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--accent);
}

a:hover,
a:focus {
  color: var(--accent-strong);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--slot);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

strong {
  font-weight: 700;
}

/* ---- panels ------------------------------------------------------------ */

section.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 1.25rem 1.5rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 12px 32px var(--shadow);
}

section.panel h2:first-child {
  margin-top: 0.25rem;
}

.callout {
  border-left: 3px solid var(--tivitti-border);
  background: rgba(175, 59, 52, 0.14);
  border-radius: 0 12px 12px 0;
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.updated {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- store buttons ----------------------------------------------------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 2rem 0 0.5rem;
  padding: 0;
  list-style: none;
}

.stores li {
  margin: 0;
}

.store-link {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.store-link:hover,
.store-link:focus {
  background: var(--accent);
  color: var(--table-rail);
}

/* ---- footer ------------------------------------------------------------ */

footer.site {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

footer.site a {
  margin: 0 0.5rem;
  white-space: nowrap;
}

/* ---- small screens ----------------------------------------------------- */

@media (max-width: 30rem) {
  .wrap {
    padding: 2rem 1rem 3rem;
  }

  h1 {
    font-size: 2rem;
  }

  section.panel {
    padding: 1rem 1.1rem 1.25rem;
  }
}
