/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --text-color: #1e293b;
    --text-muted: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
}

body {
    font-family: var(--sl-font-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Messages */
.messages {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 0;
    /* Full-bleed: break out of .container */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Hero with text overlaid on image */
.hero--overlay {
    padding: 0;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
}

.hero--overlay .hero-image {
    position: relative;
}

.hero--overlay .hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.55) 100%
    );
}

.hero--overlay .hero-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.hero--overlay .hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem;
    z-index: 1;
}

.hero--overlay h1 {
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero--overlay p {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 1rem;
}

/* Forms */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: var(--sl-border-radius-large);
    box-shadow: var(--sl-shadow-small);
}

.auth-form h1 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form p {
    margin-bottom: 1rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form textarea,
.auth-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--sl-border-radius-medium);
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--sl-color-primary-600);
    box-shadow: 0 0 0 3px var(--sl-color-primary-100);
}

.auth-form button {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-muted);
}

.auth-link a {
    color: var(--sl-color-primary-600);
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 0.5rem;
}

.dashboard > p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Shoelace card overrides */
sl-card {
    --padding: var(--sl-spacing-large);
}

sl-card h3 {
    margin-bottom: 0.5rem;
}

sl-card p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

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

/* Profile */
.profile h1 {
    margin-bottom: 1.5rem;
}

.profile h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.profile-info {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--sl-border-radius-large);
    margin-bottom: 1.5rem;
}

.profile-info p {
    margin-bottom: 0.5rem;
}

.profile form {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--sl-border-radius-large);
}

.profile-actions {
    margin-top: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Text utilities */
.text-muted {
    color: var(--text-muted);
}

/* Check-in page */
.checkin-page {
    max-width: 500px;
    margin: 2rem auto;
}

.checkin-options {
    margin-top: 1.5rem;
}

.event-details {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Slack invite */
.slack-invite {
    background-color: var(--sl-color-primary-50);
    padding: 1.5rem;
    border-radius: var(--sl-border-radius-large);
    margin-top: 1.5rem;
    text-align: center;
}

.slack-invite h3 {
    margin-bottom: 0.5rem;
}

.slack-invite p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Event list */
.event-list {
    display: grid;
    gap: 1rem;
}

/* Content pages */
.content-page h1 {
    margin-bottom: 1.5rem;
}

.page-body {
    max-width: 800px;
}

.page-body p {
    margin-bottom: 1rem;
}

/* Events page */
.events-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.events-page .intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Upcoming events section on home */
.upcoming-events {
    margin-top: 3rem;
}

.upcoming-events h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Footer */
.footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
}

/* Form errors */
.errorlist {
    list-style: none;
    color: var(--sl-color-danger-600);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.helptext {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: -0.75rem;
    margin-bottom: 1rem;
}

/* Section page */
.child-pages {
    display: grid;
    gap: 1rem;
}

.child-page-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--sl-border-radius-large);
    box-shadow: var(--sl-shadow-small);
}

.child-page-card a {
    color: var(--text-color);
    text-decoration: none;
}

.child-page-card a:hover {
    color: var(--sl-color-primary-600);
}

/* Marketing blocks */
.hero-image img {
    width: 100%;
    height: auto;
}

.features-grid {
    padding: 2rem 0;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.cta-section {
    text-align: center;
    padding: 3rem 0;
}

.cta-section p {
    color: var(--text-muted);
    margin: 0.5rem 0 1rem;
}

.testimonial {
    border-left: 3px solid var(--sl-color-primary-600);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.testimonial .quote {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial .author {
    font-weight: 600;
}

.testimonial .role {
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.testimonial .author-image {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.rich-cta-text {
    text-align: center;
    padding: 3rem 0;
}

.rich-cta-text-body {
    max-width: 800px;
    margin: 0.5rem auto 1.5rem;
    color: var(--text-muted);
}
