/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-color: #f7f7f7;
    --text-color: #111;
    --accent-color: #0055ff;
    /* Electric Blue */
    --accent-glow: rgba(0, 85, 255, 0.2);
    --grid-color: rgba(0, 0, 0, 0.04);

    --device-bezel: #1a1a1a;
    --device-frame: #333;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: 'Georgia', serif;

    --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    overflow-x: hidden;
    /* Subtle Grid Background - Premium Technical Feel */
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    height: 100%;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   2. TYPOGRAPHY
   ========================================= */
h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

p {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #555;
    max-width: 400px;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    cursor: default;
}

.logo-monogram {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #111;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-radius: 8px;
}

.logo-text {
    color: var(--text-color);
    font-weight: 500;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    margin-right: 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.btn-contact-nav {
    background: #111;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.btn-contact-nav:hover {
    transform: scale(1.05);
}

/* =========================================
   4. SCROLL LAYOUT & STAGE
   ========================================= */
.scrolly-container {
    position: relative;
    /* Height defined by scenes */
}

/* The Stage (Right Side Pinned) */
.stage-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10%;
    /* Desktop Positioning */
    pointer-events: none;
    z-index: 10;
}

/* Device Animation Wrapper */
.device-wrapper {
    position: relative;
    width: 332px;
    /* 390 * 0.85 */
    height: 680px;
    /* 800 * 0.85 */
    /* Back to scale(1) for perfect sharpness */
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
    transition: transform 0.1s ease-out, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    pointer-events: auto;
    transform-style: preserve-3d;
    will-change: transform;
}

/* =========================================
   5. DEVICE FRAME (iOS Style)
   ========================================= */
.device-frame {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 48px;
    /* 56 * 0.85 */
    padding: 10px;
    /* Bezel Thickness 12 * 0.85 */
    position: relative;
    box-shadow:
        0 20px 50px -10px rgba(0, 0, 0, 0.3),
        0 0 0 2px #333 inset;
    transition: box-shadow 0.3s;
    overflow: hidden;
    z-index: 20;
}

/* Hardware Buttons */
.power-btn {
    position: absolute;
    top: 170px;
    right: -4px;
    width: 3px;
    height: 50px;
    background: #1a1a1a;
    border-radius: 0 4px 4px 0;
}

.vol-btn {
    position: absolute;
    left: -4px;
    width: 3px;
    height: 34px;
    background: #1a1a1a;
    border-radius: 4px 0 0 4px;
}

.vol-up {
    top: 150px;
}

.vol-down {
    top: 195px;
}

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    top: 15px;
    /* Scaled */
    left: 50%;
    transform: translateX(-50%);
    width: 102px;
    /* 120 * 0.85 */
    height: 30px;
    /* 35 * 0.85 */
    background: #000;
    border-radius: 18px;
    z-index: 150;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Screen Area */
.device-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 38px;
    /* 48 - 10 bezel */
    overflow: hidden;
    position: relative;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Screen Content Container */
.screen-content {
    width: 100%;
    height: 100%;
    position: relative;
    background: #fff;
    /* Acts as background for Status Bar area */
    overflow: hidden;
    /* iOS Safe Area: Pushes website content below the Status Bar & Dynamic Island */
    padding-top: 30px;
    box-sizing: border-box;
}

/* Screen Gloss/Reflection */
.device-reflection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 40%, transparent 60%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
    z-index: 140;
    /* Above regular contents, below overlays */
    border-radius: 44px;
}

/* =========================================
   6. LOCKSCREEN UI
   ========================================= */
.lockscreen {
    position: absolute;
    inset: 0;
    background: url('assets/wallpaper.png') no-repeat center center;
    background-size: cover;
    z-index: 120;
    /* High z-index to cover shop */
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    padding-top: 60px;
    transition: transform 0.8s var(--ease-out-quart), opacity 0.8s ease;
}

.lockscreen.unlocked {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.ls-clock {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ls-date {
    font-size: 1.3rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 4px;
}

.ls-time {
    font-size: 5.5rem;
    font-weight: 600;
    letter-spacing: -2px;
    line-height: 1;
}

.ls-notification-list {
    flex: 1;
    width: 100%;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.ls-notification {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 18px;
    padding: 14px;
    color: #000;
    display: flex;
    gap: 12px;
    transform: translateX(120%);
    /* Hidden initially */
    opacity: 0;
    transition: all 0.6s var(--ease-elastic);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 0 8px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.ls-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.ls-icon {
    width: 38px;
    height: 38px;
    background: #34C759;
    /* Messages Green */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 20px;
}

.ls-content {
    flex: 1;
    overflow: hidden;
}

.ls-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: #444;
}

.ls-title {
    font-weight: 600;
    opacity: 0.9;
}

.ls-now {
    opacity: 0.6;
}

.ls-msg {
    font-size: 0.95rem;
    line-height: 1.3;
    text-align: left;
    color: #000;
}

.ls-footer {
    height: 90px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    align-items: center;
    margin-bottom: 5px;
}

.ls-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: blur(10px);
}

.ls-btn svg {
    width: 24px;
    height: 24px;
}

.ls-home-bar-hint {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 5px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}


/* =========================================
   7. IOS & SAFARI CHROME
   ========================================= */
.ios-status-bar {
    position: absolute;
    top: 8px;
    left: 0;
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 26px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    z-index: 150;
    /* Top most, below Dynamic Island */
}

.ios-status-bar.dark-mode {
    color: #fff;
}

.notch-space {
    width: 100px;
}

.status-icons {
    display: flex;
    gap: 2px;
    align-items: center;
}

.status-icons svg {
    width: 24px;
    height: 24px;
}

/* Global Safari Address Bar */
.safari-top-bar {
    position: absolute;
    bottom: 90px;
    /* Above toolbar */
    left: 20px;
    right: 20px;
    height: 48px;
    z-index: 140;
    /* Above overlays */
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.url-bar {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #000;
}

.url-text {
    opacity: 0.9;
    font-weight: 500;
}

.lock-icon {
    font-size: 10px;
}

.reload-icon {
    font-size: 12px;
    opacity: 0.7;
}

/* Safari Bottom Bar (Toolbar) */
.safari-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 84px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 12px;
    z-index: 140;
    /* Above overlays */
    padding-bottom: 20px;
    /* Safe area */
}

.safari-btn {
    color: #007AFF;
    /* iOS Blue */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.safari-btn svg {
    width: 22px;
    height: 22px;
}

.safari-btn:active {
    background: rgba(0, 0, 0, 0.1);
}

/* Spacer to prevent content being hidden */
.safari-spacer {
    height: 140px;
    width: 100%;
    flex-shrink: 0;
}


/* =========================================
   8. ZAHRATO THEME (Internal Shop)
   ========================================= */
.zahrato-theme {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    color: #1c1c1e;
    overflow: hidden;
    /* Scroll handled by z-scroll-content */
}

/* Internal fake bar hidden in favor of global one */
.zahrato-theme::after {
    display: none !important;
}

.z-scroll-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-top: 0;
}

/* Header */
.z-header {
    position: absolute;
    top: 40px;
    /* Below status bar */
    left: 0;
    width: 100%;
    padding: 0 20px;
    z-index: 90;
    height: 50px;
    display: flex;
    align-items: center;
}

.z-nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.z-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    padding: 5px;
}

.z-menu-toggle span {
    width: 20px;
    height: 2px;
    background: #fff;
    display: block;
}

.z-logo {
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.z-cart-icon {
    position: relative;
    color: #fff;
    width: 24px;
    height: 24px;
}

.z-cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff3b30;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.z-hero {
    position: relative;
    height: 500px;
    width: 100%;
    background: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

/* Background image for hero */
.z-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%),
        url('assets/zahrato/hero.png');
    background-size: cover;
    z-index: 1;
}

.z-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, #000 120%);
    z-index: 2;
}

.z-hero-content {
    position: relative;
    z-index: 5;
    padding: 0 20px;
    transform: translateY(20px);
}

.z-hero-title {
    font-family: 'Didot', 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    line-height: 1;
}

.z-hero-subtitle {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 24px;
}

.z-btn-primary {
    background: #fff;
    color: #000;
    padding: 12px 28px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Products Section */
.z-section-title {
    font-size: 1.5rem;
    text-align: center;
    margin: 40px 0 20px;
    font-weight: 600;
    font-family: 'Didot', serif;
}

.z-products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 16px;
}

.z-product-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.z-prod-img {
    aspect-ratio: 3/4;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
}

.z-prod-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.z-prod-info h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    font-family: 'Helvetica Neue', sans-serif;
}

.z-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
}

.z-stock {
    font-size: 0.6rem;
    padding: 2px 6px;
    background: #f4f4f4;
    border-radius: 4px;
    text-transform: uppercase;
    color: #888;
}

/* =========================================
   9. OVERLAYS (NARRATIVE)
   ========================================= */
.overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 135;
    /* Above base content, below Safari Bars/Status */
}

.overlay-layer>div {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: opacity, transform;
}

.overlay-layer>div.show {
    opacity: 1;
}

/* Message Bubble */
.msg-bubble {
    top: auto;
    bottom: 250px;
    left: 20px;
    right: 20px;
    height: auto !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(50px) scale(0.9);
    transition: transform 0.6s var(--ease-elastic), opacity 0.4s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.msg-bubble.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.msg-avatar {
    width: 40px;
    height: 40px;
    background: #111;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.msg-text {
    font-size: 0.9rem;
    line-height: 1.4;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif !important;
}

/* Sketch Overlay */
.sketch-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    /* Slight zoom for messiness */
}

/* Google Search Overlay */
.google-search-overlay {
    background: #fff;
    z-index: 60;
    /* Above iframe, below other overlays */
    display: flex;
    flex-direction: column;
    padding-top: 40px;
    /* Safe area */
}

.g-search-bar {
    margin: 10px 20px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    border: 1px solid #dfe1e5;
}

.g-icon {
    color: #4285F4;
    font-weight: bold;
    font-family: sans-serif;
}

.g-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.g-mic {
    opacity: 0.6;
}

.g-results {
    flex: 1;
    background: #f1f3f4;
    padding: 10px 0;
}

.g-card {
    background: #fff;
    margin: 0;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.g-map-preview {
    height: 180px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.g-map-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.g-info {
    padding: 16px;
}

.g-info h2 {
    font-size: 1.2rem;
    margin: 0 0 4px;
    color: #202124;
}

.g-rating {
    display: flex;
    gap: 4px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #5f6368;
    align-items: center;
}

.stars {
    color: #fbbc04;
    letter-spacing: 2px;
}

.g-type {
    font-size: 0.9rem;
    color: #5f6368;
    margin-bottom: 16px;
}

.g-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.g-actions button {
    flex: 1;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 18px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: #1967d2;
    font-weight: 500;
}

.g-info hr {
    border: 0;
    border-top: 1px solid #e8eaed;
    margin: 12px 0;
}

.g-detail {
    font-size: 0.9rem;
    color: #202124;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Wireframe Overlay -> iOS Photos App Style (Light Mode) */
.wireframe-overlay {
    background: #fff;
    /* Light Mode */
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-photos-ui {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: #000;
    /* Black text */
    font-family: -apple-system, system-ui, sans-serif;
}

/* Photo App Chrome */
.photos-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 44px 16px 10px 16px;
    /* PT for Status Bar */
    font-size: 17px;
    background: rgba(255, 255, 255, 0.9);
    /* Light Frost */
    backdrop-filter: blur(10px);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.p-left,
.p-right {
    color: #007AFF;
    /* iOS Blue */
    cursor: pointer;
    width: 80px;
}

.p-right {
    text-align: right;
    font-weight: 600;
}

.p-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.p-chevron {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    margin-top: -2px;
}

.p-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.p-title {
    font-weight: 600;
    font-size: 17px;
}

.p-time {
    font-size: 12px;
    color: #8E8E93;
}

.photos-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: #fff;
}

.sketch-img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.photos-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px 40px 30px;
    /* PB for Home indicator */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.1);
}

.p-icon {
    width: 24px;
    height: 24px;
    color: #007AFF;
}

.p-icon.trash {
    color: #FF3B30;
    /* Red delete */
}

/* SVG Transition Logic (Kept if needed, but current implementation uses img) */
[data-active-scene="3"] .wireframe-svg * {
    stroke-dashoffset: calc(1000 - (var(--scene-progress) * 1000));
}

/* Client Feedback Pins */
.review-overlay {
    pointer-events: none;
}

.pin {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0);
    transition: transform 0.4s var(--ease-elastic);
}

.pin.show {
    transform: scale(1);
}

.pin-head {
    width: 24px;
    height: 24px;
    background: #FF3B30;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.pin-comment {
    background: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-top: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    white-space: nowrap;
}

/* AI Support Bubble */
.support-overlay {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 120px;
}

.ai-chat-bubble {
    background: #111;
    color: #fff;
    padding: 12px 20px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
}

.ai-chat-bubble.show {
    transform: translateY(0);
    opacity: 1;
}

/* =========================================
   10. SCROLL NARRATIVE TRACK
   ========================================= */
.narrative-track {
    position: relative;
    z-index: 5;
    padding-bottom: 20vh;
}

.scene {
    position: relative;
    height: 120vh;
    display: flex;
    align-items: center;
    padding-left: 10%;
    opacity: 0.3;
    transition: opacity 0.5s;
}

.scene.active {
    opacity: 1;
}

.scroll-hint {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888;
}

.scroll-hint .line {
    width: 40px;
    height: 1px;
    background: #888;
    animation: pulseLine 2s infinite;
}

@keyframes pulseLine {

    0%,
    100% {
        transform: scaleX(0.5);
        transform-origin: left;
    }

    50% {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* Contact Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fff;
    padding: 48px;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    position: relative;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

.modal-backdrop.open .modal-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    color: #666;
}

.close-btn:hover {
    background: #eee;
    transform: scale(1.05);
}

.modal-header {
    margin-bottom: 16px;
}

/* Contact Modal - Redesigned */
.modal-contact {
    text-align: center;
    padding: 40px 36px 36px;
    max-width: 380px;
}

.contact-headline {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 8px 0;
    color: var(--text-color);
}

.contact-subtext {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 28px 0;
    font-weight: 400;
}

.contact-actions {
    display: flex;
    gap: 12px;
}

.contact-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.contact-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: stroke 0.2s ease, fill 0.2s ease;
}

.contact-btn-primary {
    background: #111;
    color: #fff;
}

.contact-btn-primary svg {
    fill: #fff;
}

.contact-btn-primary:hover {
    background: #25D366;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25);
}

.contact-btn-secondary {
    background: #f5f5f5;
    color: #111;
    border: 1px solid #e5e5e5;
}

.contact-btn-secondary svg {
    stroke: #111;
}

.contact-btn-secondary:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.contact-btn-secondary:hover svg {
    stroke: #fff;
}

/* Copied success state */
.contact-btn-secondary.copied,
.contact-btn-secondary.copied:hover {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

.contact-btn-secondary.copied svg,
.contact-btn-secondary.copied:hover svg {
    stroke: #fff;
}

/* Mobile: Stack buttons */
@media (max-width: 420px) {
    .contact-actions {
        flex-direction: column;
    }

    .modal-contact {
        padding: 32px 24px 28px;
    }

    .contact-headline {
        font-size: 1.75rem;
    }
}

.modal-eyebrow {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 8px;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text-color);
}

.modal-subtitle {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 28px;
    font-size: 1rem;
    font-weight: 600;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff !important;
    background: #111;
    border: none;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    margin-top: 12px;
    width: 100%;
    cursor: pointer;
}

.btn-whatsapp:hover {
    background: #25D366;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    color: #fff !important;
}

.btn-whatsapp svg {
    width: 20px;
    height: 20px;
    fill: #fff;
    flex-shrink: 0;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    margin-bottom: 24px;
}

.success-icon svg {
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.success-text {
    font-size: 1rem;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.5;
}

.modal-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

.modal-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .modal-content {
        padding: 32px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    /* Email link smaller on mobile to fit with copy button */
    .modal-footer a[href^="mailto"] {
        font-size: 1.15rem !important;
    }
}

/* Utility to hide Safari Chrome */
.safari-hidden .safari-top-bar,
.safari-hidden .safari-bar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.safari-hidden .safari-top-bar {
    transform: translateY(-20px);
}

/* Shop Frame (Embedding Existing Shop) */
/* Shop Frame (Embedding Existing Shop) */
.shop-frame {
    /* 
       Target Logical Width: 430px (iPhone Pro Max)
       Container Width: 312px (332px - 20px padding)
       Scale Factor: 312 / 430 = 0.7256
       Width %: 430 / 312 = 137.82%
    */
    width: 137.82%;
    height: 137.82%;
    border: none;
    background: #fff;
    display: block;
    transform-origin: top left;
    transform: scale(0.7256);
}

/* =========================================
   11. OVERLAPPING IMAGES (Scenes 7-10)
   ========================================= */
.overlapping-images-container {
    position: fixed;
    top: 50%;
    right: 14%;
    transform: translateY(-50%);
    width: 550px;
    height: 650px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 10;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.overlapping-images-container.active {
    opacity: 1;
}

.image-pair {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.image-pair.active {
    opacity: 1;
}

.img-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 420px;
    height: 520px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: width 0.4s ease, height 0.4s ease, transform 0.1s ease-in-out;
    border: none;
    outline: none;
    background: transparent;
    will-change: transform;
}

.img-front {
    position: absolute;
    bottom: +40px;
    right: -60px;
    width: 360px;
    height: 460px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    transition: width 0.4s ease, height 0.4s ease, transform 0.1s ease-in-out;
    border: none;
    outline: none;
    background: transparent;
    will-change: transform;

}

/* Copy Button */
.btn-copy {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: #e0e0e0;
    color: #111;
    transform: translateY(-2px);
}

.btn-copy:active {
    transform: translateY(0);
}

/* =========================================
   12. CTA SECTION & SHOWCASE DEVICE
   ========================================= */
.scene-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 10%;
}

.cta-block {
    max-width: 420px;
}

.cta-eyebrow {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #888;
    margin-bottom: 8px;
}

.cta-headline {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-color);
}

.cta-subtext {
    font-size: 1.125rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 380px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cta-button svg {
    transition: transform 0.2s ease;
}

.cta-button:hover svg {
    transform: translateX(3px);
}

.cta-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    font-size: 0.85rem;
    color: #888;
}

.cta-divider {
    color: #ccc;
}

.cta-legal-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cta-legal-link:hover {
    color: var(--accent-color);
}

.cta-showcase-device {
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.cta-showcase-device.visible {
    opacity: 1;
    transform: translateY(0);
}

.showcase-container {
    position: relative;
    width: 550px;
    height: 420px;
}

/* iPad outer frame - morphs size */
.showcase-ipad-frame {
    position: absolute;
    /* Center it so it can shrink towards center */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    /* Default iPad width relative to container */
    height: 100%;
    /* Default iPad height relative to container */

    background: #000;
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3), 0 0 0 2px #333 inset;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.5s ease, height 0.5s ease, border-radius 0.5s ease, padding 0.5s ease;
    will-change: width, height, border-radius;
}

/* Phone mode: Shrink the OUTER frame to phone size */
.phone-mode .showcase-ipad-frame {
    width: 260px;
    height: 520px;
    border-radius: 44px;
    background: #000;
    /* Stay black! No transparent fade */
    padding: 8px;
    /* Maintain padding */
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 0 2px #333 inset;
}

/* Phone inner frame - just follows parent */
.showcase-phone-frame {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    transition: border-radius 0.5s ease;
}

/* Phone mode - inner changes */
.phone-mode .showcase-phone-frame {
    /* No fixed size here, it fills parent */
    width: 100%;
    height: 100%;
    /* But radius might change */
    border-radius: 36px;
}

.showcase-screen {
    width: 100%;
    height: 100%;
    background: #000;
    /* Black background to prevent white flash during crossfade */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: border-radius 0.5s ease;
    will-change: border-radius;
    /* Optimization */
}

.phone-mode .showcase-screen {
    border-radius: 36px;
}

/* Website iframes */
.showcase-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transform: scale(1.5);
    transform-origin: top left;
    transition: opacity 0.4s ease;
    pointer-events: none;
    overflow: hidden;
}

.showcase-iframe.active {
    opacity: 1;
}

/* Hide scrollbar in iframes */
.showcase-screen {
    overflow: hidden;
}

.showcase-screen::-webkit-scrollbar {
    display: none;
}

/* Scale iframe content to fit */
.showcase-container .showcase-iframe {
    transform: scale(0.5);
    transform-origin: top left;
    width: 200%;
    height: 200%;
}

.phone-mode .showcase-iframe {
    transform: scale(0.35);
    width: 285%;
    height: 285%;
}

/* =========================================
   13. MOBILE OPTIMIZATION
   ========================================= */
@media (max-width: 768px) {
    .safari-spacer {
        display: none;
    }

    /* HIDE STORYTELLING SCENES & STAGE */
    .scrolly-container {
        height: auto;
        overflow: visible;
    }

    .stage-container,
    .overlapping-images-container,
    .narrative-track>.scene:not(#final) {
        display: none !important;
    }

    /* OPTIMIZE TOP NAV */
    .top-nav {
        padding: 1rem 1.5rem;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .logo-text {
        font-size: 0.9rem;
    }

    .btn-contact-nav {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    /* SHOW & STYLE FINAL SECTION (CTA) */
    .narrative-track {
        display: block;
        padding: 0;
        margin: 0;
    }

    #final {
        display: flex !important;
        flex-direction: column;
        padding-top: 100px;
        /* Space for fixed header */
        padding-bottom: 40px;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        min-height: auto;
        pointer-events: auto !important;
        gap: 40px;
    }

    /* 
       =========================================
       MOBILE DEVICE - CLEAN REWRITE
       =========================================
       
       LAPTOP: Wide rectangle, sharp corners (16:10 ratio)
       PHONE: Tall rectangle, round corners (iPhone 14 Pro Max ~9:19.5)
       
       Both fit within the SAME container that scales uniformly.
    */

    /* DEVICE WRAPPER - Positions device at top */
    .cta-showcase-device {
        order: -1;
        opacity: 1 !important;
        transform: translateY(0) !important;
        display: flex !important;
        justify-content: center;
        align-items: flex-start;
        position: relative;
        width: 100%;
        margin: 0;
        padding-top: 75px;
        /* Push below navbar */
        pointer-events: auto !important;
        overflow: visible !important;
        /* FIXED height - use the tallest (phone) so section below never moves */
        min-height: 470px;
    }

    /* No height change on phone mode - keeps layout stable */

    /* 
       CONTAINER - Single scale for everything
       Width: 100% of mobile viewport  
    */
    .showcase-container {
        width: 420px;
        height: 280px;
        transform: scale(1);
        transform-origin: center top;
        margin: 0 auto;
        position: relative;
        transition: width 0.5s ease, height 0.5s ease;
    }

    /* 
       LAPTOP FRAME (Default State)
       - Fills the container
       - Sharp corners like a screen
    */
    .showcase-ipad-frame {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        background: #000;
        border-radius: 16px !important;
        padding: 6px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 2px #333 inset;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: width 0.5s ease, height 0.5s ease, border-radius 0.5s ease;
    }

    /* 
       PHONE FRAME (When .phone-mode is active)
       - Sized to look like iPhone 14 Pro Max (tall, narrow)
       - Very round corners
    */
    .phone-mode .showcase-ipad-frame {
        width: 230px !important;
        height: 430px !important;
        border-radius: 40px !important;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 0 2px #333 inset;
    }

    /* 
       IFRAME SCALING - Make laptop show desktop content (wider viewport)
       Renders iframe at ~1200px width, then scales down to fit
       Phone mode uses the global styles (unchanged)
    */
    .showcase-container .showcase-iframe {
        transform: scale(0.35);
        transform-origin: top left;
        width: 285%;
        height: 285%;
    }

    /* TEXT BLOCK */
    .cta-block {
        width: 100%;
        padding: 0 20px;
        text-align: center;
        margin: 0 auto;
        /* Ensure it sits on top if needed or has z-index */
        position: relative;
        z-index: 10;
    }

    .cta-headline {
        font-size: 2rem;
    }

    .cta-subtext {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-footer {
        justify-content: center;
        /* Center footer links */
    }

    /* RESTORE MODAL POPUP BEHAVIOR
       We do NOT override #contact-modal styles here anymore.
       It will use the default fixed position logic from main styles.
       This ensures clicking "Start Project" opens it as a popup.
    */
}