/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: #1a1a1a;
    background-color: #a8c9a5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #5a7a58;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #1a1a1a;
    text-decoration: none;
    border-bottom: 1px solid #1a1a1a33;
    transition: border-color 0.2s;
    font-weight: 500;
}

a:hover {
    border-bottom-color: #1a1a1a;
}

/* Header */
header {
    background: #1a1a1a;
    color: #a8c9a5;
    padding: 4rem 0 3rem;
    margin-bottom: 3rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.header-text {
    text-align: left;
}

.header-cover {
    flex-shrink: 0;
}

.header-cover img {
    width: 160px;
    height: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-radius: 2px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #1a1a1a;
    background-color: #a8c9a5;
    display: inline-block;
    padding: 0.2rem 0.8rem;
}

.subtitle {
    font-size: 1.2rem;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    margin-bottom: 1.5rem;
    color: #a8c9a5;
    font-style: italic;
}

.author {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: #a8c9a5;
}

.publisher {
    font-size: 1rem;
    color: #7aa878;
}

.publisher a {
    color: #a8c9a5;
    border-bottom-color: rgba(168, 201, 165, 0.3);
}

.publisher a:hover {
    border-bottom-color: #a8c9a5;
}

/* Sections */
section {
    margin-bottom: 4rem;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.book-intro {
    margin-bottom: 3rem;
}

/* Key Arguments Grid */
.arguments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.argument {
    background: #1a1a1a;
    padding: 1.5rem;
    border-left: 3px solid #a8c9a5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: #a8c9a5;
}

.argument h3 {
    color: #a8c9a5;
    margin-bottom: 0.8rem;
}

/* Casual Power Section */
.casual-power {
    background: #8fb98d;
    padding: 2rem;
    margin: 3rem -2rem;
    border-left: 4px solid #1a1a1a;
}

blockquote {
    font-style: italic;
    margin: 2rem 0;
    padding-left: 2rem;
    border-left: 3px solid #1a1a1a;
    color: #2a2a2a;
}

blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-style: normal;
    color: #3a3a3a;
}

/* Endorsements */
#endorsements {
    background: #1a1a1a;
    padding: 2rem;
    border-top: 2px solid #a8c9a5;
    border-bottom: 2px solid #a8c9a5;
    color: #a8c9a5;
}

#endorsements h2 {
    color: #a8c9a5;
    border-bottom-color: #4a6a48;
}

.endorsement {
    margin-bottom: 2rem;
}

.endorsement:last-child {
    margin-bottom: 0;
}

.endorsement p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.endorsement cite {
    font-size: 0.95rem;
    color: #7aa878;
    font-style: normal;
}

/* Author Section */
.author-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.author-photo {
    flex-shrink: 0;
}

.author-photo img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #1a1a1a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.author-bio {
    flex: 1;
}

.author-bio a {
    color: #1a1a1a;
    font-weight: 600;
}

/* Course List */
.course-list {
    list-style: none;
    columns: 2;
    column-gap: 2rem;
    margin-top: 1rem;
}

.course-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.course-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #1a1a1a;
}

@media (max-width: 600px) {
    .course-list {
        columns: 1;
    }
}

/* Adopter CTA */
.adopter-cta {
    background: #8fb98d;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 4px;
    border-left: 4px solid #1a1a1a;
}

.cta-text {
    margin: 0;
    font-size: 1.05rem;
}

/* Form Styles */
#form {
    background: #1a1a1a;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    color: #a8c9a5;
}

#form h2 {
    margin-top: 0;
    color: #a8c9a5;
    border-bottom-color: #4a6a48;
}

#form p {
    color: #a8c9a5;
}

form {
    margin-top: 2rem;
}

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

label {
    display: block;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #a8c9a5;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #4a6a48;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: #2a2a2a;
    color: #a8c9a5;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #a8c9a5;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: #6a8a68;
}

select {
    cursor: pointer;
    background: #2a2a2a;
}

select option {
    background: #2a2a2a;
    color: #a8c9a5;
}

textarea {
    resize: vertical;
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

button[type="submit"] {
    background: #a8c9a5;
    color: #1a1a1a;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 1rem;
    font-weight: 600;
}

button[type="submit"]:hover {
    background: #8fb98d;
}

.hidden {
    display: none;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #a8c9a5;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    margin: 0;
    opacity: 0.9;
}

footer a {
    color: #a8c9a5;
    border-bottom-color: rgba(168, 201, 165, 0.3);
}

footer a:hover {
    border-bottom-color: #a8c9a5;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1.5rem;
    }

    .header-text {
        text-align: center;
    }

    .header-cover img {
        width: 140px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .casual-power,
    #form {
        margin-left: 0;
        margin-right: 0;
        padding: 1.5rem;
    }

    .arguments-grid {
        grid-template-columns: 1fr;
    }

    .radio-group {
        flex-direction: column;
        gap: 0.8rem;
    }

    .author-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-photo img {
        width: 120px;
        height: 120px;
    }
}

/* Map Mode Easter Egg */
.map-mode {
    background-color: #f2efe9 !important;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(200, 180, 160, 0.3) 50px,
            rgba(200, 180, 160, 0.3) 51px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(200, 180, 160, 0.3) 50px,
            rgba(200, 180, 160, 0.3) 51px
        );
}

.map-mode .container {
    position: relative;
}

.map-mode header {
    background: #1a1a1a !important;
    position: relative;
}

.map-mode header::after {
    content: "📍";
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 3rem;
    animation: pin-bounce 1s ease-in-out infinite;
}

@keyframes pin-bounce {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(-60%); }
}

.map-mode section {
    position: relative;
    border: 2px dashed rgba(26, 26, 26, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
}

.map-mode section::before {
    content: attr(data-map-label);
    position: absolute;
    top: -12px;
    left: 20px;
    background: #1a1a1a;
    color: #a8c9a5;
    padding: 2px 12px;
    font-size: 0.75rem;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
}

.map-mode .argument {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1a1a1a !important;
    border-left-color: #e74c3c !important;
    position: relative;
}

.map-mode .argument::before {
    content: "📌";
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 1.2rem;
}

.map-mode .argument h3 {
    color: #1a1a1a !important;
}

.map-mode #endorsements {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #1a1a1a !important;
    border-color: #3498db !important;
}

.map-mode #endorsements h2 {
    color: #1a1a1a !important;
}

.map-mode #form {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1a1a1a !important;
    border: 3px solid #e74c3c;
}

.map-mode #form h2,
.map-mode #form p,
.map-mode #form label {
    color: #1a1a1a !important;
}

.map-mode #form input,
.map-mode #form select,
.map-mode #form textarea {
    background: white !important;
    color: #1a1a1a !important;
    border-color: #ccc !important;
}

.map-mode .casual-power {
    background: rgba(232, 218, 178, 0.6) !important;
    border-left-color: #8b4513 !important;
}

.map-mode footer {
    background: #1a1a1a !important;
    position: relative;
}

.map-mode footer::before {
    content: "You are here";
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

/* Map mode toggle hint */
.map-hint {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1a1a1a;
    color: #a8c9a5;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.map-hint.visible {
    opacity: 1;
}

.map-mode .map-hint {
    background: #a8c9a5;
    color: #1a1a1a;
}

/* Route line connecting sections in map mode */
.map-mode main::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: repeating-linear-gradient(
        to bottom,
        #3498db 0px,
        #3498db 10px,
        transparent 10px,
        transparent 20px
    );
    z-index: -1;
    opacity: 0.5;
}

.map-mode main {
    position: relative;
}
