/* PolpoMed site. Colours and type from docs/DESIGN.md and apps/mobile/src/theme/tokens.ts. Mobile first. */

@font-face {
  font-family: 'Nunito';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/Nunito_700Bold.ttf") format('truetype');
}
@font-face {
  font-family: 'Nunito';
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/Nunito_900Black.ttf") format('truetype');
}

:root {
  --page: #f7f5f2;
  --surface: #ffffff;
  --border: #e7e2da;
  --text: #1f2328;
  --muted: #5f6672;
  --brand: #0fa3a3;
  --brand-lip: #0b7c7c;
  --brand-tint: #e3f6f6;
  --brand-text: #0a7373;
  --premium: #1e2a4a;
  --xp: #ffc83d;
  --radius: 16px;
  --lip: 4px;
  --font: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
}

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

a {
  color: var(--brand-text);
  text-underline-offset: 2px;
}

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

h1,
h2,
h3 {
  font-weight: 900;
  line-height: 1.2;
  margin: 1.6em 0 0.5em;
}

h1 {
  font-size: 2rem;
  margin-top: 0.5em;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1.2rem;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  padding: 8px 12px;
  background: var(--premium);
  color: #fff;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--text);
  font-weight: 900;
  font-size: 1.25rem;
  text-decoration: none;
}
.brand img {
  border-radius: 10px;
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
}
.site-header nav a[aria-current='page'] {
  color: var(--text);
}

main {
  padding-top: 24px;
  padding-bottom: 48px;
}

/* Landing */
.hero {
  text-align: center;
  padding: 16px 0 8px;
}
.hero img {
  width: 144px;
  height: 144px;
  border-radius: 32px;
}
.hero .lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34em;
  margin: 0 auto 24px;
}
.kicker {
  color: var(--brand-text);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  margin: 16px 0 0;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.stores {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 168px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--premium);
  color: #fff;
  line-height: 1.2;
}
.store small {
  font-size: 0.75rem;
  opacity: 0.85;
}
.store span {
  font-weight: 900;
  font-size: 1.1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--text);
  font-weight: 900;
  font-size: 1.05rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 var(--lip) 0 var(--brand-lip);
  margin-bottom: var(--lip);
}
.button:active {
  transform: translateY(var(--lip));
  box-shadow: none;
}
.note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.section {
  margin-top: 48px;
}
.section > h2 {
  margin-top: 0;
}

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 {
  margin-top: 0;
}
.card p:last-child {
  margin-bottom: 0;
}

.steps {
  padding-left: 1.4em;
}
.steps li {
  margin-bottom: 12px;
}
.steps li::marker {
  color: var(--brand-text);
  font-weight: 900;
}

.callout {
  background: var(--brand-tint);
  border-radius: var(--radius);
  padding: 20px;
}
.callout h2 {
  margin-top: 0;
}
.callout p:last-child {
  margin-bottom: 0;
}

/* Text pages */
.prose {
  max-width: 680px;
  margin: 0 auto;
}
.prose li {
  margin-bottom: 0.4em;
}
.meta {
  color: var(--muted);
}
.toc {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}
.toc h2 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc li {
  margin: 0;
}
.toc a {
  display: block;
  padding: 6px 0;
}
.faq h3 {
  margin-top: 1.4em;
}

/* Footer */
.site-footer {
  border-top: 2px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 24px 0 32px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 720px) {
  h1 {
    font-size: 2.6rem;
  }
  .hero img {
    width: 176px;
    height: 176px;
  }
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button:active {
    transform: none;
  }
}
