:root {
    /* colors */
    --dark-green: #214231; /* Azazie - Dark Green */
    --hunter-green: #50654D;
    --mid-green: #7A8969;
    --text-green: #505A45; /* mystery green from figma */
    --parchment: #EFECE5;
    --parchment-fade: #EFECE530; /* add opacity */
    --bone: #DFDBCE;
    --honeysuckle: #D1B975;
    --gold: #BB9940;

    color: var(--text-green);
    background-color: var(--parchment);

    /* sizes */
    --golden-ratio: 1.618;
    --base-font-size: 1.5rem; /* use relative units to be accessible to browser defaults */
    font-size: var(--base-font-size);
    --h1-font-size: calc( var(--base-font-size) * 2 );
    --h2-font-size: calc( var(--base-font-size) * 1.5 );
    --h3-font-size: calc( var(--base-font-size) * 1.15 );
    --names-font-size: calc( var(--h1-font-size) * var(--golden-ratio) );

    --safe-content-width: 75vw;
    --menu-pad: 1em;
}

/* mobile and ultra-wides want the button easier to hit */
@media (max-width: 991px), (min-width: 3000px) {
    :root {
        --menu-pad: 1.25em;
    }
}

/* use more horizontal space on mobile */
@media (max-width: 991px) {
    :root {
        --safe-content-width: 80vw;
    }

    .info {
        font-size: 150%;
    }

    .info .slider {
        width: 95vw;
        max-width: 95vw;
    }
}

@font-face {
    font-family: Cinzel;
    src: url(fonts/cinzel/CinzelDecorative-Regular.ttf);
}

@font-face {
    font-family: Geographica;
    src: url(fonts/geographica/geographica_w01_regular.woff);
}

html {
    scroll-behavior: smooth;
    overscroll-behavior: none;

    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

::selection {
    background: var(--honeysuckle);
}

a::selection, a *::selection {
    background: var(--dark-green);
}

/* chrome only */
:is(::target-text) {
    background: var(--honeysuckle);
}

body {
    border: 0;
    margin: 0;
}

noscript {
    margin: 1rem auto;
    max-width: 80vw;
}

.wrapper {
    display:flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;

    position:relative;
    box-sizing: border-box;
    font-family: Geographica;
}

.topnav {
    overflow: hidden;
    position: relative; /* sticky */
    z-index: 100;
    top: 0;
    background-color: var(--hunter-green);
    min-height: 2em;
    width: 100%;
}

.topnav #toc {
    transition: max-height 0.5s ease-out;
    max-height: 0;
    display: block;
}

.topnav #toc a {
    color: var(--parchment);
    text-decoration: none;
    display: block;
    padding: 1em;
    display: block;
    transition: all 0.5s ease-in;
}

.topnav .icon {
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    padding: 0.5em var(--menu-pad);
}

.topnav a:hover {
    background-color: var(--mid-green);
}

nav#toc span {
    padding: .5em;
}

nav#toc > div {
    height: 1.5em;
    transition-delay: 0.4s; /* wait when closing */
    transition-property: height;
}

#nav-toggle:checked ~ nav#toc > div {
    transition-delay: 0s; /* instant when opening */
    height: 0;
}

.visuallyHidden {
    position: absolute;
    overflow: hidden;
    clip-path: rect(0 0 0 0);
    height: 1px;
    width: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
}

.hamburger {
    margin: 0 auto;
    width: 1em;
    height: 1em;
    position: relative;
}

.hamburger .bar {
    padding: 0;
    width: 1em;
    height: .4ex;
    background-color: var(--parchment);
    display: block;
    border-radius: 18%;
    transition: all 0.4s ease-in-out;
    position: absolute;
}

.bar1 {
    top: 0;
}

.bar2, .bar3 {
    top: calc(50% - .4ex / 2); /* centered: half way minus half of height */
}

.bar3 {
    right: 0;
}

.bar4 {
    bottom: 0;
}

.hamburger .bar1 {
    transform-origin: 5%;
}

.hamburger .bar4 {
    transform-origin: 5%;
}

#nav-toggle:checked + label > .hamburger > .bar1 {
    transform: rotate(45deg);
    height: .4ex;
    width: 1.3em;
}

#nav-toggle:checked + label > .hamburger > .bar3 {
    transform: rotate(45deg);
    height: .4ex;
    background-color: transparent;
}

#nav-toggle:checked + label > .hamburger > .bar2 {
    transform: rotate(-45deg);
    height: .4ex;
    background-color: transparent;
}

#nav-toggle:checked + label > .hamburger > .bar4 {
    transform: rotate(-45deg);
    height: .4ex;
    width: 1.3em;
}

#nav-toggle:checked ~ nav#toc {
    max-height: 200vh;
    /*
    max-height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    */
}

/* trick to offset anchors when jumping, this is the height of the
 * info padding + the height of the sticky nav bar
 * not even working
:target::before {
    content: '';
    display: block;
    height: 2rem;
    margin-top: -2rem;
}
*/

header {
    padding-top: 1em;
    background-color: var(--dark-green);
    color: var(--parchment);
    border-bottom: 0.25em solid var(--gold);
    padding-bottom: 1em;
}

header * {
    margin: auto 0.25em;
}

header h1.names {
    font-size: var(--names-font-size);
    font-family: Cinzel;
}

h1 {
    user-select: none;
    -webkit-user-select: none;
    font-size: var(--h1-font-size);
    font-weight: normal;
    letter-spacing: 0.1ch; /* TODO: match 6% in figma somehow? */
    line-height: 1.2em;
}

h2 {
    font-size: var(--h2-font-size);
    font-weight: normal;
}

h3 {
    font-size: var(--h3-font-size);
    font-weight: normal;
}

h2.and {
    font-style: italic;
}

h2.break-line, h2.date {
    color: var(--gold);
}

.break-line {
  display: flex;
  align-items: center;
  text-align: center;
  margin: auto;
  width: 3.5em;
}

.break-line::before,
.break-line::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--gold);
}

.break-line:not(:empty)::before {
  margin-right: .25em;
}

.break-line:not(:empty)::after {
  margin-left: .25em;
}

.content {
    width: 100%;
    height: fit-content;
}

.info {
    padding: 2rem 0;
}

header > *, .info > * {
    margin: 0 auto;
    max-width: var(--safe-content-width);
}

.info:nth-child(even) {
    background: var(--mid-green);
    color: var(--parchment);
}

.gallery {
    position: relative;
    margin: 1rem auto;
}

.gallery img {
    height: auto;
    max-width: var(--safe-content-width);
}

.gallery .numbertext {
    position: absolute;
    top: 0;
}

#schedule .details {
    margin-top: 1em;
}

#schedule .details p {
    margin: 0;
}

.faq {
    text-align: left;
}

.question {
    cursor: pointer;
    font-style: italic;

    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;

    display: block; /* needed for intent to work */
    --arrow-width: 1em;
    --arrow-margin: 1em;
    text-indent: calc(var(--arrow-width) + var(--arrow-margin)) hanging;
}

.question::before {
    color: var(--honeysuckle);
    content: '\276f ';
    width: var(--arrow-width);
    margin-right: var(--arrow-margin);
    transition: 0.3s;
    display: inline-block;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

.faq-content {
    display: block;
    transition: all 0.5s ease-in-out;
    height: auto;
    width: auto;
    max-height: 0;
    padding-left: 2em;
    overflow: hidden;
}

.faq-content > * {
    margin: 0;
}

.faq-button:checked + .question::before {
    transform: rotate(90deg);
}

.faq-button:checked ~ .faq-content {
    max-height: 500vh; /* this is a hack */
}

.faq-content iframe {
    height: min(var(--safe-content-width), 75vh);
    width: min(var(--safe-content-width), 100%);
}

ul, ol {
    margin: 0 0;
    display: inline-block;
    text-align: left;

    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

li p {
    width: max-content;
    margin: 0 0;
}

.scroll-top {
    position: absolute;
    top: 200vh; /* show the button after 2 screens */
    bottom: 4rem; /* height of the footer */
    right: 5vw; /* 5% of screen */
}

#scrollToTopBtn {
    background-color: var(--parchment-fade);
    border-radius: 50%;
    border: none;
    text-decoration: none;

    position: sticky;
    top: 85vh;
    /* keep it at the top of everything else */
    z-index: 100;
    display: inline-block;
    --ratio: 1.75em;
    width: var(--ratio);
    height: var(--ratio);
    line-height: var(--ratio);
    transform: rotate(90deg);
}

/* slideshows */
.slider {
    width: 100%;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.slides {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex-direction: row;
    scrollbar-width: none;
    align-items: flex-start;
}

.slides > div {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 100%;
    height: auto;
    transform-origin: center center;
    transform: scale(1);
    transition: transform 0.5s;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.slide p {
    width: 80%;
    margin: auto;
}

.slide h2 {
    margin: 0.5rem auto;
    max-width: 85%;
}

.slide a {
    margin-bottom: 1rem;
    line-height: 1.2em;
}

.slides::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.slides::-webkit-scrollbar-thumb {
    background: black;
    border-radius: 10px;
}
.slides::-webkit-scrollbar-track {
    background: transparent;
}

a, a:link, a:hover, a:active {
  color: var(--honeysuckle);
  text-decoration: underline;
  font-weight: inherit;
  font-style: italic;
}

.arrow {
    user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
    color: var(--honeysuckle);
}

.prev, .next {
    position: absolute;
    top: 50%; /* TODO: does this need to be calculated? */
    height: 2em;
    width: 2em;
    line-height: 2em;
    text-align: center;
    z-index: 10;
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

.info.card {
    background-color: var(--dark-green);
    color: var(--parchment);

    box-shadow:
        0 0 0 1rem var(--dark-green) inset,
        0 0 0 1.25rem var(--gold) inset;
}

.button-container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;

    padding: 1rem 0;
    column-gap: 0.5rem;
}

.button {
    display: flex;
    align-items: center;
    color: var(--dark-green);
    background-color: var(--gold);
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
}

.button:hover {
    background-color: var(--honeysuckle);
}

.note {
    font-size: small;
}

blockquote {
    border-left: 0.5rem solid var(--parchment-fade);
    padding-left: 0.5rem;
    font-style: italic;
}

blockquote p {
    margin: 0.5rem auto;
}

footer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    font-size: small;
    margin: 1rem auto;
}
