/* Nonet website. Plain HTML and CSS: no scripts, no cookies, nothing loaded from other sites.
   Colours are the app's brand colours; darker or lighter shades keep text readable (WCAG AA). */

@font-face {
  font-family: "Rubik";
  src: url("fonts/rubik.ttf") format("truetype");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --black: #000807;
  --white: #FFF4E4;
  --green: #70A37F;
  --blue: #007EA7;
  --red: #D66853;
  --gold: #E3A945;

  --bg: var(--white);
  --fg: var(--black);
  --muted: #4A4943;
  --card: #FFFAF2;
  --line: rgba(0, 8, 7, 0.12);
  --link: #00627F;
  --button: #006B8E;
  --button-edge: #004A62;
  --button-text: var(--white);
  --cell: #E3DCCF;

  --board-bg: #FFFAF2;
  --board-line: rgba(0, 8, 7, 0.16);
  --board-box: var(--black);
  --board-related: #E8E7DC;
  --board-selected: #BFD6D5;
  --board-entered: #00627F;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--black);
    --fg: var(--white);
    --muted: #C9C1B4;
    --card: #0D1514;
    --line: rgba(255, 244, 228, 0.14);
    --link: #4DA1B9;
    --cell: #2E3330;

    --board-bg: #0D1514;
    --board-line: rgba(255, 244, 228, 0.16);
    --board-box: #C9C1B4;
    --board-related: #0A1E22;
    --board-selected: #003D4F;
    --board-entered: #4DA1B9;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header and footer */

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; padding-bottom: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--fg); text-decoration: none; font-weight: 700; font-size: 1.35rem;
}
.brand img { width: 40px; height: 40px; display: block; }
.site-header nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-header nav a { color: var(--fg); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid var(--line); margin-top: 72px; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  padding-top: 28px; padding-bottom: 40px; color: var(--muted); font-size: 0.95rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Buttons: raised like the app's keys, and they sink when pressed */

.button {
  display: inline-block; padding: 14px 26px; border-radius: 18px;
  background: var(--button); color: var(--button-text);
  font-weight: 600; font-size: 1.15rem; text-decoration: none;
  box-shadow: 0 5px 0 var(--button-edge);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.button:hover { text-decoration: none; }
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--button-edge); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

/* Landing page */

.hero .wrap {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  padding-top: 40px; padding-bottom: 56px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 20px; font-weight: 700;
}
.hero h1 span { color: var(--link); }
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.chips { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-size: 0.95rem; font-weight: 500;
}

/* The decorative board */

.board {
  width: min(100%, 400px); margin-left: auto; aspect-ratio: 1;
  display: grid; grid-template-columns: repeat(9, 1fr);
  background: var(--board-bg); border: 3px solid var(--board-box); border-radius: 14px;
  overflow: hidden; container-type: inline-size;
  box-shadow: 0 18px 40px rgba(0, 8, 7, 0.12);
}
.board span {
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--board-line); border-bottom: 1px solid var(--board-line);
  font-size: 6.4cqi; font-weight: 500; line-height: 1;
}
.board span:nth-child(9n) { border-right: 0; }
.board span:nth-child(9n + 3), .board span:nth-child(9n + 6) { border-right: 2px solid var(--board-box); }
.board span:nth-child(n + 19):nth-child(-n + 27),
.board span:nth-child(n + 46):nth-child(-n + 54) { border-bottom: 2px solid var(--board-box); }
.board span:nth-child(n + 73) { border-bottom: 0; }
.board .related { background: var(--board-related); }
.board .selected { background: var(--board-selected); }
.board .entered { color: var(--board-entered); font-weight: 600; }
.board .notes {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  align-items: stretch; justify-content: stretch; padding: 2px;
  font-size: 2.6cqi; font-weight: 500; color: var(--muted);
}
.board .notes i { font-style: normal; display: flex; align-items: center; justify-content: center; }

/* Sections */

section { padding: 56px 0; }
section h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.15; letter-spacing: -0.01em;
  margin: 0 0 12px; font-weight: 700;
}
.section-intro { color: var(--muted); font-size: 1.1rem; margin: 0 0 32px; max-width: 40em; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px;
}
.feature h3 { font-size: 1.25rem; margin: 16px 0 8px; font-weight: 600; }
.feature p { margin: 0; color: var(--muted); }
.also { margin: 28px 0 0; color: var(--muted); }

/* A small 3×3 nonet, one cell lit, like the app icon */
.mark { width: 36px; height: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.mark i { border-radius: 3px; background: var(--cell); }
.mark.gold i:nth-child(7), .mark.blue i:nth-child(5), .mark.green i:nth-child(3),
.mark.red i:nth-child(9), .mark.gold-2 i:nth-child(1), .mark.blue-2 i:nth-child(8) { background: var(--accent); }
.mark.gold, .mark.gold-2 { --accent: var(--gold); }
.mark.blue, .mark.blue-2 { --accent: var(--blue); }
.mark.green { --accent: var(--green); }
.mark.red { --accent: var(--red); }

.promise {
  background: var(--black); color: var(--white); border-radius: 32px;
  padding: clamp(32px, 6vw, 56px); text-align: center;
}
.promise h2 { margin-bottom: 16px; }
.promise p { margin: 0 auto; max-width: 34em; color: #C9C1B4; font-size: 1.1rem; }
@media (prefers-color-scheme: dark) {
  .promise { background: var(--card); border: 1px solid var(--line); }
}

.about {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px;
}
.about img { width: 64px; height: 64px; }
.about h2 { font-size: 1.5rem; margin-bottom: 8px; }
.about p { margin: 0; font-size: 1.1rem; }
.about .signature { margin-top: 12px; color: var(--muted); font-size: 1rem; }

/* Privacy policy */

.policy { max-width: 720px; padding-top: 24px; }
.policy h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin: 0 0 8px; font-weight: 700; }
.policy .updated { color: var(--muted); margin: 0 0 28px; }
.policy h2 { font-size: 1.35rem; margin: 40px 0 8px; font-weight: 600; }
.policy p, .policy li { color: var(--fg); }
.policy ul { padding-left: 1.3em; }
.policy li { margin: 6px 0; }
.summary {
  background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--green);
  border-radius: 16px; padding: 18px 22px; margin: 0 0 8px;
}
.summary h2 { margin-top: 0; }
.summary ul { margin: 0; }

/* Phones */

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; padding-top: 16px; }
  .board { margin: 0 auto; }
  .brand { gap: 10px; font-size: 1.2rem; }
  .brand img { width: 32px; height: 32px; }
  .site-header nav { gap: 14px; font-size: 0.95rem; }
  .about { grid-template-columns: 1fr; }
  .about img { width: 48px; height: 48px; }
}
