/* =====================================================================
   Notibrate website – shared styles for every page
   ---------------------------------------------------------------------
   You normally won't need to edit this file. To change a colour, change
   it once in the ":root" list just below and it updates everywhere.
   All colour pairs here meet WCAG 2.2 AA contrast (at least 4.5:1).
   Light and dark: the site follows the visitor's own browser/phone setting.
   Dark colours are in the second list ("prefers-color-scheme: dark").
   No web fonts are loaded: the site uses the phone/computer's own fonts,
   so nothing is requested from Google or any other company.
   ===================================================================== */

:root {
  /* Tells the browser the site has both looks, so scrollbars etc. match too */
  color-scheme: light dark;

  /* ----- LIGHT colours (the default) ----- */
  --bg: #FFFFFF;          /* page background */
  --text: #1A1A1A;        /* normal body text */
  --muted: #4A4A4A;       /* quieter text */
  --heading: #213F80;     /* dark name blue: "Notibrate" name, headings, menu */
  --link: #0066CC;        /* links in text */
  --link-hover: #213F80;
  --blue: #0066CC;        /* main blue: buttons, current menu item, step numbers */
  --blue-hover: #213F80;
  --on-blue: #FFFFFF;     /* text on the main blue */
  --card: #D6E4FF;        /* soft blue card background */
  --card-text: #001B3D;   /* text on soft blue cards */
  --line: #B8C7E0;        /* thin borders */
  --placeholder: #5A6B85; /* dashed placeholder boxes */
  --footer-bg: #213F80;
  --footer-text: #FFFFFF;
  --footer-hover: #D6E4FF;
  --focus: #213F80;       /* keyboard focus ring */

  --radius: 12px;
  --max: 64rem;           /* widest the page content gets */
}

/* ----- DARK colours: used when the visitor's browser or phone is set to dark ----- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1A2E;
    --text: #E8EDF5;
    --muted: #B8C2D3;
    --heading: #A9C7FF;
    --link: #8AB4F8;
    --link-hover: #A9C7FF;
    --blue: #0066CC;      /* same main blue, still with white text */
    --blue-hover: #004C99;
    --on-blue: #FFFFFF;
    --card: #1C2C4A;
    --card-text: #D6E4FF;
    --line: #34476B;
    --placeholder: #9AAAC4;
    --footer-bg: #08101F;
    --footer-text: #FFFFFF;
    --footer-hover: #A9C7FF;
    --focus: #A9C7FF;
  }
}

/* ---------- Basics ---------- */

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

html {
  /* Lets text grow with the user's own text-size setting (200% and more). */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  /* Lets long words such as the email address wrap onto the next line
     instead of running off the side of a phone screen at large text sizes. */
  overflow-wrap: anywhere;
}

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

h1, h2, h3 {
  color: var(--heading);
  line-height: 1.25;
  margin: 1.6em 0 0.5em;
}
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); margin-top: 0.5em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h1, h2, h3 { text-wrap: balance; }   /* evens out headings that wrap onto two lines */
p, li { text-wrap: pretty; }         /* avoids a single word left alone on the last line */

/* The skip link jumps to each page's main heading; it needn't show a focus ring there. */
h1[tabindex="-1"]:focus { outline: none; }

p, ul, ol { margin: 0 0 1em; }
li + li { margin-top: 0.35em; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }

/* Clear keyboard focus ring on everything you can tab to. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- "Skip to main content" link (for keyboard users) ---------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  background: var(--blue);
  color: var(--on-blue);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  z-index: 10;
}
.skip-link:focus { top: 1rem; color: var(--on-blue); }

/* ---------- Page width ---------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* ---------- Header and menu ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--heading);
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
}
.brand:hover { color: var(--heading); }

/* LOGO PLACEHOLDER – remove this block's use once the real logo is ready */
.logo-placeholder {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 2px dashed var(--placeholder);
  border-radius: 10px;
  color: var(--placeholder);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.logo { width: 2.5rem; height: 2.5rem; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  color: var(--heading);
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover { background: var(--card); color: var(--card-text); }
.site-nav a[aria-current="page"] {
  background: var(--blue);
  color: var(--on-blue);
}

/* ---------- Main content ---------- */

main { padding-bottom: 3rem; }

.intro {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 42rem;
}

.readable { max-width: 70ch; } /* keeps lines under about 80 letters, comfortable to read */

/* ---------- Home page top section ---------- */

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0 1rem;
}
@media (min-width: 48rem) {
  .hero { grid-template-columns: 1.3fr 1fr; }
}
.hero > * { min-width: 0; }  /* lets both columns shrink on narrow screens */
.hero h1 { margin-top: 0; }

/* ---------- Buttons ---------- */

.button {
  display: inline-block;
  background: var(--blue);
  color: var(--on-blue);
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent; /* becomes visible in Windows High Contrast mode */
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--blue-hover); color: var(--on-blue); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* GOOGLE PLAY BADGE PLACEHOLDER */
.badge-placeholder {
  display: inline-grid;
  place-items: center;
  min-width: min(10rem, 100%); /* never wider than a small phone screen */
  min-height: 3.25rem;
  padding: 0.5rem 1rem;
  border: 2px dashed var(--placeholder);
  border-radius: 10px;
  color: var(--placeholder);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}
.play-badge { height: 3.5rem; width: auto; }

/* ---------- Screenshots ---------- */

.screenshot {
  margin: 0 auto;
  max-width: 17rem;
  width: 100%;
}
.screenshot img {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
}
.screenshot figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

/* SCREENSHOT PLACEHOLDER – a phone-shaped dashed box */
.shot-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 9 / 19;
  width: 100%;
  border: 2px dashed var(--placeholder);
  border-radius: 18px;
  color: var(--placeholder);
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

/* ---------- Soft blue cards ---------- */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}
.cards li + li { margin-top: 0; }
.card {
  background: var(--card);
  color: var(--card-text);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.5rem;
}
.card h2,
.card h3 { color: var(--card-text); margin-top: 0; }
.card a { color: var(--card-text); }

/* ---------- How-to steps ---------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  display: grid;
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}
.steps > li + li { margin-top: 0; }
@media (min-width: 48rem) {
  .steps > li { grid-template-columns: 1.4fr 1fr; }
}
.steps h2 { margin-top: 0; }
.steps h2::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  min-width: 2em;   /* "min" and "em" so the circle grows with larger text */
  min-height: 2em;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--blue);
  color: var(--on-blue);
  font-size: 1rem;
  vertical-align: 0.1em;
}

/* ---------- FAQ ---------- */

.contents {
  background: var(--card);
  color: var(--card-text);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
}
.contents h2 { color: var(--card-text); margin-top: 0; font-size: 1.15rem; }
.contents a { color: var(--card-text); }
.contents ol { margin-bottom: 0; }

.faq h2 { scroll-margin-top: 1rem; }

/* ---------- Version history ---------- */

.version {
  border-left: 4px solid var(--blue);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.75rem 0;
}
.version h2 { margin-top: 0; }
.version .date { color: var(--muted); margin-top: -0.25rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0;
  font-size: 0.98rem;
}
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: var(--footer-hover); }
.site-footer :focus-visible { outline-color: var(--footer-text); }
.site-footer p { margin: 0 0 0.5rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.footer-links li + li { margin-top: 0; }

/* ---------- Windows High Contrast mode ----------
   In this mode Windows replaces all the colours above with the user's own.
   Background colours disappear, so the current page in the menu and the
   soft blue cards get an outline instead. */

@media (forced-colors: active) {
  .site-nav a[aria-current="page"] { outline: 2px solid CanvasText; }
  .card,
  .contents { border: 1px solid CanvasText; }
  .steps h2::before { border: 1px solid CanvasText; }
}

/* ---------- Respect "reduce motion" settings ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
