/* Notabene3 website. Light and dark follow the visitor's system setting */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5b5b63;
  --border: #e2dfd8;
  --accent: #1f5fa8;
  --accent-text: #ffffff;
  --highlight: #fff3c4;
  --error: #c62828;
  --success: #2e7d32;
  --radius: 10px;
  --max: 68rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181b;
    --surface: #202226;
    --text: #ececf0;
    --muted: #a3a3ad;
    --border: #34363c;
    --accent: #6aa8f0;
    --accent-text: #0d1620;
    --highlight: #4a3f12;
    --error: #ff6b6b;
    --success: #7bc47f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1.0625rem;
}

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

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

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

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* Header and navigation */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 4rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  color: var(--muted);
  text-decoration: none;
}
nav a:hover, nav a[aria-current="page"] { color: var(--text); }
nav a[aria-current="page"] { font-weight: 600; }

.nav-toggle {
  display: none;
  font: inherit;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.3rem 0.8rem;
}

@media (max-width: 40rem) {
  .nav-toggle { display: block; }
  nav { width: 100%; display: none; }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 0; padding-bottom: 0.75rem; }
  nav a { display: block; padding: 0.5rem 0; }
}

/* Content */

main { padding-top: 2rem; padding-bottom: 3rem; }

h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-top: 0; }
h2 { margin-top: 2.5rem; }

.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 44rem;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: 1rem 0 2rem;
}
@media (min-width: 56rem) {
  .hero { grid-template-columns: 1fr 1fr; }
}
.screenshot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.card h3 { margin-top: 0; }

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
.compare th, .compare td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
.table-scroll { overflow-x: auto; }

.note {
  border-left: 4px solid var(--accent);
  background: var(--surface);
  padding: 0.8rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Text still to be decided, so it stands out on review */
.tbc { background: var(--highlight); padding: 0 0.2em; }

code, kbd, pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; }
pre {
  white-space: pre-wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
}

/* Forms */

form.contact { max-width: 36rem; }
label { display: block; font-weight: 600; margin-top: 1rem; }
input[type="text"], input[type="email"], textarea {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
textarea { min-height: 10rem; }
.field-error { color: var(--error); font-size: 0.95rem; margin: 0.25rem 0 0; }
.message-ok { color: var(--success); font-weight: 600; }
.hp { position: absolute; left: -9999px; }
.cf-turnstile { margin: 1.25rem 0; }

/* Footer and cookie notice */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.cookie-notice {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 36rem;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgb(0 0 0 / 0.15);
  padding: 0.8rem 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; font-size: 0.95rem; }
.cookie-ok {
  font: inherit;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: var(--radius);
  padding: 0.4rem 1rem;
  cursor: pointer;
}
