/* Mike Hughes portfolio. Brand tokens and font loading follow the Ugly Warthog site. */

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/barlow-condensed-700.woff2) format("woff2");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/barlow-condensed-800.woff2) format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/source-serif-4-400.woff2) format("woff2");
}

:root {
  /* brand colors */
  --ink: #222222;
  --paper: #ffffff;
  --orange: #d34f00;
  --blue: #42849c;
  --blue-deep: #3f6474;

  /* print process colors, used only for the hero's CMYK squares */
  --cyan: #00aeef;
  --magenta: #ec008c;
  --yellow: #fff200;

  /* type: five sizes */
  --display: "Barlow Condensed", Impact, "Arial Black", sans-serif;
  --serif: "Source Serif 4", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --fs-poster: clamp(3.5rem, 9vw, 7.5rem);
  --fs-head: clamp(2.5rem, 5vw, 4.5rem);
  --fs-lead: clamp(1.375rem, 2vw, 1.75rem);
  --fs-body: 1.125rem;
  --fs-label: 1rem;
  --lh-body: 1.55;
  --lh-display: 0.92;
  --measure: 62ch;

  /* layout */
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 64px);
  --headshot: clamp(200px, 28vw, 340px);

  /* spacing */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;

  --tap: 44px;
  --tap-btn: 56px;

  /* focus ring color, flipped on dark fields */
  --focus: var(--orange);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

h1,
h2,
p,
ul,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.on-ink,
.on-blue-deep {
  --focus: var(--paper);
}

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

.on-blue-deep {
  background: var(--blue-deep);
  color: var(--paper);
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0;
  left: var(--gutter);
  z-index: 20;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  padding-inline: var(--s2);
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* long strings (the email address) wrap instead of scrolling sideways */
main,
.site-footer {
  overflow-wrap: anywhere;
}

/* display type: condensed caps */

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: var(--lh-display);
  overflow-wrap: anywhere;
}

h1 {
  font-size: var(--fs-poster);
}

h2 {
  font-size: var(--fs-head);
}

.label {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.35;
}

/* hero: ink field, headshot in a circle, name poster-size.
   Registration marks and CMYK squares are the only accents. */

.hero {
  position: relative;
  padding-block: var(--s5);
}

.hero-grid {
  display: grid;
  gap: var(--s4);
  justify-items: start;
  align-items: center;
}

.headshot {
  width: var(--headshot);
  height: var(--headshot);
  border-radius: 50%;
  object-fit: cover;
  background: var(--blue);
}

.hero-copy .label {
  margin-top: var(--s2);
  font-size: var(--fs-lead);
}

.hero-copy .lead {
  margin-top: var(--s3);
  max-width: 24em;
}

.cmyk {
  display: flex;
  gap: 6px;
  margin-top: var(--s4);
}

.cmyk span {
  width: 14px;
  height: 14px;
}

.cmyk .c { background: var(--cyan); }
.cmyk .m { background: var(--magenta); }
.cmyk .y { background: var(--yellow); }
.cmyk .k { box-shadow: inset 0 0 0 1px var(--paper); }

.reg {
  position: absolute;
  right: var(--gutter);
  width: 32px;
  height: 32px;
  color: var(--paper);
  opacity: 0.7;
}

.reg--tr {
  top: var(--s3);
}

.reg--br {
  bottom: var(--s3);
}

/* sections */

main > section {
  padding-block: var(--s5);
}

.intro {
  padding-bottom: 0;
}

.intro p,
.contact p {
  max-width: var(--measure);
}

.contact p + p {
  margin-top: var(--s2);
}

.intro p {
  font-size: var(--fs-lead);
  line-height: 1.45;
  max-width: 44em;
}

/* work grid: 1 / 2 / 3 columns */

.work h2 {
  margin-bottom: var(--s4);
}

.grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s3);
}

.grid a {
  display: block;
  box-shadow: 0 0 0 1px rgba(34, 34, 34, 0.25);
}

.grid img {
  width: 100%;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 240px;
  min-height: var(--tap-btn);
  padding: 0 var(--s4);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-lead);
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
}

.btn:hover {
  background: var(--blue-deep);
}

/* testimonials: 1 / 2 / 3 columns */

.quotes {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5) var(--s4);
}

.quotes figure {
  padding-top: var(--s3);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.quotes figcaption {
  margin-top: var(--s2);
}

.quotes figcaption .label {
  display: block;
}

/* contact */

.contact-grid {
  display: grid;
  gap: var(--s5);
}

.contact h2 {
  margin-bottom: var(--s3);
}

.details {
  display: grid;
  gap: var(--s3);
  align-content: start;
}

.details dt {
  margin-bottom: 2px;
}

.details a {
  display: inline-block;
  padding-block: 6px;
}

.site-footer {
  padding-block: var(--s4);
}

/* tablet and up */

@media (min-width: 40em) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .btn {
    flex: 0 1 auto;
  }
}

@media (min-width: 48em) {
  .hero {
    padding-block: var(--s6);
  }

  .hero-grid {
    grid-template-columns: auto 1fr;
    gap: var(--s5);
  }
}

@media (min-width: 64em) {
  main > section {
    padding-block: var(--s6);
  }

  .intro {
    padding-bottom: 0;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .quotes {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 3fr 2fr;
    gap: var(--s6);
  }
}
