/**
 * Slow Switzerland — Stylesheet
 * The lake at dawn. The mountain at dusk.
 * Quiet. Spacious. Intentional.
 */

/* ─── Reset & Base ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #F5F0E8;
    --green: #3D5A3E;
    --blue: #4A7C9E;
    --stone: #8B7355;
    --text: #1C1C1C;
    --white: #FFFFFF;
    --border: #E0D8CC;
    --shadow: rgba(28, 28, 28, 0.06);
    --radius: 8px;
    --max-width: 1100px;
    --header-height: 72px;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    background-color: var(--bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--blue);
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

p {
    margin-bottom: 1.25em;
}

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

/* ─── Layout ─── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

.section--alt {
    background-color: var(--white);
}

/* ─── Navigation ─── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(245, 240, 232, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--green);
    letter-spacing: -0.02em;
}

.nav-logo:hover {
    color: var(--green);
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.01em;
    position: relative;
    padding: 4px 0;
}

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

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

.nav-links a.active {
    color: var(--green);
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
}

/* ─── Hero ─── */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: var(--header-height);
}

.hero--short {
    min-height: 50vh;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(28, 28, 28, 0.25) 0%,
        rgba(28, 28, 28, 0.55) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 40px 24px;
}

.hero-content h1 {
    color: var(--white);
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    margin-bottom: 20px;
    font-style: italic;
    font-weight: 600;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 600px;
    margin: 0 auto;
}

/* Hero without image (about page) */
.hero--text {
    background-color: var(--bg);
    min-height: 40vh;
}

.hero--text .hero-content h1 {
    color: var(--text);
    font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero--text .hero-content p {
    color: var(--text);
    opacity: 0.7;
}

/* ─── Intro Section ─── */
.intro {
    text-align: center;
    padding: 80px 24px;
}

.intro-text {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text);
    opacity: 0.85;
}

/* ─── City Cards ─── */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    padding: 0 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.city-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(28, 28, 28, 0.1);
}

.city-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.city-card-body {
    padding: 28px;
}

.city-card-region {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stone);
    margin-bottom: 8px;
}

.city-card-body h3 {
    margin-bottom: 8px;
}

.city-card-body p {
    font-size: 0.95rem;
    color: var(--text);
    opacity: 0.7;
    margin-bottom: 16px;
}

.city-card-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--green);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.city-card-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.city-card:hover .city-card-link::after {
    transform: translateX(4px);
}

/* ─── Section Headers ─── */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.section-header p {
    margin-top: 12px;
    font-size: 1.05rem;
    opacity: 0.7;
}

/* ─── AI Planner Teaser ─── */
.planner-teaser {
    background: var(--green);
    color: var(--white);
    padding: 80px 24px;
    text-align: center;
}

.planner-teaser h2 {
    color: var(--white);
    max-width: 600px;
    margin: 0 auto 16px;
    font-style: italic;
}

.planner-teaser p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    margin: 0 auto 32px;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn--primary {
    background: var(--green);
    color: var(--white);
}

.btn--primary:hover {
    background: #2F472F;
    color: var(--white);
}

.btn--white {
    background: var(--white);
    color: var(--green);
}

.btn--white:hover {
    background: var(--bg);
    color: var(--green);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--green);
    color: var(--green);
}

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

/* ─── Stories Grid ─── */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.story-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 20px var(--shadow);
    transition: transform 0.3s ease;
}

.story-card:hover {
    transform: translateY(-3px);
}

.story-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.story-card-body {
    padding: 24px;
}

.story-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stone);
    margin-bottom: 10px;
}

.story-card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.story-card-body p {
    font-size: 0.9rem;
    opacity: 0.7;
    line-height: 1.65;
}

/* ─── City Landing Page ─── */
.city-nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.city-nav-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px;
    text-align: center;
    box-shadow: 0 2px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.city-nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(28, 28, 28, 0.1);
}

.city-nav-card h3 {
    margin-bottom: 8px;
}

.city-nav-card p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 20px;
}

/* ─── AI Planner ─── */
.planner-form {
    max-width: 680px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 48px;
    box-shadow: 0 2px 20px var(--shadow);
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.form-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-option {
    position: relative;
}

.form-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.form-option span {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.form-option input:checked + span {
    border-color: var(--green);
    background: var(--green);
    color: var(--white);
}

.form-option span:hover {
    border-color: var(--green);
}

.form-group input[type="number"] {
    width: 100px;
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--green);
}

.planner-submit {
    text-align: center;
    margin-top: 36px;
}

/* Planner results */
.planner-results {
    max-width: 780px;
    margin: 0 auto;
}

.planner-loading {
    text-align: center;
    padding: 60px 24px;
}

.planner-loading p {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--stone);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.day-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px;
    margin-bottom: 24px;
    box-shadow: 0 2px 20px var(--shadow);
}

.day-card h3 {
    color: var(--green);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg);
}

.day-section {
    margin-bottom: 20px;
}

.day-section h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--stone);
    margin-bottom: 8px;
}

.day-section p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.planner-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}

/* ─── Discover Grid ─── */
.discover-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 24px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text);
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--green);
    background: var(--green);
    color: var(--white);
}

.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.discover-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 20px var(--shadow);
    transition: transform 0.3s ease;
}

.discover-card:hover {
    transform: translateY(-3px);
}

.discover-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.discover-card-body {
    padding: 20px;
}

.discover-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.discover-card-body p {
    font-size: 0.88rem;
    opacity: 0.7;
    line-height: 1.6;
}

.discover-card-tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.discover-tag {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stone);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 4px;
}

/* ─── About Page ─── */
.about-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1.5em;
}

.pull-quote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-style: italic;
    text-align: center;
    color: var(--green);
    max-width: 600px;
    margin: 60px auto;
    padding: 40px 24px;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    line-height: 1.5;
}

.about-signature {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: var(--green);
    text-align: right;
    margin-top: 40px;
}

/* ─── Newsletter Form ─── */
.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 420px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background: var(--white);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--green);
}

.newsletter-form button {
    padding: 12px 24px;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #2F472F;
}

.newsletter-msg {
    font-size: 0.85rem;
    margin-top: 8px;
}

/* ─── Footer ─── */
.site-footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.8);
    padding: 64px 0 0;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr;
    gap: 48px;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.footer-tagline {
    font-size: 0.9rem;
    opacity: 0.6;
    font-style: italic;
}

.site-footer h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--white);
    margin-bottom: 16px;
}

.site-footer .newsletter-form input[type="email"] {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.site-footer .newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 48px auto 0;
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* ─── Animations ─── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Back Link ─── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--stone);
    margin-bottom: 24px;
}

.back-link::before {
    content: '←';
}

.back-link:hover {
    color: var(--green);
}

/* ─── Admin ─── */
.admin-layout {
    max-width: 960px;
    margin: calc(var(--header-height) + 40px) auto 40px;
    padding: 0 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-stat {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 2px 12px var(--shadow);
}

.admin-stat .number {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--green);
}

.admin-stat .label {
    font-size: 0.85rem;
    color: var(--stone);
    margin-top: 4px;
}

.admin-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 18px;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stone);
}

.admin-form {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: 0 2px 12px var(--shadow);
}

.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--stone);
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-form input[type="url"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background: var(--bg);
}

.admin-form textarea {
    min-height: 160px;
    resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--green);
}

.admin-actions {
    display: flex;
    gap: 10px;
}

.btn--small {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn--danger {
    background: #C0392B;
    color: var(--white);
}

.btn--danger:hover {
    background: #A93226;
    color: var(--white);
}

.login-form {
    max-width: 400px;
    margin: calc(var(--header-height) + 80px) auto;
    padding: 48px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 20px var(--shadow);
    text-align: center;
}

.login-form h1 {
    font-size: 1.6rem;
    margin-bottom: 32px;
}

.login-form .form-group {
    text-align: left;
}

.login-error {
    background: #FDEDEB;
    color: #C0392B;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--green {
    background: #E8F5E9;
    color: var(--green);
}

.badge--gray {
    background: #ECEFF1;
    color: #607D8B;
}

/* ─── Flash Messages ─── */
.flash {
    max-width: var(--max-width);
    margin: calc(var(--header-height) + 16px) auto 0;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.flash--success {
    background: #E8F5E9;
    color: var(--green);
}

.flash--error {
    background: #FDEDEB;
    color: #C0392B;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 24px;
        gap: 0;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links a::after {
        display: none;
    }

    .hero {
        min-height: 70vh;
    }

    .section {
        padding: 56px 0;
    }

    .planner-form {
        padding: 28px 20px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .newsletter-form {
        flex-direction: column;
        max-width: 100%;
    }

    .planner-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .discover-filters {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .city-card-image {
        height: 200px;
    }

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

    .form-options {
        flex-direction: column;
    }

    .form-option span {
        display: block;
        text-align: center;
    }
}
