/* Resets by tailwind.css */
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box; /* 1 */
  border-width: 0; /* 2 */
  border-style: solid; /* 2 */
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
*/

html {
  line-height: 1.5; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -moz-tab-size: 4; /* 3 */
  tab-size: 4; /* 3 */
  font-family: theme(
    "fontFamily.sans",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji"
  ); /* 4 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0; /* 1 */
  line-height: inherit; /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0; /* 1 */
  color: inherit; /* 2 */
  border-top-width: 1px; /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}
/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0; /* 1 */
  border-color: inherit; /* 2 */
  border-collapse: collapse; /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-size: 100%; /* 1 */
  font-weight: inherit; /* 1 */
  line-height: inherit; /* 1 */
  color: inherit; /* 1 */
  margin: 0; /* 2 */
  padding: 0; /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button; /* 1 */
  background-color: transparent; /* 2 */
  background-image: none; /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type="search"] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block; /* 1 */
  vertical-align: middle; /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

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

/* ¨¨¨*********** roots style ¨¨¨*********** */
:root {
  /* colors */
  --primary: #42546f;
  --gray-light: #ededed;
  --gray-dark: #d8d9cf;
  --gray-darkest: #606873;
  --retro-light: #ff8787;
  --teal: #5ed9ff;

  /* radius */
  --radius-full: 0.5rem;
  --radius-large: 1.5rem;
}

body {
  background-color: var(--primary);
}

p {
  font-size: 1rem;
  font-family: "Philosopher", sans-serif;
}

a,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Bad Script", cursive;
}

.container {
  padding-inline: 1rem;
  margin-inline: auto;
}

/* ¨¨¨*********** Header ¨¨¨*********** */
header {
  margin-top: 1rem;
  text-align: center;
}

header h1 {
  margin-top: 3.5rem;
  text-align: center;
  font-size: 1.5rem;
  color: var(--gray-light);
}

.welcome-container a {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.5rem 3rem;
  text-align: center;
  color: var(--teal);
  border: 1px solid var(--gray-light);
}

/* ¨¨¨*********** Nav ¨¨¨*********** */
nav {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

nav ul {
  display: none;
}

nav a {
  color: var(--teal);
  font-size: 1.3rem;
  /* display: none; */
}

/* ¨¨¨*********** Nav ¨¨menu active (mobile menu js) ¨*********** */
.menu-active {
  position: absolute;
  display: block;
  top: 50px;
  left: 0;
  height: 100vh;
  width: 100%;
  background-color: var(--primary);
  z-index: 10;
}

.menu-active li {
  margin-top: 20px;
}

/* ¨¨¨*********** main ¨¨¨*********** */
main {
  margin-top: 10rem;
}

/* ¨¨¨*********** footer ¨¨¨*********** */
footer {
  height: 350px;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--gray-light);
}

footer > div {
  display: grid;
  place-items: center;
  height: 100%;
  padding-inline: 1rem;
}

footer h3 {
  font-size: 1.5rem;
  color: var(--retro-light);
}

footer p {
  color: var(--gray-light);
}

.social-links-container {
  display: flex;
  column-gap: 1rem;
  align-items: center;
}

/* ¨¨¨*********** home page ¨¨¨*********** */

.welcome-container img {
  display: none;
}

.home-page > section > div {
  margin-top: 1.5rem;
}

/* home page section story */
.section-home-story div:first-of-type > img {
  margin-inline: auto;
}

/* headings */
main.home-page h2 {
  font-family: "Major Mono Display", monospace;
  font-size: 2rem;
  text-align: center;
}

/* first heading */
.section-home-story h2:first-of-type {
  color: var(--gray-light);
}

/* paragraphs */
.section-home-story p {
  padding: 1rem;
  background-color: var(--primary);
  color: var(--gray-light);
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

/* second div heading */
.section-home-collection > div {
  border-bottom-right-radius: var(--radius-large);
}

/* second div heading */
.section-home-collection h2 {
  color: var(--retro-light);
}

/* images */
/* second image element */
.section-home-collection img {
  border-top-left-radius: var(--radius-large);
}

/* second div element */
.section-home-collection {
  margin-top: 8rem;
}

/* second div element collections link */
.section-home-collection a {
  display: block;
  padding: 1rem;
  text-align: center;
  width: 260px;
  height: max-content;
  margin-inline: auto;
  margin-top: 1rem;
  background-color: var(--primary);
  color: var(--teal);
  box-shadow: 0px 4px 4px rgb(0 0 0 / 25%);
}

/* section home collection direct child div */
.section-home-collection > div {
  padding-bottom: 1rem;
  min-height: 450px;
  background-color: var(--gray-dark);
  border-top-left-radius: var(--radius-large);
}

/* Home page section quotes */
.section-home-quotes {
  margin-top: 8rem;
}

/* Section quotes all direct divs */
.section-home-quotes > div {
  padding-bottom: 1rem;
  border-radius: 20px 0 20px 0;
  background-color: var(--gray-dark);
}
.section-home-quotes > div:not(:first-of-type) {
  margin-top: 3.5rem;
  padding-bottom: 1rem;
  border-radius: 20px 0 20px 0;
  background-color: var(--gray-dark);
}

/* Section quotes all direct divs images */
.section-home-quotes > div > img {
  border-radius: 20px 0 0 100px;
}

/* Section quotes all direct divs quotes */
.section-home-quotes > div > q {
  display: block;
  padding-top: 1rem;
  padding-left: 1rem;
  font-size: 1.5rem;
  max-width: 275px;
}

/* Section quotes h2 */
.section-home-quotes h2 {
  font-family: "Major Mono Display", monospace;
  font-size: 2rem;
  color: var(--retro-light);
}

/* Banner */
.banner {
  display: grid;
  place-items: center;
  height: 400px;
  margin-top: 3rem;
}

.banner h1 {
  font-size: 3rem;
  background-color: rgba(255, 255, 255, 0.789);
  padding: 1rem 2.5rem;
  color: var(--gray-darkest);
}

/* ¨¨¨*********** Banner images ¨¨¨*********** */

/* collections page */

.banner-collections {
  background-image: url("../images/book-stand.jpg");
}

/* stories page */
.banner-stories {
  background-image: url("../images/stories.jpg");
}

/* Plays page */
.banner-plays {
  background-image: url("../images/plays-banner.jpg");
  background-position: 20% 40%;
}

/* Contact us age */
.banner-contact-us {
  background-image: url("../images/banner-contact-us.jpg");
  background-position: 50% 50%;
}

/* About us Page */
.banner-about-us {
  background-image: url("../images/banner-about-us.jpg");
  background-position: 50% 50%;
}

/* Books container */
.container-books > h2 {
  font-size: 1.5rem;
  font-weight: bolder;
  color: var(--gray-light);
  text-align: center;
}

.container-books > div {
  margin-top: 4rem;
}

.container-books > div > div {
  margin-top: 1rem;
}

.container-books-inner > div {
  display: flex;
  row-gap: 1rem;
  flex-direction: column;
  padding: 1rem;
  box-shadow: 0px 4px 4px rgb(0 0 0 / 25%);
}

.container-books-inner h2 {
  color: var(--gray-light);
  max-width: 80ch;
}

.container-books-inner :not(h2, a) {
  color: var(--gray-dark);
}

.container-books-inner dl {
  display: flex;
  column-gap: 0.8rem;
}

.container-books-inner a {
  padding: 0.5rem 3rem;
  width: max-content;
  color: var(--teal);
  border: 1px solid var(--gray-light);
}

/* ¨¨¨*********** Contact Page ¨¨¨*********** */

.contact-us {
  color: var(--gray-light);
  font-size: 1.25rem;
  text-align: center;
}

.container-about {
  color: var(--gray-light);
  max-width: 1024px;
}

/* ¨¨¨*********** Media quires ¨¨¨*********** */

@media screen and (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}
@media screen and (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}
@media screen and (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}
@media screen and (min-width: 1024px) {
  .container {
    max-width: 1280px;
  }
}

/* on screen larger than 640px */
@media screen and (min-width: 640px) {
  /* Navigation */
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  nav ul {
    display: flex;
    column-gap: 1rem;
  }

  nav button {
    display: none;
  }

  /* Home page */
  .welcome-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 1rem;
    margin-top: 2.5rem;
  }

  .welcome-container > div {
    border: 1px solid var(--retro-light);
  }

  .welcome-container h1 {
    font-size: 2rem;
  }

  .welcome-container img {
    display: block;
  }

  .section-home-story div:first-of-type {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-column-gap: 2rem;
  }

  .section-home-story div:first-of-type p {
    height: max-content;
  }

  .section-home-story h2 {
    text-align: left;
  }

  .section-home-quotes > div {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .section-home-quotes q {
    place-self: center;
  }

  /* Books container used on multiple page  */
  .container-books-inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 3rem;
  }

  .container-books > div > div {
    margin-top: 0;
  }
}

/* on screen larger than 768px */
@media screen and (min-width: 768px) {
  /* Home page */

  .section-home-collection > div {
    display: grid;
    grid-template-columns: 2fr 1fr;
    column-gap: 1rem;
    padding-bottom: 0;
    background-color: var(--primary);
  }

  /* section home collection second direct child div */
  .section-home-collection > div > div {
    display: grid;
    place-items: center;
    max-height: 382px;
    padding-inline: 1rem;
    border-bottom-right-radius: var(--radius-large);
    box-shadow: 0px 4px 4px rgb(0 0 0 / 25%);
  }
}

/* on screen larger than 1024px */
@media screen and (min-width: 1024px) {
  /* Home page */
  .section-home-quotes > div {
    max-width: 750px;
  }

  .section-home-collection > div > div {
    max-height: inherit;
  }

  .section-home-quotes > div:nth-child(even) {
    margin-left: auto;
  }

  /* Books container (used on multiple page)*/
  .container-books-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 3rem;
  }
}