/* The Awasa look shared by awasa.net, cards and pay (served at /shared/ on each, see the Caddyfile):
   the colours, the header with its ☰ menu, buttons, cards, the consent bar, the footer. Each site's own
   css/style.css adds only what is its own. */
:root {
  /* The apps' palette (theme.py in ../balance and ../kcal, Медитация's style.css): one dark look for
     every Awasa page */
  --bg: #14161a;
  --surface: #1c1c1e;
  --border: #424242;
  --text: #ffffff;
  --muted: #bdbdbd;
  --accent: #e3b873;
  --on-accent: #000000;
  --menu: #1c1c1e;  /* the ☰ menu, as the apps' ⋮ menu */
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* Header: the small icon and the name, section links on wider screens */
.top {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  background: var(--bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
}

.brand:hover {
  text-decoration: none;
}

.links {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

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

.links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* «Awasa · <site>»: Awasa always goes home to awasa.net, the site's name to the top of the site */
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dot {
  color: var(--muted);
}

.site {
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
  white-space: nowrap;
}

.site:hover {
  color: var(--accent);
  text-decoration: none;
}

.links a[aria-current="page"],
.menu a[aria-current="page"] {
  color: var(--accent);
}

/* On phones the links move behind ☰: it opens without scripts, js/menu.js only closes it after a tap */
.menu {
  display: none;
  position: relative;
}

.menu summary {
  display: flex;
  padding: 6px;
  color: var(--text);
  list-style: none;
  cursor: pointer;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.menu[open] .bars,
.menu:not([open]) .close {
  display: none;
}

/* The panel looks like the apps' ⋮ menu: their surface, 16px corners, a full-width highlight clipped by
   the corners */
.menu nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 8px 0;
  border-radius: 16px;
  background: var(--menu);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.menu nav a {
  padding: 14px 20px;
  color: var(--text);
  font-size: 16px;
}

.menu nav a:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  text-decoration: none;
}

@media (max-width: 560px) {
  .links {
    display: none;
  }

  .menu {
    display: block;
  }
}

/* One column of sections */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

section {
  scroll-margin-top: 56px;  /* the sticky header doesn't cover a section the links jump to */
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

section + section {
  border-top: 1px solid var(--border);
}

h2 {
  font-size: 24px;
  line-height: 1.25;
}

h3 {
  font-size: 17px;
  line-height: 1.35;
}

.muted,
.card p {
  color: var(--muted);
}

/* Hero: text only */
.hero {
  padding: 48px 0 56px;
  align-items: flex-start;
  gap: 20px;
}

.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(32px, 7vw, 46px);
  line-height: 1.12;
  font-weight: 700;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
}

.note {
  font-size: 14px;
  color: var(--muted);
}

/* The gold pill, as in the apps */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: none;
  border-radius: 24px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.06);
}

.button.small {
  min-height: 40px;
  padding: 0 20px;
  font-size: 15px;
}

.button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* How a reading goes: numbered steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 14px;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps p {
  color: var(--muted);
}

/* Subscription */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.benefits {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.benefits li::marker {
  color: var(--accent);
}

/* Part of Awasa: the other apps */
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.app {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.app:hover {
  text-decoration: none;
  outline: 1px solid var(--border);
}

.app img {
  flex: none;
}

.app strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

/* Closing call to action */
.cta {
  align-items: center;
  text-align: center;
  padding: 56px 0;
}

footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Metrica consent: a bar at the bottom until answered */
.consent {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 2;
  max-width: min(560px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.consent[hidden] {
  display: none;
}

.consent p {
  flex: 1 1 240px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 420px) {
  .consent {
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    max-width: calc(100% - 16px);
    padding: 12px;
    gap: 10px;
    font-size: 13px;
  }

  .consent p {
    flex-basis: 100%;
  }

  .consent-actions {
    width: 100%;
  }

  .consent-actions .button {
    flex: 1 1 auto;
  }
}

/* A soft gold glow at the top of the page, as on awasa.net */
body {
  background: radial-gradient(max(900px, 90vw) 600px at 50% 80px, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%) no-repeat, var(--bg);
}

/* The header spans the full width, so its frosted bar has no edges; the content stays in the column.
   The glow and the page show through as they scroll under it. */
.top {
  max-width: none;
  padding-inline: max(16px, calc((100% - 728px) / 2));
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Footer links to the legal pages, as on awasa.net */
footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin-bottom: 8px;
}
