/* Import a modern Google Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

/* Wird von sticky header benötigt (vollständige Tokens weiter unten) */
:root {
    --z-sticky: 1000;
}

/* Reset some default styles for consistency */
body, h1, h2, p, ul, li {
    margin: 0;
    padding: 0;
}

/* Body background and base font */
html {
    height: 100%;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Montserrat', Arial, sans-serif;
    color: #232526;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Site nav bar styles (scoped to header.nav so page-level <header> elements
   like .ai-page__header stay in normal document flow). */
header.nav {
    background-color: #333333;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 18px 32px;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    margin-bottom: 32px;
    transition: box-shadow 0.3s;
    backdrop-filter: blur(8px) saturate(180%);
    background-color: rgba(51, 51, 51, 0.85);
}

/* Header shadow on hover for depth */
header.nav:hover {
    box-shadow: 0 8px 32px rgba(44,62,80,0.18);
}

.logo-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.logo img {
    width: 80px;
    margin-right: 14px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.text {
    font-size: 1.3rem;
    text-align: center;
    text-decoration: none;
    letter-spacing: 1px;
}

.text a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    padding: 10px 18px;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
}

.text a:hover {
    color: #ff9900;
    background: rgba(255,153,0,0.08);
}

/* Style the navigation menu */
nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: space-evenly;
    flex: 1;
    padding: 0;
    margin: 0;
    gap: 12px;
}

nav li {
    flex-grow: 1;
    text-align: center;
    margin: 0;
}

nav a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
    position: relative;
    overflow: hidden;
}

nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0;
    height: 2px;
    background: #ff9900;
    transition: all 0.3s;
    transform: translateX(-50%);
}

nav a:hover {
    color: #ff9900;
    background: rgba(255,153,0,0.08);
}

nav a:hover::after {
    width: 80%;
}

nav a.nav-active,
nav a[aria-current="page"] {
    color: #ff9900;
    background: rgba(255, 153, 0, 0.12);
}

nav a.nav-active::after,
nav a[aria-current="page"]::after {
    width: 80%;
}

/* Footer + social row (centered; wrap stays centered on mobile) */
footer {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Style the social media links */
.social-media {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 32px;
    width: 100%;
    max-width: 100%;
    min-height: 120px;
    margin: 0;
    padding: 20px 12px;
    list-style: none;
    box-sizing: border-box;
    text-decoration: none;
}

.social-media li {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.fa {
    width: 64px;
    height: 64px;
    font-size: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb347 0%, #ff6961 100%);
    color: #fffbe7;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(255,179,71,0.10);
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1;
    position: relative;
}

/* Fix for Font Awesome 4 pseudo-elements (icon centering) */
.fa:before {
    display: block;
    text-align: center;
    width: 100%;
    height: 100%;
    line-height: 64px;   /* Vertically center icon */
    margin: 0;
    position: static;
}

.fa:hover {
    background: linear-gradient(135deg, #ff6961 0%, #ffb347 100%);
    color: #fffbe7;
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(255,153,0,0.18);
    border: 2px solid #fffbe7;
    opacity: 1;
}

.fa-facebook, .fa-twitter, .fa-steam, .fa-soundcloud, .fa-youtube, .fa-twitch, .fa-instagram, .fa-link {
    color: #fff;
}

/* Soft shadow and rounded corners for main content */
main {
    box-shadow: 0 8px 32px rgba(44,62,80,0.08);
    border-radius: 18px;
    background: #fff;
    flex: 1 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 24px;
}

/* Inner pages (not home): body gradient visible; white panels use .page-content-card or section cards */
main:not(.home-page) {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding-bottom: 0;
}

/* Shared white panel for downloads page / dino (aligns with home column width) */
.page-content-card {
    max-width: 1100px;
    width: min(1100px, calc(100% - 2 * var(--space-6)));
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--space-8);
    margin-bottom: var(--space-8);
    box-sizing: border-box;
    padding: var(--space-8) var(--space-6);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.08);
}

/* Newsletter nested inside page-content card: no extra 800px cap / huge outer margin */
.page-content-card .newsletter-section {
    max-width: none;
    width: 100%;
    margin: var(--space-8) 0 0;
    padding: 0;
}

/* Focus style for accessibility (keyboard navigation) */
a:focus, button:focus {
    outline: 2px solid #ff9900;
    outline-offset: 2px;
}

/* Badge style */
.badge {
    display: inline-block;
    background: linear-gradient(90deg, #ffb6d5 0%, #ffe066 100%);
    color: #a259c6;
    font-weight: bold;
    border-radius: 12px;
    padding: 4px 14px;
    margin-top: 6px;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Generic content section spacing */
.content-section {
    margin-top: 32px;
}

.intro-section {
    margin-top: 32px;
    text-align: center;
}

.intro-heading {
    color: #a259c6;
    font-size: 2.2rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.intro-text {
    color: #555;
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto 16px auto;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.quick-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    font-weight: 600;
    color: #a259c6;
    background: linear-gradient(90deg, #ffe0fa 0%, #a2aaff 100%);
    box-shadow: 0 2px 8px rgba(162,89,198,0.12);
    transition: background 0.3s, color 0.3s, transform 0.2s, box-shadow 0.2s;
}

.quick-action-button:hover {
    background: linear-gradient(90deg, #ffb6d5 0%, #a2aaff 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(162,89,198,0.2);
}

.section-heading {
    text-align: center;
    color: #a259c6;
    font-size: 2rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.section-subtitle {
    text-align: center;
    color: #ff6961;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Responsive Styles */
/* Tablet screens */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 10px 6px;
        margin-bottom: 16px;
    }

    .logo img {
        width: 52px;
        margin-right: 10px;
    }

    .text {
        font-size: 1.05rem;
    }

    .text h1 {
        font-size: 1.7rem;
    }

    .badge {
        font-size: 0.95rem;
        padding: 4px 12px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    nav li {
        margin: 6px 0;
    }
}

/* Mobile screens */
@media (max-width: 480px) {
    header {
        flex-direction: column;
        align-items: center;
        padding: 8px 4px;
        margin-bottom: 12px;
    }

    .logo img {
        width: 40px;
        margin-right: 8px;
    }

    .text {
        font-size: 1rem;
        text-align: center;
    }

    .text h1 {
        font-size: 1.45rem;
    }

    .badge {
        font-size: 0.88rem;
        padding: 3px 10px;
        margin-top: 4px;
    }

    nav a {
        padding: 10px 14px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 3px;
    }

    nav li {
        margin: 3px 0;
    }
}

/* Extra small screens */
@media (max-width: 600px) {
  .logo-text {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
  }
  .logo {
    margin-bottom: 8px;
  }
  .text {
    align-items: center;
    text-align: center;
  }
  nav ul {
    flex-direction: column;
    gap: 8px;
    padding: 0;
  }
  .social-media {
    justify-content: center;
    align-content: center;
    gap: 12px !important;
    padding-left: 8px;
    padding-right: 8px;
  }
  .site-footer-band .social-media {
    padding: 12px 8px 28px 8px;
  }
  .social-media .fa {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  .social-media .fa:before {
    line-height: 48px;
  }
  body, main {
    padding: 0 4vw;
  }
}

/* Responsive Spotify embed */
.spotify-embed-wrapper {
  display: flex;
  justify-content: center;
  margin: 32px 0 64px 0;
  width: 100%;
}

.spotify-embed-wrapper iframe {
  width: 100%;
  max-width: 480px;
  min-width: 180px;
  height: 352px;
  border-radius: 12px;
  border: none;
}

@media (max-width: 600px) {
  .spotify-embed-wrapper iframe {
    height: 180px;
    min-width: 0;
    max-width: 98vw;
  }
}

/* Responsive itch.io game embed */
.itchio-embed-wrapper {
  display: flex;
  justify-content: center;
  margin: 32px 0 24px 0;
  width: 100%;
}

.itchio-embed-wrapper iframe {
  width: 100%;
  max-width: 800px;
  min-width: 180px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: none;
  height: auto;
  background: #000;
}

@media (max-width: 600px) {
  .itchio-embed-wrapper iframe {
    max-width: 98vw;
    min-width: 0;
    aspect-ratio: 16 / 9;
  }
}

/* Showcase page styles */
.game-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 40px 16px;
}

.game-info.page-content-card {
  padding: var(--space-8) var(--space-6);
}

.page-intro {
  color: #ff6961;
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 16px auto;
}

.game-controls {
  display: inline-block;
  background: rgba(255,224,250,0.7);
  border-radius: 18px;
  padding: 18px 28px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(162,89,198,0.08);
}

.dino-game__title {
  color: #a259c6;
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.dino-game__tip {
  font-size: 1.1rem;
  color: #a259c6;
  margin-bottom: 10px;
}

.dino-game__controls-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  color: #6d3a7b;
  font-size: 1rem;
}

.dino-game__controls-label {
  font-weight: bold;
}

.dino-game__blurb {
  color: #a259c6;
  font-size: 1.05rem;
  margin: 0;
}

/* Guest Book Styles - oberer Außenabstand wie andere Seiten (≈32px unter dem Header) */
.guest-book {
    max-width: 1100px;
    width: min(1100px, calc(100% - 2 * var(--space-6)));
    margin: 32px auto 40px;
    padding: 32px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(162, 89, 198, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(162, 89, 198, 0.1);
}

.guest-book-heading {
    text-align: center;
    color: #a259c6;
    font-size: 2.5rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(162, 89, 198, 0.1);
}

.guest-book-subtitle {
    text-align: center;
    color: #ff6961;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-style: italic;
}

.guest-book-lead {
    text-align: center;
    color: #6d3a7b;
    font-size: 1rem;
    margin: 0 0 28px;
}

.guest-book-form {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #a259c6;
    font-weight: bold;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(162, 89, 198, 0.2);
    border-radius: 12px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #a259c6;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(162, 89, 198, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.guest-book-entries h3 {
    color: #a259c6;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.entries-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 8px;
}

.entry {
    background: linear-gradient(135deg, rgba(255, 224, 250, 0.3) 0%, rgba(162, 170, 255, 0.1) 100%);
    border: 1px solid rgba(162, 89, 198, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(162, 89, 198, 0.1);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.entry-name {
    font-weight: bold;
    color: #a259c6;
    font-size: 1.1rem;
}

.entry-date {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
}

.entry-message {
    color: #333;
    line-height: 1.5;
    word-wrap: break-word;
}

.empty-message {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 2px dashed rgba(162, 89, 198, 0.2);
}

/* Scrollbar styling for entries container */
.entries-container::-webkit-scrollbar {
    width: 8px;
}

.entries-container::-webkit-scrollbar-track {
    background: rgba(162, 89, 198, 0.1);
    border-radius: 4px;
}

.entries-container::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #ffe0fa 0%, #a2aaff 100%);
    border-radius: 4px;
}

.entries-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #ffb6d5 0%, #a2aaff 100%);
}

/* Responsive design for guest book */
@media (max-width: 768px) {
    .guest-book {
        margin: 32px 16px;
        padding: 24px;
    }

    .site-page-band .home-section__inner .guest-book {
        margin: 0 auto;
    }
    
    .guest-book-heading {
        font-size: 2rem;
    }
    
    .entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .guest-book {
        margin: 24px 12px;
        padding: 20px;
    }

    .site-page-band .home-section__inner .guest-book {
        margin: 0 auto;
    }
    
    .guest-book-heading {
        font-size: 1.8rem;
    }
    
    .guest-book-subtitle {
        font-size: 1rem;
    }
    
    .submit-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Newsletter Section Styles */
.newsletter-section {
    max-width: 800px;
    margin: 64px auto 48px auto;
    padding: 0 24px;
}

.newsletter-container {
    background: linear-gradient(135deg, rgba(255, 224, 250, 0.3) 0%, rgba(162, 170, 255, 0.2) 100%);
    border: 2px solid rgba(162, 89, 198, 0.2);
    border-radius: 24px;
    padding: 48px 32px;
    box-shadow: 0 8px 32px rgba(162, 89, 198, 0.15);
    backdrop-filter: blur(10px);
    text-align: center;
}

.newsletter-heading {
    color: #a259c6;
    font-size: 2.5rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(162, 89, 198, 0.1);
}

.newsletter-subtitle {
    color: #ff6961;
    font-size: 1.2rem;
    margin-bottom: 32px;
    font-style: italic;
}

.newsletter-form {
    margin-top: 24px;
}

.newsletter-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: 16px 20px;
    border: 2px solid rgba(162, 89, 198, 0.3);
    border-radius: 16px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.newsletter-input:focus {
    outline: none;
    border-color: #a259c6;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px rgba(162, 89, 198, 0.1);
}

.newsletter-input::placeholder {
    color: #999;
}

.newsletter-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.newsletter-privacy {
    color: #888;
    font-size: 0.9rem;
    margin-top: 12px;
    font-style: italic;
}

/* Beehiiv: CTA links to jackboyman.beehiiv.com (embed from dashboard can replace this block) */
.newsletter-beehiiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-4);
    text-align: center;
}

/* Responsive styles for newsletter */
@media (max-width: 768px) {
    .newsletter-section {
        margin: 48px auto 32px auto;
        padding: 0 16px;
    }
    
    .newsletter-container {
        padding: 36px 24px;
    }
    
    .newsletter-heading {
        font-size: 2rem;
    }
    
    .newsletter-subtitle {
        font-size: 1.1rem;
    }
    
    .newsletter-input-group {
        flex-direction: column;
    }
    
    .newsletter-input {
        min-width: 100%;
    }
    
    .newsletter-submit-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .newsletter-container {
        padding: 28px 20px;
    }
    
    .newsletter-heading {
        font-size: 1.8rem;
    }
    
    .newsletter-subtitle {
        font-size: 1rem;
    }
    
    .newsletter-input,
    .newsletter-submit-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

/* ── DESIGN.md: design tokens used by loading screen, cursor trail, nav scroll ── */
:root {
    --color-bg: #1a1520;
    --color-primary: #ff6b9d;
    --color-primary-dark: #e0527f;
    --color-secondary: #ffb347;
    --color-accent: #a78bfa;
    --color-bg-card: #241b2e;
    --color-bg-elevated: #2e2040;
    --color-text: #f0e6ff;
    --color-text-muted: #a094b8;
    --color-surface: #ffffff;
    --color-surface-soft: #faf8ff;
    --color-page-text: #2e2040;
    --color-page-muted: #6b5f82;
    --color-border: rgba(167, 139, 250, 0.2);
    --color-border-hover: rgba(255, 107, 157, 0.5);
    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    --gradient-warm: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --gradient-subtle: linear-gradient(135deg, var(--color-bg-card), var(--color-bg-elevated));
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-pink: 0 8px 24px rgba(255, 107, 157, 0.35);
    --shadow-purple: 0 8px 24px rgba(167, 139, 250, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --z-top: 1100; /* über sticky header (--z-sticky am Dateianfang) */
}

/* ── Navigation: farbiger Header, Opacity beim Runterscrollen per JS (initNavScroll) ── */
header.nav {
    background: rgba(52, 52, 55, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: opacity 0.35s ease, box-shadow 0.3s ease;
    opacity: 1;
}

/* ── DESIGN.md: Loading Screen ── */
#loading-screen {
    position: fixed;
    inset: 0;
    /* Über .cursor-dot (ebenfalls --z-top), damit der Screen beim Laden sichtbar bleibt */
    z-index: calc(var(--z-top) + 1);
    /* Gleicher Verlauf wie `body` - wirkt beim Ausblenden nahtlos */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-icon {
    font-size: 3rem;
    line-height: 1;
}

/* ── DESIGN.md: Cursor Trail ── */
.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    pointer-events: none;
    z-index: var(--z-top);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    box-shadow: var(--shadow-pink);
}

.cursor-dot[data-trail-index="0"] { opacity: 1; }
.cursor-dot[data-trail-index="1"] { opacity: 0.8; }
.cursor-dot[data-trail-index="2"] { opacity: 0.6; }
.cursor-dot[data-trail-index="3"] { opacity: 0.4; }
.cursor-dot[data-trail-index="4"] { opacity: 0.2; }

/* ── Site accent bars (top/bottom gradient strip) ── */
.site-accent-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #f7a8b8 0%, #fff 33%, #a2aaff 66%, #fff 100%);
    border-radius: 0 0 8px 8px;
}

.site-accent-bar--bottom {
    border-radius: 8px 8px 0 0;
}

/* Skip link (storefront-style accessibility) */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: calc(var(--z-top) + 2);
    padding: 12px 20px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    left: 0;
    top: 0;
}

/* Announcement strip (San Holo-style promo bar, Jack colors) */
.announcement-bar {
    background: linear-gradient(90deg, #1a1520 0%, #2e2040 50%, #1a1520 100%);
    border-bottom: 1px solid rgba(255, 107, 157, 0.35);
    color: #f0e6ff;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.announcement-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
    text-align: center;
}

.announcement-bar__text {
    opacity: 0.95;
}

.announcement-bar__cta {
    color: #ffb6d5;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 182, 213, 0.5);
    transition: color 0.2s, border-color 0.2s;
}

.announcement-bar__cta:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* Storefront-style header (brand | nav | social) */
header.site-header {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    margin-bottom: 24px;
    border-radius: 0 0 16px 16px;
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
    width: 100%;
    box-sizing: border-box;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.site-header__logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.site-header__name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.site-header__nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.site-header__nav ul {
    flex: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.site-header__nav li {
    flex-grow: 0;
}

.site-header__social {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.site-header__social .fa {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    line-height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #f0e6ff;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.site-header__social .fa:before {
    line-height: 40px;
    width: 100%;
    height: 100%;
}

.site-header__social .fa:hover {
    background: rgba(255, 107, 157, 0.35);
    color: #fff;
    transform: scale(1.06);
    border-color: rgba(255, 182, 213, 0.5);
    box-shadow: none;
    opacity: 1;
}

.site-header__tagline {
    text-align: center;
    font-size: 0.78rem;
    color: rgba(240, 230, 255, 0.75);
    padding: 8px 16px 14px;
    margin: 0;
    letter-spacing: 0.03em;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    .site-header__inner {
        flex-direction: column;
        align-items: center;
    }

    .site-header__nav {
        order: 3;
        width: 100%;
    }

    .site-header__social {
        order: 2;
    }
}

/* ── Home page: main shell (hero can read full-width; sections stay card-like) ── */
main.home-page {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* Footer band (all pages): compact social row; extra bottom padding before © line */
.site-footer-band .social-media {
    min-height: 0;
    gap: var(--space-6);
    padding: var(--space-4) var(--space-4) var(--space-8) var(--space-4);
}

/*
 * Home newsletter + music card: same column width as .home-section__inner.
 * Newsletter: no white outer card — only the gradient .newsletter-container (downloads-style inner).
 * Music/Spotify block keeps the white card.
 */
.page-home .home-music-block.content-section {
    /* Override global `.newsletter-section { max-width: 800px }` on home */
    max-width: none;
    width: min(1100px, calc(100% - 2 * var(--space-6)));
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    padding: var(--space-8) var(--space-6);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.08);
}

.page-home .home-newsletter.newsletter-section {
    max-width: none;
    width: min(1100px, calc(100% - 2 * var(--space-6)));
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    padding: var(--space-8) var(--space-6);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/*
 * Full-width soft band (home featured block + inner pages): matches pillars / mission vibe.
 */
.site-page-band {
    background: linear-gradient(180deg, #faf8ff 0%, #ffffff 100%);
}

/* Inner pages + home: white card sits inside band without doubling vertical margin */
.site-page-band .home-section__inner > .page-content-card,
.site-page-band .home-section__inner > .guest-book,
.site-page-band .home-section__inner > .newsletter-section.home-newsletter {
    margin-top: 0;
    margin-bottom: 0;
}

/* Home newsletter: gradient .newsletter-container only (no white wrapper) */
.page-home .home-newsletter .newsletter-container {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
}

.home-hero {
    padding: var(--space-12) var(--space-6) var(--space-8);
    background:
        linear-gradient(135deg, rgba(255, 107, 157, 0.14) 0%, rgba(162, 170, 255, 0.2) 45%, rgba(255, 240, 250, 0.95) 100%);
    border-bottom: 1px solid rgba(162, 89, 198, 0.12);
}

/* Dark artist hero (storefront-style banner, JackSoundWorks palette) */
.home-hero--artist {
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 107, 157, 0.35) 0%, transparent 55%),
        linear-gradient(165deg, #1a1520 0%, #2a1f35 45%, #3d2f4a 100%);
    border-bottom: 1px solid rgba(255, 107, 157, 0.28);
    margin-top: 0;
}

.home-hero--artist .home-hero__eyebrow {
    color: #ffb6d5;
    letter-spacing: 0.18em;
}

.home-hero--artist .home-hero__title {
    color: #fff;
    font-size: clamp(2rem, 5.5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.home-hero--artist .home-hero__lead {
    color: rgba(240, 230, 255, 0.9);
    max-width: 38rem;
}

.home-hero__inner {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
}

.home-hero__eyebrow {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a259c6;
    font-weight: 700;
    margin-bottom: var(--space-4);
}

.home-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: #232526;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.home-hero__lead {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.65;
    max-width: 36rem;
    margin: 0 auto var(--space-6);
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
}

.home-section {
    padding: var(--space-12) var(--space-6);
}

.home-section__inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.home-section__title {
    text-align: center;
    color: #a259c6;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: 0.04em;
    margin-bottom: var(--space-4);
}

.home-section__subtitle {
    text-align: center;
    color: #666;
    font-size: 1.05rem;
    max-width: 40rem;
    margin: 0 auto var(--space-8);
    line-height: 1.6;
}

.home-mission {
    background: linear-gradient(180deg, #fff 0%, #faf8ff 100%);
}

.home-mission__text {
    text-align: center;
    font-size: 1.1rem;
    color: #444;
    line-height: 1.75;
    max-width: 42rem;
    margin: 0 auto;
}

/* Pillars sit between mission (#faf8ff end) and how (#fff); without a fill, body gradient reads as grey */
.home-pillars {
    background: linear-gradient(180deg, #faf8ff 0%, #ffffff 100%);
}

.home-pillars__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
}

@media (max-width: 900px) {
    .home-pillars__grid {
        grid-template-columns: 1fr;
    }
}

.home-card {
    min-width: 0;
    background: #fff;
    border: 1px solid rgba(162, 89, 198, 0.15);
    border-radius: 18px;
    padding: var(--space-6);
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.06);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.home-card:hover {
    border-color: rgba(255, 107, 157, 0.35);
    transform: translateY(-3px);
    box-shadow: var(--shadow-pink);
}

.home-card__icon {
    font-size: 2.25rem;
    line-height: 1;
    margin-bottom: var(--space-4);
}

.home-card__title {
    color: #232526;
    font-size: 1.15rem;
    margin-bottom: var(--space-4);
}

.home-card__text {
    color: #555;
    font-size: 0.98rem;
    line-height: 1.55;
    margin-bottom: var(--space-4);
}

.home-how {
    background: #fff;
}

.home-how__steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
}

@media (max-width: 900px) {
    .home-how__steps {
        grid-template-columns: 1fr;
    }
}

.home-how__step {
    min-width: 0;
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    padding: var(--space-6);
    background: linear-gradient(145deg, #fff 0%, #f8f5ff 100%);
    border-radius: 16px;
    border: 1px solid rgba(162, 170, 255, 0.25);
}

.home-how__step-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    background: linear-gradient(135deg, #ff6b9d 0%, #a259c6 100%);
    border-radius: 12px;
    box-shadow: none;
    border: none;
}

/* Override global `.fa` footer button sizing for how-it-works icons */
.home-how__step-icon.fa:before {
    line-height: 48px;
    width: 100%;
    height: 100%;
}

.home-how__step-icon.fa:hover {
    transform: scale(1.06);
    background: linear-gradient(135deg, #ff6b9d 0%, #a259c6 100%);
    border: none;
    box-shadow: var(--shadow-pink);
    opacity: 1;
}

.home-how__step-title {
    font-size: 1.05rem;
    color: #232526;
    margin-bottom: 0.35rem;
}

.home-how__step-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.home-free {
    background: linear-gradient(180deg, #faf8ff 0%, #fff 100%);
}

.home-free__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
    .home-free__grid {
        grid-template-columns: 1fr;
    }
}

.home-free__item {
    min-width: 0;
    text-align: center;
    padding: var(--space-6);
    border-radius: 16px;
    background: #fff;
    border: 1px dashed rgba(162, 89, 198, 0.35);
}

.home-free__emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-4);
}

.home-free__item-title {
    color: #a259c6;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.home-free__item-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.home-free__cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
}

.home-trust {
    padding: var(--space-8) var(--space-6);
    background: linear-gradient(135deg, #2a2435 0%, #3d2f4a 50%, #2a2435 100%);
    color: #f0e6ff;
    border-top: 1px solid rgba(255, 107, 157, 0.2);
    border-bottom: 1px solid rgba(255, 107, 157, 0.15);
}

.home-trust__inner {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-6);
    text-align: center;
}

@media (max-width: 900px) {
    .home-trust__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .home-trust__inner {
        grid-template-columns: 1fr;
    }
}

.home-trust__item {
    padding: var(--space-4);
}

.home-trust__icon {
    font-size: 1.75rem;
    color: #ffb6d5;
    margin-bottom: 0.5rem;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    background: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.home-trust__icon.fa:before {
    line-height: 1;
    width: auto;
    height: auto;
}

.home-trust__icon.fa:hover {
    transform: none;
    background: none;
    border: none;
    box-shadow: none;
    opacity: 1;
    color: #fff;
}

.home-trust__label {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 0.25rem;
}

.home-trust__hint {
    font-size: 0.82rem;
    opacity: 0.88;
    margin: 0;
    line-height: 1.4;
}

.home-trust__link {
    color: #ffb6d5;
    font-weight: 600;
}

.home-trust__link:hover {
    color: #fff;
}

/* Footer: copyright + newsletter jump */
.site-footer {
    flex-direction: column;
    gap: 0;
}

.site-footer__meta {
    margin: 0;
    padding: 0 var(--space-4) var(--space-6);
    text-align: center;
    font-size: var(--text-sm, 0.875rem);
    color: #555;
}

.site-footer__meta a {
    color: #a259c6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer__meta a:hover {
    color: #ff6b9d;
}

/*
 * Bottom band on every page: accent strip + footer share the same lavender/white as
 * .site-page-band; avoids the footer sitting on the raw body gradient and removes the
 * grey gap from main’s default padding-bottom (home + inner pages set padding-bottom: 0).
 */
.site-footer-band {
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(180deg, #faf8ff 0%, #ffffff 100%);
    border-top: 1px solid rgba(162, 89, 198, 0.1);
}

.site-footer-band .site-footer {
    background: transparent;
    border-top: none;
    padding-top: var(--space-6);
    padding-bottom: var(--space-2);
}

.site-footer-band .site-footer__meta {
    color: #4a4458;
    padding: 0 var(--space-4) var(--space-8);
}

@media (max-width: 600px) {
    .site-footer-band {
        margin-left: -4vw;
        margin-right: -4vw;
        width: calc(100% + 8vw);
        padding-left: 4vw;
        padding-right: 4vw;
    }
}

/* Downloads page (downloads.html): single folder CTA */
.downloads-page__heading {
    text-align: center;
    margin-top: var(--space-4);
    margin-bottom: var(--space-4);
    font-size: 2rem;
    color: #a259c6;
    letter-spacing: 1px;
}

.downloads-page__intro {
    text-align: center;
    color: #ff6961;
    font-size: 1.2rem;
    margin-top: var(--space-4);
    margin-bottom: var(--space-6);
}

.downloads-page__cta {
    text-align: center;
    margin-bottom: var(--space-4);
}

/* =========================================================================
   Album Cover Generator: client-side Canvas app.
   ========================================================================= */

.cover-generator {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
    color: var(--color-page-text);
}

.cover-generator__header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.cover-generator__eyebrow {
    margin: 0;
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cover-generator__title {
    margin: 0;
    color: var(--color-page-text);
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
}

.cover-generator__intro {
    max-width: 760px;
    margin: 0 auto;
    color: var(--color-page-muted);
    font-size: var(--text-lg);
    line-height: 1.6;
}

.cover-generator__workspace {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 1.1fr);
    gap: var(--space-8);
    align-items: start;
}

.cover-generator__panel,
.cover-generator__preview {
    background: linear-gradient(135deg, var(--color-surface-soft), var(--color-surface));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.cover-generator__panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.cover-generator__preview {
    position: sticky;
    top: calc(var(--space-8) + 96px);
}

.cover-generator__section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.cover-generator__section-title,
.cover-generator__label {
    color: var(--color-page-text);
    font-weight: 800;
    font-size: var(--text-sm);
}

.cover-generator__hint {
    margin: 0;
    color: var(--color-page-muted);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.cover-generator__button-row,
.cover-generator__palette-list,
.cover-generator__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.cover-generator__toggle,
.cover-generator__chip,
.cover-generator__palette {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--color-page-muted);
    cursor: pointer;
    font: inherit;
    font-size: var(--text-sm);
    font-weight: 800;
    min-height: 42px;
    padding: var(--space-2) var(--space-4);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cover-generator__toggle:hover,
.cover-generator__chip:hover,
.cover-generator__palette:hover {
    border-color: var(--color-border-hover);
    color: var(--color-page-text);
    transform: translateY(-1px);
}

.cover-generator__toggle[aria-pressed="true"],
.cover-generator__chip[aria-pressed="true"],
.cover-generator__palette[aria-pressed="true"] {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--color-surface);
    box-shadow: var(--shadow-pink);
}

.cover-generator__field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.cover-generator__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.cover-generator__field--wide {
    grid-column: 1 / -1;
}

.cover-generator__input,
.cover-generator__select {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-page-text);
    font: inherit;
    padding: var(--space-3) var(--space-4);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cover-generator__input:focus,
.cover-generator__select:focus,
.cover-generator__range:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-color: var(--color-primary);
}

.cover-generator__colors {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
}

.cover-generator__color {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    color: var(--color-page-muted);
    font-size: var(--text-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cover-generator__color input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    cursor: pointer;
    padding: var(--space-1);
}

.cover-generator__range-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-4);
    align-items: center;
}

.cover-generator__range {
    width: 100%;
    accent-color: var(--color-primary);
}

.cover-generator__bpm {
    min-width: 76px;
    color: var(--color-primary);
    font-weight: 900;
    text-align: right;
}

.cover-generator__canvas-shell {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--color-bg);
    box-shadow: var(--shadow-lg);
}

.cover-generator__canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
}

.cover-generator__preview-meta {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-4);
    color: var(--color-page-muted);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.cover-generator__note {
    margin: 0;
}

.cover-generator__status {
    margin: 0;
    color: var(--color-primary);
    font-weight: 800;
    text-align: right;
}

.cover-generator__download[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 980px) {
    .cover-generator__workspace {
        grid-template-columns: 1fr;
    }

    .cover-generator__preview {
        position: static;
    }
}

@media (max-width: 640px) {
    .cover-generator {
        gap: var(--space-6);
    }

    .cover-generator__workspace,
    .cover-generator__field-grid,
    .cover-generator__colors,
    .cover-generator__preview-meta {
        grid-template-columns: 1fr;
    }

    .cover-generator__panel,
    .cover-generator__preview {
        padding: var(--space-4);
    }

    .cover-generator__toggle,
    .cover-generator__chip,
    .cover-generator__palette,
    .cover-generator__actions .home-btn {
        width: 100%;
    }

    .cover-generator__preview-meta {
        display: grid;
    }

    .cover-generator__status {
        text-align: left;
    }
}

/* =========================================================================
   AI pages: ai-tools.html + credits success/cancel
   Cozy red panda aesthetic on top of the existing page-content-card shell.
   Text colors are tuned for WCAG AA contrast on a white card background.
   ========================================================================= */

.ai-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    max-width: 780px;
    margin: 0 auto;
    color: #2e2040;
}

.ai-page__header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ai-page__title {
    font-size: 2.2rem;
    color: #2e2040;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
}

.ai-page__subtitle {
    color: #2e2040;
    font-size: 1.1rem;
    line-height: 1.55;
    margin: 0;
}

.ai-page__meta {
    color: #3d2f5a;
    font-size: 0.95rem;
    margin: 0;
}

.ai-page__meta strong {
    color: var(--color-primary);
}

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.ai-tabs {
    display: flex;
    gap: var(--space-2, 0.5rem);
    flex-wrap: wrap;
    padding: 6px;
    background: #f5f0fa;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
}

.ai-tab {
    flex: 1 1 auto;
    min-width: 180px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: #3d2f5a;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ai-tab:hover:not(.ai-tab--active) {
    background: rgba(255, 107, 157, 0.08);
    color: #2e2040;
}

.ai-tab--active {
    background: #fff;
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.ai-tab:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.ai-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ai-panel__title {
    margin: 0;
    color: #2e2040;
    font-size: 1.3rem;
    font-weight: 700;
}

.ai-panel__intro {
    margin: 0;
    color: #3d2f5a;
    line-height: 1.55;
}

/* ── Auth block (signed out state) ──────────────────────────────────────── */
.ai-auth {
    background: linear-gradient(135deg, #faf8ff 0%, #fff 100%);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: var(--space-8) var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
    text-align: center;
}

.ai-auth__heading {
    margin: 0;
    font-size: 1.4rem;
    color: #2e2040;
}

.ai-auth__text {
    margin: 0;
    color: #444;
    max-width: 44ch;
    line-height: 1.5;
}

.ai-auth__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 0.75rem);
    width: 100%;
    max-width: 360px;
}

.ai-auth__label {
    text-align: left;
    font-weight: 600;
    color: #2e2040;
    font-size: 0.9rem;
}

.ai-auth__input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    color: #232526;
}

.ai-auth__input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-color: var(--color-primary);
}

.ai-auth__status {
    margin: 0;
    color: #6b5f82;
    min-height: 1.4em;
}

/* ── Tool layout (signed in state) ──────────────────────────────────────── */
.ai-tool {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.ai-tool__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding: var(--space-4);
    background: #faf8ff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
}

.ai-tool__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 6px 12px;
    background: rgba(255, 107, 157, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
}

.ai-tool__badge-label {
    opacity: 0.75;
    font-weight: 500;
}

.ai-tool__bar-actions {
    display: flex;
    gap: var(--space-3, 0.75rem);
    flex-wrap: wrap;
}

/* ── Form controls ─────────────────────────────────────────────────────── */
.ai-form {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Anti-bot honeypot: visually hidden (not display:none — some bots skip those). */
.ai-form__hp {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}

.ai-form__row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-form__label {
    font-weight: 600;
    color: #2e2040;
    font-size: 0.95rem;
}

.ai-form__hint {
    font-weight: 400;
    color: #6b5f82;
    font-size: 0.85rem;
}

.ai-form__input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    color: #232526;
    transition: border-color 0.2s ease;
}

.ai-form__input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-color: var(--color-primary);
}

.ai-form__input--area {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.ai-form__actions {
    display: flex;
    gap: var(--space-3, 0.75rem);
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.ai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 12px 22px;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ai-btn--link {
    background: transparent;
    border-color: transparent;
    color: #6b5f82;
    padding: 8px 12px;
    font-weight: 500;
}

.ai-btn--link:hover:not(:disabled) {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ── Error message ─────────────────────────────────────────────────────── */
.ai-error {
    margin: 0;
    padding: 12px 16px;
    background: rgba(248, 113, 113, 0.12);
    color: #b3261e;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 12px;
    font-weight: 500;
}

/* ── Result block ──────────────────────────────────────────────────────── */
.ai-result {
    background: #1a1520;
    color: #f0e6ff;
    border-radius: 16px;
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ai-result__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3, 0.75rem);
}

.ai-result__title {
    margin: 0;
    font-size: 1.1rem;
    color: #ffb347;
    letter-spacing: 0.5px;
}

.ai-result .ai-btn--link {
    color: #ffb347;
}

.ai-result .ai-btn--link:hover {
    color: #fff;
}

.ai-result__body {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.65;
    color: #f0e6ff;
    max-height: 60vh;
    overflow-y: auto;
}

/* ── Responsive tweaks ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ai-page__title { font-size: 1.7rem; }
    .ai-tool__bar { flex-direction: column; align-items: flex-start; }
    .ai-btn { width: 100%; }
    .ai-form__actions { flex-direction: column; }
    .ai-tab { min-width: 0; width: 100%; }
}

/* Shared CTA button preset: keep buttons consistent across all pages. */
.home-btn,
.home-card__link,
.cute-download-link,
.text a.cute-download-link,
.submit-btn,
.newsletter-submit-btn,
.newsletter-beehiiv__cta,
.ai-btn--primary,
.ai-btn--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    border: 0;
    border-radius: var(--radius-full, 9999px);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #ff6b9d 0%, #a259c6 100%);
    box-shadow: var(--shadow-pink, 0 8px 24px rgba(255, 107, 157, 0.35));
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.home-btn:hover,
.home-card__link:hover,
.cute-download-link:hover,
.text a.cute-download-link:hover,
.submit-btn:hover,
.newsletter-submit-btn:hover,
.newsletter-beehiiv__cta:hover,
.ai-btn--primary:hover:not(:disabled),
.ai-btn--ghost:hover:not(:disabled) {
    color: #fff;
    background: linear-gradient(135deg, #ff6b9d 0%, #a259c6 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0, 0, 0, 0.4));
    text-decoration: none;
}

.home-btn:active,
.home-card__link:active,
.cute-download-link:active,
.text a.cute-download-link:active,
.submit-btn:active,
.newsletter-submit-btn:active,
.newsletter-beehiiv__cta:active,
.ai-btn--primary:active:not(:disabled),
.ai-btn--ghost:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn,
.newsletter-submit-btn {
    width: 100%;
}
