/* Marty & Matt — martyandmatt.com
   Colours, type and spacing follow the brand guide. Mobile first. */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-grotesque-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-grotesque-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('../fonts/nunito-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('../fonts/nunito-sans-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --mm-ink: #24324B;
  --mm-paper: #FFF8EC;
  --mm-blue: #4962E8;
  --mm-yellow: #F6BD45;
  --mm-coral: #EF775E;
  --mm-teal: #2C7769;
  --mm-white: #FFFFFF;
  --mm-line: rgba(36, 50, 75, 0.16);
  --mm-heading: 'Bricolage Grotesque', system-ui, sans-serif;
  --mm-body: 'Nunito Sans', system-ui, sans-serif;
  --gutter: 24px;
  --section: 64px;
  --radius-panel: 24px;
  --radius-control: 16px;
  color-scheme: light;
}

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

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

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--mm-heading);
  font-optical-sizing: auto;
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.1;
}

h2 {
  font-size: 1.875rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.27;
  font-weight: 600;
}

p,
ul {
  margin: 0;
}

p {
  max-width: 62ch;
  text-wrap: pretty;
}

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

a {
  color: var(--mm-blue);
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--mm-ink);
}

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section);
}

.stack > * + * {
  margin-top: 16px;
}

.eyebrow {
  color: var(--mm-teal);
  font-size: 1rem;
  line-height: 1.375;
  font-weight: 700;
}

.lede {
  font-size: 1.1875rem;
  line-height: 1.5;
}

.caption {
  font-size: 0.875rem;
  line-height: 1.43;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Skip link */

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 12px 16px;
  color: var(--mm-paper);
  background: var(--mm-ink);
  border-radius: var(--radius-control);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  color: var(--mm-paper);
  transform: none;
  outline-color: var(--mm-blue);
}

/* Header */

.site-header {
  padding-block: 20px 4px;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 32px;
}

.logo {
  display: inline-block;
  padding-block: 10px;
}

.logo img {
  width: 220px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin-left: -4px;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
  color: var(--mm-ink);
  font-size: 1rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--mm-blue);
}

.site-nav a[aria-current='page'] {
  text-decoration-thickness: 0.16em;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-control);
  font-size: 1rem;
  line-height: 1.375;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  color: var(--mm-paper);
  background: var(--mm-blue);
}

.btn--primary:hover {
  color: var(--mm-paper);
  background: var(--mm-ink);
}

.btn--secondary {
  color: var(--mm-ink);
  border-color: var(--mm-ink);
}

.btn--secondary:hover {
  color: var(--mm-paper);
  background: var(--mm-ink);
}

.btn--ink {
  color: var(--mm-paper);
  background: var(--mm-ink);
}

.btn--ink:hover {
  color: var(--mm-paper);
  background: var(--mm-blue);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero */

.hero {
  padding-block: 32px var(--section);
}

.hero .wrap {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero h1 {
  margin-top: 8px;
}

.hero .lede {
  margin-top: 20px;
}

.hero .actions {
  margin-top: 28px;
}

.hero__art img {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
}

/* Apps */

.band {
  color: var(--mm-paper);
  background: var(--mm-ink);
}

.band :focus-visible {
  outline-color: var(--mm-paper);
}

.section-head {
  margin-bottom: 32px;
}

.cards {
  display: grid;
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  color: var(--mm-ink);
  background: var(--mm-white);
  border-radius: var(--radius-panel);
}

.card :focus-visible {
  outline-color: var(--mm-ink);
}

.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  line-height: 1.43;
  font-weight: 700;
}

.chip--yellow {
  background: var(--mm-yellow);
}

.chip--coral {
  background: var(--mm-coral);
}

.card__name {
  margin-top: 16px;
  font-size: 1.75rem;
  line-height: 1.15;
}

.card__by {
  margin-top: 2px;
  font-size: 0.875rem;
  line-height: 1.43;
}

.card__text {
  margin-top: 16px;
  margin-bottom: 24px;
}

.card .btn {
  margin-top: auto;
}

.card__domain {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.43;
}

/* App cards with a screenshot */

.app-card {
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.app-card__shot {
  display: flex;
  justify-content: center;
  padding: 24px;
}

.app-card__shot--yellow {
  background: var(--mm-yellow);
}

.app-card__shot--coral {
  background: var(--mm-coral);
}

.app-card__screen {
  width: auto;
  height: 360px;
  border: 3px solid var(--mm-ink);
}

.app-card__screen--phone {
  border-radius: 24px;
}

.app-card__screen--tablet {
  border-radius: 14px;
}

.app-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
}

/* Our story */

.split {
  display: grid;
  gap: 32px;
  align-items: center;
}

.split + .split {
  margin-top: var(--section);
}

.split__art img {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

.note {
  padding-left: 16px;
  border-left: 4px solid var(--mm-yellow);
  font-size: 0.875rem;
  line-height: 1.43;
}

.principles {
  display: grid;
  gap: 16px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.principles li {
  padding: 24px;
  background: var(--mm-white);
  border: 1px solid var(--mm-line);
  border-top: 6px solid var(--mm-blue);
  border-radius: var(--radius-control);
}

.principles li:nth-child(2) {
  border-top-color: var(--mm-yellow);
}

.principles li:nth-child(3) {
  border-top-color: var(--mm-teal);
}

.principles p {
  margin-top: 8px;
}

/* Help panel */

.help {
  padding-top: 0;
}

.panel {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: 32px 24px;
  background: var(--mm-yellow);
  border-radius: var(--radius-panel);
}

.panel p {
  margin-top: 8px;
}

/* Footer */

.site-footer {
  padding-block: 48px 40px;
  color: var(--mm-paper);
  background: var(--mm-ink);
}

.site-footer :focus-visible {
  outline-color: var(--mm-paper);
}

.site-footer a {
  color: var(--mm-paper);
}

.site-footer a:hover {
  color: var(--mm-yellow);
}

.footer__top {
  display: grid;
  gap: 32px;
}

.footer__brand img {
  width: 220px;
}

.footer__brand p {
  margin-top: 16px;
}

.footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.footer__nav h2 {
  font-family: var(--mm-body);
  font-size: 1rem;
  line-height: 1.375;
}

.footer__nav ul {
  margin-top: 4px;
  padding: 0;
  list-style: none;
}

.footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer__legal {
  max-width: none;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 248, 236, 0.28);
  font-size: 0.875rem;
  line-height: 1.43;
}

/* Privacy, Support and other text pages */

.page-head {
  padding-block: 32px 8px;
}

.page-head .lede {
  margin-top: 16px;
}

.page-head .caption {
  margin-top: 12px;
}

.page-head .actions {
  margin-top: 28px;
}

.page-head--solo {
  padding-bottom: var(--section);
}

.page-body {
  padding-top: 32px;
}

.page-body--flush {
  padding-top: 0;
}

.prose {
  max-width: 70ch;
}

.prose h2 {
  margin-top: 48px;
  font-size: 1.5rem;
  line-height: 1.25;
}

.prose p,
.prose ul {
  margin-top: 16px;
}

.prose ul {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 8px;
}

.support-card {
  align-items: stretch;
  border: 1px solid var(--mm-line);
}

.support-card h2 {
  font-size: 1.75rem;
  line-height: 1.15;
}

.support-card p {
  margin-top: 16px;
}

.support-card .actions {
  margin-top: 24px;
  margin-bottom: 8px;
}

.support-card .btn {
  margin-top: 0;
}

.break-anywhere {
  overflow-wrap: anywhere;
}

/* Wider screens */

@media (min-width: 720px) {
  :root {
    --gutter: 40px;
    --section: 96px;
  }

  body {
    font-size: 1.125rem;
    line-height: 1.56;
  }

  h1 {
    font-size: 3.25rem;
    line-height: 1.08;
  }

  h2 {
    font-size: 2.5rem;
    line-height: 1.15;
  }

  h3 {
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .lede {
    font-size: 1.25rem;
  }

  .logo img {
    width: 240px;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    padding: 32px;
  }

  .app-card {
    padding: 0;
  }

  .app-card__shot,
  .app-card__body {
    padding: 32px;
  }

  .app-card__screen {
    height: 440px;
  }

  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .panel {
    grid-template-columns: 1fr auto;
    padding: 40px;
  }

  .footer__top {
    grid-template-columns: 1.2fr 1fr;
  }
}

@media (min-width: 960px) {
  h1 {
    font-size: 4rem;
    line-height: 1.0625;
  }

  .hero {
    padding-block: 48px var(--section);
  }

  .hero .wrap,
  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
  }

  .split--flip .split__art {
    order: 2;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

@media print {
  .site-nav,
  .skip-link,
  .actions {
    display: none;
  }

  .band,
  .site-footer {
    color: var(--mm-ink);
    background: none;
  }

  .site-footer a {
    color: var(--mm-ink);
  }
}
