/*
========================
COLORS/STYLES
========================
*/

:root {
  --color-black: #000000;
  --color-dark: #333333;
  --color-mid: #808080;
  /* --color-dim: #bfbfbf; */
  --color-dim: #ccc;
  --color-light: #f7f7f7;
  --color-white: #fff;

  --color-red: #B11116;

  --spacing-xs: 0.25rem;
  --spacing-s: 1rem;
  --spacing-m: 1rem;
  --spacing-l: 2rem;
  --spacing-xl: 4rem;

  --font-size: 16px;
  --font-small: 0.825em;
  --font-xs: 0.75em;
  --font-body: "Escalator", "dunbar-text", sans-serif;
  --font-headings: var(--font-body);
  --font-monospace: monospace;

  --line-height: 1.5;

  --width-s: 40rem;
  --width-m: 1000px;
  --width-l: 1440px;

  --header: 60px;
}

@media only screen and (min-width: 768px) {
  :root {
    --font-size: 17px;
  }
}

@media only screen and (min-width: 960px) {
  :root {
    --spacing-xs: 0.5rem;
    --spacing-s: 1rem;
    --spacing-m: 2rem;
    --spacing-l: 4rem;
    --spacing-xl: 6rem;
  }
}

@media only screen and (min-width: 1280px) {
}

@media only screen and (min-width: 1440px) {
  :root {
    --font-size: 20px;
  }
}

/*
========================
BASE
========================
*/

body {
  background: var(--color-white);
  color: var(--color-black);
  display: flex;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
}

::selection {
  background: rgba(255, 239, 68, 0.5);
}

html {
	scroll-behavior: smooth;
}

:target {
  margin-top: calc(var(--spacing-xl) * -1);
  padding-top: var(--spacing-xl);
  scroll-behavior: smooth;
}

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

/*
========================
CONTENT
========================
*/



/*
========================
TYPOGRAPHY
========================
*/

html {
  font-size: var(--font-size);
  font-family: var(--font-body);
}

body {
  line-height: var(--line-height);

  font-variant-ligatures: no-common-ligatures;

  -webkit-hyphens: auto;
	-webkit-hyphenate-limit-before: 4;
	-webkit-hyphenate-limit-after: 3;
	-webkit-hyphenate-limit-chars: 7 4 3;
	-webkit-hyphenate-limit-lines: 2;
	-webkit-hyphenate-limit-zone: 8%;
	-webkit-hyphenate-limit-last: always;

	-moz-hyphens: auto;
	-moz-hyphenate-limit-chars: 7 4 3;
	-moz-hyphenate-limit-lines: 2;
	-moz-hyphenate-limit-zone: 8%;
	-moz-hyphenate-limit-last: always;

	-ms-hyphens: auto;
	-ms-hyphenate-limit-chars: 7 4 3;
	-ms-hyphenate-limit-lines: 2;
	-ms-hyphenate-limit-zone: 8%;
	-ms-hyphenate-limit-last: always;

	hyphens: auto;
	hyphenate-limit-chars: 7 4 3;
	hyphenate-limit-lines: 2;
	hyphenate-limit-zone: 8%;
	hyphenate-limit-last: always;
}

h1, h2, h3 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.125;
  margin-bottom: var(--spacing-s);

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

h1 {
  font-size: 2.25em;
}

h2 {
  font-size: 1.5em;
}

h3 {
  font-size: 1em;
  line-height: var(--line-height);
  margin-bottom: 0;
}

p:not(:last-child) {
  margin-bottom: 0.5em;
}

em {
  font-style: italic;
}

strong {
  font-weight: 700;
}

a,
button {
  color: var(--color-black);
  cursor: pointer;
  transition: all .1s ease-in-out;
}

a:hover,
button:hover {
  color: var(--color-red);
}

a {
  border-bottom: 1px solid var(--color-mid);
  text-decoration: none;
}

a:hover {
  border-bottom: 1px solid var(--color-red);
}

/* Remove border on links where it shouldn't be */
header a,
footer a,
.font-index-container a,
.sidebar-container a {
  border: 0;
  text-decoration: none;
}

header a:hover,
footer a:hover,
.font-index-container a:hover,
.sidebar-container a:hover {
  border: 0;
}

/* Lists */

h3 + ol {
  margin-top: var(--spacing-xs);
}

/*
========================
MODIFIERS
========================
*/

.small {
  font-size: var(--font-small);
}

.subtle {
  color: var(--color-mid);
}

/*
========================
DIVIDERS
========================
*/

hr {
  border: 0;
  border-bottom: 1px solid var(--color-dim);
  margin: var(--spacing-m) 0;
}

.border {
  display: grid;
  margin: var(--spacing-m) 0;
  width: 100%;
}

/* XL Border */

.border.XL {
  grid-template-columns: 38px 1fr 38px;
  height: 29px;
}

.border.XL .center {
  height: 29px;
  width: 100%;
}

.border.XL .cap {
  width: 38px;
}

.border.XL svg {
  fill: var(--color-red);
}

/* Large Border */

.border.L {
  grid-template-columns: 28px 1fr 28px;
  height: 21px;
}

.border.L .center {
  height: 21px;
  width: 100%;
}

.border.L .cap {
  width: 28px;
}

.border.L svg {
  fill: var(--color-dim);
}

/* Medium Border */

.border.M {
  grid-template-columns: 22px 1fr 22px;
  height: 21px;
}

.border.M .center {
  height: 21px;
  width: 100%;
}

.border.M .cap {
  width: 22px;
}

.border.M svg {
  fill: var(--color-dim);
}

/* Small Border */

.border.S {
  grid-template-columns: 6px 1fr 6px;
  height: 5px;
}

.border.S .center {
  height: 5px;
  width: 100%;
}

.border.S .cap {
  width: 6px;
}

.border.S svg {
  fill: var(--color-dim);
}

/* XS Border */

.border.XS {
  background: var(--color-dim);
  height: 1px;
}

.double-divider {
  align-self: center;
  border-top: 1px solid var(--color-dim);
  border-bottom: 1px solid var(--color-dim);
  display: flex;
  height: 6px;
  margin: var(--spacing-m) 0;
  width: 100%;
}

/*
========================
CROP CONTENT
========================
*/

.crop {
  height: 0;
  margin: 0;
  position: relative;
}

.crop>div {
  background: #ccc;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.crop img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.crop-1x1 {
  padding-bottom: 100%;
}

.crop-4x5 {
  padding-bottom: 125%;
}

.crop-5x4 {
  padding-bottom: 80%;
}

.crop-9x16 {
  padding-bottom: 177.77777778%;
}

.crop-16x9 {
  padding-bottom: 56.25%;
}

/*
========================
CONTENT
========================
*/

.content {
  margin: 0 auto;
  /* margin-top: var(--spacing-m); */
  padding: var(--spacing-exterior);
  width: 100%;
}

@media only screen and (min-width: 768px) {
  .content {
    /* margin-top: var(--spacing-xl); */
  }
}

.content > *:first-child {
  margin-top: var(--spacing-xl);
}

.content > .feature-image,
.content > .font-opener {
  margin-top: 0;
}

.content>p,
.content>blockquote,
.content>h1,
.content>h2,
.content>h3,
.content>ol,
.content>ul,
.content>details,
.content>aside {
  max-width: var(--width-s);
}

.content > * {
  margin-left: auto;
  margin-right: auto;
  width: 92%;
}

.width-full {
  max-width: 100%;
  width: 100%;
}

.content .width-large,
.width-large {
  max-width: var(--width-l);
}

.content .width-medium,
.width-medium {
  max-width: var(--width-m);
}

.content .width-small,
.width-small {
  max-width: var(--width-s);
}

.col-container {
  display: flex;
  justify-content: space-between;
}

.col-1of2 {
  width: calc(50% - var(--spacing-m));
}

/*
========================
HEADER
========================
*/

header,
header .inner {
  align-items: center;
  background: var(--color-white);
  /* border-bottom: 1px solid var(--color-black); */
  display: flex;
  flex-wrap: wrap;
  height: var(--header);
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  width: 100%;
  z-index: 100;
}

header {
  justify-content: center;
}

header .inner {
  justify-content: space-between;
  max-width: var(--width-l);
  width: 92%;
}

header .inner::before {
  background: var(--color-white);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1;
}

header::after {
  bottom: -1px;
  /* border-bottom: 1px solid var(--color-dim); */
  content: "";
  left: 0;
  position: absolute;
  width: 100%;
}

header a {
  border: 0;
  text-decoration: none;
}

header .logo {
  max-width: 80px;
  width: 100%;
}

@media only screen and (min-width: 1440px) {
  header .logo {
    max-width: 100px;
  }
}

header .logo svg {
  margin-bottom: -2.5%;
  overflow: visible;
  vertical-align: middle;
}

header .logo a svg #letters {
  fill: var(--color-black);
}

header .logo svg .dot {
  fill: var(--color-red);
  transform: translateY(0%);

  -webkit-transition: all .1s ease-in-out;
  -moz-transition: all .1s ease-in-out;
  -ms-transition: all .1s ease-in-out;
  -o-transition: all .1s ease-in-out;
  transition: all .1s ease-in-out;
}

header .logo svg #dot-1 {
  transition-delay: 0s;
}

header .logo svg #dot-2 {
  transition-delay: 0.1s;
}

header .logo svg #dot-3 {
  transition-delay: 0.2s;
}

header .logo a svg:hover .dot {
  transform: translateY(-8%);
}

header .nav {
  background: white;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 1.5rem;
  justify-content: center;
  left: 0;
  max-height: 100vh;
  overflow-y: scroll;
  position: absolute;
  transform: translateY(0);
  width: 100%;

  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */

  -webkit-transition: all .3s cubic-bezier(0.770, 0.000, 0.175, 1.000);
  -moz-transition: all .3s cubic-bezier(0.770, 0.000, 0.175, 1.000);
  -ms-transition: all .3s cubic-bezier(0.770, 0.000, 0.175, 1.000);
  -o-transition: all .3s cubic-bezier(0.770, 0.000, 0.175, 1.000);
  transition: all .3s cubic-bezier(0.770, 0.000, 0.175, 1.000);
}

header .nav::-webkit-scrollbar {
  display: none;
}

header .nav.open {
  opacity: 1;
  transform: translateY(calc(100% + 1px));
}

header .mobile-only a {
  margin-right: var(--spacing-l);
  text-decoration: none;
}

/* header .nav a:last-of-type {
  margin-right: 0;
} */

header fontdue-cart-button {
  min-width: 34px;
}

header .nav a,
header .nav .cart-button {
  border-bottom: 1px solid var(--color-dim);
  margin: 0;
  padding: var(--spacing-s);
  position: relative;
  text-align: center;
  width: 100%;
}

/* header .nav a::after {
  content: "\2192";
  position: absolute;
  right: var(--spacing-s);
} */

header .logo,
header .mobile-only {
  z-index: 1;
}

@media only screen and (min-width: 768px) {
  header {
    /* font-size: var(--font-small); */
    font-size: 16px;
  }

  .mobile-only,
  button#mobile-menu {
    display: none;
  }

  header .nav {
    border: 0;
    font-size: inherit;
    overflow: visible;
    padding: 0;
    position: relative;
    transform: none;
    width: auto;
    z-index: 1;
  }

  header .nav a,
  header .mobile-only a,
  header .nav .cart-button {
    border: 0;
    margin-right: var(--spacing-m);
    padding: 0;
    text-decoration: none;
    width: auto;
  }

  header .nav .cart-button {
    font-weight: 700;
    margin: 0;
    position: relative;
  }

  header .nav .cart-button::after {
    background: var(--color-red);
    content: "";

    border-radius: 4px;
    height: 8px;
    width: 8px;

    position: absolute;
  }

  header .nav .cart-button[data-count="0"] {
    color: var(--color-mid);
    font-weight: 400;
  }

  header .nav .cart-button[data-count="0"]::after {
    background: none;
    content: "";

    border-radius: 4px;
    height: 8px;
    width: 8px;

    position: absolute;
  }
}

/*
========================
FOOTER
========================
*/

footer ::selection {
  background: var(--color-red);
}

footer {
  align-items: center;
  background: var(--color-black);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  font-size: var(--font-small);
  margin-top: var(--spacing-xl);
  width: 100%;
}

footer .subscribe-container {
  background: var(--color-red);
  padding: var(--spacing-m);
  text-align: center;
  width: 100%;
}

footer .subscribe-container div {
  font-family: "Montecatini Largo";
  font-weight: 400;
  font-feature-settings: "calt" 0;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  transition: 0.2s all ease-in-out;
}

footer .subscribe-container:hover div {
  color: var(--color-white);
  letter-spacing: 0.1em;
}

.ornm {
  font-feature-settings: "ornm" 1;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--width-l);
  padding-top: var(--spacing-l);
  width: 92%;
}

.footer-section {
  margin-bottom: var(--spacing-m);
  margin-right: var(--spacing-m);
  width: calc(50% - var(--spacing-m));
}

.footer-section:last-child {
  margin-right: 0;
}

@media only screen and (min-width: 768px) {
  .footer-section {
    margin-right: var(--spacing-l);
    width: auto;
  }
}

footer a {
  color: inherit;
}

footer a:hover {
  color: var(--color-mid);
}

footer .border.S svg,
footer .border.M svg,
footer .border.L svg,
footer .border.XL svg {
  fill: var(--color-dark);
}

.footer-section h3 {
  font-weight: 700;
  letter-spacing: 0.25em;
  line-height: var(--line-height);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
}

.footer-section ul {
  color: var(--color-dim);
  list-style: none;
  margin: 0;
  padding: 0;
}

footer .copyright-container {
  margin-bottom: var(--spacing-l);
  max-width: var(--width-l);
  text-align: center;
  width: 92%;
}

footer .copyright {
  color: var(--color-mid);
  padding: 0 var(--spacing-s);
}

footer .border.M {
  align-items: center;
  grid-template-columns: 22px 1fr max-content 1fr 22px;
}

/*
========================
HOME
========================
*/

.feature-image {
  margin-top: calc(var(--spacing-xl) * -1);
  margin-bottom: var(--spacing-l);
  width: 100%;
}

.catalog {
  max-width: var(--width-l);
  width: 100%;
}

.catalog .item {
  border-bottom: 1px solid var(--color-dim);
  color: var(--color-mid);
  font-size: var(--font-small);
  padding-bottom: var(--spacing-l);
  text-align: center;
}

.catalog .item:not(:first-child) {
  margin-top: var(--spacing-m);
}

.catalog .item:last-child {
  border-bottom: 0;
}

.catalog .item .images {
  display: flex;
}

.cite-fonts {
  margin-top: var(--spacing-m);
}

.cite-fonts a {
  color: inherit;
}

/*
========================
PAGE OPTIONS
========================
*/

.page-options {
  display: flex;
  justify-content: center;
  margin: var(--spacing-xl) auto;
  max-width: var(--width-s);
}

.page-options * {
  margin: 0 var(--spacing-xs);
}

.page-options a,
.page-options a.active {
  text-decoration: none;
}

.page-options a.active {
  color: var(--color-mid);
}


/*
========================
FONT TOGGLE
========================
*/

.font-toggle {
  bottom: 0;
  right: 0;
  padding: var(--spacing-s);
  position: fixed;
}

/*
========================
FONT FIT
========================
*/

.fit {
  display: inline-flex;
  /* font-size: 16px; */
  margin: 0;
  opacity: 0;
  white-space: nowrap;

  /* -moz-animation: fadein 1s;
  -webkit-animation: fadein 1s;
  -o-animation: fadein 1s; */

  -webkit-transition: opacity 1s ease-in-out;
  -moz-transition: opacity 1s ease-in-out;
  -ms-transition: opacity 1s ease-in-out;
  -o-transition: opacity 1s ease-in-out;
  transition: opacity 1s ease-in-out;
}

.fitted {
  opacity: 1;
}

/*
========================
FADE IN
========================
*/

@keyframes fadein {
    from {
        opacity:0;
    }
    to {
        opacity:1;
    }
}
@-moz-keyframes fadein { /* Firefox */
    from {
        opacity:0;
    }
    to {
        opacity:1;
    }
}
@-webkit-keyframes fadein { /* Safari and Chrome */
    from {
        opacity:0;
    }
    to {
        opacity:1;
    }
}
@-o-keyframes fadein { /* Opera */
    from {
        opacity:0;
    }
    to {
        opacity: 1;
    }
}
