:root {
    --cream: #fffbeb;
    --navy: #1e3a5f;
    --navy-light: #2c4c79;
    --tan: #d6a76a;
    --tan-light: #e6c08c;
    --blush: #fbcfe8;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    
    --font-heading: 'Lora', serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --shadow-sm: 0 4px 6px -1px rgba(30, 58, 95, 0.05), 0 2px 4px -1px rgba(30, 58, 95, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(30, 58, 95, 0.1), 0 4px 6px -2px rgba(30, 58, 95, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(30, 58, 95, 0.1), 0 10px 10px -5px rgba(30, 58, 95, 0.04);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--navy);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.hidden { display: none !important; }

/* Layout */
.site-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.site-header {
    padding: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo svg {
    color: var(--tan);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 60px;
}

.view-section {
    width: 100%;
    animation: fadeIn 0.4s ease-out forwards;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--navy);
    line-height: 1.2;
}

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tan);
    display: block;
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--navy-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--blush);
    color: var(--navy);
}

.btn-secondary:hover {
    background-color: #f9bce0;
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Cards */
.card-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    border: 1px solid rgba(214, 167, 106, 0.2);
}

/* Hero View */
.hero-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid rgba(214, 167, 106, 0.2);
}

@media(min-width: 768px) {
    .hero-card {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-image-wrapper {
    position: relative;
    height: 300px;
}
@media(min-width: 768px) {
    .hero-image-wrapper { height: auto; min-height: 450px; }
}

.hero-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}

.hero-content {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    color: var(--gray-600);
    margin-bottom: 30px;
    font-size: 1.125rem;
}

/* Quiz View */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-header {
    margin-bottom: 30px;
}

.progress-wrapper {
    width: 100%;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 8px;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--gray-100);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--tan);
    width: 0%;
    transition: width 0.4s ease;
}

.question-body h2 {
    font-size: 1.75rem;
    margin-bottom: 30px;
    text-align: center;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media(min-width: 600px) {
    .answers-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.answer-card {
    background: var(--white);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.answer-card:hover {
    border-color: var(--tan);
    background-color: #faf5ed;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Gate View */
.gate-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.icon-circle {
    width: 64px;
    height: 64px;
    background: var(--blush);
    color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.gate-card h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.gate-card p {
    color: var(--gray-600);
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--navy);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--tan);
    box-shadow: 0 0 0 3px rgba(214, 167, 106, 0.2);
}

/* Result View */
.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h1 {
    font-size: 3rem;
}

.result-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media(min-width: 768px) {
    .result-split {
        grid-template-columns: 2fr 3fr;
    }
}

.result-img-container img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    /* Watercolor subtle edge effect hack via border-radius variations */
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    34% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
    67% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
}

.result-desc {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 30px;
    line-height: 1.8;
}

/* Local Matches */
.local-matches-section {
    margin-top: 60px;
    text-align: center;
}

.local-matches-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.matches-subtext {
    color: var(--gray-600);
    margin-bottom: 40px;
}

.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.pet-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
}

.pet-img {
    height: 200px;
    background-color: var(--gray-100);
    background-size: cover;
    background-position: center;
}

.pet-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pet-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.pet-meta {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 20px;
}

.pet-meta span {
    display: inline-block;
    background: var(--cream);
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 6px;
    margin-bottom: 6px;
}

.btn-outline {
    margin-top: auto;
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
    padding: 10px 20px;
    text-align: center;
}

.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
}

/* Error Message */
.error-message {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid #f87171;
}

/* Share Panel */
.share-prompt {
    background: var(--cream);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-top: 30px;
}

.share-tools {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.share-tools input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
}

/* Powered By */
#wbx-powered-by-slot {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}