/* I'm In The Book Design System
   Target audience: grandparents 65+
   Minimum 20px body font, 56px buttons, responsive layout */

:root {
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
    --font-size-body: 20px;
    --font-size-h1: 42px;
    --font-size-h2: 32px;
    --font-size-h3: 24px;
    --font-size-small: 16px;
    --font-size-button: 20px;
    --font-size-hero: 56px;

    --color-primary: #2D7A5A;
    --color-primary-hover: #246B4D;
    --color-primary-light: #E8F3ED;
    --color-accent: #C4813D;
    --color-accent-hover: #B0722F;
    --color-accent-light: #FDF3E8;
    --color-text: #2D2418;
    --color-text-light: #6B5D50;
    --color-bg: #FBF7F2;
    --color-bg-soft: #F5F0EA;
    --color-border: #E8DFD4;
    --color-success: #4A8B5C;
    --color-error: #C45B5B;
    --color-warning: #D4913D;

    --button-height: 56px;
    --button-height-large: 64px;
    --input-height: 52px;
    --border-radius: 12px;
    --border-radius-small: 8px;
    --border-radius-large: 16px;
    --max-width: 960px;
    --max-width-wide: 1100px;
    --spacing: 24px;
    --spacing-small: 16px;
    --spacing-large: 32px;
    --spacing-xl: 48px;

    --shadow-sm: 0 1px 3px rgba(45, 36, 24, 0.08);
    --shadow-md: 0 4px 12px rgba(45, 36, 24, 0.10);
    --shadow-lg: 0 8px 24px rgba(45, 36, 24, 0.12);
    --shadow-card: 0 2px 8px rgba(45, 36, 24, 0.06);
}

/* === RESET & BASE === */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

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

a {
    color: var(--color-primary);
    text-decoration: underline;
}

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

/* === LAYOUT === */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 20px;
}

.page-content {
    padding: var(--spacing-large) 0;
}

/* === TYPOGRAPHY === */

h1 {
    font-family: var(--font-display);
    font-size: var(--font-size-h1);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--spacing-small) 0;
    color: var(--color-text);
}

h2 {
    font-family: var(--font-display);
    font-size: var(--font-size-h2);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 var(--spacing-small) 0;
}

h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-h3);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 var(--spacing-small) 0;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: var(--font-size-hero);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 var(--spacing) 0;
}

.subline {
    font-size: 22px;
    color: var(--color-text-light);
    line-height: 1.4;
    margin: 0 0 var(--spacing-large) 0;
}

.helper-text {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
}

/* === BUTTONS === */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--button-height);
    padding: 12px 32px;
    font-family: var(--font-body);
    font-size: var(--font-size-button);
    font-weight: 700;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    display: flex;
    width: 100%;
    min-height: var(--button-height-large);
    background: var(--color-primary);
    color: white;
    font-size: 22px;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: var(--color-bg);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary-light);
    text-decoration: none;
}

.btn-text {
    background: none;
    color: var(--color-primary);
    border: none;
    min-height: auto;
    padding: 8px 16px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* === FORMS === */

label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    width: 100%;
    min-height: var(--input-height);
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-small);
    background: var(--color-bg);
    color: var(--color-text);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 122, 90, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: #999;
}

.form-group {
    margin-bottom: var(--spacing);
}

.form-row {
    display: flex;
    gap: var(--spacing);
}

.form-row > * {
    flex: 1;
}

/* === CARDS (selectable) === */

.card {
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing);
    margin-bottom: var(--spacing-small);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.card:hover {
    border-color: var(--color-primary);
}

.card.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.card-title {
    font-size: var(--font-size-body);
    font-weight: 700;
    margin: 0 0 4px 0;
}

.card-description {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
    margin: 0;
}

.hint-text {
    font-size: var(--font-size-small);
    color: var(--color-primary);
    margin: 8px 0 0 0;
    font-style: italic;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-small);
}

/* 2-column card grid on desktop */
.card-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing);
}

/* 3-column card grid on desktop */
.card-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing);
}

@media (max-width: 960px) {
    .card-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .card-grid-2col,
    .card-grid-3col {
        grid-template-columns: 1fr;
    }
}

/* Featured card (spans full width, slightly different styling) */
.card.card-featured {
    border: 3px solid var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary-light) 0%, #E8F3ED 100%);
    position: relative;
}

.card-badge {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Card with icon layout */
.card-icon {
    font-size: 36px;
    margin-bottom: 8px;
    line-height: 1;
}

/* Character card (used on Characters page) */
.character-card {
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius-large);
    padding: var(--spacing);
    background: var(--color-bg);
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.character-card:hover {
    box-shadow: var(--shadow-md);
}

.character-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-small);
}

/* Grandparent toggle card */
.gp-toggle-card {
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius-large);
    padding: var(--spacing);
    background: var(--color-bg);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: var(--spacing-small);
}

.gp-toggle-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.gp-toggle-card.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.gp-toggle-card .gp-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-bg-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.gp-toggle-card.selected .gp-icon {
    background: var(--color-primary);
    color: white;
}

.gp-toggle-card .gp-info {
    flex: 1;
}

.gp-toggle-card .gp-info strong {
    font-size: var(--font-size-body);
    display: block;
}

.gp-toggle-card .gp-info small {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
}

.gp-toggle-card .gp-check {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.gp-toggle-card.selected .gp-check {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Children grid */
.children-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing);
}

/* Center single child card */
.children-grid.children-grid-single {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .children-grid {
        grid-template-columns: 1fr;
    }
    .children-grid.children-grid-single {
        max-width: 100%;
    }
}

/* Grandparents grid */
.gp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing);
}

@media (max-width: 640px) {
    .gp-grid {
        grid-template-columns: 1fr;
    }
}

.gp-grid .character-card {
    margin-top: var(--spacing-small);
}

/* Section divider within a step */
.step-section {
    margin-top: var(--spacing-large);
    margin-bottom: var(--spacing);
}

.step-section-title {
    font-size: var(--font-size-h2);
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--color-text);
    text-align: center;
}

.step-section-subtitle {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
    margin: 0 0 var(--spacing) 0;
    text-align: center;
}

/* Page header area */
.page-header {
    text-align: center;
    margin-bottom: var(--spacing-large);
}

.page-header h1 {
    margin-bottom: 8px;
}

.page-header .helper-text {
    max-width: 600px;
    margin: 0 auto;
}

/* === RADIO/TOGGLE BUTTONS === */

.toggle-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.toggle-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--button-height);
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    font-weight: 600;
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-bg);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    -webkit-tap-highlight-color: transparent;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.toggle-option:hover {
    border-color: var(--color-primary);
}

.toggle-option.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.toggle-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* === PROGRESS INDICATOR (step-based) === */

.progress-indicator {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: var(--spacing-small);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    margin-bottom: var(--spacing);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Named step progress */
.step-progress {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--spacing-large);
    padding: 10px var(--spacing-small) 0;
    overflow: visible;
    scrollbar-width: none;
}
.step-progress::-webkit-scrollbar {
    display: none;
}

.step-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    white-space: nowrap;
}

.step-progress-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-light);
    flex-shrink: 0;
    transition: all 0.2s;
}

.step-progress-dot.completed {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.step-progress-dot.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(45, 122, 90, 0.2);
}

.step-progress-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-light);
    margin-top: 6px;
    text-align: center;
    max-width: 80px;
    line-height: 1.2;
}

.step-progress-label.active {
    color: var(--color-primary);
    font-weight: 700;
}

.step-progress-label.completed {
    color: var(--color-success);
}

.step-progress-connector {
    width: 24px;
    height: 3px;
    background: var(--color-border);
    flex-shrink: 0;
    margin: 0 4px;
    margin-top: 15px; /* vertically center with 32px dot (32/2 - 3/2 = 14.5) */
}

.step-progress-connector.completed {
    background: var(--color-success);
}

/* On mobile, show a compact version */
@media (max-width: 640px) {
    .step-progress {
        gap: 0;
        padding: 10px 8px 0;
    }
    .step-progress-dot {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .step-progress-label {
        font-size: 11px;
        max-width: 56px;
    }
    .step-progress-connector {
        width: 12px;
        margin: 0 2px;
        margin-top: 13px; /* vertically center with 28px dot (28/2 - 3/2 = 12.5) */
    }
}

/* Hide labels on very small screens, keep dots */
@media (max-width: 400px) {
    .step-progress-label {
        display: none;
    }
    .step-progress-connector {
        width: 16px;
    }
}

/* === STATUS & FEEDBACK === */

.error {
    color: var(--color-error);
    font-weight: 700;
    font-size: var(--font-size-body);
    margin-bottom: 8px;
}

.success {
    color: var(--color-success);
    font-weight: 700;
}

.alert {
    padding: var(--spacing);
    border-radius: var(--border-radius-small);
    margin-bottom: var(--spacing);
}

.alert-error {
    background: #FDE8E8;
    border: 2px solid var(--color-error);
    color: var(--color-error);
}

.alert-success {
    background: #E8F5E9;
    border: 2px solid var(--color-success);
    color: #1B5E20;
}

/* === PRICE DISPLAY === */

.price-sticky {
    position: sticky;
    bottom: 0;
    background: var(--color-bg);
    border-top: 2px solid var(--color-border);
    padding: var(--spacing-small) 20px;
    text-align: center;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.price-amount {
    font-size: var(--font-size-h2);
    color: var(--color-text);
}

/* === CHECKLIST (generation progress) === */

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: var(--font-size-body);
    border-bottom: 1px solid var(--color-border);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* === FAQ ACCORDION === */

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing) 0;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    font-weight: 700;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    color: var(--color-text-light);
    flex-shrink: 0;
    margin-left: 16px;
    transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 0 0 var(--spacing) 0;
    color: var(--color-text-light);
    line-height: 1.6;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

/* === PHOTO UPLOAD === */

.upload-zone {
    border: 3px dashed var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.upload-zone-text {
    font-size: var(--font-size-body);
    font-weight: 600;
    color: var(--color-text-light);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: var(--spacing);
}

.photo-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--border-radius-small);
    overflow: hidden;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === BOOK VIEWER === */

.book-page {
    max-width: 600px;
    margin: 0 auto;
}

.book-page img {
    width: 100%;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.redraw-wrapper {
    position: relative;
}

.redraw-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--border-radius);
    z-index: 5;
}

.redraw-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.book-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing);
    gap: var(--spacing);
}

.page-counter {
    font-size: var(--font-size-body);
    font-weight: 600;
    text-align: center;
}

/* === VERSION GALLERY (redraws) === */

.version-gallery {
    display: flex;
    gap: 8px;
    margin-top: var(--spacing-small);
    overflow-x: auto;
}

.version-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    border: 3px solid var(--color-border);
    cursor: pointer;
    flex-shrink: 0;
}

.version-thumb.selected {
    border-color: var(--color-primary);
}

.version-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === FOOTER === */

.footer {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-large) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-light);
    font-size: var(--font-size-small);
}

.footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
}

.footer a {
    color: var(--color-text-light);
}

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

/* === CHARACTER TABS (Photos page) === */

.char-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: var(--spacing);
    flex-wrap: wrap;
}

.char-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius);
    background: var(--color-bg);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    font-weight: 600;
    color: var(--color-text);
    transition: all 0.2s;
    min-height: var(--button-height);
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

.char-tab:hover {
    border-color: var(--color-primary);
}

.char-tab.active {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.char-tab .tab-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.char-tab .tab-status.complete {
    background: var(--color-success);
    color: white;
}

.char-tab .tab-status.incomplete {
    background: var(--color-warning);
    color: white;
}

/* Appearance swatches */
.swatch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.swatch-option {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 8px;
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius-small);
    background: var(--color-bg);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    min-height: 48px;
}

.swatch-option:hover {
    border-color: var(--color-primary);
}

.swatch-option.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.swatch-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.swatch-color {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.skin-swatch-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.skin-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius-small);
    background: var(--color-bg);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
}

.skin-swatch:hover {
    border-color: var(--color-primary);
}

.skin-swatch.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.skin-swatch input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.skin-swatch .swatch-color {
    width: 44px;
    height: 44px;
}

/* Appearance 2-column layout on desktop */
.appearance-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing);
}

@media (max-width: 640px) {
    .appearance-2col {
        grid-template-columns: 1fr;
    }
}

/* === MULTI-SELECT OPTION CARDS (Villages questions) === */

.option-card {
    position: relative;
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-small) var(--spacing);
    background: var(--color-bg);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    box-shadow: var(--shadow-card);
}

.option-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.option-card.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
}

.option-card.card-maxed {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.option-card .option-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.option-card .option-text {
    font-size: var(--font-size-body);
    font-weight: 600;
    flex: 1;
}

.option-card .option-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s;
    color: transparent;
}

.option-card.selected .option-check {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Cover preview cards (Q7) */
.option-card.cover-card {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    min-height: auto;
}

.option-card.cover-card .cover-thumb {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: block;
}

.option-card.cover-card .cover-card-body {
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-card.cover-card .cover-card-title {
    font-size: var(--font-size-body, 16px);
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}

.option-card.cover-card .cover-card-desc {
    font-size: var(--font-size-small, 14px);
    color: var(--text-secondary, #666);
    line-height: 1.3;
}

.option-card.cover-card .option-check {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--color-border);
}

.option-card.cover-card.selected .option-check {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

@media (max-width: 640px) {
    .option-card.cover-card .cover-thumb {
        max-height: 160px;
    }
}

/* Options grid: 3col desktop, 2col tablet, 1col mobile */
.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-small);
}

@media (max-width: 960px) {
    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* Selection counter */
.selection-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 24px;
    background: var(--color-bg-soft);
    border: 2px solid var(--color-border);
    font-size: var(--font-size-body);
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: var(--spacing);
}

.selection-counter.met {
    background: #E8F5E9;
    border-color: var(--color-success);
    color: var(--color-success);
}

/* === STORY TYPE CARDS === */

.story-card {
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius-large);
    padding: var(--spacing);
    background: var(--color-bg);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-card);
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.story-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.story-card.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
}

.story-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.story-card .story-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.story-card .story-title {
    font-size: var(--font-size-body);
    font-weight: 700;
    margin: 0 0 8px 0;
}

.story-card .story-desc {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
    margin: 0 0 8px 0;
    line-height: 1.4;
    flex: 1;
}

.story-card .story-age {
    font-size: 14px;
    color: var(--color-primary);
    font-weight: 600;
}

/* Featured story card */
.story-card.story-featured {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #E8F3ED 0%, var(--color-primary-light) 100%);
    grid-column: 1 / -1;
}

@media (min-width: 641px) {
    .story-card.story-featured {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: var(--spacing);
        text-align: left;
        padding: var(--spacing) var(--spacing-large);
    }
    .story-card.story-featured .story-icon {
        font-size: 56px;
        margin-bottom: 0;
        display: flex;
        align-items: center;
    }
}

/* === ART STYLE CARDS === */

.art-card {
    border: 3px solid var(--color-border);
    border-radius: var(--border-radius-large);
    padding: var(--spacing);
    background: var(--color-bg);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-card);
    text-align: center;
    position: relative;
}

.art-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.art-card.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
}

.art-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.art-card .art-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.art-card .art-title {
    font-size: var(--font-size-body);
    font-weight: 700;
    margin: 0 0 8px 0;
}

.art-card .art-desc {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.4;
}

/* Art grid: 2-3 cols */
.art-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing);
}

@media (max-width: 960px) {
    .art-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .art-grid {
        grid-template-columns: 1fr;
    }
}

/* === DEDICATION PAGE === */

.dedication-container {
    max-width: 640px;
    margin: 0 auto;
}

.dedication-container .form-group label {
    font-size: var(--font-size-body);
}

.dedication-preview {
    background: var(--color-bg-soft);
    border-radius: var(--border-radius);
    padding: var(--spacing);
    margin-bottom: var(--spacing);
    text-align: center;
    font-style: italic;
    color: var(--color-text-light);
    border: 2px dashed var(--color-border);
}

/* === BOTTOM ACTION BAR === */

.bottom-action {
    margin-top: var(--spacing-large);
    padding-top: var(--spacing);
    text-align: center;
}

.bottom-action .btn-primary {
    max-width: 480px;
    margin: 0 auto;
}

/* === ACCESSIBILITY === */

@media (prefers-contrast: more) {
    :root {
        --color-border: #999999;
        --color-text-light: #333333;
    }
    .card { border-width: 4px; }
    .card.selected { border-width: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}

*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* === RESPONSIVE === */

@media (max-width: 480px) {
    :root {
        --font-size-body: 18px;
        --font-size-h1: 28px;
        --font-size-h2: 24px;
        --font-size-h3: 22px;
        --font-size-hero: 32px;
        --spacing: 20px;
        --spacing-large: 24px;
        --spacing-xl: 32px;
    }

    .container {
        padding: 0 16px;
    }

    .hero-headline {
        font-size: var(--font-size-hero);
    }

    .subline {
        font-size: 18px;
    }

    .btn-primary {
        font-size: 20px;
        min-height: var(--button-height);
    }

    .card {
        padding: var(--spacing-small);
    }

    .footer a {
        display: inline-block;
        margin: 4px 8px;
    }
}

@media (max-width: 640px) {
    .hero-headline {
        font-size: 36px;
    }

    .subline {
        font-size: var(--font-size-body);
    }

    .form-row {
        flex-direction: column;
        gap: var(--spacing-small);
    }

    .toggle-group {
        flex-direction: column;
    }

    .toggle-option {
        min-width: unset;
    }

    .footer p {
        line-height: 2;
    }

    .page-header {
        margin-bottom: var(--spacing);
    }

    .swatch-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .skin-swatch-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop card grid: 2 columns for story type */
@media (min-width: 641px) {
    .card-grid-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing);
    }
}

/* Two-column toggle (boy/girl, yes/no) stays side by side on mobile */
.toggle-group-inline {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.toggle-group-inline .toggle-option {
    flex: 1;
    min-width: 0;
}

/* === LOADING SPINNER === */

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* === LANDING PAGE === */

.section {
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--color-border);
}

.section:first-of-type {
    border-top: none;
}

.how-it-works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-large);
}

.how-it-works-card {
    text-align: center;
    padding: var(--spacing);
    background: var(--color-bg-soft);
    border-radius: var(--border-radius);
}

.how-it-works-card .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.how-it-works-card h3 {
    margin-bottom: 8px;
}

.how-it-works-card p {
    color: var(--color-text-light);
    margin: 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing);
}

.testimonial-card {
    background: var(--color-bg-soft);
    border-radius: var(--border-radius);
    padding: var(--spacing);
}

.testimonial-card .quote {
    font-style: italic;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.testimonial-card .author {
    font-weight: 700;
    color: var(--color-text-light);
    margin: 0;
    font-size: 18px;
}

/* On wider screens, show how-it-works in 3 cols */
@media (min-width: 641px) {
    .how-it-works-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === HEADER === */

.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-header .logo a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

@media (max-width: 480px) {
    .site-header .logo a {
        font-size: 22px;
    }
}

/* === UTILITY === */

.text-center { text-align: center; }
.text-muted { color: var(--color-text-light); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-small); }
.mt-2 { margin-top: var(--spacing); }
.mt-3 { margin-top: var(--spacing-large); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-small); }
.mb-2 { margin-bottom: var(--spacing); }
.mb-3 { margin-bottom: var(--spacing-large); }
.hidden { display: none; }
.w-full { width: 100%; }
.overflow-hidden { overflow: hidden; }

/* ============================================================
   LANDING PAGE (PhotoAI-inspired, scoped to body.landing)
   ============================================================ */

/* --- Landing: base overrides --- */

body.landing {
    background: var(--color-bg);
    color: var(--color-text);
}

/* --- Landing: urgency banner --- */

body.landing .urgency-banner {
    background: var(--color-accent);
    color: var(--color-text);
    text-align: center;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
}

/* --- Landing: sticky header --- */

body.landing .landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 24px;
    background: rgba(26, 46, 31, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.3s;
}

body.landing .landing-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.landing .landing-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap;
}

body.landing .landing-logo .logo-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

body.landing .landing-logo .logo-text {
    font-family: var(--font-display);
    font-size: 24px;
    color: #FFFFFF;
    line-height: 1;
}

body.landing .landing-logo .logo-prefix {
    font-weight: 400;
}

body.landing .landing-logo .logo-emphasis {
    font-weight: 700;
}

body.landing .landing-logo:hover {
    text-decoration: none;
}

body.landing .landing-logo:hover .logo-text {
    color: #C4813D;
}

body.landing .btn-cta-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2D7A5A, #246B4D);
    color: #FFFFFF;
    border: none;
    padding: 10px 28px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(45, 122, 90, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 44px;
}

body.landing .btn-cta-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(45, 122, 90, 0.45);
    color: #FFFFFF;
    text-decoration: none;
}

/* --- Landing: hero section --- */

body.landing .hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2e1f 0%, #243d2a 50%, #1a2e1f 100%);
    overflow: hidden;
    padding: 120px 24px 80px;
}

/* --- Star particles (CSS-only twinkling dots) --- */

body.landing .hero-stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

body.landing .hero-stars::before,
body.landing .hero-stars::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

body.landing .hero-stars::before {
    width: 2px;
    height: 2px;
    box-shadow:
        80px 60px 0 0 rgba(255,255,255,0.6),
        200px 120px 0 0 rgba(255,255,255,0.4),
        350px 40px 0 0 rgba(255,255,255,0.7),
        500px 200px 0 0 rgba(255,255,255,0.3),
        650px 80px 0 0 rgba(255,255,255,0.5),
        800px 180px 0 0 rgba(255,255,255,0.6),
        950px 30px 0 0 rgba(255,255,255,0.4),
        1100px 160px 0 0 rgba(255,255,255,0.7),
        120px 350px 0 0 rgba(255,255,255,0.5),
        300px 400px 0 0 rgba(255,255,255,0.3),
        450px 300px 0 0 rgba(255,255,255,0.6),
        600px 380px 0 0 rgba(255,255,255,0.4),
        750px 320px 0 0 rgba(255,255,255,0.5),
        900px 420px 0 0 rgba(255,255,255,0.7),
        1050px 350px 0 0 rgba(255,255,255,0.3),
        170px 520px 0 0 rgba(255,255,255,0.6),
        400px 560px 0 0 rgba(255,255,255,0.4),
        550px 480px 0 0 rgba(255,255,255,0.5),
        700px 550px 0 0 rgba(255,255,255,0.7),
        850px 500px 0 0 rgba(255,255,255,0.3),
        60px 700px 0 0 rgba(255,255,255,0.5),
        250px 680px 0 0 rgba(255,255,255,0.4),
        500px 720px 0 0 rgba(255,255,255,0.6),
        750px 650px 0 0 rgba(255,255,255,0.5),
        1000px 700px 0 0 rgba(255,255,255,0.4),
        1150px 550px 0 0 rgba(255,255,255,0.6),
        1200px 300px 0 0 rgba(255,255,255,0.3),
        50px 150px 0 0 rgba(255,255,255,0.5),
        1300px 100px 0 0 rgba(255,255,255,0.4),
        1350px 450px 0 0 rgba(255,255,255,0.6);
    animation: twinkle 4s ease-in-out infinite alternate;
}

body.landing .hero-stars::after {
    width: 1px;
    height: 1px;
    box-shadow:
        150px 90px 0 0 rgba(255,255,255,0.5),
        280px 250px 0 0 rgba(255,255,255,0.3),
        430px 130px 0 0 rgba(255,255,255,0.6),
        580px 300px 0 0 rgba(255,255,255,0.4),
        720px 50px 0 0 rgba(255,255,255,0.5),
        870px 270px 0 0 rgba(255,255,255,0.6),
        1020px 100px 0 0 rgba(255,255,255,0.3),
        100px 450px 0 0 rgba(255,255,255,0.5),
        350px 500px 0 0 rgba(255,255,255,0.4),
        520px 420px 0 0 rgba(255,255,255,0.6),
        680px 480px 0 0 rgba(255,255,255,0.5),
        830px 380px 0 0 rgba(255,255,255,0.3),
        980px 530px 0 0 rgba(255,255,255,0.7),
        200px 620px 0 0 rgba(255,255,255,0.4),
        470px 650px 0 0 rgba(255,255,255,0.5),
        630px 600px 0 0 rgba(255,255,255,0.6),
        790px 700px 0 0 rgba(255,255,255,0.3),
        1100px 620px 0 0 rgba(255,255,255,0.5),
        40px 250px 0 0 rgba(255,255,255,0.4),
        1250px 200px 0 0 rgba(255,255,255,0.6);
    animation: twinkle 5s ease-in-out 1s infinite alternate;
}

@keyframes twinkle {
    0%   { opacity: 0.4; }
    50%  { opacity: 0.8; }
    100% { opacity: 0.5; }
}

/* --- Floating gallery (two rows drifting behind hero text) --- */

body.landing .hero-gallery {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 1;
}

body.landing .gallery-row {
    display: flex;
    gap: 20px;
    width: max-content;
    will-change: transform;
}

body.landing .gallery-row img {
    width: 280px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    opacity: 0.45;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

body.landing .gallery-row-1 {
    animation: scroll-left 34s linear infinite;
}

body.landing .gallery-row-2 {
    animation: scroll-right 41s linear infinite;
}

body.landing .gallery-row-3 {
    animation: scroll-left 38s linear infinite;
}

body.landing .gallery-row-4 {
    animation: scroll-right 36s linear infinite;
}

body.landing .gallery-row-5 {
    animation: scroll-left 39s linear infinite;
}

/* Fixed pixel translate = exactly one set of 6 images (6 × 300px).
   Using px instead of -50% prevents gaps on wide screens (>1920px). */
@keyframes scroll-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-1800px); }
}

@keyframes scroll-right {
    0%   { transform: translateX(-1800px); }
    100% { transform: translateX(0); }
}

/* --- Hero content (centered, on top of everything) --- */

body.landing .hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 750px;
    background: radial-gradient(ellipse at center, rgba(20, 35, 25, 0.55) 0%, rgba(20, 35, 25, 0.3) 50%, transparent 80%);
    padding: 60px 80px;
    border-radius: 40px;
}

body.landing .hero-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.1;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

body.landing .hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
    margin: 0 0 36px 0;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

body.landing .hero-meta {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin: 20px 0 16px;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

body.landing .hero-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 17px;
    color: #FFFFFF;
}

body.landing .hero-rating .stars {
    color: #C4813D;
    font-size: 20px;
    letter-spacing: 2px;
}

/* --- CTA button (gradient, like PhotoAI) --- */

body.landing .btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2D7A5A, #246B4D);
    color: #FFFFFF;
    border: none;
    padding: 18px 52px;
    font-size: 22px;
    font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(45, 122, 90, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    min-height: 60px;
    cursor: pointer;
}

body.landing .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 36px rgba(45, 122, 90, 0.55);
    color: #FFFFFF;
    text-decoration: none;
}

body.landing .btn-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 16px rgba(45, 122, 90, 0.4);
}

/* Hero CTA - solid, no animation (pulsing reads as sketchy to 65+ users) */
body.landing .btn-cta-hero {
    box-shadow: 0 4px 24px rgba(45, 122, 90, 0.4);
}

/* --- Social proof bar --- */

body.landing .social-proof-bar {
    background: var(--color-accent-light);
    border-bottom: 1px solid rgba(45, 35, 25, 0.1);
    padding: 28px 24px;
}

body.landing .social-proof-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

body.landing .proof-item {
    font-size: 18px;
    color: var(--color-text);
    text-align: center;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.landing .proof-icon {
    font-size: 18px;
}

body.landing .proof-divider {
    width: 1px;
    height: 20px;
    background: rgba(45, 35, 25, 0.2);
}

body.landing .proof-item strong {
    font-weight: 800;
    color: var(--color-text);
}

body.landing .proof-divider {
    width: 1px;
    height: 28px;
    background: rgba(45, 35, 25, 0.2);
    flex-shrink: 0;
}

/* --- Landing section containers --- */

body.landing .landing-section {
    padding: 80px 24px;
}

body.landing .landing-section-alt {
    background: var(--color-bg-soft);
}

body.landing .landing-container {
    max-width: 1000px;
    margin: 0 auto;
}

body.landing .section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

body.landing .section-subtitle {
    font-size: 20px;
    color: var(--color-text-light);
    text-align: center;
    margin: 0 0 48px 0;
    line-height: 1.5;
}

/* --- Book showcase grid --- */

body.landing .showcase-container {
    max-width: 800px;
    margin: 0 auto;
}

body.landing .showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    padding: 12px;
}

body.landing .showcase-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(45, 35, 25, 0.15);
    background: #FFFFFF;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s;
    cursor: pointer;
}

body.landing .showcase-card:hover {
    transform: rotate(0deg) translateY(-8px) !important;
    box-shadow: 0 16px 48px rgba(45, 35, 25, 0.25);
}

body.landing .showcase-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

/* --- Lightbox modal --- */

body.landing .lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    cursor: pointer;
}

body.landing .lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
}

body.landing .lightbox-close {
    position: fixed;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 48px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    padding: 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

body.landing .lightbox-close:hover {
    opacity: 1;
}

[x-cloak] {
    display: none !important;
}

/* --- How It Works (steps grid) --- */

body.landing .steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-top: 48px;
}

body.landing .step-card {
    text-align: center;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 36px 28px 32px;
    box-shadow: 0 4px 20px rgba(45, 35, 25, 0.08);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

body.landing .step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(45, 35, 25, 0.14);
}

body.landing .step-number {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C4813D, #B0722F);
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(196, 129, 61, 0.3);
}

body.landing .step-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 12px auto 20px;
    box-shadow: 0 4px 16px rgba(45, 35, 25, 0.12);
}

body.landing .step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.landing .step-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 10px 0;
}

body.landing .step-card p {
    font-size: 17px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

/* --- Differentiation --- */

body.landing .differentiation-section {
    background: var(--color-bg);
    padding-top: 48px;
    padding-bottom: 64px;
}

body.landing .diff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

body.landing .diff-card {
    background: white;
    border-radius: 12px;
    padding: 28px 24px;
    border: 1px solid rgba(45, 35, 25, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.landing .diff-card-icon {
    font-size: 28px;
    margin-bottom: 12px;
}

body.landing .diff-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

body.landing .diff-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #5a4e3e;
    margin: 0;
}

/* --- Pricing --- */

body.landing .pricing-section {
    background: var(--color-bg);
    padding-top: 60px;
    padding-bottom: 60px;
}

body.landing .pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 48px auto 0;
    align-items: stretch;
}

body.landing .pricing-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 40px 32px;
    border: 2px solid var(--color-border);
    text-align: center;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

body.landing .pricing-card .btn-pricing {
    margin-top: auto;
}

body.landing .pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(45, 36, 24, 0.12);
}

body.landing .pricing-card-featured {
    border-color: #C4813D;
    box-shadow: 0 8px 32px rgba(196, 129, 61, 0.15);
}

body.landing .pricing-card-featured:hover {
    box-shadow: 0 12px 40px rgba(196, 129, 61, 0.22);
}

body.landing .pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #C4813D, #B0722F);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

body.landing .pricing-card-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px 0;
}

body.landing .pricing-card-desc {
    font-size: 16px;
    color: #6B5D50;
    margin: 0;
}

body.landing .pricing-card-price {
    padding: 24px 0;
}

body.landing .pricing-amount {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--color-text);
}

body.landing .pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    text-align: left;
}

body.landing .pricing-features li {
    padding: 8px 0;
    font-size: 17px;
    color: #6B5D50;
    border-bottom: 1px solid var(--color-border);
    padding-left: 28px;
    position: relative;
}

body.landing .pricing-features li:last-child {
    border-bottom: none;
}

body.landing .pricing-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #2D7A5A;
    font-weight: 700;
}

body.landing .btn-pricing {
    display: block;
    width: 100%;
    min-height: 56px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

body.landing .btn-pricing-primary {
    background: linear-gradient(135deg, #C4813D, #B0722F);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(196, 129, 61, 0.3);
}

body.landing .btn-pricing-primary:hover {
    box-shadow: 0 6px 24px rgba(196, 129, 61, 0.45);
    transform: translateY(-1px);
    color: #FFFFFF;
    text-decoration: none;
}

body.landing .btn-pricing-secondary {
    background: #FFFFFF;
    color: #2D7A5A;
    border: 2px solid #2D7A5A;
}

body.landing .btn-pricing-secondary:hover {
    background: var(--color-primary-light);
    text-decoration: none;
}

/* --- Testimonials --- */

body.landing .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 48px;
}

body.landing .testimonial-card-new {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 32px 28px;
    border-left: 4px solid transparent;
    border-image: linear-gradient(to bottom, #C4813D, #B0722F) 1;
    box-shadow: 0 4px 20px rgba(45, 35, 25, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

body.landing .testimonial-card-new:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(45, 35, 25, 0.14);
}

body.landing .testimonial-stars {
    color: #C4813D;
    font-size: 22px;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

body.landing .testimonial-quote {
    font-size: 19px;
    color: var(--color-text);
    line-height: 1.6;
    margin: 0 0 16px 0;
    font-style: italic;
}

body.landing .testimonial-author {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-light);
    margin: 0;
}

/* --- Final CTA (dark bookend section) --- */

body.landing .final-cta {
    background: linear-gradient(135deg, #1a2e1f 0%, #243d2a 50%, #1a2e1f 100%);
    padding: 80px 24px;
    text-align: center;
}

body.landing .final-cta h2 {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

body.landing .final-cta p {
    font-size: 20px;
    color: #B8D4C4;
    margin: 0 0 36px 0;
    line-height: 1.5;
}

/* --- FAQ (landing-scoped overrides) --- */

body.landing .faq-item {
    border-bottom: 1px solid rgba(45, 35, 25, 0.12);
}

body.landing .faq-question {
    color: var(--color-text);
    padding: 22px 0;
}

body.landing .faq-question::after {
    color: var(--color-text-light);
}

body.landing .faq-answer {
    color: var(--color-text-light);
    transition: opacity 0.2s ease-out;
}

body.landing .faq-answer a {
    color: #2D7A5A;
}

/* --- Landing footer (expanded, dark, multi-column) --- */

body.landing .landing-footer {
    background: #1a2e1f;
    padding: 64px 24px 32px;
    border-top: none;
}

body.landing .footer-inner {
    max-width: 1000px;
    margin: 0 auto;
}

body.landing .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

body.landing .footer-col h4 {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 16px 0;
}

body.landing .footer-logo {
    font-family: var(--font-display);
    display: flex;
    align-items: center;
}

body.landing .footer-logo .logo-prefix {
    font-weight: 400;
}

body.landing .footer-logo .logo-emphasis {
    font-weight: 700;
}

body.landing .footer-brand p {
    font-size: 16px;
    color: #B8D4C4;
    line-height: 1.6;
    margin: 0;
}

body.landing .footer-col a {
    display: block;
    font-size: 16px;
    color: #B8D4C4;
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.2s;
}

body.landing .footer-col a:hover {
    color: #FFFFFF;
    text-decoration: none;
}

body.landing .footer-bottom {
    border-top: 1px solid rgba(184, 196, 216, 0.15);
    padding-top: 24px;
    text-align: center;
}

body.landing .footer-bottom p {
    font-size: 15px;
    color: #B8D4C4;
    margin: 0;
}

/* --- Transformation showcase --- */

body.landing .transformation-section .landing-container {
    max-width: 1300px;
}

body.landing .transform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

body.landing .transform-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 20px 16px;
    box-shadow: 0 4px 24px rgba(45, 35, 25, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

body.landing .transform-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 36px rgba(45, 35, 25, 0.16);
}

body.landing .transform-pair {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

body.landing .transform-side {
    flex: 1;
    position: relative;
    min-width: 0;
    cursor: pointer;
}

body.landing .transform-side img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}

body.landing .transform-photo img {
    border: 3px solid #E8E0D8;
}

body.landing .transform-illustration img {
    border: 3px solid #C4813D;
    box-shadow: 0 4px 16px rgba(196, 129, 61, 0.2);
}

body.landing .transform-label {
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-light);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.landing .transform-arrow {
    flex-shrink: 0;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.landing .sparkle-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.landing .sparkle {
    font-size: 28px;
    color: #C4813D;
    animation: sparkle-pulse 2s ease-in-out infinite;
}

@keyframes sparkle-pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

body.landing .transform-caption {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text);
    margin: 14px 0 0 0;
}

/* --- Book flipper / sample gallery --- */

body.landing .book-flipper-section {
    background: var(--color-bg-soft);
}

body.landing .book-flipper-section .landing-container {
    max-width: 1400px;
}

body.landing .peek-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

body.landing .peek-card {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(45, 36, 24, 0.12);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

body.landing .peek-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(196, 129, 61, 0.2);
}

body.landing .peek-card {
    position: relative;
}

body.landing .peek-card img {
    width: 100%;
    height: auto;
    display: block;
}

body.landing .peek-row-label {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

body.landing .peek-style-badge {
    display: block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-light);
    letter-spacing: 0.03em;
    padding: 6px 0 2px;
    text-align: center;
}

/* ============================================================
   LANDING PAGE: responsive breakpoints
   ============================================================ */

/* --- 1024px and below: showcase 2x2 --- */
@media (max-width: 1024px) {
    body.landing .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    body.landing .gallery-row img {
        width: 240px;
        height: 170px;
    }

    body.landing .transform-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }

    body.landing .transform-card {
        padding: 24px;
    }

    body.landing .peek-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

/* --- 768px and below --- */
@media (max-width: 768px) {
    body.landing .showcase-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    body.landing .steps-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    body.landing .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    body.landing .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    body.landing .pricing-card-featured {
        order: -1;
    }

    body.landing .social-proof-inner {
        flex-direction: column;
        gap: 16px;
    }

    body.landing .proof-divider {
        width: 60px;
        height: 1px;
    }

    body.landing .diff-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    body.landing .peek-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    body.landing .book-flipper-track {
        gap: 16px;
        padding: 12px 16px 20px;
    }

    body.landing .landing-section {
        padding: 60px 20px;
    }

    body.landing .final-cta {
        padding: 60px 20px;
    }

    body.landing .gallery-row img {
        width: 200px;
        height: 140px;
    }

    body.landing .gallery-row {
        gap: 14px;
    }

    body.landing .hero {
        padding: 100px 20px 60px;
    }

    body.landing .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
}

/* --- 480px and below (mobile) --- */
@media (max-width: 480px) {
    body.landing .peek-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    body.landing .hero {
        min-height: 100svh;
        padding: 90px 16px 48px;
    }

    body.landing .hero-title {
        font-size: 28px;
    }

    body.landing .hero-subtitle {
        font-size: 17px;
        margin-bottom: 28px;
    }

    body.landing .btn-cta {
        padding: 16px 36px;
        font-size: 20px;
        min-height: 56px;
        width: 100%;
    }

    body.landing .hero-meta {
        font-size: 14px;
    }

    body.landing .hero-rating {
        font-size: 15px;
        flex-direction: column;
        gap: 4px;
    }

    body.landing .gallery-row img {
        width: 160px;
        height: 115px;
        border-radius: 12px;
    }

    body.landing .gallery-row {
        gap: 10px;
    }

    body.landing .showcase-card {
        transform: rotate(0deg) !important;
    }

    body.landing .section-title {
        font-size: 26px;
    }

    body.landing .section-subtitle {
        font-size: 17px;
        margin-bottom: 32px;
    }

    body.landing .step-card {
        padding: 32px 20px 28px;
    }

    body.landing .testimonial-quote {
        font-size: 17px;
    }

    body.landing .landing-section {
        padding: 48px 16px;
    }

    body.landing .final-cta {
        padding: 48px 16px;
    }

    body.landing .final-cta h2 {
        font-size: 24px;
    }

    body.landing .final-cta p {
        font-size: 17px;
    }

    body.landing .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    body.landing .landing-header {
        padding: 10px 16px;
    }

    body.landing .landing-logo {
        gap: 6px;
    }

    body.landing .landing-logo .logo-icon {
        width: 22px;
        height: 22px;
    }

    body.landing .landing-logo .logo-text {
        font-size: 18px;
    }

    body.landing .btn-cta-small {
        padding: 8px 18px;
        font-size: 14px;
    }

    body.landing .transform-card {
        padding: 16px;
    }

    body.landing .transform-arrow {
        width: 28px;
    }

    body.landing .sparkle {
        font-size: 22px;
    }

    body.landing .transform-label {
        font-size: 11px;
    }
}

/* --- Animated section backgrounds --- */

/* 1. Floating sparkles behind "See the Magic" */
body.landing .transformation-section {
    position: relative;
    overflow: hidden;
}

body.landing .sparkle-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.landing .sparkle-bg span {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0;
    animation: sparkle-float 8s ease-in-out infinite;
}

/* Scatter the 15 sparkles across the section */
body.landing .sparkle-bg span:nth-child(1)  { left: 5%;  animation-delay: 0s;    animation-duration: 7s; }
body.landing .sparkle-bg span:nth-child(2)  { left: 12%; animation-delay: 1.2s;  animation-duration: 9s; }
body.landing .sparkle-bg span:nth-child(3)  { left: 20%; animation-delay: 0.5s;  animation-duration: 8s; }
body.landing .sparkle-bg span:nth-child(4)  { left: 30%; animation-delay: 2.1s;  animation-duration: 7.5s; }
body.landing .sparkle-bg span:nth-child(5)  { left: 38%; animation-delay: 0.8s;  animation-duration: 10s; }
body.landing .sparkle-bg span:nth-child(6)  { left: 48%; animation-delay: 3s;    animation-duration: 8.5s; }
body.landing .sparkle-bg span:nth-child(7)  { left: 55%; animation-delay: 1.5s;  animation-duration: 7s; }
body.landing .sparkle-bg span:nth-child(8)  { left: 63%; animation-delay: 0.3s;  animation-duration: 9.5s; }
body.landing .sparkle-bg span:nth-child(9)  { left: 72%; animation-delay: 2.5s;  animation-duration: 8s; }
body.landing .sparkle-bg span:nth-child(10) { left: 80%; animation-delay: 1s;    animation-duration: 7.5s; }
body.landing .sparkle-bg span:nth-child(11) { left: 88%; animation-delay: 3.5s;  animation-duration: 9s; }
body.landing .sparkle-bg span:nth-child(12) { left: 15%; animation-delay: 4s;    animation-duration: 8s; }
body.landing .sparkle-bg span:nth-child(13) { left: 42%; animation-delay: 2s;    animation-duration: 10s; }
body.landing .sparkle-bg span:nth-child(14) { left: 68%; animation-delay: 0.7s;  animation-duration: 7s; }
body.landing .sparkle-bg span:nth-child(15) { left: 93%; animation-delay: 1.8s;  animation-duration: 9s; }

@keyframes sparkle-float {
    0%   { bottom: -10px; opacity: 0; transform: scale(0.5); }
    15%  { opacity: 0.6; }
    50%  { opacity: 0.3; transform: scale(1); }
    85%  { opacity: 0.5; }
    100% { bottom: 100%; opacity: 0; transform: scale(0.5); }
}

/* Make sure section content stays above sparkles */
body.landing .transformation-section .landing-container,
body.landing .transformation-section .lightbox-overlay {
    position: relative;
    z-index: 1;
}

/* 2. Slow-drifting faint illustrations behind "How It Works" */
body.landing .how-it-works-section {
    position: relative;
    overflow: hidden;
}

body.landing .drift-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
}

body.landing .drift-row {
    display: flex;
    gap: 24px;
    width: max-content;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

body.landing .drift-row img {
    width: 220px;
    height: 155px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

body.landing .drift-row-1 {
    animation: scroll-left 80s linear infinite;
}

body.landing .how-it-works-section .landing-container {
    position: relative;
    z-index: 1;
}

/* 2.5. Flowing wave lines behind Pricing */
body.landing .pricing-section {
    position: relative;
    overflow: hidden;
}

body.landing .waves-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.landing .waves-bg svg {
    position: absolute;
    width: 200%;
    height: 100%;
    top: 0;
    left: 0;
}

body.landing .waves-bg .wave-group-1 {
    animation: wave-drift-1 20s linear infinite;
}

body.landing .waves-bg .wave-group-2 {
    animation: wave-drift-2 25s linear infinite;
}

@keyframes wave-drift-1 {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes wave-drift-2 {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

body.landing .pricing-section .landing-container {
    position: relative;
    z-index: 1;
}

/* 3. Floating star particles behind Final CTA */
body.landing .final-cta {
    position: relative;
    overflow: hidden;
}

body.landing .stars-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.landing .stars-bg span {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    animation: star-twinkle 4s ease-in-out infinite;
}

body.landing .stars-bg span:nth-child(1)  { left: 8%;  top: 15%; animation-delay: 0s; }
body.landing .stars-bg span:nth-child(2)  { left: 18%; top: 60%; animation-delay: 0.8s; }
body.landing .stars-bg span:nth-child(3)  { left: 28%; top: 30%; animation-delay: 1.5s; }
body.landing .stars-bg span:nth-child(4)  { left: 38%; top: 75%; animation-delay: 0.3s; }
body.landing .stars-bg span:nth-child(5)  { left: 50%; top: 20%; animation-delay: 2.2s; }
body.landing .stars-bg span:nth-child(6)  { left: 60%; top: 55%; animation-delay: 1s; }
body.landing .stars-bg span:nth-child(7)  { left: 70%; top: 40%; animation-delay: 2.8s; }
body.landing .stars-bg span:nth-child(8)  { left: 78%; top: 70%; animation-delay: 0.5s; }
body.landing .stars-bg span:nth-child(9)  { left: 88%; top: 25%; animation-delay: 1.8s; }
body.landing .stars-bg span:nth-child(10) { left: 95%; top: 50%; animation-delay: 3s; }
body.landing .stars-bg span:nth-child(11) { left: 35%; top: 45%; animation-delay: 2s; }
body.landing .stars-bg span:nth-child(12) { left: 82%; top: 85%; animation-delay: 1.2s; }

@keyframes star-twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50%      { opacity: 0.7; transform: scale(1.2); }
}

body.landing .final-cta .landing-container {
    position: relative;
    z-index: 1;
}

/* --- Scroll-triggered reveal animations --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entrance for step cards */
.step-card.reveal-on-scroll:nth-child(1) { transition-delay: 0s; }
.step-card.reveal-on-scroll:nth-child(2) { transition-delay: 0.12s; }
.step-card.reveal-on-scroll:nth-child(3) { transition-delay: 0.24s; }

/* Staggered entrance for peek cards */
.peek-card.reveal-on-scroll:nth-child(1) { transition-delay: 0s; }
.peek-card.reveal-on-scroll:nth-child(2) { transition-delay: 0.08s; }
.peek-card.reveal-on-scroll:nth-child(3) { transition-delay: 0.16s; }
.peek-card.reveal-on-scroll:nth-child(4) { transition-delay: 0.24s; }

/* Pricing badge subtle entrance */
.pricing-card-featured .pricing-badge {
    animation: badge-pop 0.5s ease-out 0.3s both;
}

@keyframes badge-pop {
    from { transform: translateX(-50%) scale(0.8); opacity: 0; }
    to { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* --- Reduced motion: disable all landing animations --- */
@media (prefers-reduced-motion: reduce) {
    body.landing .gallery-row {
        animation: none !important;
    }

    body.landing .hero-stars::before,
    body.landing .hero-stars::after {
        animation: none !important;
    }

    body.landing .btn-cta-hero {
        animation: none !important;
    }

    body.landing .showcase-card,
    body.landing .step-card,
    body.landing .testimonial-card-new,
    body.landing .transform-card,
    body.landing .lightbox-close,
    body.landing .book-flipper-card img,
    body.landing .book-flipper-arrow,
    body.landing .book-flipper-dot {
        transition: none !important;
    }

    body.landing .book-flipper-track {
        scroll-behavior: auto;
    }

    body.landing .sparkle {
        animation: none !important;
    }

    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .pricing-card-featured .pricing-badge {
        animation: none !important;
    }

    body.landing .sparkle-bg span,
    body.landing .stars-bg span {
        animation: none !important;
        display: none;
    }

    body.landing .waves-bg svg {
        animation: none !important;
    }

    body.landing .drift-row {
        animation: none !important;
    }
}
