* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(20, 14%, 10%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(20, 14%, 10%);
    --primary: hsl(27, 87%, 55%);
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-glow: hsl(27, 87%, 65%);
    --secondary: hsl(28, 100%, 95%);
    --secondary-foreground: hsl(27, 87%, 35%);
    --muted: hsl(27, 40%, 96%);
    --muted-foreground: hsl(20, 8%, 45%);
    --border: hsl(27, 30%, 90%);
    --input: hsl(27, 30%, 90%);
    --shadow-glow: 0 10px 40px -10px hsl(27, 87%, 55%, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: 100%;
    max-width: 768px;
}

header .container {
    background-color: rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.5rem;
        border-bottom: 1px solid var(--border);

    padding: 0 1rem;

    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
}

header .logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

header .logo-wrapper img {
    height: 32px;
}

header nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

header nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.3s;
}

header nav a:hover {
    opacity: 1;
}

/* Responsive Navbar */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100;
}

.nav-toggle .bar {
    width: 24px;
    height: 3px;
    background: var(--foreground);
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 900px) {
    header nav.site-nav {
        position: fixed;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s, opacity 0.3s;
    }

    header nav.site-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-toggle {
        display: flex;
    }

    header .container {
        height: 64px;
    }
}

/* Hamburger animation */
.nav-toggle.open .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-outline {
    border: 1px solid var(--border);
    background-color: transparent;
    color: var(--foreground);
}

.btn-outline:hover {
    background-color: var(--muted);
}

.btn-hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-glow));
    color: var(--primary-foreground);
    box-shadow: var(--shadow-glow);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px -15px hsl(27, 87%, 55%, 0.4);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, var(--secondary), var(--background));
    padding: 10rem 0 !important;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    /* GRID */
    background-image:
        linear-gradient(to right, #ffffff 1px, transparent 1px),
        linear-gradient(to bottom, #ffffff 1px, transparent 1px);
    background-size: 5rem 5rem;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
}

.envelope-follow {
    position: fixed;
    top: 25%;
    left: 50%;
    width: clamp(7rem, 12vw, 12.5rem);
    pointer-events: none;
    z-index: 40;
    transform: translate3d(-50%, -50%, 0) translate3d(var(--x, 0px), var(--y, 0px), 0) rotate(var(--rotation, 0deg)) scale(var(--scale, 1));
    transform-origin: center;
    will-change: transform;
    transition: filter 0.3s ease;
}

.envelope-follow img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 40px hsl(27, 87%, 55%, 0.3));
}

.hero .container {
    position: relative;
    z-index: 10;
}

.hero-logo {
    height: 7rem;
    margin: 0 auto 2rem;
    display: block;
}

.hero-logo-footer {
    width: 50%;
    height: auto;
    margin: 0 auto 2rem;
    display: block;
}

.hero-content {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid hsl(27, 87%, 55%, 0.2);
    background-color: hsl(27, 87%, 55%, 0.1);
    border-radius: 9999px;
}

.hero-badge svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    color: var(--primary);
}

.hero-badge span {
    font-size: 0.875rem;
    font-weight: 500;
}

h1 {
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 .highlight {
    color: var(--primary);
}

/* Prevent layout shift from typewriter: reserve space only on mobile */
@media (max-width: 640px) {
    .email-line {
        display: inline-block;
        /* allow height control while staying inline with h1 */
        min-height: 2.4em;
        /* 2 lines * 1.2 line-height = 2.4 */
        position: relative;
        width: 100%;
    }
}

/* Keep cursor from affecting line height */
.email-line .cursor {
    display: inline-block;
    width: 0.5ch;
}

.hero-description {
    margin-bottom: 2rem;
    font-size: 1.125rem;
    color: var(--muted-foreground);
}

.hero-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 28rem;
    margin: 0 auto;
}

.hero-form .input-group {
    display: flex;
    gap: 0.5rem;
}

.input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--input);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: var(--background);
}

.hero-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Section */
section {
    padding: 5rem 0;
}

.section-header {
    max-width: 42rem;
    margin: 0 auto 4rem;
    text-align: center;
}

h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.section-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Card */
.card {
    position: relative;
    z-index: 45;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-under {
    position: relative;
    z-index: 35;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-glow);
}

.card-under:hover {
    box-shadow: var(--shadow-glow);
}

.card-header {
    padding: 1.5rem;
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    background-color: hsl(27, 87%, 55%, 0.1);
}

.card-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.card-content {
    padding: 0 1.5rem 1.5rem;
}

/* Pricing */
.pricing {
    background-color: hsl(27, 40%, 96%, 0.5);
}

.pricing-grid {
    display: grid;
    gap: 2rem;
    max-width: 75rem;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pricing-card {
    position: relative;
}

.pricing-badge {
    position: absolute;
    top: -1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.pricing-card.featured {
    border: 1px solid var(--primary);
    box-shadow: var(--shadow-glow);
}

.price {
    margin-top: 1rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
}

.price-period {
    color: var(--muted-foreground);
}

.feature-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

.feature-item svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--primary);
}

.feature-item span {
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

/* CTA */
.cta-content {
    max-width: 48rem;
    margin: 0 auto;
    text-align: center;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    background-color: hsl(27, 40%, 96%, 0.3);
}

footer .container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer-logo {
    height: 100px;
    margin-bottom: 1rem;
}

.footer-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.footer-title {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 0.5rem;
}

.footer-list a {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-list a:hover {
    color: var(--foreground);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

@media (min-width: 640px) {
    h1 {
        font-size: 3.75rem;
    }

    .hero-form {
        flex-direction: row;
    }

    .cta-buttons {
        flex-direction: row;
    }
}

@media (min-width: 768px) {

    .hero,
    section {
        padding: 8rem 0;
    }
}
