/* ozdor.app: the one stylesheet for the three pages.
   Colours, corners and spacing from design/m2/README.md (light and dark by the device's setting).
   The system font stack: the pages load no web font, no script and nothing from a third party. */

:root {
  color-scheme: light dark;
  --bg: #E9EDFF;          /* the periwinkle page */
  --surface: #FFFFFF;     /* cards */
  --raised: #DDE5F0;
  --text: #0B1B33;
  --text-2: #4F5B70;
  --accent: #14284B;      /* navy */
  --on-accent: #FFFFFF;
  --gold: #7E5F22;        /* gold text and links: 5.1:1 on the page, 5.9:1 on a card, 4.7:1 on the raised colour */
  --line: #D3DCE8;
  --card-border: transparent;
  --shadow: 0 1px 2px rgba(11, 27, 51, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071226;        /* deep navy */
    --surface: #0D1B33;
    --raised: #15274A;
    --text: #EEF1F7;
    --text-2: #A9B6CC;
    --accent: #E0B064;    /* gold */
    --on-accent: #1A1300;
    --gold: #E0B064;
    --line: #1F3358;
    --card-border: var(--line);
    --shadow: none;       /* no shadows in dark */
  }
}

* { box-sizing: border-box; }

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;      /* the screen gutter */
}

@media (min-width: 40em) {
  .wrap { padding: 0 24px; }
}

/* the top bar: the logo lockup and the two links */

.top {
  border-bottom: 1px solid var(--line);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 48px;      /* touch target */
  border-radius: 8px;
}

.brand img {
  display: block;
  height: 40px;
  width: auto;
}

.top nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.top nav a {
  display: inline-block;
  padding: 12px 8px;     /* at least 48 px tall */
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
}

.top nav a:hover,
.top nav a[aria-current="page"] {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

main {
  padding: 24px 0 40px;
}

/* text */

h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 0.75rem;
}

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

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

li {
  margin-bottom: 0.5rem;
}

li ul {
  margin-top: 0.5rem;
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: from-font;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.note {
  color: var(--text-2);
}

.legal {
  color: var(--text-2);
  font-style: italic;
  font-size: 0.9375rem;
}

/* the home page */

.hero {
  text-align: center;
  padding: 16px 0 8px;
}

.hero img {
  display: block;
  height: 120px;
  width: auto;
  margin: 0 auto 8px;
}

.hero h1 {
  font-size: 2rem;
}

.tagline {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--text-2);
  margin: 0 0 1.5rem;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 40em) {
  .cards { grid-template-columns: 1fr 1fr; }
}

.cards li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 18px;    /* cards */
  padding: 16px;
  box-shadow: var(--shadow);
}

.page-links a {
  display: inline-block;
  padding: 12px 0;        /* touch target */
}

/* the privacy page's table: three columns wide, stacked cards on a small phone */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

thead th {
  background: var(--raised);
  border-top: 0;
}

tbody th {
  font-weight: 600;
}

@media (max-width: 40em) {
  table, tbody, tr, th, td {
    display: block;
  }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  tr {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: 12px;   /* tiles */
    padding: 8px 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
  }
  th, td {
    border: 0;
    padding: 6px 0;
  }
  td::before, tbody th::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-2);
  }
}

/* the terms' five points */

.terms > li {
  margin-bottom: 1.25rem;
}

.terms > li:target {
  scroll-margin-top: 16px;
}

/* the footer */

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  color: var(--text-2);
  font-size: 0.875rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

footer img {
  display: block;
  height: 24px;
  width: auto;
}

footer nav a {
  display: inline-block;
  padding: 12px 0;
  margin-right: 16px;
}

footer p {
  flex-basis: 100%;
  margin: 0;
}
