Files changed (1) hide show
  1. index.html +218 -253
index.html CHANGED
@@ -3,30 +3,31 @@
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width,initial-scale=1" />
6
- <title>NeuralNomadAI — Creative AI Studio</title>
7
 
8
  <!-- Google fonts -->
9
  <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap" rel="stylesheet">
10
 
11
- <!-- Tailwind (utility) + local CSS -->
12
  <script src="https://cdn.tailwindcss.com?plugins=forms"></script>
 
 
13
  <link rel="stylesheet" href="style.css">
14
  </head>
15
- <body class="font-display bg-hero-bg text-gray-100">
16
 
17
- <!-- NAV -->
18
  <header class="site-header">
19
  <div class="container nav-inner">
20
  <div class="brand">
21
- <div class="logo"></div>
22
  <span class="brand-name">NeuralNomadAI</span>
23
  </div>
24
  <nav class="nav-links" aria-label="Primary Navigation">
25
- <a data-page="home" class="nav-link active">Home</a>
26
- <a data-page="services" class="nav-link">Services</a>
27
- <a data-page="portfolio" class="nav-link">Portfolio</a>
28
- <a data-page="pricing" class="nav-link">Pricing</a>
29
- <a data-page="contact" class="nav-link">Contact</a>
30
  </nav>
31
  <div class="nav-cta">
32
  <button class="btn btn-outline">Login</button>
@@ -40,282 +41,246 @@
40
  <div class="hero-overlay"></div>
41
  <div class="container hero-inner">
42
  <h1 class="hero-title">Unleash Your Creative Vision with AI</h1>
43
- <p class="hero-sub">NeuralNomadAI empowers creators with cutting-edge AI tools for imagery and automation, transforming ideas into stunning visuals and streamlined workflows.</p>
44
- <div class="hero-ctas">
 
45
  <a href="#contact" class="btn btn-primary large">Get Started</a>
46
  <a href="#services" class="btn btn-muted large">Explore Features</a>
47
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  </div>
49
  </section>
50
 
51
  <main>
52
- <!-- QUICK PITCH -->
53
- <section class="container section section-compact text-center">
54
  <h2 class="section-title">Quick Pitch</h2>
55
- <p class="lead">NeuralNomadAI offers a suite of AI-powered tools to generate images, automate workflows, and tailor models to your brand style — all with fast turnaround and commercial rights.</p>
56
  </section>
 
57
 
58
- <!-- VISUAL SHOWCASE -->
59
- <section class="container section">
60
- <h2 class="section-title text-center">Visual Showcase</h2>
61
- <div class="grid-3 gap-large mt-8">
62
- <article class="feature-card">
63
- <img src="assets/showcase-1.jpg" alt="AI-powered sample 1" loading="lazy" />
64
- <h3>AI-Powered Image Generation</h3>
65
- <p>Create stunning, unique visuals with our advanced AI image models.</p>
66
- </article>
67
- <article class="feature-card">
68
- <img src="assets/showcase-2.jpg" alt="AI-powered sample 2" loading="lazy" />
69
- <h3>Automated Workflow Tools</h3>
70
- <p>Streamline your process with automated tasks and pipelines.</p>
71
- </article>
72
- <article class="feature-card">
73
- <img src="assets/showcase-3.jpg" alt="AI-powered sample 3" loading="lazy" />
74
- <h3>Customizable AI Models</h3>
75
- <p>Tune models to match your artistic vision and brand voice.</p>
76
- </article>
77
  </div>
 
 
78
 
79
- <!-- large showcase banner -->
80
- <div class="showcase-banner mt-10">
81
- <img src="assets/hero-showcase.jpg" alt="Large showcase" loading="lazy"/>
82
- <button class="play-btn" aria-label="Play showcase video">▶</button>
83
- </div>
84
- </section>
 
 
 
 
 
 
85
 
86
- <!-- TRUSTED / LOGOS -->
87
- <section class="container section">
88
- <h3 class="section-title text-center">Trusted by Creators</h3>
89
- <div class="trusted-logos">
90
- <div class="logo-circle"><img src="assets/logo1.png" alt="Company 1"/></div>
91
- <div class="logo-circle"><img src="assets/logo2.png" alt="Company 2"/></div>
92
- <div class="logo-circle"><img src="assets/logo3.png" alt="Company 3"/></div>
93
- <div class="logo-circle"><img src="assets/logo4.png" alt="Company 4"/></div>
94
  </div>
95
- </section>
 
96
 
97
- <!-- CTA BANNER -->
98
- <section class="cta-banner">
99
- <div class="container">
100
- <h3>Ready to Transform Your Creative Process?</h3>
101
- <a href="#contact" class="btn btn-primary">Get Started Today</a>
102
- </div>
103
- </section>
104
 
105
- <!-- CONTACT + FORM -->
106
- <section id="contact" class="container section grid-2 gap-large">
107
- <div class="contact-card">
108
- <h3>Hire Us on Fiverr</h3>
109
- <p>For standardized services and quick turnarounds, find us on Fiverr.</p>
110
- <a class="btn btn-primary" href="#" target="_blank" rel="noopener">Hire on Fiverr</a>
111
-
112
- <hr class="divider"/>
113
-
114
- <h3>Custom Requests</h3>
115
- <form id="contact-form" class="contact-form" novalidate>
116
- <label>
117
- <span>Your Name</span>
118
- <input name="name" type="text" placeholder="Enter your name" required>
119
- </label>
120
- <label>
121
- <span>Your Email</span>
122
- <input name="email" type="email" placeholder="Enter your email" required>
123
- </label>
124
- <label>
125
- <span>Subject</span>
126
- <input name="subject" type="text" placeholder="Enter the subject">
127
- </label>
128
- <label>
129
- <span>Your Message</span>
130
- <textarea name="message" rows="6" placeholder="Enter your message" required></textarea>
131
- </label>
132
- <button type="submit" class="btn btn-primary full">Send Message</button>
133
- </form>
134
- </div>
135
 
136
- <aside class="contact-info">
137
- <h3>Direct Contact & Info</h3>
138
- <div class="info-box">
139
- <p><strong>Email:</strong> <a href="mailto:contact@neuralnomad.ai">contact@neuralnomad.ai</a></p>
140
- <p><strong>Business Hours:</strong> Mon–Fri, 9 AM – 6 PM (GMT)</p>
141
- <p><strong>Availability:</strong> We are currently accepting new projects.</p>
142
- </div>
143
 
144
- <h4>Follow Us</h4>
145
- <div class="social-grid">
146
- <a class="social">Twitter</a>
147
- <a class="social">Instagram</a>
148
- <a class="social">LinkedIn</a>
149
- </div>
150
 
151
- <h4>What Happens Next?</h4>
152
- <ol class="what-next">
153
- <li><strong>Initial Contact:</strong> We review your message and reply within 24 hours.</li>
154
- <li><strong>Project Discussion:</strong> We schedule a call to discuss details.</li>
155
- <li><strong>Proposal & Quote:</strong> You receive a tailored proposal.</li>
156
- <li><strong>Kick-off:</strong> We start after approval and keep you updated.</li>
157
- </ol>
158
- </aside>
159
- </section>
 
160
 
161
- <!-- PRICING -->
162
- <section id="pricing" class="container section">
163
- <h2 class="section-title text-center">Transparent Pricing</h2>
164
- <p class="lead text-center">Choose the plan that fits your creative needs. No hidden fees.</p>
165
-
166
- <div class="pricing-grid mt-8">
167
- <div class="pricing-card">
168
- <div class="price-top">Basic <span class="price-amount">$29<span class="price-unit">/month</span></span></div>
169
- <ul class="price-features">
170
- <li>100 AI Image Credits</li>
171
- <li>Basic Image Editing Tools</li>
172
- <li>Community Support</li>
173
- </ul>
174
- <button class="btn btn-outline full">Choose Plan</button>
175
- </div>
176
 
177
- <div class="pricing-card featured">
178
- <div class="ribbon">Popular</div>
179
- <div class="price-top">Pro <span class="price-amount">$99<span class="price-unit">/month</span></span></div>
180
- <ul class="price-features">
181
- <li>Unlimited AI Image Credits</li>
182
- <li>Advanced Editing Tools</li>
183
- <li>Priority Support</li>
184
- </ul>
185
- <button class="btn btn-primary full">Choose Plan</button>
186
- </div>
187
 
188
- <div class="pricing-card">
189
- <div class="price-top">Enterprise <span class="price-amount">Custom</span></div>
190
- <ul class="price-features">
191
- <li>Custom Solutions</li>
192
- <li>Dedicated Account Manager</li>
193
- <li>Scalable Resources</li>
194
- </ul>
195
- <button class="btn btn-outline full">Contact Us</button>
196
- </div>
197
- </div>
198
 
199
- <div class="package-table mt-10">
200
- <h4>Package Comparison</h4>
201
- <table>
202
- <thead>
203
- <tr><th>Feature</th><th>Basic</th><th>Pro</th><th>Enterprise</th></tr>
204
- </thead>
205
- <tbody>
206
- <tr><td>AI Image Credits</td><td>100</td><td>Unlimited</td><td>Custom</td></tr>
207
- <tr><td>Image Editing Tools</td><td>Basic</td><td>Advanced</td><td>Advanced</td></tr>
208
- <tr><td>Support</td><td>Community</td><td>Priority</td><td>Dedicated</td></tr>
209
- <tr><td>Delivery Time</td><td>Instant</td><td>Instant</td><td>Custom</td></tr>
210
- <tr><td>Commercial Use</td><td>No</td><td>Yes</td><td>Yes</td></tr>
211
- </tbody>
212
- </table>
213
- </div>
214
- </section>
215
 
216
- <!-- TESTIMONIALS -->
217
- <section class="container section">
218
- <h2 class="section-title text-center">What Our Clients Say</h2>
219
- <div class="testimonial-grid mt-8">
220
- <blockquote class="testimonial">
221
- <div class="avatar">SB</div>
222
- <div class="quote">
223
- <strong>Sophia Bennett</strong>
224
- <p class="date">August 15, 2023</p>
225
- <p class="stars">★★★★★</p>
226
- <p class="text">"NeuralNomadAI transformed my creative process. The AI imagery is stunning, and the automation tools have saved me countless hours."</p>
227
- </div>
228
- </blockquote>
229
-
230
- <blockquote class="testimonial">
231
- <div class="avatar">EC</div>
232
- <div class="quote">
233
- <strong>Ethan Carter</strong>
234
- <p class="date">July 22, 2023</p>
235
- <p class="stars">★★★★★</p>
236
- <p class="text">"Exceptional service and results. NeuralNomadAI's AI tools are a game-changer for content creators."</p>
237
- </div>
238
- </blockquote>
239
-
240
- <blockquote class="testimonial">
241
- <div class="avatar">OH</div>
242
- <div class="quote">
243
- <strong>Olivia Hayes</strong>
244
- <p class="date">June 10, 2023</p>
245
- <p class="stars">★★★★★</p>
246
- <p class="text">"I'm blown away by the quality and efficiency of NeuralNomadAI. A must-have for any serious creator."</p>
247
- </div>
248
- </blockquote>
249
- </div>
250
- </section>
251
 
252
- <!-- ABOUT (brief) -->
253
- <section class="container section">
254
- <h2 class="section-title text-center">About NeuralNomadAI</h2>
255
- <p class="lead text-center">We pioneer AI-driven creative solutions — blending art and technology to help creators scale and focus on what matters.</p>
256
- <div class="capability-grid mt-8">
257
- <div class="cap-card"><h4>AI-Powered Imagery</h4><p>Generate stunning visuals with AI.</p></div>
258
- <div class="cap-card"><h4>Automation Tools</h4><p>Automate repetitive tasks for efficiency.</p></div>
259
- <div class="cap-card"><h4>Creative Solutions</h4><p>Tailored solutions for diverse needs.</p></div>
260
- <div class="cap-card"><h4>Rapid Turnaround</h4><p>Fast delivery without compromising quality.</p></div>
261
- </div>
262
- </section>
263
 
264
- <!-- PORTFOLIO -->
265
- <section id="portfolio" class="container section">
266
- <h2 class="section-title">Featured Work</h2>
267
- <p class="lead">Explore our portfolio of AI-driven projects.</p>
268
-
269
- <div class="portfolio-grid mt-8">
270
- <div class="portfolio-item"><img src="assets/portfolio-1.jpg" alt=""><h4>AI-Enhanced Photography</h4></div>
271
- <div class="portfolio-item"><img src="assets/portfolio-2.jpg" alt=""><h4>Automated Content Creation</h4></div>
272
- <div class="portfolio-item"><img src="assets/portfolio-3.jpg" alt=""><h4>Personalized Marketing</h4></div>
273
- <div class="portfolio-item"><img src="assets/portfolio-4.jpg" alt=""><h4>Design Tools</h4></div>
274
- <div class="portfolio-item"><img src="assets/portfolio-5.jpg" alt=""><h4>Interactive Installations</h4></div>
275
- <div class="portfolio-item"><img src="assets/portfolio-6.jpg" alt=""><h4>Data Visualization</h4></div>
276
- </div>
277
 
278
- <div class="pagination mt-8">‹ <span class="page active">1</span> 2 3 ›</div>
279
- </section>
280
- </main>
 
 
 
 
 
281
 
282
- <footer class="site-footer">
283
- <div class="container">
284
- <div class="footer-row">
285
- <div>© 2025 NeuralNomadAI. All rights reserved.</div>
286
- <div class="footer-links">
287
- <a>Terms of Service</a>
288
- <a>Privacy Policy</a>
289
- <a>Contact Us</a>
290
- </div>
291
- </div>
292
- </div>
293
- </footer>
294
 
295
- <!-- Optional small JS for simple navigation & form -->
296
- <script>
297
- // Simple single-page switching using data-page attributes
298
- (function() {
299
- const links = document.querySelectorAll('.nav-link');
300
- const pages = document.querySelectorAll('.page-content'); // not used here — we use anchors instead
301
- function setActive(link) {
302
- links.forEach(l => l.classList.remove('active'));
303
- link.classList.add('active');
304
  }
305
- links.forEach(l => {
306
- l.addEventListener('click', (e) => {
307
- links.forEach(x=>x.classList.remove('active'));
308
- l.classList.add('active');
309
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  });
311
 
312
- // Contact form simple handler
313
- const form = document.getElementById('contact-form');
314
- form?.addEventListener('submit', (e) => {
315
- e.preventDefault();
316
- alert('Thanks! Your message was received (this demo does not send emails).');
317
- form.reset();
318
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  })();
320
  </script>
321
  </body>
 
3
  <head>
4
  <meta charset="utf-8" />
5
  <meta name="viewport" content="width=device-width,initial-scale=1" />
6
+ <title>NeuralNomadAI — Gemini Share Embed Demo</title>
7
 
8
  <!-- Google fonts -->
9
  <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&display=swap" rel="stylesheet">
10
 
11
+ <!-- Tailwind utilities CDN -->
12
  <script src="https://cdn.tailwindcss.com?plugins=forms"></script>
13
+
14
+ <!-- Local CSS -->
15
  <link rel="stylesheet" href="style.css">
16
  </head>
17
+ <body class="font-display bg-gradient-to-b from-[#071017] to-[#07121a] text-gray-100">
18
 
19
+ <!-- Simple header -->
20
  <header class="site-header">
21
  <div class="container nav-inner">
22
  <div class="brand">
23
+ <div class="logo" aria-hidden="true"></div>
24
  <span class="brand-name">NeuralNomadAI</span>
25
  </div>
26
  <nav class="nav-links" aria-label="Primary Navigation">
27
+ <a href="#home" class="nav-link active">Home</a>
28
+ <a href="#services" class="nav-link">Services</a>
29
+ <a href="#portfolio" class="nav-link">Portfolio</a>
30
+ <a href="#contact" class="nav-link">Contact</a>
 
31
  </nav>
32
  <div class="nav-cta">
33
  <button class="btn btn-outline">Login</button>
 
41
  <div class="hero-overlay"></div>
42
  <div class="container hero-inner">
43
  <h1 class="hero-title">Unleash Your Creative Vision with AI</h1>
44
+ <p class="hero-sub">NeuralNomadAI empowers creators with cutting-edge AI tools for imagery and automation.</p>
45
+
46
+ <div class="hero-ctas mt-6">
47
  <a href="#contact" class="btn btn-primary large">Get Started</a>
48
  <a href="#services" class="btn btn-muted large">Explore Features</a>
49
  </div>
50
+
51
+ <!-- Gemini share preview card (centered under CTAs) -->
52
+ <div class="mt-8 flex justify-center">
53
+ <div class="gemini-card" id="geminiCard" role="region" aria-labelledby="geminiTitle" aria-describedby="geminiDesc">
54
+ <div class="gemini-thumb" aria-hidden="true">
55
+ <!-- stylized thumbnail or icon -->
56
+ <svg width="64" height="64" viewBox="0 0 24 24" fill="none" class="text-sky-400" xmlns="http://www.w3.org/2000/svg">
57
+ <rect width="24" height="24" rx="6" fill="currentColor" opacity="0.12"/>
58
+ <path d="M8 12h8M8 8h8M8 16h8" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
59
+ </svg>
60
+ </div>
61
+ <div class="gemini-meta">
62
+ <h3 id="geminiTitle" class="gemini-title">View Gemini Share</h3>
63
+ <p id="geminiDesc" class="gemini-desc">Interactive preview — opens an in-page viewer that mirrors the shared Gemini conversation.</p>
64
+ <div class="gemini-actions">
65
+ <button id="openGeminiBtn" class="btn btn-primary small">Open Preview</button>
66
+ <a id="openGeminiNewTab" class="btn btn-outline small" target="_blank" rel="noopener">Open in new tab</a>
67
+ <button id="copyGeminiLink" class="btn btn-muted small">Copy Link</button>
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </div>
72
  </div>
73
  </section>
74
 
75
  <main>
76
+ <!-- rest of the page content simplified for the demo -->
77
+ <section class="container section text-center">
78
  <h2 class="section-title">Quick Pitch</h2>
79
+ <p class="lead">NeuralNomadAI modern interface, Gemini share preview embedded for demonstration.</p>
80
  </section>
81
+ </main>
82
 
83
+ <!-- Footer -->
84
+ <footer class="site-footer">
85
+ <div class="container footer-row">
86
+ <div 2025 NeuralNomadAI. All rights reserved.</div>
87
+ <div class="footer-links">
88
+ <a>Terms</a>
89
+ <a>Privacy</a>
90
+ <a>Contact</a>
 
 
 
 
 
 
 
 
 
 
 
91
  </div>
92
+ </div>
93
+ </footer>
94
 
95
+ <!-- Modal for Gemini iframe -->
96
+ <div id="geminiModal" class="modal hidden" role="dialog" aria-modal="true" aria-labelledby="modalTitle" aria-hidden="true">
97
+ <div class="modal-backdrop" data-close="true"></div>
98
+ <div class="modal-panel" role="document">
99
+ <header class="modal-header">
100
+ <h3 id="modalTitle">Gemini Share Preview</h3>
101
+ <div class="modal-controls">
102
+ <button id="copyLinkModal" class="btn btn-muted small">Copy Link</button>
103
+ <a id="openNewTabModal" class="btn btn-outline small" target="_blank" rel="noopener">Open in new tab</a>
104
+ <button id="closeModal" class="btn btn-outline small" aria-label="Close preview">Close</button>
105
+ </div>
106
+ </header>
107
 
108
+ <div class="modal-body">
109
+ <!-- lazy-loaded iframe -->
110
+ <div id="iframeContainer" class="iframe-container" aria-live="polite">
111
+ <div class="iframe-fallback">
112
+ Loading preview... If the preview cannot be shown, you can open it in a new tab.
113
+ </div>
114
+ <!-- iframe element will be created dynamically on demand -->
115
+ </div>
116
  </div>
117
+ </div>
118
+ </div>
119
 
120
+ <script>
121
+ // ==== Gemini share integration script ====
122
+ (function () {
123
+ const GEMINI_URL = 'https://g.co/gemini/share/4388c23581b0'; // provided share URL
 
 
 
124
 
125
+ const openGeminiBtn = document.getElementById('openGeminiBtn');
126
+ const openGeminiNewTab = document.getElementById('openGeminiNewTab');
127
+ const copyGeminiLink = document.getElementById('copyGeminiLink');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
 
129
+ const geminiModal = document.getElementById('geminiModal');
130
+ const iframeContainer = document.getElementById('iframeContainer');
131
+ const closeModalBtn = document.getElementById('closeModal');
132
+ const copyLinkModal = document.getElementById('copyLinkModal');
133
+ const openNewTabModal = document.getElementById('openNewTabModal');
 
 
134
 
135
+ // Set the anchor hrefs
136
+ openGeminiNewTab.href = GEMINI_URL;
137
+ openNewTabModal.href = GEMINI_URL;
 
 
 
138
 
139
+ // Copy helper
140
+ async function copyToClipboard(text) {
141
+ try {
142
+ await navigator.clipboard.writeText(text);
143
+ return true;
144
+ } catch (err) {
145
+ console.warn('Clipboard copy failed:', err);
146
+ return false;
147
+ }
148
+ }
149
 
150
+ // Create iframe lazily and inject to container
151
+ function createIframe(url) {
152
+ // remove any previous iframe
153
+ iframeContainer.querySelectorAll('iframe').forEach(n => n.remove());
 
 
 
 
 
 
 
 
 
 
 
154
 
155
+ const iframe = document.createElement('iframe');
156
+ iframe.className = 'gemini-iframe';
157
+ // set src only when creating (lazy)
158
+ iframe.src = url;
159
+ // sandbox to reduce risk; allow-same-origin if Gemini needs it
160
+ // You can adjust sandbox flags if needed.
161
+ iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups');
162
+ iframe.setAttribute('loading', 'lazy');
163
+ iframe.setAttribute('referrerpolicy', 'no-referrer');
164
+ iframe.setAttribute('title', 'Gemini share preview');
165
 
166
+ // optional: handle load / error states
167
+ iframe.addEventListener('load', () => {
168
+ // hide fallback message
169
+ const fb = iframeContainer.querySelector('.iframe-fallback');
170
+ if (fb) fb.style.display = 'none';
171
+ });
 
 
 
 
172
 
173
+ iframe.addEventListener('error', () => {
174
+ const fb = iframeContainer.querySelector('.iframe-fallback');
175
+ if (fb) fb.textContent = 'Preview failed to load. You can open the share in a new tab.';
176
+ // remove iframe to avoid confusion
177
+ iframe.remove();
178
+ });
 
 
 
 
 
 
 
 
 
 
179
 
180
+ iframeContainer.appendChild(iframe);
181
+ return iframe;
182
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
 
184
+ // Open modal (creates iframe if needed)
185
+ function openModal() {
186
+ // show modal
187
+ geminiModal.classList.remove('hidden');
188
+ geminiModal.setAttribute('aria-hidden', 'false');
 
 
 
 
 
 
189
 
190
+ // Focus management: focus the close button quickly
191
+ closeModalBtn.focus();
 
 
 
 
 
 
 
 
 
 
 
192
 
193
+ // If there's no iframe yet, create it lazily
194
+ if (!iframeContainer.querySelector('iframe')) {
195
+ createIframe(GEMINI_URL);
196
+ }
197
+ // add key listener for Esc
198
+ document.addEventListener('keydown', onKeyDown);
199
+ trapFocus(geminiModal);
200
+ }
201
 
202
+ // Close modal and clean up
203
+ function closeModal() {
204
+ geminiModal.classList.add('hidden');
205
+ geminiModal.setAttribute('aria-hidden', 'true');
 
 
 
 
 
 
 
 
206
 
207
+ // Optionally keep the iframe for faster reopen, or remove to free memory:
208
+ // iframeContainer.querySelectorAll('iframe').forEach(i => i.remove());
209
+ document.removeEventListener('keydown', onKeyDown);
210
+ releaseFocusTrap();
 
 
 
 
 
211
  }
212
+
213
+ function onKeyDown(e) {
214
+ if (e.key === 'Escape') closeModal();
215
+ }
216
+
217
+ // Basic focus trap for accessibility
218
+ let previousActive = null;
219
+ function trapFocus(modal) {
220
+ previousActive = document.activeElement;
221
+ const focusable = modal.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])');
222
+ const first = focusable[0];
223
+ const last = focusable[focusable.length - 1];
224
+ function handleTrap(e) {
225
+ if (e.key !== 'Tab') return;
226
+ if (e.shiftKey && document.activeElement === first) {
227
+ e.preventDefault();
228
+ last.focus();
229
+ } else if (!e.shiftKey && document.activeElement === last) {
230
+ e.preventDefault();
231
+ first.focus();
232
+ }
233
+ }
234
+ modal._trapHandler = handleTrap;
235
+ modal.addEventListener('keydown', handleTrap);
236
+ }
237
+ function releaseFocusTrap() {
238
+ const modal = geminiModal;
239
+ if (modal && modal._trapHandler) {
240
+ modal.removeEventListener('keydown', modal._trapHandler);
241
+ modal._trapHandler = null;
242
+ }
243
+ if (previousActive && previousActive.focus) previousActive.focus();
244
+ }
245
+
246
+ // clicking the backdrop closes modal
247
+ document.querySelectorAll('.modal-backdrop').forEach(b => {
248
+ b.addEventListener('click', closeModal);
249
+ });
250
+
251
+ // Event bindings
252
+ openGeminiBtn.addEventListener('click', openModal);
253
+ closeModalBtn.addEventListener('click', closeModal);
254
+
255
+ copyGeminiLink.addEventListener('click', async () => {
256
+ const ok = await copyToClipboard(GEMINI_URL);
257
+ const btn = copyGeminiLink;
258
+ const orig = btn.textContent;
259
+ btn.textContent = ok ? 'Copied!' : 'Copy failed';
260
+ setTimeout(() => btn.textContent = orig, 1600);
261
  });
262
 
263
+ copyLinkModal.addEventListener('click', async () => {
264
+ const ok = await copyToClipboard(GEMINI_URL);
265
+ const btn = copyLinkModal;
266
+ const orig = btn.textContent;
267
+ btn.textContent = ok ? 'Copied!' : 'Copy failed';
268
+ setTimeout(() => btn.textContent = orig, 1600);
269
  });
270
+
271
+ // If iframe is blocked by X-Frame-Options/CSP, the iframe will error and fallback message will show.
272
+ // The "Open in new tab" link remains available as a reliable fallback.
273
+
274
+ // Small enhancement: try to preconnect to the domain to reduce latency (non-blocking)
275
+ (function preconnect() {
276
+ try {
277
+ const l = document.createElement('link');
278
+ l.rel = 'preconnect';
279
+ l.href = 'https://g.co';
280
+ l.crossOrigin = 'anonymous';
281
+ document.head.appendChild(l);
282
+ } catch (e) { /* noop */ }
283
+ })();
284
  })();
285
  </script>
286
  </body>