/* Rise website: one stylesheet for every page.
   Colours come from the app (Rise/Views/Theme.swift and AccentColor). */

:root {
  color-scheme: light dark;
  --accent: #2E5E6E;        /* the teal of the icon's hill */
  --text: #1C1C1E;
  --secondary: #5F6B73;
  --background: #FFFFFF;
  --panel: #F4F6F8;
  --line: #E6EAEE;

  /* Layout: the header, text and footer share one column; 16px side margins on phones. */
  --max: 1080px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #4A8FA3;
    --text: #F2F2F7;
    --secondary: #A1ABB3;
    --background: #000000;
    --panel: #1C2329;
    --line: #2A333A;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  /* The iPhone's own font (San Francisco) on Apple devices; the system font elsewhere. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 700px) {
  :root { --gutter: 32px; }
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
/* Text stays in a narrower column inside it, for comfortable line lengths. */
main > * { max-width: 40rem; }

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

/* "Skip to content", shown only when reached with the keyboard. */
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 10;
  background: var(--background); color: var(--text);
  padding: 8px 14px; border-radius: 10px; font-weight: 600;
}
.skip:focus { left: var(--gutter); }

/* Header: small icon + "Rise" (back to the home page) on the left, Privacy · Support on the right. */
.site-top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 20px;
  padding-top: 20px; padding-bottom: 20px;
}
.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}
.site-name img { width: 2.25rem; height: 2.25rem; }
.site-top nav, .site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-top nav a { color: var(--secondary); text-decoration: none; padding: 6px 0; font-size: 0.9375rem; }
.site-top nav a:hover,
.site-top nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }

/* Footer: Rise's links, then the company line. */
.site-foot { margin-top: 4rem; font-size: 0.9rem; color: var(--secondary); }
.site-foot .wrap > * { max-width: none; }
.site-foot .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px;
}
.site-foot .wrap::before {
  content: ""; flex-basis: 100%; border-top: 1px solid var(--line); margin-bottom: 14px;
}
.site-foot .wrap { padding-bottom: 40px; }
.site-foot p { margin: 0; }
.site-foot a { color: var(--secondary); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--text); }

/* Keyboard focus: always visible. */
.site-top a:focus-visible, .site-foot a:focus-visible {
  outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px;
}

h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; margin: 2rem 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }
h3 { font-size: 1.0625rem; margin: 1.5rem 0 0.25rem; }
p, ul { margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }
.updated { color: var(--secondary); margin-bottom: 1.5rem; }

.panel {
  background: var(--panel);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }

/* The home page: everything centred on the screen. */
body.home { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 3rem;
}
body.home main img { width: 8rem; height: 8rem; filter: drop-shadow(0 6px 18px rgb(0 0 0 / 0.15)); }
body.home h1 { font-size: 3rem; margin: 1.5rem 0 0.25rem; }
body.home .tagline { font-size: 1.25rem; color: var(--secondary); margin: 0 0 1.5rem; }
body.home .soon {
  display: inline-block;
  background: #2E5E6E;      /* the icon's teal in both modes: white text stays readable */
  color: #FFFFFF;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  margin-bottom: 1.5rem;
}
body.home .about { max-width: 30rem; }
