/*
Theme Name: Steven Rossen Author Theme
Theme URI: https://stevenrossen.com
Author: Steven Rossen
Author URI: https://stevenrossen.com
Description: A bespoke, parchment-toned literary theme featuring historical context grids, a secure password-protected synopsis area, and custom typography for author Steven Rossen.
Version: 1.0.0
Text Domain: steven-rossen
Requires at least: 5.8
Tested up to: 6.5
Screenshot: /screenshot.png
*/

:root {
    --bg-parchment: #F4EEDD;
    --bg-parchment-light: #FAF6ED;
    --bg-parchment-dark: #E6DCBF;
    --text-ink: #2C221E;
    --text-muted: #5A4A42;
    --accent-wine: #6B2D3C;
    --accent-wine-hover: #53212D;
    --accent-gold: #9E7B38;
    --accent-gold-light: #D4AF37;
    --border-antique: #C5B38C;
    --card-bg: #F9F4EC;
}

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

body {
    background-color: var(--bg-parchment);
    color: var(--text-ink);
    font-family: 'EB Garamond', Garamond, Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.7;
    background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.3) 0%, rgba(0,0,0,0.05) 100%);
    min-height: 100vh;
}

h1, h2, h3, h4, .brand-title, .nav-links a, .btn {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Header & Navigation */
header {
    background-color: var(--bg-parchment-light);
    border-bottom: 2px solid var(--border-antique);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(44, 34, 30, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-ink);
    text-decoration: none;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-name span {
    color: var(--accent-wine);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-ink);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-wine);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -3px;
    left: 0;
    background-color: var(--accent-wine);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.synopsis-lock-btn {
    background: none;
    border: 1px solid var(--accent-gold);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    color: var(--accent-wine);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
}

.synopsis-lock-btn:hover {
    background: var(--accent-gold);
    color: #fff;
}

/* Main Content Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

section.active-section {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero / Home Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 3.5rem;
    align-items: center;
    padding: 2rem 0 4rem 0;
    border-bottom: 1px solid var(--border-antique);
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 700;
    color: var(--accent-wine);
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.hero-content .byline {
    font-size: 1.3rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-style: italic;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent-wine);
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: 3px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: background-color 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-wine-hover);
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--accent-wine);
    color: var(--accent-wine);
}

.btn-outline:hover {
    background-color: var(--accent-wine);
    color: #fff;
}

.hero-image-container {
    width: 100%;
    height: 100%;
    min-height: 340px;
    border: 4px solid var(--border-antique);
    box-shadow: 8px 8px 0px rgba(158, 123, 56, 0.2);
    overflow: hidden;
    background-color: var(--bg-parchment-dark);
    position: relative;
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: sepia(15%) contrast(105%);
}

.image-caption {
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Section Titles */
.section-heading {
    font-size: 2.75rem;
    color: var(--accent-wine);
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 2px;
    background-color: var(--accent-gold);
}

/* The Book Section */
.book-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
}

.book-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.book-text p:first-of-type::first-letter {
    font-size: 3.5rem;
    float: left;
    line-height: 0.8;
    padding-right: 0.75rem;
    padding-top: 0.15rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: var(--accent-wine);
    font-weight: 700;
}

.book-sidebar-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-antique);
    padding: 2rem;
    box-shadow: 4px 4px 15px rgba(44, 34, 30, 0.05);
    position: sticky;
    top: 6rem;
}

.book-sidebar-box h3 {
    font-size: 1.5rem;
    color: var(--accent-wine);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-antique);
    padding-bottom: 0.5rem;
}

.sidebar-group {
    margin-bottom: 1.5rem;
}

.sidebar-group:last-child {
    margin-bottom: 0;
}

.sidebar-group h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-ink);
    margin-bottom: 0.4rem;
}

.sidebar-group p, .sidebar-group ul {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.sidebar-group ul {
    list-style-type: none;
    padding-left: 0;
}

.sidebar-group li {
    margin-bottom: 0.3rem;
    position: relative;
    padding-left: 1.2rem;
}

.sidebar-group li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
}

/* About Section */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-bio p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.credentials-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.credential-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-ink);
    background: var(--bg-parchment-light);
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--accent-gold);
    border-top: 1px solid var(--border-antique);
    border-right: 1px solid var(--border-antique);
    border-bottom: 1px solid var(--border-antique);
}

.about-photo-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-antique);
    padding: 1.25rem;
    box-shadow: 4px 4px 15px rgba(44, 34, 30, 0.05);
    margin-top: 2rem;
}

.about-photo-container {
    width: 100%;
    height: 300px;
    border: 2px solid var(--border-antique);
    overflow: hidden;
    background-color: var(--bg-parchment-dark);
    position: relative;
}

.about-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: sepia(10%) contrast(105%);
}

.about-quote-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-antique);
    padding: 2.5rem;
    box-shadow: 4px 4px 15px rgba(44, 34, 30, 0.05);
    font-style: italic;
}

.about-quote-box h3 {
    font-size: 1.6rem;
    color: var(--accent-wine);
    margin-bottom: 1.25rem;
    font-style: normal;
    border-bottom: 1px solid var(--border-antique);
    padding-bottom: 0.5rem;
}

.about-quote-box p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

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

/* Historical Background Section */
.history-intro {
    margin-bottom: 2.5rem;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.history-category {
    margin-bottom: 2.5rem;
}

.history-category h3 {
    font-size: 1.8rem;
    color: var(--accent-wine);
    margin-bottom: 1.2rem;
    border-bottom: 1px dashed var(--border-antique);
    padding-bottom: 0.3rem;
}

.history-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.history-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-antique);
    padding: 1.25rem 1.5rem;
    border-radius: 2px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: block;
}

.history-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(107, 45, 60, 0.1);
    border-color: var(--accent-gold);
}

.history-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-wine);
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-card-title::after {
    content: '↗';
    font-size: 1rem;
    color: var(--accent-gold);
}

.history-card-source {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

.history-card-desc {
    font-size: 1rem;
    color: var(--text-ink);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Contact Section */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.contact-form {
    background-color: var(--card-bg);
    border: 1px solid var(--border-antique);
    padding: 2.5rem;
    box-shadow: 4px 4px 15px rgba(44, 34, 30, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-ink);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background-color: var(--bg-parchment-light);
    border: 1px solid var(--border-antique);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: var(--text-ink);
    border-radius: 2px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-wine);
    box-shadow: 0 0 5px rgba(107, 45, 60, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 130px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.35rem;
    accent-color: var(--accent-wine);
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
}

.checkbox-group label {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 400;
    cursor: pointer;
    margin-bottom: 0;
    line-height: 1.5;
}

.form-success-message {
    display: none;
    background-color: #E8F2E8;
    border: 1px solid #7FA87F;
    color: #2D522D;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

.form-error-message {
    background-color: #F5E4E7;
    border: 1px solid #C77E8B;
    color: #A63A50;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

/* Modal / Password Overlay for Synopsis */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 34, 30, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-parchment-light);
    border: 3px solid var(--accent-gold);
    padding: 3rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-card h3 {
    font-size: 2rem;
    color: var(--accent-wine);
    margin-bottom: 0.75rem;
}

.modal-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.error-shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* Synopsis Page Content Styling */
.synopsis-content-box {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border: 1px solid var(--border-antique);
    padding: 3rem;
    box-shadow: 4px 4px 20px rgba(44,34,30,0.08);
}

.synopsis-header {
    text-align: center;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border-antique);
    padding-bottom: 1.5rem;
}

.synopsis-header h2 {
    font-size: 3rem;
    color: var(--accent-wine);
    margin-bottom: 0.5rem;
}

.synopsis-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-style: italic;
}

.synopsis-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Footer */
footer {
    background-color: var(--bg-parchment-light);
    border-top: 2px solid var(--border-antique);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--accent-wine);
}

.copyright {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Responsive Design */
@media(max-width: 900px) {
    .hero-section, .book-layout, .about-layout, .contact-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-links {
        gap: 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}