/* solounited.app: the brand's look (docs/BRAND.md; colours as app/src/theme/colors.ts). Fonts are served from this site. */

@font-face { font-family: 'Nunito Sans'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-sans-400.ttf') format('truetype'); }
@font-face { font-family: 'Nunito Sans'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-sans-700.ttf') format('truetype'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700; font-display: swap; src: url('/fonts/bricolage-grotesque-700.ttf') format('truetype'); }
@font-face { font-family: 'Kalam Name'; font-weight: 300; font-display: swap; src: url('/fonts/solo-name-300.ttf') format('truetype'); }
@font-face { font-family: 'Kalam Name'; font-weight: 700; font-display: swap; src: url('/fonts/solo-name-700.ttf') format('truetype'); }

:root {
  --ink: #24202A;
  --brand-ink: #2B2838;
  --paper: #F7F1E8;
  --card: #FFFDF8;
  --plum: #5B3E8E;
  --plum-dark: #3E2766;
  --lilac: #D9C4F2;
  --lilac-light: #E3D3F6;
  --soft: #3A3442;
  --muted: #4A4452;
  --line: #D8D0C4;
  --red: #A23B2A;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--soft);
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
[hidden] { display: none !important; }

/* the notch: logo and wordmark on dark, hanging from the top centre (BRAND.md section 5) */
.top { display: flex; justify-content: center; padding: 0 16px; }
.notch {
  display: flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 6px 22px 8px;
  border-radius: 0 0 24px 24px;
  background: var(--brand-ink) radial-gradient(ellipse 70% 90% at 50% 70%, rgba(255, 244, 210, 0.14), rgba(255, 244, 210, 0));
}
.notch img { display: block; }

main, footer { width: 100%; max-width: 40rem; margin: 0 auto; padding: 0 20px; }
main { padding-top: 28px; padding-bottom: 40px; }

h1, h2 { color: var(--ink); font-family: 'Bricolage Grotesque', 'Nunito Sans', system-ui, sans-serif; font-weight: 700; }
/* capped by the screen's width too: the name never breaks, so with large text it mustn't outgrow a narrow phone */
h1 { margin: 0 0 12px; font-size: min(2.125rem, 10.5vw); line-height: 1.1; letter-spacing: -0.5px; }
h2 { margin: 32px 0 8px; font-size: 1.3125rem; line-height: 1.2; }
h2:focus { outline: none; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 1.25em; }
li { margin-bottom: 8px; }
li::marker { color: var(--plum); }
strong { color: var(--ink); font-weight: 700; }
.byline { color: var(--muted); font-size: 0.9375rem; }

a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:hover { color: var(--plum-dark); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }

/* the naming rule (BRAND.md section 4): the words in the page are "Solo United", shown the wordmark's way */
.su { font-family: 'Kalam Name', cursive; font-size: 1.12em; font-weight: 300; font-style: normal; line-height: 1; white-space: nowrap; text-transform: lowercase; }
.su-s { letter-spacing: 0.34em; }
.su-o { letter-spacing: 0.25em; }
.su-l { letter-spacing: 0.17em; }
.su-o2 { letter-spacing: 0.09em; }
.su-gap { font-size: 0; letter-spacing: 0; }
.su b { font-weight: 700; }

.card { margin: 20px 0; padding: 18px 18px 8px; background: var(--card); border: 1.6px solid var(--ink); border-radius: 22px 14px 22px 14px; }
.card h2 { margin-top: 0; }

/* the deletion form */
form { margin: 24px 0; }
form h2 { margin-top: 0; }
label { display: block; margin-bottom: 6px; color: var(--ink); font-weight: 700; }
input {
  display: block; width: 100%; padding: 12px 14px;
  background: var(--card); color: var(--ink);
  border: 1.6px solid var(--ink); border-radius: 14px;
  font: inherit; font-size: 1.125rem;
}
input[aria-invalid='true'] { border-color: var(--red); border-width: 2px; }
#code { letter-spacing: 0.35em; font-variant-numeric: tabular-nums; }
.error, .note { margin: 8px 0 0; font-size: 0.9375rem; font-weight: 700; }
.error { color: var(--red); }
.note { color: var(--plum); }
.error:empty, .note:empty { margin: 0; }
button {
  display: block; width: 100%; min-height: 50px; margin-top: 16px; padding: 12px 18px;
  background: var(--plum); color: var(--card);
  border: 1.6px solid var(--ink); border-radius: 18px 12px 18px 12px;
  font: inherit; font-weight: 700; cursor: pointer;
}
button.danger { background: var(--red); }
button[disabled] { opacity: 0.6; cursor: default; }
.links { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 16px; margin-top: 8px; }
button.link {
  width: auto; min-height: 44px; margin: 0; padding: 8px 0;
  background: none; color: var(--plum); border: 0; border-radius: 4px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* the root page */
.home-name { font-size: min(2.5rem, 12vw); }
.home-name .su { font-size: 1.1em; }
.lead { color: var(--ink); font-size: 1.1875rem; }
.pages { margin-top: 24px; padding: 0; list-style: none; }
.pages li { margin-bottom: 12px; }
.pages a {
  display: block; padding: 16px 18px;
  background: var(--card); color: var(--ink);
  border: 1.6px solid var(--ink); border-radius: 22px 14px 22px 14px;
  font-weight: 700; text-decoration: none;
}
.pages a:hover { background: var(--lilac-light); }

footer { border-top: 1.4px solid var(--line); padding-top: 14px; padding-bottom: 32px; color: var(--muted); font-size: 0.9375rem; }
footer ul { display: flex; flex-wrap: wrap; column-gap: 20px; margin: 0 0 10px; padding: 0; list-style: none; }
footer li { margin: 0; }
footer a { display: inline-block; padding: 8px 0; }
footer a[aria-current='page'] { color: var(--ink); font-weight: 700; text-decoration: none; }
footer p { margin: 0; }
