/*
========================
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", 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,
.content {
  background: var(--color-white);
  color: var(--color-black);
  display: flex;
  flex-wrap: wrap;

  cursor: url(../tipofili/cursor.png) 6 6,auto;
  cursor: url(../tipofili/cursor.svg) 6 6,auto;
  cursor: -webkit-image-set(url("../tipofili/cursor.png") 1x,url("../tipofili/cursor@2x.png") 2x) 6 6,auto;
}

a:hover,
button:hover,
input[type="submit"]:hover,
.subscribe-button:hover {
  cursor: url(../tipofili/cursor-black.png) 6 6,auto;
  cursor: url(../tipofili/cursor-black.svg) 6 6,auto;
  cursor: -webkit-image-set(url("../tipofili/cursor-black.png") 1x,url("../tipofili/cursor-black@2x.png") 2x) 6 6,auto;
}

footer a:hover,
.subscribe-container:hover {
  cursor: url(../tipofili/cursor-white.png) 6 6,auto;
  cursor: url(../tipofili/cursor-white.svg) 6 6,auto;
  cursor: -webkit-image-set(url("../tipofili/cursor-white.png") 1x,url("../tipofili/cursor-white@2x.png") 2x) 6 6,auto;
}

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

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

@media only screen and (max-width: 767px) {
  .desktop {
    display: none;
  }
}

@media only screen and (min-width: 768px) {
  .mobile {
    display: none;
  }
}


/*
========================
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;
}

p + h2 {
  margin-top: var(--spacing-m);
}

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);
  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%;

  --scale: 0.75;
}

@media only screen and (min-width: 768px) {
  .border {
    --scale: 1;
  }
}

.border .cap {
  overflow: visible;
}

/* XL Border */

.border.XL {
  grid-template-columns: calc(38px * var(--scale)) 1fr calc(38px * var(--scale));
  height: calc(29px * var(--scale));
}

.border.XL .center {
  width: 100%;
}

.border.XL .cap {
  width: calc(38px * var(--scale));
}

.border.XL svg {
  fill: var(--color-red);
    height: calc(29px * var(--scale));
}

/* Large Border */

.border.L {
  grid-template-columns: calc(28px * var(--scale)) 1fr calc(28px * var(--scale));
  height: calc(21px * var(--scale));
}

.border.L .center {
  width: 100%;
}

.border.L .cap {
  width: calc(28px * var(--scale));
}

.border.L svg {
  fill: var(--color-dim);
  height: calc(21px * var(--scale));
}

/* Medium Border */

.border.M {
  grid-template-columns: calc(22px * var(--scale)) 1fr calc(22px * var(--scale));
  height: calc(21px * var(--scale));
}

.border.M .center {
  width: 100%;
}

.border.M .cap {
  width: calc(22px * var(--scale));
}

.border.M svg {
  fill: var(--color-dim);
  height: calc(21px * var(--scale));
}

/* 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%;
}

/*
========================
NEWSLETTER SUBSCRIBE
========================
*/

.form-container {
  width: 100%;
}

.form-container form .inner {
  align-items: center;
  border-bottom: 1px solid var(--color-dim);
  display: flex;
  font-size: var(--font-small);
  white-space: nowrap;

  -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;
}

@media only screen and (min-width: 768px) {
  .form-container form .inner {
    font-size: var(--font-size);
  }
}

.form-container form .inner:hover,
.form-container form .inner:focus-within {
  border-bottom: 1px solid var(--color-black);
}

/* Reset appearance */

.form-container input {
  background: none;
  border: 0;
  border-radius: 0;
  color: currentColor;
  margin: 0;
  padding: 0;
  -webkit-appearance: textfield;

  -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;
}

/* Add styling */

.form-container input[type=email] {
  flex: 1;
  margin-right: var(--spacing-s);
  padding: 0.5em 0;
}

.form-container input::placeholder {
  color: var(--color-mid);
}

.form-container .subscribe-button {
  background: none;
  border: 0;
  font-weight: 700;
  padding: 0.5em 0;
  position: relative;

  -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;
}

.form-container .subscribe-button:hover {
  border: 0;
  color: var(--color-mid);
}

.subscribe-button *,
.subscribe-button:hover * {
  border: 0;
}

.form-container input[type=email]:hover,
.form-container input[type=email]:focus,
.form-container input[type=email]:active {
  outline: none;
}

/* Footer styling */

footer .form-container {
  margin-bottom: var(--spacing-s);
}

@media only screen and (min-width: 768px) {
  footer .form-container {
    margin-bottom: var(--spacing-xs);
  }
}

footer .form-container form .inner {
  align-items: center;
  border-bottom: 1px solid var(--color-white);
}

footer .form-container form .inner:hover,
footer .form-container form .inner:focus-within {
  border-bottom: 1px solid var(--color-white);
}

footer .form-container input::placeholder,
footer .form-container form input[type="submit"] {
  color: var(--color-white);
}

footer .form-container form input[type="submit"]:hover {
  color: var(--color-black);
}


/*
========================
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);
  padding: 0 4%;
  width: 100%;
}

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;
}

/* Cart button */

header fontdue-cart-button {
  width: 100%;
}

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 .logo,
header .mobile-only {
  z-index: 1;
}

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

  header .inner {
    padding: 0;
    width: 92%;
  }

  .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 fontdue-cart-button {
    min-width: 34px;
    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);
  display: flex;
  justify-content: center;
  padding: var(--spacing-l);
  text-align: center;
  width: 100%;
}

footer .subscribe-container > .inner {
  align-items: center;
  display: flex;
  flex-direction: column;
  max-width: 30em;
  width: 100%;
}

footer .subscribe-container h3 {
  font-family: "Montecatini Normale";
  font-weight: 400;
  font-feature-settings: "calt" 0;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  margin-bottom: var(--spacing-xs);
  transition: 0.2s all ease-in-out;
}

footer .subscribe-container h3 span {
  letter-spacing: 0;
  margin-left: -0.03em;
}

@media only screen and (min-width: 768px) {
  footer .subscribe-container {
    padding: var(--spacing-m);
  }
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-column-gap: var(--spacing-m);
  grid-row-gap: var(--spacing-l);
  margin: 0 auto;
  max-width: var(--width-l);
  padding-top: var(--spacing-l);
  width: 92%;
}

@media only screen and (min-width: 768px) {
  .footer-nav {
    grid-template-columns: repeat(4, 1fr);
    grid-column-gap: var(--spacing-l);
  }
}

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: var(--spacing-l) 0;
  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;
  margin: 0;
  opacity: 0;
  white-space: nowrap;

  transition: opacity 0.2s ease-in-out;
}

.fitted {
  opacity: 1;
}

/*
========================
GRID
========================
*/

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

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

.col-full {
  grid-column: span 12;
}

.col-1of2 {
  grid-column: span 6;
}

.col-1of3 {
  grid-column: span 4;
}

.col-2of3 {
  grid-column: span 8;
}

.col-1of4 {
  grid-column: span 3;
}

.col-3of4 {
  grid-column: span 9;
}

.gutter-l {
  grid-column-gap: var(--spacing-l);
}

.gutter-m {
  grid-column-gap: var(--spacing-m);
}

.gutter-s {
  grid-column-gap: var(--spacing-s);
}

.margin-top-xs {
  margin-top: var(--spacing-xs);
}

.margin-top-s {
  margin-top: var(--spacing-s);
}

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

.margin-top-l {
  margin-top: var(--spacing-l);
}

.margin-top-xl {
  margin-top: var(--spacing-xl);
}

.margin-bottom-xs {
  margin-bottom: var(--spacing-xs);
}

.margin-bottom-s {
  margin-bottom: var(--spacing-s);
}

.margin-bottom-m {
  margin-bottom: var(--spacing-m);
}

.margin-bottom-l {
  margin-bottom: var(--spacing-l);
}

.margin-bottom-xl {
  margin-bottom: var(--spacing-xl);
}

/* Large phones? and tablets */

@media only screen and (min-width: 960px) {
  .col-m-full {
    grid-column: span 12;
  }

  .col-m-1of2 {
    grid-column: span 6;
  }

  .col-m-1of3 {
    grid-column: span 4;
  }

  .col-m-2of3 {
    grid-column: span 8;
  }

  .col-m-1of4 {
    grid-column: span 3;
  }

  .col-m-3of4 {
    grid-column: span 9;
  }
}

/* Laptops and larger screens */

@media only screen and (min-width: 1280px) {
  .col-l-full {
    grid-column: span 12;
  }

  .col-l-1of2 {
    grid-column: span 6;
  }

  .col-l-1of3 {
    grid-column: span 4;
  }

  .col-l-2of3 {
    grid-column: span 8;
  }

  .col-l-1of4 {
    grid-column: span 3;
  }

  .col-l-3of4 {
    grid-column: span 9;
  }
}

/*
========================
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;
    }
}
