/*****************************************/
/*           Standards                   */
/*****************************************/

/*
This website was built by Sal Costa
https://salcosta.dev

Screen Breakpoints:
1280+ Desktops
800-1280 Small Screen Computers
480-800 Tablets
300-480 Phones


/*****************************************/
/* --- Universal Formatting --- */
/*****************************************/

:root {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* firefox scrollbar */
  /* scrollbar-color: #FFFFFF #000000  THUMB, TRACK */;

  /* theme variables */
  --bg: #f2efe3;
  --text: #323e4e;
  --text-light: rgba(50, 62, 78, 0.6); /* text with lighter opacity */
  --accent: #C68D24;
  --accent-light: #E2B632;

  --shadow-lg: 0px 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);

  --font-xs: 1rem;
  --font-sm: 1.2rem;
  --font-md: 1.4rem;
  --font-lg: 1.8rem;

  --time: 400ms; /* pointer actions */
  --time-fast: 100ms; /* theme */
  --time-long: 600ms;
}

/* highlighted text 
::selection { 
  background-color: #FFFFFF;  Highlight background color 
  color: #000000;  Highlighted text color 
}
*/

/* scrollbar 
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #000000;
}
  */

html {
	margin: 0 auto;
	padding: 0;
  font-family: "Poppins", sans-serif;

  font-weight: 400;
  font-style: normal;
  background-color: var(--bg);
  color: var(--text);

	scroll-behavior: smooth;
	max-width: 100%;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
body {
	margin: 0 auto;
	padding: 0;
}
h1, h2, p {
  color: var(--text);
}
h1 { 
	font-family: "El Messiri", sans-serif;
  font-size: 2.6rem;
  line-height: 2.8rem;
  margin: 0;
  position: relative;
  top: 6px;
}
h2 {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  margin: 0;
  opacity: 0.8;
}
h3 {
  font-family: "Poppins", sans-serif;
  font-size: var(--font-xs);
  line-height: 1.4rem;
  margin: 0;
  color: var(--text-light);
}

p {
  font-family: "Poppins", sans-serif;
  font-size: var(--font-sm);
}

a, a:visited {
  color: var(--text);
  font-size: var(--font-sm);
  text-decoration: none;
}
a:hover,
a:focus-visible {
  color: var(--accent);
}
a.button {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border: none;
  outline: none;
  padding: 12px 12px 4px 12px;
  margin-bottom: 4px;
  cursor: pointer;
	font-family: "El Messiri", sans-serif;
  font-weight: 500;
  font-size: var(--font-lg);
  line-height: 2rem;
  white-space: nowrap;
  background-color: var(--accent);
  box-shadow: var(--shadow-md);
  color: var(--bg);
  transition: 
    background-color var(--time),
    transform var(--time-fast);
}
a.button:hover,
a.button:focus-visible {
  background-color: var(--accent-light);
  transform: scale(0.95);
}
a.button:focus-visible {
  text-decoration: underline;
}

@media screen and (max-width: 800px) { /* tablets */
  h1 { 
    font-size: 2.2rem;
    line-height: 2.4rem;
    top: 4px;
  }
}
@media screen and (max-width: 480px) { /* phones */
  h1 { 
    font-size: 1.8rem; 
    line-height: 2rem;
  }
  h2 {
    font-size: 1.4rem;
  }
}

/*****************************************/
/*              Page setup               */
/*****************************************/
#content { /* page content box */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4rem;
  min-height: 80vh;
  max-width: 2000px;
  margin: 160px auto 6rem auto;
}
#content.home {
  margin: 6rem auto;
  gap: 6rem;
}

.divider {
  width: 100%;
  border-bottom: 1px solid var(--text-light);
  filter: blur(0.5px);
  margin: 0 auto;
}

.page-title { /* page title */
  width: 100%;
  box-sizing: border-box;
  display: flex;
  border-left: 8px solid var(--text-light);
  padding-left: 16px;
}
.title-text {
  display: flex;
  flex-direction: column;
}

@media screen and (max-width: 2000px) {/* not ultra-wide */
  #content {
    margin: 160px 15% 6rem 15%;
  }
  #content.home {
    margin: 6rem 15%;
  }

}
@media screen and (max-width: 800px) { /* tablets */
  #content {
    margin: 160px 10% 6rem 10%;
  }
  #content.home {
    margin: 2rem 10% 6rem 10%;
  }
  .title-text > h2 {
    margin-bottom: -4px;
  }
}
@media screen and (max-width: 480px) { /* phones */
  #content {
    margin: 140px 5% 4rem 5%;
  }
  #content.home {
    margin: 2rem 5% 6rem 5%;
  }
}

/*****************************************/
/*         Navigation Bar/Menu           */
/*****************************************/

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15%;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  gap: 1rem;
  height: 80px;
  box-shadow: var(--shadow-md);
  background-color: var(--text);
  z-index: 9;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}
.nav-left img {
  height: 70px;
}
.nav-left-text {
  display: flex;
  flex-direction: column;
  padding-top: 0.25rem;
}
a.nav-left-text span {
  font-size: var(--font-md);
  font-weight: 500;
  color: var(--bg);
  font-family: "El Messiri", sans-serif;
  white-space: nowrap;
  line-height: 1.4rem;
}
#nav-links {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1rem;
}
a.page-link, a.page-link:visited {
  position: relative;
  font-size: var(--font-sm);
  padding: 1rem 0;
  color: var(--bg);
}
a.page-link::before {
  content: '';
  position: absolute;
  height: 2px;
  width: 100%;
  left: 0;
  background-color: var(--bg);
  bottom: 1rem;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform var(--time);
}

a.page-link:hover::before,
a.page-link:focus-visible::before,
a.page-link.active::before {
  transform-origin: left;
  transform: scaleX(1);
}

/* dropdown item */
.dropdown-button {
  cursor: default;
  border-radius: 0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  background-color: inherit;
  font-family: "Poppins", sans-serif;
  font-size: var(--font-sm);
  padding: 1rem 0.25rem 1rem 0.5rem;
  height: 80px;
  color: var(--bg);
}
.dropdown-button svg {
  display: inline-block;
  width: 0.5rem;
  margin-top: 4px;
  fill: var(--bg);
}
.dropdown-menu {
  display: flex;
  flex-direction: column;
  position: absolute;
  max-height: 0;
  overflow: hidden;
  top: 80px;
  min-width: 160px;
  background-color: var(--text);
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4);
  transition: max-height var(--time-long) ease-in-out;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  max-height: 1000px;
}
.dropdown-menu a.page-link {
  display: block;
  padding: 1rem 0;
  margin: 0 1rem;
  white-space: nowrap;
}

/* mobile nav elements */
#nav-button {
  display: none;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  z-index: 10;
  position: absolute;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
}
#nav-button svg {
  fill: var(--bg);
}
#nav-button svg rect {
  transition: 
    transform var(--time);
}
#nav-button svg rect.top {transform-origin: top center;}
#nav-button svg rect.mid {transform-origin: center center;}
#nav-button svg rect.bot {transform-origin: bottom center;}

#nav-button.menu-open svg rect.top { transform: scaleY(0.6) translateY(-10px); }
#nav-button.menu-open svg rect.mid { transform: scale(0.8, 0.6); }
#nav-button.menu-open svg rect.bot { transform: scaleY(0.6) translateY(10px); }

/* responsive nav */
@media screen and (max-width: 1280px) {
  nav {
    padding: 0 10%;
  }
  #nav-links {
    gap: 0.75rem;
  }
}
@media screen and (max-width: 800px) {
  nav {
    height: 100px;
  }
  #nav-links { /* full screen nav */
    display: flex;
    position: fixed;
    visibility: hidden; /* for initial load, visible after toggleNav() */
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    gap: 0.25rem;
    padding-top: 120px;
    background-color: var(--text);
    flex-direction: column;
    transform: translateX(110%); /* off screen */
    pointer-events: none;
    transition: transform var(--time);
  }
  #nav-links > a.button { /* button in mobile nav only */
    margin-top: 1rem;
  }
  nav.menu-open #nav-links {
    transform: translateX(0%);
    pointer-events: auto;

  }
  #nav-button {
    display: flex;
  }
  a.page-link, .dropdown-button {
    font-size: var(--font-lg);
    width: 80%;
    text-align: center;
  }
  .dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .dropdown-button svg {
    width: 0.75rem;
    margin-bottom: 2px;
    transition: transform var(--time);
  }
  .dropdown-menu {
    align-items: center;
    position: static;
    box-shadow: none;
    background-color: var(--bg);
    width: 100%;
    box-shadow: inset var(--shadow-lg);
  }
  .dropdown:hover .dropdown-menu {
    max-height: 0;
  }
  .dropdown.open .dropdown-menu,
  .dropdown.open:hover .dropdown-menu {
    max-height: 1000px;
  }
  .dropdown.open .dropdown-button svg {
    transform: rotate(180deg);
  }
  .dropdown-menu a.page-link {
    color: var(--text);
  }
  a.page-link::before {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  nav {
    padding: 0 5%;
  }
  #nav-button {
    right: 5%;
  }
}

/***************************************/
/*                 Hero                */
/***************************************/
#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 80px;
  min-height: 95vh;
  box-sizing: border-box;
  box-shadow: 0 0 60px var(--text-light) inset;
  gap: 1rem;
}
#hero h3 {
  color: var(--text);
}
.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4rem;
}
.hero-title h1 {
  font-size: 4rem;
  line-height: 4rem;
}
.hero-flex {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  gap: 4rem;
  width: 70%;
  padding: 0 15%;
  max-width: 1600px;
}
.hero-book {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 20%;
  max-width: 360px;
}
.hero-book > img {
  width: 70%;
  min-width: 180px;
  padding-top: 1rem;
  filter: drop-shadow( var(--shadow-md) );
}
.award-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80%;
  text-align: center;
  gap: 8px;
}
.award-wrap img.hero-seal {
  width: 80px;
  height: 80px;
  aspect-ratio: 1/1;
  filter: drop-shadow( var(--shadow-sm));
}
.award-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.award-text h3 {
  white-space: nowrap;
}
.hero-video {
  width: 70%;
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}
iframe {
  border: none;
  aspect-ratio: 16/9;
  background-color: gray;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  text-align: center;
  min-width: 320px;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding-bottom: 4rem;
}

@media screen and (max-width: 1280px) {
  #hero {
    min-height: auto;
  }
  .hero-flex {
    width: 80%;
    padding: 0 10%;
  }
  .hero-book {
    width: 15%;
    gap: 0.5rem;
  }
  .hero-book > img {
    width: 100%;
    min-width: 110px;
  }
  .award-wrap {
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }
  .award-wrap img.hero-seal {
    width: 60px;
    height: 60px;
  }
}
@media screen and (max-width: 800px) {
  #hero {
    margin-top: 100px;
  }
  .hero-title {
    padding-top: 3rem;
  }
  .hero-title h1 {
    font-size: 3rem;
    line-height: 3rem;
  }
  .hero-flex {
    flex-direction: column-reverse;
    gap: 1rem;
  }
  .hero-video {
    width: 100%;
  }
  .hero-book {
    width: 80%;
  }
  .hero-book > img {
    display: none;
  }
  .award-wrap {
    flex-direction: row;
    gap: 8px;
  }
  .award-wrap img.hero-seal {
    width: 80px;
    height: 80px;
  }
  .hero-cta {
    padding-bottom: 2rem;
  }
}

@media screen and (max-width: 480px) {
  .hero-title h1 {
    font-size: 2.6rem;
    line-height: 2.8rem;
  }
  .hero-cta {
    min-width: auto;
  }
}


/***************************************/
/*         Home page                   */
/***************************************/

.jump-link {
  align-self: center;
  display: none;
  padding: 8px;
  transform-origin: center;
  transform: rotate(45deg) translate(-50%, -50%);
}
.jump-arrow {
  width: 20px;
  height: 20px;
  border-right: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
}
/* review */
#review {
  display: flex;
  flex-direction: column;
}
#review.home {
  gap: 1rem;
}
.review-wrap {
  margin: 0 2rem;
}
.stars {
  display: flex;
  align-items: center;
  transform: translateX(-3px);
  gap: 2px;
  padding: 8px 0;
}
.stars svg {
  width: 24px;
  fill: var(--accent);
}
blockquote {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.5rem 0 0 0;
  padding: 0 8px;
  border-left: 2px solid var(--text-light);
}
blockquote p {
  font-size: var(--font-xs);
  margin: 0;
}

/* INTERVIEW */
#interview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.audio-player {
  display: flex;
}
audio {
  width: 100%;
  margin: 0 2rem;
  filter: drop-shadow( var(--shadow-md) );
}

/* home-books */
#home-books {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.book-list {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
}
a.book-link {
  width: 25%;
  display: flex;
  transform-origin: bottom center;
  transition: 
    transform var(--time),
    filter var(--time-fast);
}
a.book-link img {
  width: 100%;
  aspect-ratio: 2/3;
  box-shadow: var(--shadow-md);
}
a.book-link:hover,
a.book-link:focus-visible {
  transform: scale(1.02);
  filter: brightness(1.1);
}

@media screen and (max-width: 1280px) {
  .book-list {
    justify-content: space-between;
  }
  a.book-link {
    width: 30%;
  }
}

@media screen and (max-width: 800px) {
  .jump-link {
    display: flex;
  }
  .review-wrap {
    margin: 0 1rem;
  }
}

@media screen and (max-width: 480px) {
  audio {
    margin: 0;
  }
  .review-wrap {
    margin: 0;
  }
}


/*****************************************/
/*             Book Pages                */
/*****************************************/

.book-listing {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem; /* for award seal */
}
.book-buy {
  width: 35%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}
.cover-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}
.cover-wrap img.cover {
  width: 100%;
  max-width: 270px;
  aspect-ratio: 2/3;
  box-shadow: var(--shadow-md);
}
.awards-wrap {
  position: absolute;
  top: 0;
  left: -10px;
  transform: translateX(-100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.awards-wrap img.award {
  width: 80px;
  height: 80px;
  aspect-ratio: 1/1;
  filter: drop-shadow(var(--shadow-sm)) brightness(1);
  cursor: help;
  transition: filter var(--time);
}
img.award:hover {
  filter: drop-shadow(0 0 0 rgba(0,0,0,0)) brightness(1.06);
}
.book-buy > a.button {
  width: 100%;
  box-sizing: border-box;
  max-width: 270px;
}

.book-summary {
  width: 60%;
}
.isbn {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 1rem;
}
.isbn-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

}

/* other reaading section */
#other-books {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.small-book-list {
  display: flex;
  width: 100%;
  gap: 4rem;
}
a.small-book-link {
  width: 15%;
  display: flex;
  transform-origin: bottom center;
  transition: 
    transform var(--time),
    filter var(--time-fast);
}
a.small-book-link img {
  width: 100%;
  min-width: 100px;
  aspect-ratio: 2/3;
  box-shadow: var(--shadow-md);
}
a.small-book-link:hover,
a.small-book-link:focus-visible {
  transform: scale(1.02);
  filter: brightness(1.1);
}

@media screen and (max-width: 800px) {
  .book-listing {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }
  .book-buy {
    width: 100%;
    padding-bottom: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px dotted var(--text);
  }
  .cover-wrap img.cover {
    max-width: 240px;
  }
  .awards-wrap img.award {
    pointer-events: none;
  }
  .book-summary {
    width: 100%;
  }
  a.small-book-link {
    width: 20%;
  }
}

@media screen and (max-width: 480px) {
  .cover-wrap {
    width: 55%;
  }
  .cover-wrap img.cover {
    max-width: none;
  }
  .awards-wrap img.award {
    pointer-events: none;
    width: 60px;
    height: 60px;
  }
  .isbn {
    justify-content: flex-start;
  }
}


/*****************************************/
/*             About Page                */
/*****************************************/

.headshot-wrap {
  display: flex;
  justify-content: center;
  width: 300px;
  flex-shrink: 0;
  float: right;
  margin: 1.5rem 1rem 1rem 1.5rem;
}
.headshot-wrap img {
  width: 100%;
  aspect-ratio: 1/1;
  box-shadow: var(--shadow-md);
}

@media screen and (max-width: 1280px) {
  .headshot-wrap {
    width: 40%;
  }
}
@media screen and (max-width: 800px) {
  .headshot-wrap {
    min-width: 240px;
  }
}
@media screen and (max-width: 600px) {
  .headshot-wrap {
    float: none;
    margin: 0 auto;
  }
}

/*****************************************/
/*              Events page              */
/*****************************************/

.events-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  flex-grow: 1;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
  gap: 2rem;
}
.no-events {
  display: flex;
  align-self: center;
  justify-content: center;
}
.event {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  gap: 0.5rem;
  width: 100%;
}
.event-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.event-info h2,
.event-name h1 {
  white-space: nowrap;
}
.event-name {
  display: flex;
  flex-wrap: wrap;
}
.event-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1rem;
}
.event-links > a::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--text);
  -webkit-mask-image: url('../assets/link-arrow.svg');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url('../assets/link-arrow.svg');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  transform: translate(6px, -1px);
  vertical-align: middle;
  transition: transform var(--time);
}
.event-links > a:hover::after {
  transform: translate(8px, -3px);
}

@media screen and (max-width: 800px) {
  .events-wrap {
    padding: 0;
  }
}

/*****************************************/
/*              Footer                   */
/*****************************************/

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 15%;
  gap: 8px;
  background-color: var(--text);
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2); /* inverted shadow-md */
}
footer img {
  height: 100px;
}
footer h3 {
  color: var(--bg);
}

@media screen and (max-width: 800px) {
  footer {
    padding: 2rem 10%;
  }
}

@media screen and (max-width: 480px) {
  footer {
    padding: 2rem 5%;
  }
  footer img {
    height: 70px;
  }
}