/* Axiom Media & Tech — site styles. No external requests: fonts are self-hosted. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --cobalt: #2a3be6;
  --cobalt-deep: #1f2cb8;
  --ink: #10163f;
  --chalk: #f5f7ff;
  --yolk: #ffc93c;
  --mist: #c9d0ff;
  --rule: #d6dbf5;

  --display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 38rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

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

.skip {
  position: absolute;
  left: -100vw;
  top: 0.5rem;
  background: var(--yolk);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  z-index: 10;
}

.skip:focus {
  left: var(--gutter);
}

/* ---------- Masthead ---------- */

.masthead {
  background: var(--cobalt);
  color: var(--chalk);
  padding: 1.25rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.wordmark-tile {
  width: 0.8em;
  height: 0.8em;
  border-radius: 0.2em;
  background: var(--yolk);
  flex: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: var(--yolk);
}

/* ---------- Home: opening ---------- */

.opening {
  background: var(--cobalt);
  color: var(--chalk);
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(3rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.opening h1 {
  font-weight: 800;
  font-size: clamp(2.75rem, 8.2vw, 7rem);
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.opening-text p {
  margin-top: 1.75rem;
  max-width: 30rem;
  font-size: 1.1875rem;
  color: var(--mist);
}

.opening-text p a {
  color: var(--chalk);
}

/* ---------- The playable tile puzzle ---------- */

.puzzle {
  justify-self: end;
  width: min(100%, 23rem);
}

.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  padding: 0.6rem;
  background: var(--cobalt-deep);
  border-radius: 1.5rem;
}

.tile {
  appearance: none;
  border: 0;
  padding: 0;
  aspect-ratio: 1;
  border-radius: 0.9rem;
  background: var(--ink);
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.tile[aria-pressed="true"] {
  background: var(--yolk);
}

.tile:active {
  transform: scale(0.94);
}

.board.is-solved .tile {
  animation: settle 520ms ease both;
}

@keyframes settle {
  40% {
    transform: scale(0.9);
  }
}

.puzzle-bar {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9375rem;
}

.puzzle-status {
  color: var(--mist);
  min-height: 3em;
  display: flex;
  align-items: center;
}

.button {
  appearance: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--yolk);
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover {
  background: #ffd766;
}

/* ---------- Content sections ---------- */

.band {
  padding: clamp(3rem, 7vw, 6rem) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 6vw, 6rem);
}

.band + .band {
  border-top: 1px solid var(--rule);
}

.band h2 {
  font-weight: 700;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  letter-spacing: -0.025em;
}

.band-body {
  max-width: var(--measure);
}

.band-body p + p {
  margin-top: 1.1rem;
}

.email {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.4vw, 2.75rem);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-decoration-color: var(--cobalt);
}

.email + p {
  margin-top: 1.25rem;
}

/* ---------- Plain document pages (contact, privacy) ---------- */

.page-title {
  background: var(--cobalt);
  color: var(--chalk);
  padding: clamp(2rem, 6vw, 4.5rem) var(--gutter) clamp(2.25rem, 6vw, 4.5rem);
}

.page-title h1 {
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.03em;
}

.page-title p {
  margin-top: 1rem;
  color: var(--mist);
  max-width: var(--measure);
}

.document {
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
  max-width: calc(var(--measure) + 2 * var(--gutter));
}

.document h2 {
  font-weight: 700;
  font-size: 1.625rem;
  letter-spacing: -0.02em;
  margin-top: 2.75rem;
}

.document h2:first-child {
  margin-top: 0;
}

.document p,
.document ul {
  margin-top: 0.9rem;
}

.document ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.document li + li {
  margin-top: 0.4rem;
}

.document a {
  text-decoration-color: var(--cobalt);
}

.details {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.5rem;
}

.details dt {
  font-weight: 600;
}

.details dd {
  margin: 0;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: var(--mist);
  padding: 2.5rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  font-size: 0.9375rem;
}

.footer strong {
  color: var(--chalk);
  font-weight: 600;
}

.footer address {
  font-style: normal;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 52rem) {
  .opening,
  .band {
    grid-template-columns: minmax(0, 1fr);
  }

  .puzzle {
    justify-self: start;
  }
}

@media (max-width: 30rem) {
  .details {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .details dd {
    margin-bottom: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile {
    transition: none;
  }

  .board.is-solved .tile {
    animation: none;
  }
}
