feat(page): initial landing page with dev tooling
Pre-launch landing page for The Lofty Project — a 501(c)(4) connecting creative talent with leftist organizing. Includes hero with blur-in line-by-line animation, three-pillar section (Talent/Media/Infrastructure), interest signup buttons, and responsive design with fluid typography. Tooling: Astro 5, Biome linting/formatting, Lefthook git hooks, Commitizen with conventional commits, and project documentation.
This commit is contained in:
169
src/layouts/Layout.astro
Normal file
169
src/layouts/Layout.astro
Normal file
@@ -0,0 +1,169 @@
|
||||
---
|
||||
interface Props {
|
||||
title?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
const {
|
||||
title = "Lofty — Creative power for the progressive movement",
|
||||
description = "Lofty connects creative professionals with progressive campaigns, produces original political media, and builds digital infrastructure for progressive organizing.",
|
||||
} = Astro.props;
|
||||
|
||||
const ogImage = "/og.png";
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content={ogImage} />
|
||||
<meta property="og:site_name" content="Lofty" />
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={title} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
<meta name="twitter:image" content={ogImage} />
|
||||
|
||||
<!-- Typekit Fonts -->
|
||||
<link rel="preconnect" href="https://use.typekit.net" crossorigin />
|
||||
<link rel="stylesheet" href="https://use.typekit.net/mdp0hnk.css" />
|
||||
|
||||
<!-- Reduced motion detection -->
|
||||
<script is:inline>
|
||||
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
|
||||
document.documentElement.classList.add('reduce-motion');
|
||||
}
|
||||
window.matchMedia('(prefers-reduced-motion: reduce)').addEventListener('change', (e) => {
|
||||
document.documentElement.classList.toggle('reduce-motion', e.matches);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<slot />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style is:global>
|
||||
/* ——— Design Tokens ——— */
|
||||
:root {
|
||||
/* Colors */
|
||||
--color-cream: #F5F0EB;
|
||||
--color-cream-dark: #EDE6DF;
|
||||
--color-dusty-rose: #C48B8B;
|
||||
--color-rose-dark: #A86F6F;
|
||||
--color-slate-blue: #8A9BB5;
|
||||
--color-slate-light: #A3B1C7;
|
||||
--color-navy: #1A1F2E;
|
||||
--color-navy-light: #2D3548;
|
||||
--color-white: #FDFCFA;
|
||||
|
||||
/* Typography */
|
||||
--font-body: 'neue-haas-grotesk-display', sans-serif;
|
||||
--font-display: 'meno-text', serif;
|
||||
|
||||
--text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
|
||||
--text-sm: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);
|
||||
--text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
|
||||
--text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.3125rem);
|
||||
--text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
|
||||
--text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
|
||||
--text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
|
||||
--text-4xl: clamp(2.75rem, 1.85rem + 4.5vw, 5rem);
|
||||
|
||||
/* Spacing */
|
||||
--space-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
|
||||
--space-sm: clamp(0.75rem, 0.65rem + 0.5vw, 1rem);
|
||||
--space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
|
||||
--space-lg: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
|
||||
--space-xl: clamp(2rem, 1.4rem + 3vw, 4rem);
|
||||
--space-2xl: clamp(3rem, 2rem + 5vw, 6rem);
|
||||
--space-3xl: clamp(4rem, 2.5rem + 7.5vw, 8rem);
|
||||
|
||||
/* Transitions */
|
||||
--ease-out: cubic-bezier(0.25, 1, 0.5, 1);
|
||||
--ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
|
||||
--ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
|
||||
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
--duration-fast: 250ms;
|
||||
--duration-base: 500ms;
|
||||
--duration-slow: 900ms;
|
||||
--duration-slower: 1400ms;
|
||||
|
||||
/* Borders */
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 8px;
|
||||
--radius-lg: 16px;
|
||||
--radius-full: 9999px;
|
||||
}
|
||||
|
||||
/* ——— CSS Reset ——— */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-rendering: optimizeLegibility;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
img, picture, video, canvas, svg {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* ——— Global Typography ——— */
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-base);
|
||||
font-weight: 500;
|
||||
line-height: 1.6;
|
||||
color: var(--color-navy);
|
||||
background-color: var(--color-cream);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: var(--font-display);
|
||||
font-weight: 400;
|
||||
line-height: 1.1;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-dusty-rose);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* ——— Reduced motion ——— */
|
||||
.reduce-motion *,
|
||||
.reduce-motion *::before,
|
||||
.reduce-motion *::after {
|
||||
animation-duration: 0.001ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.001ms !important;
|
||||
}
|
||||
</style>
|
||||
689
src/pages/index.astro
Normal file
689
src/pages/index.astro
Normal file
@@ -0,0 +1,689 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro";
|
||||
|
||||
// const signupEndpoint = import.meta.env.PUBLIC_SIGNUP_ENDPOINT || "/api/signup";
|
||||
|
||||
const heroLines = ["Talent, media, and tech", "for collective power"];
|
||||
|
||||
const pillars = [
|
||||
{
|
||||
icon: "talent",
|
||||
title: "Talent",
|
||||
description:
|
||||
"Connecting talented designers, filmmakers, photographers, and strategists to help progressive campaigns tell stories that win.",
|
||||
},
|
||||
{
|
||||
icon: "media",
|
||||
title: "Media",
|
||||
description:
|
||||
"Producing original leftist content, from rapid-response videos to long-form storytelling that moves people to organize and act.",
|
||||
},
|
||||
{
|
||||
icon: "infra",
|
||||
title: "Infrastructure",
|
||||
description:
|
||||
"Building digital tools and platforms independent from big tech that help leftist organizers mobilize, communicate, and win.",
|
||||
},
|
||||
];
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<!-- Hero -->
|
||||
<section class="hero">
|
||||
<div class="hero-bg">
|
||||
<picture>
|
||||
<source srcset="/hero-bg.webp" type="image/webp" />
|
||||
<img src="/hero-bg.jpg" alt="" aria-hidden="true" width="1920" height="1536" />
|
||||
</picture>
|
||||
</div>
|
||||
<header class="hero-header">
|
||||
<div class="container">
|
||||
<div class="hero-logo">Lofty</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container hero-inner">
|
||||
<h1 class="hero-headline">
|
||||
{heroLines.map((line, i) => (
|
||||
<span class="line-reveal" style={`--i: ${i}`}>{line}</span>
|
||||
))}
|
||||
</h1>
|
||||
<p class="hero-sub">
|
||||
The Lofty Project aims to bridge talented creatives<br class="hide-mobile" /> with leftist movements and progressive campaigns.
|
||||
</p>
|
||||
<div class="hero-cta-wrap">
|
||||
<a href="#signup" class="hero-cta">
|
||||
<span>Get involved</span>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M3 8h10M9 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- What We Build -->
|
||||
<section class="what-we-do">
|
||||
<div class="container">
|
||||
<p class="section-eyebrow reveal">Our work</p>
|
||||
<h2 class="section-heading reveal" style="--stagger: 1">What we're building</h2>
|
||||
<div class="pillars">
|
||||
{pillars.map((pillar, i) => (
|
||||
<div class="pillar reveal" style={`--stagger: ${i + 2}`}>
|
||||
<div class={`pillar-icon pillar-icon--${pillar.icon}`} aria-hidden="true">
|
||||
{pillar.icon === 'talent' && (
|
||||
<svg viewBox="0 0 32 32" fill="none"><circle cx="16" cy="12" r="5" stroke="currentColor" stroke-width="1.5"/><path d="M6 28c0-5.523 4.477-10 10-10s10 4.477 10 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
||||
)}
|
||||
{pillar.icon === 'media' && (
|
||||
<svg viewBox="0 0 32 32" fill="none"><rect x="4" y="6" width="24" height="16" rx="2" stroke="currentColor" stroke-width="1.5"/><path d="M13 11l7 4-7 4V11z" fill="currentColor" opacity="0.6"/><path d="M10 26h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
||||
)}
|
||||
{pillar.icon === 'infra' && (
|
||||
<svg viewBox="0 0 32 32" fill="none"><rect x="8" y="4" width="16" height="8" rx="2" stroke="currentColor" stroke-width="1.5"/><rect x="8" y="20" width="16" height="8" rx="2" stroke="currentColor" stroke-width="1.5"/><path d="M16 12v8M12 12v2l-4 4v2M20 12v2l4 4v2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
|
||||
)}
|
||||
</div>
|
||||
<h3 class="pillar-title">{pillar.title}</h3>
|
||||
<p class="pillar-desc">{pillar.description}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Email Signup -->
|
||||
<section class="signup" id="signup">
|
||||
<div class="container signup-inner">
|
||||
<p class="section-eyebrow reveal">Get involved</p>
|
||||
<h2 class="section-heading reveal" style="--stagger: 1">Lend your skills</h2>
|
||||
<p class="signup-desc reveal" style="--stagger: 2">
|
||||
We're looking for creatives, organizers, and anyone ready to put their talent toward building a better country for all.
|
||||
</p>
|
||||
<!-- TODO: Restore email signup form
|
||||
<form
|
||||
class="signup-form reveal"
|
||||
style="--stagger: 3"
|
||||
action={signupEndpoint}
|
||||
method="POST"
|
||||
data-endpoint={signupEndpoint}
|
||||
>
|
||||
<label for="email" class="sr-only">Email address</label>
|
||||
<div class="input-wrap">
|
||||
<input
|
||||
type="email"
|
||||
id="email"
|
||||
name="email"
|
||||
placeholder="you@example.com"
|
||||
required
|
||||
autocomplete="email"
|
||||
class="signup-input"
|
||||
/>
|
||||
</div>
|
||||
<button type="submit" class="signup-btn">
|
||||
<span class="btn-text">Count me in</span>
|
||||
<svg class="btn-arrow" width="18" height="18" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M3 8h10M9 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</form>
|
||||
-->
|
||||
<div class="interest-buttons reveal" style="--stagger: 3">
|
||||
<a href="https://lofty.to/creative-interest" class="interest-btn" target="_blank" rel="noopener">
|
||||
<span>Creatives</span>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M3 8h10M9 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="https://lofty.to/volunteer-interest" class="interest-btn interest-btn--outline" target="_blank" rel="noopener">
|
||||
<span>Operations</span>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M3 8h10M9 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="site-footer">
|
||||
<div class="container footer-inner">
|
||||
<p class="footer-text">© {new Date().getFullYear()} The Lofty Project.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</Layout>
|
||||
|
||||
<style>
|
||||
/* ——— Utilities ——— */
|
||||
.container {
|
||||
max-width: 68rem;
|
||||
margin-inline: auto;
|
||||
padding-inline: var(--space-md);
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
/* ——— Hero ——— */
|
||||
.hero {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: var(--color-cream);
|
||||
}
|
||||
|
||||
.hero-bg {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.hero-bg img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center center;
|
||||
filter: blur(2px) saturate(0.15) brightness(1.2);
|
||||
transform: scale(1.03);
|
||||
opacity: 0.3;
|
||||
mix-blend-mode: multiply;
|
||||
}
|
||||
|
||||
.hero-bg::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(245, 240, 235, 0.4) 0%,
|
||||
rgba(237, 230, 223, 0.6) 50%,
|
||||
rgba(245, 240, 235, 0.85) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.hero-inner {
|
||||
max-width: 56rem;
|
||||
padding-block: var(--space-3xl);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.hero-header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
padding-block: var(--space-lg);
|
||||
}
|
||||
|
||||
.hero-logo {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-xl);
|
||||
font-weight: 700;
|
||||
color: var(--color-navy);
|
||||
letter-spacing: -0.02em;
|
||||
opacity: 0;
|
||||
filter: blur(8px);
|
||||
animation: fade-in-up 1s var(--ease-out-quart) 0.1s forwards;
|
||||
}
|
||||
|
||||
.hide-mobile {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.hide-mobile {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
.hero-headline {
|
||||
font-size: var(--text-4xl);
|
||||
color: var(--color-navy);
|
||||
margin-bottom: var(--space-md);
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.line-reveal {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
filter: blur(10px);
|
||||
transform: translateY(0.4em);
|
||||
animation: line-clip 1.4s var(--ease-out-quart) forwards;
|
||||
animation-delay: calc(0.3s + var(--i) * 0.35s);
|
||||
}
|
||||
|
||||
@keyframes line-clip {
|
||||
to {
|
||||
opacity: 1;
|
||||
filter: blur(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.hero-sub {
|
||||
font-size: var(--text-lg);
|
||||
color: var(--color-navy-light);
|
||||
max-width: 34rem;
|
||||
margin-inline: auto;
|
||||
margin-top: var(--space-lg);
|
||||
line-height: 1.6;
|
||||
opacity: 0;
|
||||
filter: blur(8px);
|
||||
transform: translateY(1rem);
|
||||
animation: fade-in-up 1.2s var(--ease-out-quart) 1s forwards;
|
||||
}
|
||||
|
||||
.hero-cta-wrap {
|
||||
opacity: 0;
|
||||
filter: blur(8px);
|
||||
transform: translateY(1rem);
|
||||
animation: fade-in-up 1.2s var(--ease-out-quart) 1.3s forwards;
|
||||
margin-top: var(--space-xl);
|
||||
}
|
||||
|
||||
.hero-cta {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem 1.75rem;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--color-white);
|
||||
background: var(--color-navy);
|
||||
border-radius: var(--radius-full);
|
||||
text-decoration: none;
|
||||
transition: transform var(--duration-base) var(--ease-out-quart),
|
||||
background-color var(--duration-base) var(--ease-out-quart);
|
||||
}
|
||||
|
||||
.hero-cta:hover {
|
||||
text-decoration: none;
|
||||
background: var(--color-navy-light);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.hero-cta:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
@keyframes fade-in-up {
|
||||
to {
|
||||
opacity: 1;
|
||||
filter: blur(0);
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* ——— What We Do ——— */
|
||||
.what-we-do {
|
||||
padding-block: var(--space-3xl) var(--space-2xl);
|
||||
}
|
||||
|
||||
.section-eyebrow {
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
color: var(--color-dusty-rose);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-xs);
|
||||
}
|
||||
|
||||
.section-heading {
|
||||
font-size: var(--text-3xl);
|
||||
text-align: center;
|
||||
margin-bottom: var(--space-xl);
|
||||
color: var(--color-navy);
|
||||
}
|
||||
|
||||
.pillars {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--space-lg);
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.pillars {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: var(--space-md);
|
||||
}
|
||||
}
|
||||
|
||||
.pillar {
|
||||
text-align: center;
|
||||
padding: var(--space-xl) var(--space-lg);
|
||||
border-radius: var(--radius-lg);
|
||||
background: rgba(253, 252, 250, 0.5);
|
||||
border: 1px solid rgba(163, 177, 199, 0.15);
|
||||
box-shadow: 0 2px 8px rgba(26, 31, 46, 0);
|
||||
transition: transform var(--duration-slow) var(--ease-out-quart),
|
||||
box-shadow var(--duration-slow) var(--ease-out-quart),
|
||||
border-color var(--duration-slow) var(--ease-out-quart);
|
||||
}
|
||||
|
||||
.pillar:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 16px 48px rgba(26, 31, 46, 0.08), 0 4px 12px rgba(26, 31, 46, 0.04);
|
||||
border-color: rgba(196, 139, 139, 0.25);
|
||||
}
|
||||
|
||||
.pillar-icon {
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
margin-inline: auto;
|
||||
margin-bottom: var(--space-md);
|
||||
border-radius: var(--radius-lg);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pillar-icon svg {
|
||||
width: 1.75rem;
|
||||
height: 1.75rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pillar-icon--talent {
|
||||
background: linear-gradient(135deg, rgba(196, 139, 139, 0.15), rgba(196, 139, 139, 0.05));
|
||||
color: var(--color-dusty-rose);
|
||||
}
|
||||
|
||||
.pillar-icon--media {
|
||||
background: linear-gradient(135deg, rgba(138, 155, 181, 0.15), rgba(138, 155, 181, 0.05));
|
||||
color: var(--color-slate-blue);
|
||||
}
|
||||
|
||||
.pillar-icon--infra {
|
||||
background: linear-gradient(135deg, rgba(45, 53, 72, 0.12), rgba(45, 53, 72, 0.04));
|
||||
color: var(--color-navy-light);
|
||||
}
|
||||
|
||||
.pillar-title {
|
||||
font-size: var(--text-xl);
|
||||
margin-bottom: var(--space-xs);
|
||||
color: var(--color-navy);
|
||||
}
|
||||
|
||||
.pillar-desc {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--color-navy-light);
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
/* ——— Signup ——— */
|
||||
.signup {
|
||||
padding-block: var(--space-2xl) var(--space-3xl);
|
||||
background-color: var(--color-cream-dark);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.signup-inner {
|
||||
max-width: 36rem;
|
||||
text-align: center;
|
||||
padding-top: var(--space-xl);
|
||||
}
|
||||
|
||||
.signup-desc {
|
||||
font-size: var(--text-lg);
|
||||
color: var(--color-navy-light);
|
||||
margin-bottom: var(--space-xl);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.interest-buttons {
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.interest-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem 1.75rem;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 600;
|
||||
color: var(--color-white);
|
||||
background: var(--color-navy);
|
||||
border-radius: var(--radius-full);
|
||||
text-decoration: none;
|
||||
transition: transform var(--duration-base) var(--ease-out-quart),
|
||||
background-color var(--duration-base) var(--ease-out-quart);
|
||||
}
|
||||
|
||||
.interest-btn:hover {
|
||||
background: var(--color-navy-light);
|
||||
transform: scale(1.05);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.interest-btn:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.interest-btn--outline {
|
||||
background: transparent;
|
||||
color: var(--color-navy);
|
||||
border: 1px solid rgba(26, 31, 46, 0.2);
|
||||
}
|
||||
|
||||
.interest-btn--outline:hover {
|
||||
background: rgba(26, 31, 46, 0.06);
|
||||
border-color: rgba(26, 31, 46, 0.35);
|
||||
color: var(--color-navy);
|
||||
}
|
||||
|
||||
.signup-form {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
justify-content: center;
|
||||
max-width: 26rem;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
.input-wrap {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.signup-input {
|
||||
width: 100%;
|
||||
height: 2.5rem;
|
||||
padding: 0 0.75rem;
|
||||
border: 1px solid rgba(163, 177, 199, 0.35);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-white);
|
||||
font-size: var(--text-sm);
|
||||
color: var(--color-navy);
|
||||
transition: border-color var(--duration-fast) ease,
|
||||
box-shadow var(--duration-fast) ease;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.signup-input::placeholder {
|
||||
color: var(--color-slate-light);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.signup-input:focus {
|
||||
border-color: var(--color-navy-light);
|
||||
box-shadow: 0 0 0 3px rgba(26, 31, 46, 0.06);
|
||||
}
|
||||
|
||||
.signup-input.has-error {
|
||||
border-color: var(--color-dusty-rose);
|
||||
animation: shake 0.35s var(--ease-out);
|
||||
}
|
||||
|
||||
@keyframes shake {
|
||||
0%, 100% { transform: translateX(0); }
|
||||
25% { transform: translateX(-4px); }
|
||||
50% { transform: translateX(4px); }
|
||||
75% { transform: translateX(-2px); }
|
||||
}
|
||||
|
||||
.signup-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
height: 2.5rem;
|
||||
padding: 0 1rem;
|
||||
background: var(--color-navy);
|
||||
color: var(--color-white);
|
||||
font-size: var(--text-xs);
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.01em;
|
||||
border: none;
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: background-color var(--duration-fast) ease,
|
||||
opacity var(--duration-fast) ease;
|
||||
}
|
||||
|
||||
.btn-arrow {
|
||||
transition: transform var(--duration-fast) ease;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.signup-btn:hover {
|
||||
background-color: var(--color-navy-light);
|
||||
}
|
||||
|
||||
.signup-btn:hover .btn-arrow {
|
||||
transform: translateX(2px);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.signup-btn:active {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.signup-form.is-success .signup-btn {
|
||||
background-color: var(--color-slate-blue);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.signup-form.is-success .signup-input {
|
||||
opacity: 0.4;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ——— Scroll animations ——— */
|
||||
.reveal {
|
||||
opacity: 0;
|
||||
filter: blur(8px);
|
||||
transform: translateY(2.5rem);
|
||||
transition: opacity var(--duration-slower) var(--ease-in-out),
|
||||
filter var(--duration-slower) var(--ease-in-out),
|
||||
transform var(--duration-slower) var(--ease-in-out);
|
||||
transition-delay: calc(var(--stagger, 0) * 120ms);
|
||||
}
|
||||
|
||||
.reveal.is-visible {
|
||||
opacity: 1;
|
||||
filter: blur(0);
|
||||
transform: translateY(0);
|
||||
transition: opacity var(--duration-slower) var(--ease-in-out),
|
||||
filter var(--duration-slower) var(--ease-in-out),
|
||||
transform var(--duration-slower) var(--ease-in-out),
|
||||
box-shadow var(--duration-slow) var(--ease-out-quart),
|
||||
border-color var(--duration-slow) var(--ease-out-quart);
|
||||
}
|
||||
|
||||
/* ——— Footer ——— */
|
||||
.site-footer {
|
||||
padding-block: var(--space-xl);
|
||||
background: var(--color-cream);
|
||||
}
|
||||
|
||||
.footer-inner {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-text {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--color-navy-light);
|
||||
opacity: 0.45;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
// Intersection Observer for scroll-triggered animations
|
||||
const revealEls = document.querySelectorAll('.reveal');
|
||||
|
||||
if (revealEls.length > 0) {
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.classList.add('is-visible');
|
||||
observer.unobserve(entry.target);
|
||||
}
|
||||
});
|
||||
},
|
||||
{ threshold: 0.1, rootMargin: '-40px 0px' }
|
||||
);
|
||||
|
||||
revealEls.forEach((el) => observer.observe(el));
|
||||
}
|
||||
|
||||
// Form handler
|
||||
const form = document.querySelector<HTMLFormElement>('.signup-form');
|
||||
const input = document.querySelector<HTMLInputElement>('.signup-input');
|
||||
const btnText = document.querySelector<HTMLSpanElement>('.btn-text');
|
||||
|
||||
if (form && input && btnText) {
|
||||
const endpoint = form.dataset.endpoint || '/api/signup';
|
||||
let originalPlaceholder = input.placeholder;
|
||||
|
||||
form.addEventListener('submit', async (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const email = input.value.trim();
|
||||
if (!email) return;
|
||||
|
||||
try {
|
||||
const res = await fetch(endpoint, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ email }),
|
||||
});
|
||||
|
||||
if (!res.ok) throw new Error('Signup failed');
|
||||
|
||||
// Success state
|
||||
form.classList.add('is-success');
|
||||
btnText.textContent = "You're in";
|
||||
input.value = '';
|
||||
} catch {
|
||||
// Error state
|
||||
input.classList.add('has-error');
|
||||
input.value = '';
|
||||
input.placeholder = 'Something went wrong — try again';
|
||||
|
||||
setTimeout(() => {
|
||||
input.classList.remove('has-error');
|
||||
input.placeholder = originalPlaceholder;
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user