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

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Base Styles */
body {
  background-color: #000;
  font-family: "SourceSansProRegular", sans-serif;
}

/* Color Classes */
.pink {
  background-color: #fe386e;
}

.white {
  background-color: #FFF;
}

.grey-light {
  background-color: #3D3D3D;
}

.grey-dark {
  background-color: #141414;
}

/* Header Styles */
header {
  height: 83px;
  border-top: #141414 1px solid;
  border-bottom: #141414 1px solid;
  background-color: #090909;
  background-size: 10px 10px;
}

header>a#logo {
  display: block;
  height: inherit;
  width: inherit;
  background-image: url('images/ebn-logo.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: auto 64%;
}

/* Footer Styles */
footer {
  height: 24px;
  clear: both;
  border-top: #141414 1px solid;
  border-bottom: #141414 1px solid;
  background-color: #090909;
  background-size: 10px 10px;
}

footer>div {
  text-align: center;
  color: #333;
  font-size: 12px;
  line-height: 24px;
  font-family: sans-serif;
}

/* Home Page Styles */
body,
html {
  min-height: 650px;
}

div#home {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 100%;
  height: 807px;
}

div#home>main {
  margin: 0 auto;
}

main .grid {
  overflow: hidden;
}

main .grid .tile {
  height: 100px;
  width: 100px;
  display: block;
}

main .grid .tile a {
  display: flex;
  height: inherit;
  width: inherit;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0;
  font-family: 'Archivo Black', sans-serif;
  font-weight: 900;
  font-size: 14px;
  line-height: 1.1;
  text-align: right;
  text-decoration: none;
  opacity: 0;
  transition: opacity .5s ease-in-out;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.pink a {
  color: white;
}

.white a {
  color: black;
}

.grey-light a {
  color: #fe386e;
  /* Hot pink */
}

main .grid .tile a:hover {
  opacity: 1;
}

@keyframes shakesalot {
  0% {
    transform: translate(2px, 1px) rotate(0deg);
  }

  10% {
    transform: translate(-1px, -2px) rotate(-1deg);
  }

  20% {
    transform: translate(-3px, 0px) rotate(1deg);
  }

  30% {
    transform: translate(0px, 2px) rotate(0deg);
  }

  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }

  50% {
    transform: translate(-1px, 2px) rotate(-1deg);
  }

  60% {
    transform: translate(-3px, 1px) rotate(0deg);
  }

  70% {
    transform: translate(2px, 1px) rotate(-1deg);
  }

  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }

  90% {
    transform: translate(2px, 2px) rotate(0deg);
  }

  100% {
    transform: translate(1px, -2px) rotate(-1deg);
  }
}

main .grid .tile:hover,
main .grid .tile:focus,
.shaking {
  animation-name: shakesalot;
  animation-duration: 0.8s;
  transform-origin: 50% 50%;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

/* Flexbox layout for all desktop/tablet sizes */
div#home>main {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

main .grid {
  display: flex;
  padding: 0;
  box-sizing: border-box;
  padding: 100px;
  gap: 100px;
  flex-flow: row wrap;
}

/* Responsive */
@media only screen and (max-height: 649px) {
  html {
    zoom: 0.75;
  }
}

@media only screen and (max-width: 1114px) {
  div#home>main {
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
  }

  main .grid .tile {
    height: 60px;
    width: 60px;
    display: block;
  }

  main .grid {
    padding: 60px;
    gap: 60px;
  }

  main .grid .tile a {
    font-size: 11px;
  }
}

/* Mobile layout - 3×5 grid */
@media only screen and (max-width: 659px) {

  /* Container adjustments */
  div#home {
    position: relative;
    height: auto;
    min-height: 100vh;
  }

  /* Header responsive */
  header {
    min-width: auto;
    width: 100%;
    max-width: 100%;
  }

  /* Footer responsive */
  footer {
    min-width: auto;
    width: 100%;
    max-width: 100%;
  }

  /* Main content responsive */
  div#home>main {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 20px 0;
  }

  /* 3×5 grid layout for mobile */
  main .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 30px;
    justify-content: center;
    max-width: 240px;
    margin: 0 auto;
    padding: 0;
    height: auto;
  }

  main .grid .tile {
    height: 60px;
    width: 60px;
    margin: 0;
    justify-self: center;
  }

  /* Adjust font size for smaller tiles */
  main .grid .tile a {
    font-size: 11px;
  }

  /* Footer text size */
  footer>div {
    font-size: 10px;
    padding: 0 10px;
  }
}
