/* Shared by every page of the site: tokens, type, buttons, nav, footer. Page CSS stays in each page. */
:root {
  /* brand: the logo's navy and mint (img/akroates.svg) */
  --night: #0b162b;      /* the page's ground at night */
  --night-2: #15243c;    /* one step up on night */
  --day: #f3f4f6;        /* daytime ground */
  --card: #ffffff;
  --ink: #0b162b;
  --ink-2: #4a5568;      /* secondary text on day */
  --moon: #e9edf3;       /* text on night */
  --moon-2: #a7b1c2;     /* secondary text on night */
  --brand: #28e3a6;      /* the logo's tile: buttons and marks on night only */
  --brand-ink: #0b162b;
  --display: 'Geologica', 'Manrope', system-ui, sans-serif;
  --text: 'Manrope', system-ui, sans-serif;
  --m: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(.22, .8, .24, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--day); color: var(--ink); font: 500 1.0625rem/1.6 var(--text); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.night :focus-visible { outline-color: var(--brand); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--m); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  border-radius: 6px; border: 0; font: 700 1rem/1 var(--text); text-decoration: none; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); transition: transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.logo-svg { display: block; height: 32px; width: auto; aspect-ratio: 1672 / 378; color: #fff; }
.h2 { font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.6rem); max-width: 16ch; }
.sub { margin-top: 20px; max-width: 54ch; color: var(--ink-2); font-size: 1.125rem; }
.night .sub { color: var(--moon-2); }
section.day { padding: clamp(80px, 11vw, 150px) 0; }
/* angled edge where the ground changes: the block rides up over the one before it */
.cut {
  --s: clamp(36px, 6vw, 96px); position: relative; margin-top: calc(-1 * var(--s));
  border-top: var(--s) solid transparent; clip-path: polygon(0 var(--s), 100% 0, 100% 100%, 0 100%);
}
.cut.r { clip-path: polygon(0 0, 100% var(--s), 100% 100%, 0 100%); }
:where(section.day.cut) { background: var(--day); } /* zero specificity: a page colour wins */

/* night ground + nav */
.night { background: var(--night); color: var(--moon); overflow-x: clip; }
nav.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 22px; padding-bottom: 22px; }
nav.top ul { list-style: none; padding: 0; display: flex; gap: 28px; font-size: .9375rem; }
nav.top ul a { text-decoration: none; color: var(--moon-2); }
nav.top ul a:hover, nav.top ul a[aria-current=page] { color: var(--moon); }
.nav-end { display: flex; align-items: center; gap: 10px; }
nav.top .btn { min-height: 44px; padding: 0 20px; font-size: .9375rem; }
.lang {
  min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 6px; border: 0; cursor: pointer;
  background: transparent; color: var(--moon); box-shadow: inset 0 0 0 2px #2b3f60; font: 700 .875rem/1 var(--text); letter-spacing: .02em;
}
.lang:hover { box-shadow: inset 0 0 0 2px var(--moon-2); }

/* footer */
.site-foot { padding: 56px 0 40px; border-top: 1px solid #22334f; font-size: .9375rem; color: var(--moon-2); }
.site-foot.cut { border-top: var(--s) solid transparent; }
.site-foot .grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.site-foot .logo-svg { height: 28px; margin-bottom: 14px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; align-content: start; }
.site-foot a { color: var(--moon); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .by { margin-top: 10px; }
.site-foot .by a { color: var(--brand); font-weight: 600; }
.site-foot .note { margin-top: 40px; font-size: .8125rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 980px) {
  nav.top ul { display: none; }
  nav.top .btn { min-height: 40px; padding: 0 16px; }
  .lang { min-height: 40px; }
  .site-foot .grid { grid-template-columns: 1fr 1fr; }
  .site-foot .grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  nav.top { gap: 12px; }
  nav.top .logo-svg { height: 24px; }
  .nav-end { gap: 8px; }
  nav.top .btn { padding: 0 14px; font-size: .875rem; }
}
