@import './normalize.css';

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

textarea {
  resize: vertical;
}

/* TODO: Color tokens */

/**
  --ff-default:
    Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
    'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
 */

/* ==========================================================================
    Base styles
    ========================================================================== */

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-Extralight.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-ExtralightItalic.otf") format("opentype");
  font-weight: 200;
  font-style: italic;
}
    
@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-LightItalic.otf") format("opentype");
  font-weight: 300;
  font-style: italic;
}


@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-RegularItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-BoldItalic.otf") format("opentype");
  font-weight: 700;
  font-style: italic;
}

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-Extrabold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: "Wonder";
  src: url("../fonts/Wonder-ExtraboldItalic.otf") format("opentype");
  font-weight: 800;
  font-style: italic;
}

body {
  background-color: #f1eff0;
  color: #666;
  font-family: "Wonder", serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-weight: 200;
}

body.no-scroll {
  overflow: hidden;
}

/* TODO: Generic h1-h5 styles? */
h1, h2, h3, h4, h5 {
  font-weight: 200;
  margin: 0 0 16px;
}

p {
  margin: 0 0 16px;
}

a {
  color: #d07775;
  text-underline-offset: 4px;
}

a:not(:is(:hover, :focus)) {
  text-decoration-color: 
    color-mix(in srgb, currentColor, transparent 85%);
}

.icon > svg {
  height: 0.8em;
}

strong {
  font-weight: 700;
}

/* ==========================================================================
    App shell
    ========================================================================== */

.wrapper {
  padding: 16px 16px;
}

.container {
  margin: 0 auto;
  max-width: 1024px;
}

.site-header {
  margin: 0 0 16px;
}

.site-header .header-body {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.site-header .home-link {
  width: 100px;
}

.site-header .home-link svg {
  display: block;
  width: 100%;
}

.site-header .mobile-nav-control,
.mobile-site-nav .mobile-nav-close {
  appearance: none;
  background: rgba(255, 255, 255, 0);
  border: none;
  border-radius: 50%;
  color: #666;
  padding: 8px;
  transition: 200ms background-color;
}

.site-header .mobile-nav-control:focus-visible,
.mobile-site-nav .mobile-nav-close:focus-visible {
  outline: 2px solid #d07775;
  outline-offset: 2px;
}

.site-header .mobile-nav-control:hover,
.mobile-site-nav .mobile-nav-close:hover {
  background: rgba(255, 255, 255, 0.5);
}

.site-header .mobile-nav-control:active,
.mobile-site-nav .mobile-nav-close:active {
  background: rgba(255, 255, 255, 1);
}

.site-header .mobile-nav-control svg,
.mobile-site-nav .mobile-nav-close svg {
  display: block;
  width: 24px;
}

.site-nav {
  display: none;
}

.site-nav ul {
  font-size: 14px;
  line-height: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav ul li {
  display: inline-block;
  margin: 0 8px;
}

.site-nav ul li:last-child {
  margin-right: 0;
}

.site-nav ul li a {
  display: inline-block;
  text-underline-offset: 7px;
  text-decoration: none;
}

.site-nav ul li a:hover {
  text-decoration: underline;
}

.mobile-site-nav {
  background: #f1eff0;
  box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  font-size: 24px;
  height: 100vh;
  padding: 32px;
  position: fixed;
  right: 0;
  top: 0;
  text-align: right;
  width: 90vw;

  display: none;
}

.mobile-site-nav.open {
  display: block;
}

.mobile-site-nav ul {
  list-style: none;
}

.mobile-site-nav ul li {
  padding: 0;
  margin: 0 0 8px;
}

.mobile-site-nav .mobile-nav-close {
  left: 24px;
  position: absolute;
  top: 24px;
}

@media (min-width: 768px) {
  .site-header {
    margin-bottom: 32px;
  }

  .site-header .home-link {
    margin: 0 0 -12px;
  }

  .site-header .mobile-nav-control {
    display: none;
  }

  .site-header .header-body {
    align-items: flex-end;
    border-bottom: 1px solid #dfc9ce;
    padding: 16px 0 4px;
  }

  .site-header .site-nav {
    display: block;
  }
}

/* ==========================================================================
    Layouts
    ========================================================================== */

@media (min-width: 768px) {
  .layout-two-col {
    display: flex;
    gap: 32px;
  }

  .layout-two-col .col-a {
    flex: 4;
  }
  
  .layout-two-col .col-b {
    flex: 2;
  }
}

/* ==========================================================================
    Page Modules
    ========================================================================== */

.page-mod + .page-mod {
  border-top: 2px solid #dfc9ce;
}

.section-title {
  border-bottom: 2px solid #7f5959;
  color: #7f5959;
  font-size: 14px;
  margin: 0 0 16px;
  padding: 8px 0;
  text-transform: uppercase;
}

.section-description {
  font-size: 12px;
}

.hero {
  margin: 0 0 24px;
}

.hero img {
  display: block;
  margin: 0;
  width: 100%;
}

/* ==========================================================================
    Home Page
    ========================================================================== */

.section--about-blurb p {
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 16px;
}

/* ==========================================================================
    'Next Event' Module
    ========================================================================== */

.next-event .event-link {
  color: #555;
  text-decoration: none;
}

.next-event .event-details {
  align-content: flex-start;
  align-items: flex-start;
  display: flex;
  justify-content: flex-start;
  gap: 24px;
}

.next-event .event-date {
  border-bottom: 3px dotted rgba(200, 200, 200, 0.6);
  flex: 0 0 88px;
  font-weight: 300;
  line-height: 1.1;
  padding: 2px 0 8px;
}

.next-event .event-date span {
  display: block;
  text-align: center;
  text-transform: uppercase;
}

.next-event .event-date .month,
.next-event .event-date .day {
  font-size: 16px;
}

.next-event .event-date .date {
  font-size: 56px;
}

.next-event .readers-list {
  font-size: 24px;
  letter-spacing: -1px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.next-event .time-location {
  color: #586d58;
  font-size: 18px;
}

.next-event .more {
  font-size: 14px;
  margin-top: 8px;
}

@media (min-width: 768px) {
  .next-event .readers-location {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  .next-event .readers-location .time-location {
    flex: 0 0 188px;
  }
}

/* ==========================================================================
    'Next Event' Alt
    ========================================================================== */

.next-event--alt .event-link {
  color: #555;
  display: block;
  text-decoration: none;
}

.next-event--alt .event {
  padding-bottom: 24px;
}

.next-event--alt .event-meta .name {
  color: #bb6765;
  font-size: 16px;
}

.next-event--alt .event-meta .date,
.next-event--alt .event-meta .time {
  font-size: 24px;
}

.next-event--alt .event-meta .more {
  color: #d07775;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: 8px;
}

.next-event--alt .event-link:not(:is(:hover, :focus)) .event-meta .more {
  text-decoration-color: 
    color-mix(in srgb, currentColor, transparent 85%);
}

.next-event--alt .readers-list {
  font-size: 24px;
  letter-spacing: -1px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

@media (min-width: 768px) {
  .next-event--alt .event-details {
    display: flex;
    gap: 16px;
  }

  .next-event--alt .event-meta,
  .next-event--alt .readers {
    width: 100%;
  }

  .next-event--alt .readers-list {
    margin-top: 0;
  }
}

/* ==========================================================================
    Event Details Page
    ========================================================================== */

.page--event-details .event-location {
  padding: 16px 0;
}

.page--event-details .event .name {
  color: #bb6765;
  font-size: 24px;
  line-height: 1;
  margin: 0 0 4px;
}

.page--event-details .event .date,
.page--event-details .event .time {
  font-size: 40px;
  line-height: 1;
  margin: 0 0 4px;
}

.page--event-details .event .description {
  font-size: 20px;
  margin: 16px 0 0;
}

.page--event-details .location {
  margin-top: 24px;
}

.page--event-details .location .name {
  color: #586d58;
  font-size: 20px;
  line-height: 1;
}

.page--event-details .location .website {
  font-size: 12px;
  line-height: 1;
}

.page--event-details .location .address {
  font-size: 16px;
  margin-top: 8px;
}

.page--event-details .event .ticket-link,
.page--event-details .location .map-link {
  background: #586d58;
  border-radius: 40px;
  color: #fff;
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  margin-top: 16px;
  padding: 8px 16px;
  text-decoration: none;
  transition: 200ms background-color;
}

.page--event-details .event .ticket-link .icon {
  margin-left: 4px;
}

.page--event-details .event .ticket-link:focus-visible,
.page--event-details .location .map-link:focus-visible {
  outline: 2px solid #a2b6a2;
  outline-offset: 2px;
}

.page--event-details .event .ticket-link:hover,
.page--event-details .location .map-link:hover {
  background-color: #6e7f6e;
}

.page--event-details .event .ticket-link:active,
.page--event-details .location .map-link:active {
  background-color: #879b87;
}

.page--event-details .readers-list {
  margin-bottom: 24px;
}

.page--event-details .readers-list .photo {
  margin-bottom: 16px;
}

.page--event-details .readers-list .photo img {
  display: block;
  width: 100%;
}

.page--event-details .readers-list .reader:not(:last-child) {
  border-bottom: 1px solid #dfc9ce;
  margin-bottom: 32px;
  padding-bottom: 32px;
}

.page--event-details .readers-list .reader .name {
  color: #bb6765;
  font-size: 24px;
  margin: 0;
}

.page--event-details .readers-list .reader .website-link {
  font-size: 12px;
}

.page--event-details .readers-list .reader .bio {
  font-size: 14px;
  line-height: 1.4;
  margin: 16px 0 0;
}

.page--event-details .reading-list {
  display: grid;
  grid-gap: 16px;
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.page--event-details .reading-list .book {
  border-bottom: 2px solid transparent;
  transition: 200ms border-color;
}

.page--event-details .reading-list .book:hover {
  border-bottom: 2px solid #bb6765;
}

.page--event-details .reading-list .cover-img {
  display: block;
  margin: 0;
  width: 100%;
}


@media (min-width: 768px) {
  .page--event-details .location {
    margin-top: 0;
  }

  .page--event-details .readers-list .reader {
    display: flex;
    gap: 24px;
  }

  .page--event-details .readers-list .reader .photo {
    flex: 0 0 25%;
  }

  .page--event-details .reading-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
    Upcoming Event List
    ========================================================================== */

.upcoming-event-list .event-link {
  color: #555;
  display: block;
  text-decoration: none;
}

.upcoming-event-list .event {
  align-content: flex-start;
  align-items: flex-start;
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  padding: 0 0 16px;
}

.upcoming-event-list .event:not(:last-child) {
  border-bottom: 1px solid #d6d6d6;
  margin-bottom: 16px;
}

.upcoming-event-list .event-date {
  /* border-bottom: 3px dotted rgba(200, 200, 200, 0.6); */
  flex: 0 0 88px;
  font-weight: 300;
  line-height: 1.1;
  padding: 2px 0 8px;
}

.upcoming-event-list .event-date span {
  display: block;
  text-align: center;
  text-transform: uppercase;
}

.upcoming-event-list .event-date .month,
.upcoming-event-list .event-date .day {
  font-size: 14px;
}

.upcoming-event-list .event-date .date {
  font-size: 40px;
}

.upcoming-event-list .readers-list {
  font-size: 14px;
  letter-spacing: -1px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.upcoming-event-list .time-location {
  color: #586d58;
  font-size: 14px;
}

.upcoming-event-list .more {
  color: #d07775;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: 8px;
}

.upcoming-event-list .event-link:not(:is(:hover, :focus)) .more {
  text-decoration-color: 
    color-mix(in srgb, currentColor, transparent 85%);
}

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

.page--about .readers-list {
  margin-bottom: 24px;
}

.page--about .readers-list .photo {
  margin-bottom: 16px;
}

.page--about .readers-list .photo img {
  display: block;
  width: 100%;
}

.page--about .readers-list .reader:not(:last-child) {
  border-bottom: 1px solid #dfc9ce;
  margin-bottom: 32px;
  padding-bottom: 32px;
}

.page--about .readers-list .reader .name {
  color: #bb6765;
  font-size: 24px;
  margin: 0;
}

.page--about .readers-list .reader .website-link {
  font-size: 12px;
}

.page--about .readers-list .reader .bio {
  font-size: 14px;
  line-height: 1.4;
  margin: 16px 0 0;
}

@media (min-width: 768px) {
  .page--about .readers-list .reader {
    display: flex;
    gap: 24px;
  }

  .page--about .readers-list .reader .photo {
    flex: 0 0 25%;
  }
}

/* ==========================================================================
    Print styles.
    Inlined to avoid the additional HTTP request:
    https://www.phpied.com/delay-loading-your-print-css/
    ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
    * Don't show links that are fragment identifiers,
    * or use the `javascript:` pseudo protocol
    */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
