:root {
    --shire-green: #2d4a22;
    --grass-green: #4caf50;
    --gold: #d4af37;
    --parchment: #fdf5e6;
    --dark-wood: #3e2723;
    --sky-blue: #87CEEB;
    --text-color: #2c2c2c;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Georgia', serif;
    background-color: var(--parchment);
    color: var(--text-color);
    scroll-behavior: smooth;
}

/* --- Hobbit Hole Banner CSS --- */
.hobbit-hole-banner {
    position: relative;
    height: 85vh; /* Increased height to give the sky more room */
    min-height: 600px;
    background: linear-gradient(to bottom, #6cb2eb 0%, #b3e5fc 80%, #e0f6ff 100%);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.sky {
    position: absolute;
    top: 10%; /* Moved up to prevent hill overlap */
    text-align: center;
    width: 100%;
    z-index: 1;
}

.sky h1 {
    font-size: 5rem;
    color: var(--dark-wood);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 2px 2px 0px rgba(255,255,255,0.5);
}

.sky .subtitle {
    font-size: 1.8rem;
    color: var(--shire-green);
    font-style: italic;
    font-weight: bold;
    margin-top: 10px;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* Rolling background hill for depth */
.hill-background {
    position: absolute;
    bottom: 0;
    left: -20%;
    width: 150%;
    height: 45vh;
    background: #4caf50;
    border-radius: 50% 50% 0 0;
    z-index: 2;
    opacity: 0.8;
}

.hill {
    position: absolute;
    bottom: -15vh;
    width: 120%;
    height: 55vh;
    background: radial-gradient(ellipse at top center, #66bb6a 0%, #2e7d32 80%, #1b5e20 100%);
    border-radius: 50% 50% 0 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed to flex-start to place door properly */
    padding-top: 8vh;
    z-index: 3;
    box-shadow: inset 0 30px 50px rgba(0,0,0,0.15);
}

/* A path leading up to the door */
.stone-path {
    position: absolute;
    bottom: 15vh;
    width: 100px;
    height: 120px;
    background: #9e9e9e;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    background-image: radial-gradient(#757575 15%, transparent 16%), radial-gradient(#757575 15%, transparent 16%);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.3);
}

.door-container {
    position: relative;
    width: 240px;
    height: 240px;
    perspective: 1200px;
    z-index: 5;
    /* Stone archway framing the door */
    border: 15px solid #757575;
    border-radius: 50%;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8), 0 10px 20px rgba(0,0,0,0.4);
    background-color: #3e2723;
}

/* The Cozy Interior */
.door-interior {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 50% 40%, #ffcc80 0%, #f57c00 40%, #3e2723 90%);
    box-shadow: inset 0 0 40px #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.interior-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 50%, rgba(255, 235, 59, 0.4) 0%, transparent 60%);
}

.hallway-floor {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 25%;
    /* Wood plank floor effect */
    background: repeating-linear-gradient(90deg, #5d4037, #5d4037 15px, #4e342e 15px, #4e342e 30px);
    border-top: 3px solid #27140f;
    box-shadow: inset 0 15px 15px -10px rgba(0,0,0,0.8);
}

.welcome-text {
    color: #fff8eb;
    font-size: 1.1rem;
    font-weight: bold;
    font-style: italic;
    text-shadow: 2px 2px 4px #000;
    z-index: 2;
    margin-top: -20px;
}

/* The Exterior Door */
.round-door {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #1b5e20;
    /* Wood grain texture */
    background-image: repeating-linear-gradient(90deg, transparent, transparent 35px, rgba(0,0,0,0.2) 35px, rgba(0,0,0,0.2) 38px);
    border: 8px solid #27140f;
    box-sizing: border-box;
    transform-origin: left center;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset -10px 0 20px rgba(0,0,0,0.5), 5px 5px 15px rgba(0,0,0,0.6);
}

.round-door.open {
    transform: rotateY(-110deg);
    box-shadow: 20px 0 30px rgba(0,0,0,0.5); /* Adjust shadow when open */
}

.knob {
    position: absolute;
    width: 28px;
    height: 28px;
    background: radial-gradient(circle at 30% 30%, #ffd54f, #ffb300, #ff8f00);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 3px 3px 6px rgba(0,0,0,0.6), inset -2px -2px 4px rgba(0,0,0,0.4);
    border: 1px solid #c68400;
}

/* Wrought iron hinges */
.hinge {
    position: absolute;
    left: 0;
    width: 40px;
    height: 12px;
    background: #212121;
    clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.top-hinge { top: 25%; }
.bottom-hinge { bottom: 25%; }

/* The Rustic Sign */
.wooden-sign {
    position: absolute;
    bottom: 25vh;
    right: 30%;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    transform: rotate(-4deg); /* Slightly crooked */
}

.wooden-sign:hover {
    transform: scale(1.08) rotate(2deg);
}

.sign-board {
    position: relative;
    background-color: #795548;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 5px, rgba(0,0,0,0.05) 5px, rgba(0,0,0,0.05) 10px),
        linear-gradient(180deg, #8d6e63, #5d4037);
    color: #fff8eb;
    padding: 15px 30px;
    border-radius: 3px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    border: 2px solid #3e2723;
    box-shadow: 4px 6px 10px rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.5);
    text-shadow: 1px 1px 3px #000;
    z-index: 2;
}

/* Iron nails in the corners */
.nail {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #424242;
    border-radius: 50%;
    box-shadow: inset -1px -1px 2px #000, 1px 1px 1px rgba(255,255,255,0.2);
}
.top-left { top: 5px; left: 5px; }
.top-right { top: 5px; right: 5px; }
.bottom-left { bottom: 5px; left: 5px; }
.bottom-right { bottom: 5px; right: 5px; }

.sign-post {
    width: 16px;
    height: 80px;
    background: linear-gradient(90deg, #4e342e, #3e2723);
    margin: -5px auto 0;
    box-shadow: 4px 2px 5px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 0 0 4px 4px;
}

.grass-tuft {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 15px;
    background: #2e7d32;
    clip-path: polygon(0% 100%, 15% 20%, 30% 100%, 50% 0%, 70% 100%, 85% 10%, 100% 100%);
    z-index: 3;
}

/* --- Content CSS --- */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.quote-section {
    text-align: center;
    font-size: 1.5rem;
    color: var(--shire-green);
    font-style: italic;
    margin-bottom: 4rem;
}

.about {
    text-align: center;
    margin-bottom: 4rem;
}

.parchment-box {
    background-color: #fff8eb;
    border: 1px solid #e6d5b8;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    font-size: 1.2rem;
}

.themes {
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

.theme-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 250px;
    border-top: 4px solid var(--shire-green);
}

.petition-section {
    background-color: var(--dark-wood);
    color: var(--parchment);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.petition-content {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--gold);
}

input, textarea {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    background-color: #fff;
}

button {
    width: 100%;
    background-color: var(--gold);
    color: var(--dark-wood);
    padding: 1rem 2rem;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #bfa12f;
}

#formMessage {
    margin-top: 1rem;
    text-align: center;
    font-weight: bold;
    padding: 10px;
    border-radius: 4px;
}

.success { background: #d4edda; color: #155724; }
.error { background: #f8d7da; color: #721c24; }

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--shire-green);
    color: var(--parchment);
}

.counter-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--gold);
    border-radius: 8px;
}

.count-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--gold);
    display: block;
    font-family: 'Georgia', serif;
}

.count-label {
    font-size: 1.1rem;
    color: var(--parchment);
    text-transform: uppercase;
    letter-spacing: 2px;
}