@media not (prefers-reduced-motion: reduce) {
    html,
    body {
        scroll-behavior: smooth;
        scroll-padding-top: 10vh;
    }
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    background-color: #222;
    background-size: cover;
    background-attachment: fixed;
    background-image: linear-gradient(
        180deg,
        rgba(0, 0, 0, 1) 8%,
        rgba(33, 31, 31, 1) 43%
    );
}
body {
    max-width: 1920px;
    margin-inline: auto;
    box-shadow: 0 5px 20px 5px #2e2e3120;
}

body,
.paper {
    background-color: #fff7e7;
    background-repeat: repeat;
    background-size: 120px 120px;
}

* {
    box-sizing: border-box;
}

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

p {
    line-height: 1.5;
    font-family: "Paragraph Font";
}

h1 {
    font-family: "Title Font";
    font-size: clamp(1rem, 7vw, 5rem);
}

h2 {
    font-family: "Title Font";
    font-size: 2rem;
    margin: 1rem;
}
h2.tagline,
h3.tagline {
    font-family: "Paragraph Font";
}

.portrait {
    border: 2px inset #cca07c35;
    border-radius: 2px;
}

.button {
    background: lavender;
    color: #222;
    padding: 1rem;
    border-radius: 5px;
    border-shape: squircle;
    border: 1px solid #1111;
    user-select: none;
    font-family: "Paragraph Font";
}
button.button {
    padding: 0.5rem 0.7rem;
    font-size: 1rem;
}

@font-face {
    font-family: "Title Font";
    src: url("/assets/fonts/arizonia/Arizonia-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Paragraph Font";
    src: url("/assets/fonts/Sorts_Mill_Goudy/SortsMillGoudy-Italic.ttf")
        format("truetype");
}

.fade-between {
    --background: #463860;
    --angle: -1deg;
    --box-shadow:
        0 0 15px 20px var(--background), inset 0 0 1px 1px var(--background);
    color: #eef;
    background: transparent;
    position: relative;
    isolation: isolate;
    font-size: clamp(1rem, 5vw, 2.2rem);
    padding: 2.5em;
    margin-block: -100px;
    overflow: hidden;
    z-index: 2;
}
.fade-between::before {
    content: "";
    position: absolute;
    top: 50px;
    right: -10px;
    bottom: 50px;
    left: -10px;
    z-index: -1;
    background-color: var(--background);
    box-shadow: var(--box-shadow);
    transform: rotate(var(--angle));
}

.page-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
.reveal-wrapper::after,
.page-footer::after {
    content: "";
    z-index: -1;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    background-color: #e6e6faee;
    backdrop-filter: blur(10px);
    filter: blur(20px);
}

.reveal-wrapper {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    z-index: 10;
    height: calc(20vh + 3vw);
    margin-bottom: calc(-20vh - 3vw);
}
.reveal-wrapper::after {
    /* polygon creates the slanted cut */

    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - (100% * tan(15deg))),
        0 100%
    );
}
.top-background-mask {
    inset: 0;
    clip-path: circle(0% at 0% 50%);
    animation: reveal 5s ease-out forwards;
}

@keyframes reveal {
    to {
        clip-path: circle(150% at 50% 50%);
    }
}

nav[aria-label="Skip to"] {
    position: fixed;
    top: 10px;
    left: calc(-50vw - 200px);
    margin: 0;
    padding: 1lh 1em;
    background-color: #fff7e7;
    border-radius: 8px;
    border-shape: squircle;
    transition: 300ms ease-out;
    box-shadow: 0 5px 20px 5px #2e2e3120;
}
nav[aria-label="Skip to"]:focus-within {
    left: 10px;
}
nav[aria-label="Skip to"] ul {
    margin: 0;
    padding: 0 0 0 1em;
}
nav[aria-label="Skip to"] a {
    color: #222;
}

.page-header {
    z-index: 1000;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    align-items: center;
    font-family: "Paragraph Font";
    font-weight: 600;
    box-shadow: 0 5px 20px 5px #2e2e3120;
    border-bottom: 2px solid #22223324;
    transition: background 100ms ease;
    max-width: 1920px;
    margin-inline: auto;
    background-color: #eae8d5;
}
.page-header.transparent {
    background: transparent;
    border: none;
    box-shadow: none;
}
.main-navigation > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    line-height: 1.05;
    font-size: 1rem;
}
.main-navigation a {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 3lh;
    /* padding-inline: 1.5rem; */
    min-width: clamp(2rem, 18vw, 6rem);
    text-decoration: none;
    color: #110a1a;
}
.main-navigation a:hover {
    background-color: #2222;
    backdrop-filter: blur(10px);
}
.main-navigation li ul {
    display: none;
}
@media screen and (min-width: 500px) {
    .main-navigation li:has(ul) {
        position: relative;
    }
    .main-navigation > ul li:has(ul) > a::after {
        content: "▼";
        font-size: 10px;
        padding-left: 3px;
    }
    .main-navigation > ul li:has(ul):hover {
        background-color: #efefff;
    }
    .main-navigation li ul {
        list-style: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: max-content;
        margin: 0;
        padding: 0;
        border-radius: 8px;
        border-top-left-radius: 0;
        overflow: hidden;
        background-color: #efefff;
        box-shadow: 0 5px 15px 0px #2e2e3122;
    }
    .main-navigation li ul a {
        padding: 0.6rem clamp(0.5rem, 2vw, 2rem);
    }
    .main-navigation li:hover ul {
        display: block;
    }
}

.page-banner {
    background-size: cover;
}
@supports not (-webkit-overflow-scrolling: touch) {
    .page-header:not(.transparent) {
        background-color: #eae8d5e8;
        backdrop-filter: blur(20px) grayscale(0.2) brightness(1);
    }
    .page-banner {
        background-attachment: fixed;
        background-position: center;
    }
}
.page-banner {
    padding-block: calc(60px + 2lh) 2lh;
    overflow-x: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    background-image: url("/assets/images/banner_1920x1080.png");
    background-repeat: no-repeat;

    position: relative;
    isolation: isolate;

    min-height: 80vh;

    color: white;
    /* box-shadow: inset 0 5px 20px 5px #2e2e3170; */
    box-shadow:
        inset 0 20vh 80vh #111a,
        inset 0 -15vh 20vh #1118;
}
@media (min-width: 1940px) {
  .page-banner {
        background-size: 1920px;
        background-image: url("/assets/images/banner.jpg");
  }
}
/* For screens smaller than 1920px (e.g., laptops, smaller desktops) */
@media (max-width: 1700px) {
  .page-banner {
    background-image: url('/assets/images/banner_1600x900.png'); /* Resize image for smaller screens */
  }
}

/* For screens smaller than 1280px (e.g., tablets, small laptops) */
@media (max-width: 1280px) {
  .page-banner {
    background-image: url('/assets/images/banner_1280x720.png'); /* Resize further for medium screens */
  }
}

/* For screens smaller than 768px (e.g., mobile portrait) */
@media (max-width: 768px) {
  .page-banner {
    background-image: url('/assets/images/banner_768x1365.png'); /* Resize for mobile screens */
  }
}

/* For screens smaller than 480px (e.g., small mobile devices) */
@media (max-width: 480px) {
  .page-banner {
    background-image: url('/assets/images/banner_480x854.png'); /* Smaller size for very small screens */
  }
}
.page-banner.blur-backdrop::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    backdrop-filter: blur(15px) grayscale(0.27);
}
.page-banner-inner-wrapper {
    margin-inline: auto;
    margin-block: 10vh;
    /* padding-inline: min(2rem, 5vw); */
    /* transform: translateY(-33%); */
}
.page-banner-inner-wrapper:not(:has(.banner-person-wrapper)) {
    width: max(65vw, 1000px);
    max-width: 97vw;
}

.person-banner {
    min-height: 80vh;
}
.person-banner h1 {
    text-align: center;
    margin-top: 0;
}
.banner-person-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    max-width: min(720px, 95vw);
    display: flex;
    flex-wrap: wrap;
    background-color: #2224;
    border-radius: 3px;
    border: 1px outset #2222;
    backdrop-filter: blur(90px);
}
.banner-person-wrapper > div:first-child {
    flex: 2;
    min-width: 195px;
    /*
    * I'm not sure why there's a little gap here. It's not any sort of margin or padding.
    * which means it's some sort of content gap since there's also no border.
    * Best fix I could manage for the moment.
    */
    display: flex;
    justify-content: center;
}
.banner-person-wrapper > div:last-child {
    flex: 5;
    padding: 1rem;
    min-width: min(45ch, 95vw);
}
.banner-person-wrapper h2.tagline,
.banner-person-wrapper h3.tagline,
.banner-person-wrapper p {
    margin: 0 0 1em 0;
    padding: 0;
    text-shadow: 0 2px 10px #000000aa;
}
.banner-person-wrapper h2.tagline .banner-person-wrapper h3.tagline {
    font-size: 1.2rem;
}
@supports not (backdrop-filter: blur(10px)) {
    .banner-person-wrapper,
    .page-banner.blur-backdrop::after {
        backdrop-filter: none !important;
    }
    .banner-person-wrapper {
        background-color: rgb(34, 34, 34, 0.8); /* fallback */
    }
}
@supports (-webkit-backdrop-filter: none) {
    /* GNOME Web fallback */
    /* Seems like the actual issue is that it's JS interpreter feels like it's running on JS  */
    .fade-between::before {
        box-shadow: none;
    }

    .page-banner.blur-backdrop::after {
        backdrop-filter: none;
    }
}
.banner-heading {
    font-family: "Title Font";
    font-weight: 500;
    font-size: clamp(2rem, 8vw, 9rem);
    text-shadow: 0 4px 15px #000000;
}

.banner-heading > .subtitle {
    font-size: 0.7em;
    display: block;
    text-align: right;
}

.page-banner-inner-wrapper p.page-description {
    isolation: isolate;
    position: relative;
    color: #223;
    font-size: clamp(1.5rem, 1.2vw, 2rem);
    padding: 2rem;
    border-radius: 10px;
    overflow: hidden;
    text-shadow: 0 5px 5px 5px #222233aa;
}

section[aria-labelledby="people-heading"] {
    max-width: min(80vw, 1920px);
    margin-inline: auto;
}
#people-heading {
    text-align: center;
}
@media screen and (min-width: 340px) {
    .people-cards {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
        justify-content: center;
    }
}
.people-card header {
    font-family: "Paragraph Font";
    color: #444;
    margin-bottom: 0.6rem;
    line-height: 1.1;
}
.people-card h3 {
    margin: 0;
    line-height: 1.2;
    margin-bottom: 0.4rem;
    padding: 0;
    font-family: "Title Font";
    color: #222;
}
.people-card-inner-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.people-card {
    padding: 1rem;
    border-radius: 12px;
}
.people-card:hover {
    background-color: #8c91db22;
}
.people-card-inner-wrapper .people-card-short-description {
    margin: 0;
    margin-block-end: 0.8rem;
    padding: 0;
    color: #191919;
}
@media screen and (min-width: 1700px) {
    .people-cards {
        display: flex;
        flex-wrap: wrap;
    }
    .people-card {
        width: max(30%, 550px);
    }
    .people-card-inner-wrapper {
        display: grid;
        grid-template-columns: 200px 1fr;
    }
    .people-card .people-card-inner-wrapper > div:first-child {
        flex: 2;
    }
    .people-card .people-card-inner-wrapper > div:last-child {
        flex: 3;
        align-self: center;
    }
}
.price-learn-more-box {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
}
.price-learn-more-box div {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Paragraph Font";
}
.price-learn-more-box div:first-child p {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.price-learn-more-box div:nth-child(2) {
    border-left: 2px solid #22222208;
    padding-left: 0.5rem;
}
.people-card .learn-more-button {
    display: block;
}
p.people-card-disclaimers,
.discount-disclaimer {
    margin-block: 0.4rem 0;
    font-family: "Paragraph Font";
    font-size: 0.95rem;
    color: #333;
}

.page-footer .footer-inner-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 5vw;
    padding-block: 5vh;
    align-items: center;
    max-width: min(80vw, 1400px);
    margin-inline: auto;
}
.page-footer .footer-inner-wrapper div {
    flex: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.page-footer .footer-inner-wrapper div:first-child {
    flex: 1;
}
.page-footer .footer-logo-wrapper {
    max-width: 256px;
}
.page-footer .footer-inner-wrapper div:last-child {
    min-width: min(40ch, 70vw);
}
.page-footer .footer-nav ul {
    margin: 0;
    padding: 2em;
}
.page-footer .footer-nav ul li {
    font-family: "Paragraph Font";
    margin-inline: 1em;
    line-height: 1.5lh;
    float: left;
}

/* --- Subscription Box --- */
.subscription-box {
    margin: auto;
    max-width: max-content;
    border-radius: 7px;
    border: 1px solid #222;
    background-color: #fff;
    color: #222;
    padding: 1rem;
    font-family: sans-serif;
}
.subscription-box p {
    font-family: sans-serif;
    font-size: 0.4;
    text-shadow: none;
    margin: 0;
    padding: 0 1rem;
    color: #3a3a3a;
}

.edition-heading {
    margin: 0 0 1rem 0;
}

.edition-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
}
.edition-container > div:first-child {
    padding: 1rem;
    min-width: 60%;
}

.edition-type,
.edition-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.edition-type {
    padding-bottom: 1rem;
}

.edition-option {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    cursor: pointer;
}

.edition-option input {
    margin-right: 0.4rem;
}
.subscription-box label:has(input:checked) {
    font-weight: 600;
}

.edition-price {
    text-align: center;
    font-size: 1.25rem;
}

.price-old {
    color: #999;
    margin-right: 6px;
}

.price-new {
    font-weight: bold;
}

#paypal-button-container {
    margin-top: 1.2rem;
}

.subscribe-title {
    font-size: max(0.4em, 1.4rem);
}

/* --- Banner Button Group --- */
.banner-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1lh;
}

.page-title {
    padding-block: calc(10vh - 2vw);
    margin: 0;
    padding-left: 10%;
}

.subscription-section {
    max-width: min(95vw, 1200px);
}
.subscription-section > div:first-child {
    flex: 2;
}
.subscription-section > div:last-child {
    flex: 4;
}

.detailed-intro {
    --box-shadow: none;
    --angle: 0.2deg;
    --background: #efe8cc;
    color: #222;
    font-size: 1.4rem;
    margin-block: 0px;
    overflow: visible;
    max-width: 1000px;
}



/* --- Loading screen styling --- */
#loader {
  position: fixed;
  inset: 0;
  background: #000000aa;
  backdrop-filter: blur(5px);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
  z-index: 9999;

  animation: fadeOut 0.5s ease 0.5s forwards;
}

/* Simple spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ddd;
  border-top-color: #444;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeOut {
  to { opacity: 0; visibility: hidden; }
}

/* Page content (hidden under loader) */
#content {
  padding: 40px;
  font-family: "MyCustomFont", sans-serif; /* Example */
}
