/* colortap.co
   One stylesheet for the whole site. Tokens first, then the parts shared by
   every page, then each page's own sections. Spacing sits on an 8 point grid. */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "MD Nichrome";
  src: url("../fonts/MDNichrome0.7-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MD Nichrome";
  src: url("../fonts/MDNichrome0.7-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "MD Nichrome";
  src: url("../fonts/MDNichrome0.7-Ultra.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-italic-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --paper: #fcfcfc;
  --ink: #282828;
  --ink-soft: #6b6b6b;
  --pink: #efa1b8;
  --pink-deep: #db698b;
  --blue: #6ec6df;
  --blue-deep: #4fb4d1;
  --yellow: #f1db46;
  --yellow-light: #ffe772;
  --on-dark: #fcfcfc;
  --on-dark-soft: rgba(252, 252, 252, 0.75);

  --display: "MD Nichrome", "Arial Narrow", Impact, sans-serif;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type. The display sizes follow the window between a phone and a desktop. */
  --size-hero: clamp(2.5rem, 1.1rem + 5.6vw, 5rem);
  --size-h2: clamp(2.25rem, 1.3rem + 3.6vw, 4rem);
  --size-h3: clamp(2rem, 1.5rem + 1.9vw, 3rem);
  --size-label: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --size-nav: 1.5rem;
  --size-body: 1.125rem;
  --size-small: 0.875rem;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;
  --section: clamp(64px, 3rem + 5vw, 96px);
  --gutter: clamp(24px, 6vw, 64px);

  --radius: 16px;
  --nav-height: 64px;
  --shadow-nav: 0 4px 16px rgba(40, 40, 40, 0.2);
  --text-width: 650px;
  --page-width: 1120px;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-height) + var(--space-2));
}

body {
  margin: 0;
  padding-top: var(--nav-height);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

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

a {
  color: inherit;
}

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

.pixel {
  image-rendering: pixelated;
}

.skip {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 200;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  background: var(--yellow);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: var(--space-1);
}

/* ---------- Shared parts ---------- */

.h2 {
  font-size: var(--size-h2);
  font-weight: 900;
}

.h3 {
  font-size: var(--size-h3);
  font-weight: 900;
}

.lede {
  max-width: var(--text-width);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--size-nav);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.15s ease-out, transform 0.15s ease-out;
}
.button:hover {
  background: var(--blue-deep);
  transform: translateY(-2px);
}
.button:active {
  transform: translateY(0);
}

.badge-link {
  display: inline-block;
  border-radius: 12px;
  transition: transform 0.15s ease-out;
}
.badge-link:hover {
  transform: translateY(-2px);
}

/* The bar at the top, with a sprinkle of confetti along its upper edge. */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--paper) url("../images/confetti.svg") 50% -64px no-repeat;
  box-shadow: var(--shadow-nav);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  max-width: calc(940px + var(--gutter) * 2);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav__logo img {
  width: 180px;
}
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  list-style: none;
}
.nav__link {
  display: block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  font-family: var(--display);
  font-size: var(--size-nav);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.15s ease-out;
}
.nav__link:hover,
.nav__link[aria-current="page"] {
  background: var(--yellow);
}
.nav__badge {
  margin-left: var(--space-1);
}
.nav__badge img {
  height: 45px;
  width: auto;
}

/* The mascot walking in above the footer. */
.bucket {
  display: flex;
  justify-content: center;
  padding: var(--space-16) var(--gutter) var(--space-4);
}
.bucket img {
  width: min(480px, 80vw);
}

.footer {
  padding: var(--space-6) var(--gutter);
  background: var(--ink);
  color: var(--on-dark);
  font-size: 1rem;
  line-height: 1.5;
}
.footer__columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  max-width: 940px;
  margin: 0 auto var(--space-6);
}
.footer__tagline {
  margin: var(--space-2) 0;
  color: var(--on-dark-soft);
  font-size: var(--size-small);
}
.footer__list {
  padding: 0;
  list-style: none;
}
.footer__list a {
  display: inline-block;
  padding: 4px 0;
  text-decoration: none;
}
.footer__list a:hover {
  text-decoration: underline;
}
.footer__note {
  margin-bottom: var(--space-1);
  color: var(--on-dark-soft);
  font-size: var(--size-small);
}
.footer__love {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

/* ---------- Home ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: min(650px, 90vh);
  padding-top: var(--space-6);
  overflow: hidden;
  background: radial-gradient(circle farthest-corner at 100% 100%, var(--pink-deep), var(--pink));
  text-align: center;
}
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--gutter) var(--space-4);
}
.hero h1 {
  max-width: 12.5em;
  font-size: var(--size-hero);
  font-weight: 300;
}
.hero__badge img {
  width: min(250px, 60vw);
}
.hero__mocks {
  width: min(1042px, 92vw);
}
.hero__mocks img {
  width: 100%;
}

.features {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--section) var(--gutter);
  text-align: center;
}
.features__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 940px;
  margin-top: var(--space-6);
  padding: 0;
  list-style: none;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
/* Pixel art at twice its size, which keeps every pixel square. */
.feature img {
  height: 192px;
  width: auto;
}
.feature h3 {
  font-size: var(--size-label);
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.award {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8) var(--gutter) var(--space-16);
  background: var(--blue);
}
.award__icon {
  width: 160px;
}
.award__wreath {
  width: min(500px, 100%);
}

.kind-words {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--section) var(--gutter);
  text-align: center;
}
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8) var(--space-6);
  max-width: 1040px;
  margin-top: var(--space-6);
  padding: 0;
  list-style: none;
  text-align: left;
}
.review img {
  width: 176px;
}
.review blockquote {
  margin: var(--space-1) 0;
}
.review cite {
  color: var(--ink-soft);
  font-size: var(--size-small);
  font-style: normal;
}
.kind-words__note {
  margin-top: var(--space-6);
  color: var(--ink-soft);
  font-size: var(--size-small);
}

/* Two halves side by side: a picture or a color on one, words on the other. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.split__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-12) clamp(24px, 7vw, 96px);
}
.split__picture {
  position: relative;
  min-height: 360px;
}
/* The picture fills its half, however tall the words beside it make it. */
.split__picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--gutter);
  background: radial-gradient(circle farthest-corner at 100% 100%, var(--yellow), var(--yellow-light));
}
.split__badge img {
  width: min(440px, 80%);
}

/* ---------- About, Press, Contact, Privacy ---------- */

.banner {
  background-position: 50% 0;
  background-size: cover;
}
.banner--about {
  min-height: 70vh;
  background-image: url("../images/kid-with-ipad.webp");
}
.banner--press {
  aspect-ratio: 2200 / 813;
  max-height: 580px;
  width: 100%;
  background-color: var(--yellow);
  background-image: url("../images/press-hero.webp");
  background-position: 50% 50%;
}
.banner--contact {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  padding: var(--space-6) var(--gutter);
  background-color: var(--blue);
}
.banner--contact img {
  height: 350px;
  width: auto;
}

.article {
  max-width: calc(var(--page-width) + var(--gutter) * 2);
  margin: 0 auto;
  padding: var(--section) var(--gutter) 0;
}
.article h1 {
  font-size: var(--size-h2);
  font-weight: 900;
}
.article h2 {
  margin-top: var(--space-6);
  font-size: var(--size-h3);
  font-weight: 900;
}
.article p,
.article ul {
  max-width: var(--text-width);
}
.article a {
  color: #a5385c;
  /* A long address breaks instead of pushing the page wider. */
  overflow-wrap: anywhere;
}
.prose > * + * {
  margin-top: var(--space-3);
}
.prose > h2 {
  margin-top: var(--space-8);
}
.prose > h1 + *,
.prose > h2 + * {
  margin-top: var(--space-3);
}
.prose ul {
  padding-left: var(--space-3);
}

.article--narrow {
  max-width: calc(var(--text-width) + var(--gutter) * 2);
}

/* Press: the words in a column down the middle, the pictures wider around it. */
.article--centered {
  max-width: calc(940px + var(--gutter) * 2);
}
.article--centered > :not(.promo) {
  max-width: var(--text-width);
  margin-inline: auto;
}
.article--centered > .promo {
  margin-inline: auto;
}

/* About: words in the wide column, a picture in the narrow one. */
.row {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-8);
  align-items: start;
}
.row + .row {
  margin-top: var(--space-12);
}
.row--text-first {
  grid-template-columns: 7fr 5fr;
}
.row__picture {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.row__picture--sticky {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-4));
}
.row__phone {
  width: min(280px, 60%);
}
.polaroid {
  border: 8px solid var(--pink);
  border-radius: var(--radius);
}
.caption {
  margin-top: var(--space-2);
  font-size: 1rem;
  font-style: italic;
  text-align: center;
}
.team {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  width: 100%;
}
.team img {
  width: 100%;
  border-radius: var(--radius);
}

/* Press: pictures to download. */
.promo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  max-width: 940px;
  margin-top: var(--space-6);
}
.promo--phones {
  grid-template-columns: repeat(3, 1fr);
  margin-top: var(--space-6);
}
.promo a {
  display: block;
  border-radius: var(--space-1);
  overflow: hidden;
  transition: transform 0.15s ease-out;
}
.promo a:hover {
  transform: translateY(-2px);
}
.promo img {
  width: 100%;
}

/* Privacy: a short version in boxes, then the long one. */
.legal {
  padding-bottom: var(--space-8);
}
.legal__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
  font-weight: 700;
  text-decoration: none;
}
.legal__back:hover {
  text-decoration: underline;
}
.legal__box {
  margin-top: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: #f1f1f1;
}
.legal__box h3 {
  margin-bottom: var(--space-2);
  font-family: var(--body);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}
.legal__box p + p {
  margin-top: var(--space-2);
}
.legal__box .legal__heading {
  margin-top: var(--space-4);
  font-weight: 700;
}
.legal a {
  color: #a5385c;
}

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--section) var(--gutter) 0;
  text-align: center;
}
.not-found img {
  height: 240px;
  width: auto;
}

/* ---------- Narrower windows ---------- */

@media (max-width: 900px) {
  .features__list {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .reviews {
    grid-template-columns: 1fr 1fr;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .split__picture {
    aspect-ratio: 4 / 3;
  }
  .split__text {
    padding-block: var(--space-8);
  }
  .row,
  .row--text-first {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .row__picture--sticky {
    position: static;
  }
  .row--picture-last .row__picture {
    order: 2;
  }
  .footer__columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --size-nav: 1.25rem;
  }
  .nav__logo img {
    width: 132px;
  }
  .nav__link {
    padding: var(--space-1) 12px;
  }
  /* On a phone the hero is as tall as what is in it. */
  .hero {
    min-height: 0;
  }
  /* The hero has its own, larger badge right under the bar. */
  .nav__badge {
    display: none;
  }
  .reviews {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .promo {
    grid-template-columns: 1fr;
  }
  .promo--phones {
    grid-template-columns: 1fr 1fr;
  }
  .banner--about {
    min-height: 44vh;
  }
  .banner--contact {
    min-height: 320px;
  }
  .banner--contact img {
    height: 240px;
  }
  .bucket {
    padding-top: var(--space-8);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
