/* ============================================
   JEFFREY - GLOBAL STYLES
   A refined, warm British aesthetic
   ============================================ */

/* Fonts: Libre Baskerville for elegance, Source Sans 3 for readability */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ============================================
   CSS VARIABLES - Jeffrey Colour Palette
   ============================================ */
:root {
    /* Primary Colours */
    --primary: #5F7D8C;              /* Soft Slate Blue - main background */
    --secondary: #F3F1EE;            /* Warm Light Stone - content areas */
    --accent: #7FA69A;               /* Soft Sage Green - CTAs */
    --accent-hover: #6B9389;         /* Darker sage for hover */
    --accent-light: rgba(127, 166, 154, 0.15);
    
    /* Text Colours */
    --text-primary: #2E2E2E;         /* Charcoal Grey */
    --text-secondary: #6B6B6B;       /* Muted Grey */
    --text-light: #F3F1EE;           /* Light text on dark backgrounds */
    
    /* Subtle Elements */
    --highlight: #DCE6EA;            /* Mist Blue - lines, icons */
    --white: #FFFFFF;
    --border: rgba(47, 46, 46, 0.1);
    
    /* Shadows */
    --shadow-soft: 0 2px 8px rgba(95, 125, 140, 0.08);
    --shadow-medium: 0 4px 20px rgba(95, 125, 140, 0.12);
    --shadow-lifted: 0 8px 32px rgba(95, 125, 140, 0.16);
    
    /* Typography */
    --font-display: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, sans-serif;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
    --space-3xl: 96px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.7;
    background: var(--secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

ul, ol {
    list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
}

.lead {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 300;
}

.small {
    font-size: 0.875rem;
}

.serif-italic {
    font-family: var(--font-display);
    font-style: italic;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container--narrow {
    max-width: 680px;
}

.container--tight {
    max-width: 480px;
}

.section {
    padding: var(--space-3xl) 0;
}

.section--primary {
    background: var(--primary);
    color: var(--text-light);
}

.section--primary h1,
.section--primary h2,
.section--primary h3 {
    color: var(--text-light);
}

.section--primary p {
    color: rgba(243, 241, 238, 0.85);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    text-decoration: none;
    line-height: 1;
}

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

.btn--primary {
    background: var(--accent);
    color: var(--white);
}

.btn--primary:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn--secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

.btn--secondary:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.btn--ghost {
    background: transparent;
    color: var(--text-light);
    border: 1.5px solid rgba(243, 241, 238, 0.3);
}

.btn--ghost:hover:not(:disabled) {
    background: rgba(243, 241, 238, 0.1);
    border-color: rgba(243, 241, 238, 0.5);
}

.btn--large {
    padding: 18px 36px;
    font-size: 1.0625rem;
}

.btn--full {
    width: 100%;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label--light {
    color: var(--text-light);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--highlight);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--white);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-input--dark {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(243, 241, 238, 0.2);
    color: var(--text-light);
}

.form-input--dark:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
}

.form-input--dark::placeholder {
    color: rgba(243, 241, 238, 0.5);
}

.form-hint {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.form-error {
    margin-top: var(--space-xs);
    font-size: 0.8125rem;
    color: #C44536;
}

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

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B6B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-soft);
    transition: box-shadow var(--transition-base);
}

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

.card--bordered {
    box-shadow: none;
    border: 1.5px solid var(--highlight);
}

.card--featured {
    background: var(--white);
    border: 2px solid var(--accent);
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(243, 241, 238, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-base);
}

.header--dark {
    background: rgba(95, 125, 140, 0.95);
    border-bottom-color: rgba(243, 241, 238, 0.1);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
}

.logo__image {
    height: 32px;
    width: auto;
}

.header--dark .logo {
    color: var(--text-light);
}

.header--dark .logo__image {
    filter: brightness(0) invert(1);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav__link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.nav__link:hover {
    color: var(--text-primary);
}

.header--dark .nav__link {
    color: rgba(243, 241, 238, 0.7);
}

.header--dark .nav__link:hover {
    color: var(--text-light);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(127, 166, 154, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(95, 125, 140, 0.3), transparent);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    padding: var(--space-3xl) 0;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: var(--space-lg);
}

.hero__eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.hero__title {
    color: var(--text-light);
    margin-bottom: var(--space-lg);
    max-width: 700px;
}

.hero__title-light {
    display: block;
    font-size: 0.6em;
    font-weight: 300;
    font-family: var(--font-body);
    opacity: 0.75;
    letter-spacing: 0;
    margin-bottom: var(--space-sm);
}

.hero__title-emphasis {
    display: block;
    font-family: var(--font-display);
    font-style: italic;
}

.hero__subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(243, 241, 238, 0.8);
    max-width: 540px;
    margin-bottom: var(--space-xl);
    font-weight: 300;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
    background: var(--secondary);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.feature {
    padding: var(--space-lg);
}

.feature__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    color: var(--accent);
}

.feature__title {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.feature__text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   WAITLIST FORM
   ============================================ */
.waitlist {
    background: var(--primary);
    position: relative;
}

.waitlist::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.waitlist__card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(243, 241, 238, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 520px;
    margin: 0 auto;
}

.waitlist__title {
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.waitlist__subtitle {
    color: rgba(243, 241, 238, 0.7);
    margin-bottom: var(--space-xl);
}

/* ============================================
   TRUST INDICATORS
   ============================================ */
.trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border);
    margin-top: var(--space-xl);
}

.trust__item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.trust__icon {
    color: var(--accent);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--text-primary);
    color: rgba(243, 241, 238, 0.6);
    padding: var(--space-2xl) 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer__logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.footer__logo-image {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer__text {
    font-size: 0.875rem;
}

.footer__links {
    display: flex;
    gap: var(--space-lg);
}

.footer__link {
    font-size: 0.875rem;
    color: rgba(243, 241, 238, 0.6);
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--text-light);
}

/* ============================================
   SUCCESS PAGE
   ============================================ */
.success {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    text-align: center;
    padding: var(--space-xl);
}

.success__icon {
    width: 80px;
    height: 80px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-xl);
    color: var(--accent);
}

.success__title {
    margin-bottom: var(--space-md);
}

.success__text {
    max-width: 400px;
    margin: 0 auto var(--space-xl);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .hero {
        min-height: auto;
        padding-top: 100px;
    }
    
    .hero__content {
        padding: var(--space-2xl) 0;
    }
    
    .header__inner {
        height: 64px;
    }
    
    .nav {
        gap: var(--space-md);
    }
    
    .nav__link {
        font-size: 0.875rem;
    }
    
    .btn--large {
        padding: 16px 28px;
        font-size: 1rem;
    }
    
    .waitlist__card {
        padding: var(--space-xl);
    }
    
    .trust {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .footer__inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .card {
        padding: var(--space-lg);
    }
    
    .waitlist__card {
        padding: var(--space-lg);
    }
}
