/* The One Percent Project - base: reset, browser surfaces, buttons, header, footer. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--graphite) var(--stone); scroll-padding-top: 120px; -webkit-tap-highlight-color: rgb(204 50 51 / .16); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  caret-color: var(--red);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
picture > source { display: none; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; color: inherit; text-wrap: balance; font-kerning: normal; font-feature-settings: "kern" 1; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-deep); }
::selection { background: var(--red); color: var(--on-red); }
/* on his red, a red selection would vanish: select in ink there */
.band ::selection, .band--close ::selection { background: var(--ink); color: var(--paper); }
/* One focus ring, square like everything else: red on white and stone (5.7:1 and 5.0:1), white on his red */
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.band :focus-visible, .band--close :focus-visible { outline-color: var(--paper); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--stone); }
::-webkit-scrollbar-thumb { background: var(--graphite); border: 3px solid var(--stone); border-radius: 8px; }

[class*="__title"], [class*="__name"], [class*="__label"], [class*="__value"] { line-height: 1.25; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 100; }
.skip:focus { left: 16px; top: 16px; }
.skip:hover { color: var(--paper); text-decoration-thickness: 2px; }

.wrap { width: 100%; max-width: calc(var(--content) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* Buttons: red on white is the one action colour; on a red field the action turns ink. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.25em;
  font-family: var(--display); font-weight: 800; font-size: 1.0625rem; letter-spacing: 0;
  white-space: nowrap; text-decoration: none; border: 0; border-radius: 0; cursor: pointer;
  background: var(--red); color: var(--on-red);
  transition: background-color 160ms cubic-bezier(.2,.7,.2,1), transform 160ms cubic-bezier(.2,.7,.2,1);
}
.btn:hover, .btn:active { background: var(--red-deep); color: var(--on-red); }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover, .btn--ink:active { background: var(--ink-hover); color: var(--paper); }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--paper); }
.site-head[data-se-nav-scrolled] { background: var(--paper); box-shadow: 0 1px 0 rgba(26,23,22,.06), 0 6px 18px -12px rgba(26,23,22,.25); }
/* The header logo: 44px on a phone, 72px from the nav breakpoint (the brief's 72 to 80), in a 96px bar. */
.site-head__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-block: 10px; }
.brand { display: block; flex: 0 1 auto; min-width: 0; margin-right: auto; }
.brand img { width: 44px; height: 44px; }
.head-join { display: none; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px;
  font-family: var(--display); font-weight: 700; font-size: 1.0625rem; text-decoration: none; white-space: nowrap; color: var(--ink);
}
.site-nav a:not(.btn):hover, .site-nav a:not(.btn):active, .site-nav a[aria-current]:not(.btn) { color: var(--red-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.site-nav .btn { margin-left: 12px; }
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  position: relative; flex: 0 0 auto; width: 48px; height: 48px; padding: 0; border: 0; background: transparent; cursor: pointer;
}
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--ink); transition: transform 160ms ease, opacity 160ms ease, background-color 160ms ease; }
.nav-toggle:hover span, .nav-toggle:active span { background: var(--red-deep); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.site-nav[data-se-nav-mode="overlay"] {
  flex-direction: column; align-items: stretch; gap: 0;
  background: var(--paper); padding: 104px var(--gutter) 32px;
}
.site-nav[data-se-nav-mode="overlay"] a:not(.btn) { font-size: 2rem; font-weight: 800; min-height: 64px; padding: 0; }
.site-nav[data-se-nav-mode="overlay"] .btn { margin: 24px 0 0; min-height: 56px; font-size: 1.25rem; }
/* On a long inner page the sign-up stays one tap away on a phone, beside the menu. */
@media (max-width: 959.98px) {
  .head-join { display: inline-flex; min-height: 44px; padding: 0 0.9em; font-size: 1rem; }
}
@media (min-width: 960px) {
  /* the brief: about 72 to 80px square at 1440, where his stacked words read (brand.json's 64 was round 1's size) */
  .site-head__bar { min-height: 96px; padding-block: 12px; }
  .brand img { width: 72px; height: 72px; }
}

/* ---------- Footer ---------- */
.site-foot { background: var(--stone); padding-block: 56px 40px; font-size: 0.9375rem; }
.foot { display: grid; gap: 32px; }
.foot img { width: 96px; height: 96px; }
/* the logo link hugs the logo, so its focus ring frames the mark rather than an empty grid cell */
.foot__brand { justify-self: start; align-self: start; }
.foot__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.foot__h { font-family: var(--display); font-weight: 800; font-size: 1rem; margin-bottom: 8px; }
.foot__cols ul { list-style: none; margin: 0; padding: 0; }
.foot__cols a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; overflow-wrap: anywhere; }
.foot__cols a:hover, .foot__cols a:active { text-decoration: underline; }
/* his email breaks only after the "@", never inside a word */
.foot__cols .foot__mail { overflow-wrap: normal; word-break: normal; }
/* The credit is one flex item, so the deploy's "· Go live with this site" (injected inside .foot__by) stays in its line */
.foot__credit { margin-top: 40px; color: var(--graphite); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.foot__credit a { color: var(--ink); }
.foot__by { white-space: nowrap; }
@media (max-width: 899.98px) {
  /* clear the contact dock's 56px chat button (16px off the edge) when the page is scrolled to its end */
  .site-foot { padding-bottom: 104px; }
}
@media (max-width: 359.98px) {
  /* "Redesigned by InkySites · Go live with this site" is 318px at 15px; a 320 screen's column is 288px */
  .foot__by { font-size: 0.8125rem; }
}
@media (min-width: 900px) {
  .foot { grid-template-columns: 3fr 9fr; }
  .foot__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  html .btn:active, html .cf-submit:active { transform: none; }
  html { scroll-behavior: auto; }
}
