:root {
    --font-family: 'Imprint MT Shadow', 'Roboto', 'Algerian', sans-serif;
    --heading-font: 'Imprint MT Shadow', serif;
    --body-font: 'Roboto', sans-serif;
    --primary-color: #685B34;
    --accent-color: #f0ca7a;
    --surface-bg: #eceae5;
    --surface-border: #d2cfc6;
    --surface-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    --radius-lg: 12px;
}


nav {
    background-color: var(--primary-color);
    padding: 10px;
    position: relative;
    /* this is the anchor for logo */
}

.main-nav {
    border-bottom: .5em solid black;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-family);
    font-size: 2rem;
    font-weight: 500;
}


nav ul {
    list-style: none;
    text-decoration: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

li a:hover {
    text-shadow: 0 0 0.5rem black;
    /* background-color: black;
    color: whitesmoke; */

}

.nav-toggle {
    display: none;
    margin: 0;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 2px solid var(--accent-color);
}

.nav-toggle .bar {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: var(--accent-color);
}

.nav-toggle .bar+.bar {
    margin-top: 0.3rem;
}

header {
    text-align: center;
    border-bottom: var(--accent-color) solid 0.5rem;
    font-family: var(--font-family);
    width: 100%;
}



.logo {
    position: absolute;
    top: -10%;
    left: 10px;
    transform: translateY(-50%);
    width: 100px;
    height: auto;
}

.andrew {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-inline: auto;
    padding-top: 1rem;
}



/* ---making the book button look like a book cover, and making the book open and close when clicked--- */
.book-button {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 1rem auto;
    cursor: pointer;
    perspective: 1200px;
}

.book-frame {
    position: relative;
    display: inline-block;
    width: clamp(260px, 30vw, 420px);
    overflow: hidden;
    transform-style: preserve-3d;
    transform-origin: left center;
    transition: filter 900ms ease;
    will-change: transform;
}

.book-inside,
.book-cover {
    display: block;
    max-width: none;
    width: 100%;
    height: auto;
}

.book-inside {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.book-cover {
    position: relative;
    z-index: 2;
    transform-origin: left center;
    backface-visibility: hidden;
    transform: rotateY(0deg);
    transition: transform 1400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.book-button.is-open .book-cover {
    transform: rotateY(-132deg);
}

.book-button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}


.call-to-action {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--primary-color);
    font-family: var(--font-family);
}

button {
    display: block;
    margin: 1rem auto;
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: whitesmoke;
    background-color: var(--primary-color);
    border: 2px solid #111;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

/* ---title and hero section --- */
.hero {
    position: relative;
    width: 100%;
    margin: 0;
    min-height: 8rem;
    background-image: url("../images/wall.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
/* ---(above)changed the background img to responsive css background
which prevents distortion and passes lighthouse best practices--- */

.wall {
    display: none;
}

.hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    color: var(--accent-color);
    z-index: 1;
}

.construction {
    text-align: center;
    font-style: italic;
    font-size: 2rem;
    font-weight: 600;
    border: black solid 0.5rem;
}


h1 {
    font-size: 3rem;
    text-shadow: black 0 0 2rem;
    font-family: var(--font-family);
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

h3 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--primary-color);
}

p {
    font-family: var(--body-font);
}

h2,
h3,
.preorder-fieldset legend,
.featured-quote blockquote {
    font-family: var(--heading-font);
}

.preorder-fieldset label,
.preorder-fieldset input,
.preorder-fieldset textarea {
    font-family: var(--body-font);
}

.content-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.25rem;
}

.card {
    background: #f8f4ea;
    border: 2px solid #c8b98f;
    border-radius: 10px;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    height: auto;
    box-sizing: border-box;
}

.card> :first-child {
    margin-top: 0;
}

.card-cover {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-cover .book-button {
    margin: 0;
}

.card p {
    margin: 0;
    line-height: 1.55;
}


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

.about-content {
    display: block;
    padding: 2rem;
}

.chronology-main {
    padding: 1.25rem 1rem 2rem;
}

.chronology-title {
    margin: 0.4rem auto 0.9rem;
    max-width: 32ch;
    text-align: center;
}

.chronology-table-wrap {
    max-width: 1040px;
    margin: 0 auto;
    max-height: 30rem;
    overflow-y: auto;
    background: #f8f4ea;
    border: 1px solid #d0c4a8;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.chronology-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.chronology-table .col-date {
    width: 12.5rem;
}

.chronology-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--primary-color);
    color: #fff7e4;
    font-family: var(--heading-font);
    font-size: 1.2rem;
    text-align: left;
}

.chronology-table th,
.chronology-table td {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid rgba(104, 91, 52, 0.25);
    vertical-align: top;
    line-height: 1.5;
}

.chronology-table .date-col {
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

/* ---order page and support page styles--- */

.order-main {
    padding: 1.25rem 1rem 2rem;
}

.order-title {
    margin: 0.3rem auto 0.6rem;
    text-align: center;
    max-width: 28ch;
}

.order-intro {
    margin: 0 auto 1.2rem;
    max-width: 60ch;
    text-align: center;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.5;
}

.subtitle {
    text-align: center;
    margin: 0 0 1rem;
}

.subtitle h4 {
    margin: 0;
    font-size: 1.35rem;
}

.order-layout {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: start;
}

.order-panel {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--surface-shadow);
    padding: 1rem;
}

.preorder-form {
    width: 100%;
}

#preorder-message {
    margin: 0.5rem 0 0;
    min-height: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* --orders Admin Tools page styles --- */
.order-tools {
    margin-top: 0.9rem;
    padding: 0.75rem;
    border: 1px dashed black;
    border-radius: 8px;
    background: #faf7ef;
}

.order-tools-note {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    line-height: 1.4;
}

.order-tool-btn {
    display: inline-block;
    margin: 0.25rem 0.4rem 0.25rem 0;
    font-size: 1rem;
    padding: 0.5rem 0.85rem;
}

.order-panel {
    background: var(--primary-color);
    border: .5em solid black;
}

/* -----end Admin Tools page styles---- */




.preorder-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.preorder-fieldset legend {
    font-size: clamp(1.5rem, 2.6vw, 2.15rem);
    margin-bottom: 0.75rem;
    color: var(--surface-bg);
}

.preorder-fieldset label {
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--surface-bg);
    margin-top: 0.4rem;
}

.preorder-fieldset input,
.preorder-fieldset textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #9f9a95;
    border-radius: 8px;
    padding: 0.7rem;
    font-size: 1.5rem;
    background: #f7f6f3;
}

.preorder-fieldset textarea {
    resize: vertical;
    min-height: 6.8rem;
}

.preorder-fieldset input:focus-visible,
.preorder-fieldset textarea:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 1px;
}

.order-submit {
    margin-top: 1rem;
    width: 100%;
    font-size: 1.95rem;
    border-radius: 8px;
}

.thankyou-main {
    text-align: center;
}

.order-aside {
    background: #f8f4ea;
    border: 1px solid #d0c4a8;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    padding: 0.85rem;
}

.order-aside img {
    display: block;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.order-aside h3 {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
}

.order-aside p {
    margin: 0;
    line-height: 1.5;
}

.featured-quote {
    margin: 0.95rem 0 0;
    border-left: 4px solid var(--primary-color);
    background: #f1ebdc;
    border-radius: 8px;
    padding: 0.7rem 0.75rem;
    animation: quoteFadeUp 520ms ease-out both;
    animation-delay: 130ms;
}

.featured-quote blockquote {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.35;
    color: #3f3457;
}

.featured-quote figcaption {
    margin-top: 0.35rem;
    font-size: 0.98rem;
    color: #4f4736;
    font-style: italic;
}

@keyframes quoteFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-main {
    padding: 1.2rem 1rem 2rem;
}

.support-title {
    margin: 0.5rem auto 0.75rem;
    max-width: 60ch;
}

.support-description {
    max-width: 70ch;
    margin: 0 auto 1.35rem;
    text-align: center;
    line-height: 1.5;
    padding: 0 0.75rem;
}

.levels {
    background: black;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--surface-shadow);
    max-width: 860px;
    margin: 0 auto;
    padding: 1.1rem;
    display: grid;
    gap: 0.9rem;
}

.support {
    background-color: var(--primary-color);
    border-radius: 12px;
    padding: 1.2rem 1rem 1rem;
    text-align: center;
    opacity: 0;
    transform: translateY(14px);
    animation: supportFadeIn 560ms ease-out forwards;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.support:nth-child(1) {
    animation-delay: 80ms;
}

.support:nth-child(2) {
    animation-delay: 180ms;
}

.support:nth-child(3) {
    animation-delay: 280ms;
}

.support:nth-child(4) {
    animation-delay: 380ms;
}

.support:hover,
.support:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.27);
}

.support h3 {
    margin: 0;
    color: #fff7e4;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    line-height: 1.2;
}

.open-btn {
    margin-top: 0.8rem;
    border-radius: 6px;
    padding: 0.45rem 1rem;
    font-size: 1.2rem;
}

.open-btn:hover,
.open-btn:focus-visible {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.support-main dialog a {
    color: var(--primary-color);
}

@keyframes supportFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .support {
        animation: none;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .featured-quote {
        animation: none;
    }
}

footer {
    background-color: var(--primary-color);
    border-top: 0.5em solid black;
    padding: 1rem 10px;
    text-align: center;
    color: whitesmoke;
}

.social {
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: 15px;
}

.social a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border: 2px solid whitesmoke;
    border-radius: 8px;
}

.social img {
    width: 30px;
    height: 30px;
}

.social a:hover {
    background-color: #3f3720;
}