/* =========================================
   L. Sinisterra-Mejia — Author Portfolio
   Shared styling for all pages
   ========================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ink: #1E4A6E;
    --ink-soft: #2B5A7C;
    --paper: rgba(255, 255, 255, 0.85);
    --paper-strong: rgba(255, 255, 255, 0.95);
}

body {
    font-family: Forum, serif;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ink);
}

/* ---------- Image protection (deterrent against casual save/copy) ---------- */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    pointer-events: auto;
}

/* Watercolor ombre background — sky-blue → mint → buttery yellow */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(173, 216, 255, 0.85) 0%,
            rgba(176, 224, 230, 0.80) 20%,
            rgba(200, 240, 240, 0.75) 40%,
            rgba(220, 250, 220, 0.70) 60%,
            rgba(255, 250, 205, 0.75) 80%,
            rgba(255, 245, 200, 0.80) 100%),
        url('https://images.unsplash.com/photo-1512820790803-83ca734da794?w=1800&q=80');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* ---------- Social icons (top-center of dashboard) ---------- */
.social-icon {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid rgba(30, 74, 110, 0.18);
    box-shadow: 0 4px 14px rgba(30, 74, 110, 0.12);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    z-index: 5;
    animation: fadeInUp 0.9s ease 0.2s forwards;
    opacity: 0;
}

.social-icon:hover {
    transform: translateX(-50%) translateY(-3px) scale(1.06);
    background: #fff;
    border-color: rgba(30, 74, 110, 0.45);
    box-shadow: 0 8px 22px rgba(30, 74, 110, 0.20);
}

.social-icon svg { width: 28px; height: 28px; display: block; }

.social-youtube { color: #FF0000; }

@media (max-width: 768px) {
    .social-icon { top: 14px; width: 46px; height: 46px; }
    .social-icon svg { width: 24px; height: 24px; }
}

/* ---------- Shopping instructions banner ---------- */
.shop-note {
    font-family: Forum, serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    color: #1E4A6E;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    margin: 0 auto 40px;
    max-width: 760px;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.92);
    border: 2px solid #F5C84B;
    border-radius: 50px;
    position: relative;
    z-index: 1;
    animation: shopGlow 2.2s ease-in-out infinite alternate, fadeInUp 0.9s ease 0.35s forwards;
    opacity: 0;
}

@keyframes shopGlow {
    0% {
        box-shadow:
            0 0 8px  rgba(245, 200, 75, 0.55),
            0 0 18px rgba(245, 200, 75, 0.40),
            0 0 32px rgba(255, 235, 130, 0.25);
        border-color: #F5C84B;
    }
    100% {
        box-shadow:
            0 0 14px rgba(255, 215, 95, 0.95),
            0 0 32px rgba(255, 215, 95, 0.75),
            0 0 56px rgba(255, 240, 150, 0.55);
        border-color: #FFD75F;
    }
}

/* ---------- Hero (dashboard) ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 110px 20px 60px;
}

.author-name {
    font-family: Forum, serif;
    font-size: 6rem;
    font-weight: 400;
    color: var(--ink);
    text-align: center;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.6);
    letter-spacing: 3px;
}

.author-name .first-name {
    display: block;
    font-size: 5.5rem;
}

.tagline {
    font-size: 1.4rem;
    color: var(--ink-soft);
    text-align: center;
    margin-bottom: 50px;
    letter-spacing: 6px;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

/* ---------- Featured / New Releases strip ---------- */
.featured {
    width: 100%;
    max-width: 960px;
    margin-bottom: 55px;
    padding: 0 25px;
    text-align: center;
}

.featured-label {
    font-size: 0.95rem;
    color: var(--ink-soft);
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 22px;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.5);
    position: relative;
    display: inline-block;
    padding: 0 18px;
}

.featured-label::before,
.featured-label::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 36px;
    height: 1px;
    background: rgba(30, 74, 110, 0.35);
}
.featured-label::before { right: 100%; }
.featured-label::after  { left:  100%; }

.featured-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.featured-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    padding: 14px 10px 16px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.featured-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: contain;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.featured-title {
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
    letter-spacing: 0.3px;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    max-width: 750px;
    width: 100%;
    padding: 0 25px;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 35px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    font-family: Forum, serif;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 70px;
    text-align: center;
    border: 2px solid rgba(30, 74, 110, 0.2);
}

.link-button:hover {
    background: var(--paper-strong);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(30, 74, 110, 0.4);
}

.link-button:active { transform: translateY(-2px); }

/* ---------- Category gallery pages ---------- */
.page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 30px 90px;
}

.page-header {
    text-align: center;
    margin-bottom: 55px;
}

.page-title {
    font-family: Forum, serif;
    font-size: 4.5rem;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: 2px;
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 1.05rem;
    color: var(--ink-soft);
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.5);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 10px 22px;
    background: var(--paper);
    border: 2px solid rgba(30, 74, 110, 0.2);
    border-radius: 50px;
    margin-bottom: 30px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.back-link:hover {
    background: var(--paper-strong);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 35px 28px;
}

.book-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.55);
    padding: 18px 14px 22px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.book-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
}

.book-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    margin-bottom: 16px;
}

.book-title {
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.4px;
}

/* ---------- About page ---------- */
.about-card {
    max-width: 720px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 22px;
    padding: 50px 50px 55px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
}

.about-card p {
    font-size: 1.18rem;
    line-height: 1.75;
    color: var(--ink);
    margin-bottom: 18px;
}

.about-card p:last-child { margin-bottom: 0; }

/* ---------- Contact form ---------- */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 22px;
    padding: 45px 45px 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contact-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-label {
    font-size: 0.85rem;
    color: var(--ink-soft);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    font-family: Forum, serif;
    font-size: 1.05rem;
    color: var(--ink);
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(30, 74, 110, 0.22);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: rgba(30, 74, 110, 0.55);
    background: #fff;
    box-shadow: 0 4px 14px rgba(30, 74, 110, 0.12);
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}

.contact-submit {
    align-self: flex-start;
    font-family: Forum, serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #fff;
    background: var(--ink);
    border: none;
    border-radius: 50px;
    padding: 14px 38px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(30, 74, 110, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.contact-submit:hover {
    background: #173a58;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(30, 74, 110, 0.30);
}

.contact-submit:active { transform: translateY(0); }

.contact-recaptcha {
    margin-top: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .author-name { font-size: 4.5rem; letter-spacing: 2px; }
    .author-name .first-name { font-size: 4rem; }
    .tagline { font-size: 1.1rem; letter-spacing: 4px; margin-bottom: 35px; }
    .featured { margin-bottom: 40px; }
    .featured-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .featured-title { font-size: 0.8rem; }
    .featured-label { font-size: 0.85rem; letter-spacing: 4px; }
    .featured-label::before, .featured-label::after { width: 22px; }
    .button-grid { grid-template-columns: 1fr; gap: 18px; max-width: 420px; }
    .link-button { padding: 20px 30px; font-size: 1.05rem; min-height: 65px; }
    .page-title { font-size: 3.2rem; }
    .page-wrap { padding: 50px 20px 70px; }
    .book-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 26px 18px; }
    .about-card { padding: 35px 28px 40px; }
    .about-card p { font-size: 1.05rem; }
    .contact-form { padding: 30px 25px 35px; gap: 18px; }
}

@media (max-width: 480px) {
    .hero { padding: 50px 15px; }
    .author-name { font-size: 3.2rem; }
    .author-name .first-name { font-size: 3rem; }
    .tagline { font-size: 0.95rem; letter-spacing: 3px; margin-bottom: 35px; }
    .link-button { padding: 18px 25px; font-size: 0.95rem; letter-spacing: 2px; min-height: 60px; }
    .page-title { font-size: 2.6rem; }
    .book-title { font-size: 0.95rem; }
}

/* ---------- Fade-in animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(35px); }
    to   { opacity: 1; transform: translateY(0); }
}

.author-name { animation: fadeInUp 1s ease forwards; }
.tagline     { opacity: 0; animation: fadeInUp 0.9s ease 0.2s forwards; }
.featured-label { opacity: 0; animation: fadeInUp 0.9s ease 0.35s forwards; }
.featured-card  { opacity: 0; animation: fadeInUp 0.7s ease forwards; }
.featured-card:nth-child(1) { animation-delay: 0.45s; }
.featured-card:nth-child(2) { animation-delay: 0.55s; }
.featured-card:nth-child(3) { animation-delay: 0.65s; }
.featured-card:nth-child(4) { animation-delay: 0.75s; }
.link-button { opacity: 0; animation: fadeInUp 0.7s ease forwards; }
.page-title  { animation: fadeInUp 0.9s ease forwards; }
.page-subtitle { opacity: 0; animation: fadeInUp 0.9s ease 0.2s forwards; }
.book-card   { opacity: 0; animation: fadeInUp 0.6s ease forwards; }
.about-card  { opacity: 0; animation: fadeInUp 0.9s ease 0.2s forwards; }

.link-button:nth-child(1)  { animation-delay: 0.75s; }
.link-button:nth-child(2)  { animation-delay: 0.83s; }
.link-button:nth-child(3)  { animation-delay: 0.91s; }
.link-button:nth-child(4)  { animation-delay: 0.99s; }
.link-button:nth-child(5)  { animation-delay: 1.07s; }
.link-button:nth-child(6)  { animation-delay: 1.15s; }
.link-button:nth-child(7)  { animation-delay: 1.23s; }
.link-button:nth-child(8)  { animation-delay: 1.31s; }
.link-button:nth-child(9)  { animation-delay: 1.39s; }
.link-button:nth-child(10) { animation-delay: 1.47s; }

.book-card:nth-child(1)  { animation-delay: 0.10s; }
.book-card:nth-child(2)  { animation-delay: 0.17s; }
.book-card:nth-child(3)  { animation-delay: 0.24s; }
.book-card:nth-child(4)  { animation-delay: 0.31s; }
.book-card:nth-child(5)  { animation-delay: 0.38s; }
.book-card:nth-child(6)  { animation-delay: 0.45s; }
.book-card:nth-child(7)  { animation-delay: 0.52s; }
.book-card:nth-child(8)  { animation-delay: 0.59s; }
.book-card:nth-child(9)  { animation-delay: 0.66s; }
.book-card:nth-child(10) { animation-delay: 0.73s; }
.book-card:nth-child(11) { animation-delay: 0.80s; }
