/*
  The app's reading modes (Shared/Theme.swift): paper by day, night after dark,
  and the high-contrast pair when the system asks for more contrast.
*/

:root {
  color-scheme: light dark;
  --paper: #F6F1E7;
  --surface: #FFFDF8;
  --ink: #1E1B16;
  --ink-secondary: #5C554A;
  --accent: #1F6B4C;
  --hairline: rgb(30 27 22 / 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141210;
    --surface: #1F1B17;
    --ink: #EDE6D8;
    --ink-secondary: #A69D8C;
    --accent: #5BAF8A;
    --hairline: rgb(237 230 216 / 0.16);
  }
}

@media (prefers-contrast: more) {
  :root {
    --paper: #FFFFFF;
    --surface: #FFFFFF;
    --ink: #000000;
    --ink-secondary: #3A3A3A;
    --accent: #155A3E;
    --hairline: rgb(0 0 0 / 0.6);
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --surface: #0A0A0A;
    --ink: #FFFFFF;
    --ink-secondary: #D6D6D6;
    --accent: #7FD1A8;
    --hairline: rgb(255 255 255 / 0.6);
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  font-size: 1.125rem;
  line-height: 1.9;
}

.page {
  max-width: 38rem;
  margin-inline: auto;
  padding: 2rem 1rem 3rem;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.4;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.5;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.5;
  margin: 1.5rem 0 0.25rem;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-inline-start: 1.25rem;
}

li + li {
  margin-block-start: 0.25rem;
}

.lead {
  font-size: 1.25rem;
  color: var(--ink-secondary);
}

.date {
  color: var(--ink-secondary);
  font-size: 1rem;
}

.contact {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 0.5rem;
}

/* The address, the only link: a 44-point target like the app's controls. */
.contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

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

/* The name card: what every address but the two pages shows (404.html). */
.card {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 2rem 1rem;
  text-align: center;
}

.card img {
  width: 96px;
  height: 96px;
  margin-block-end: 1rem;
  border-radius: 22.4%;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}

.card .name {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.card .tagline {
  font-size: 1.25rem;
  color: var(--ink-secondary);
  margin: 0;
}

/* The store's badge: Apple's own, the card's one link, a 44-point target. */
.card .store {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-block-start: 1.5rem;
  border-radius: 6px;
}

.card .store img {
  display: block;
  width: auto;
  height: 40px;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
