/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent-color: #F2622E;
    --accent-hover: #d9531f;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background: #F5F2EB;
    --border: #e5e7eb;
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Main container */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: calc(100vh - 100px); /* Account for footer */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content {
    text-align: center;
}

/* Logo */
.logo {
    max-width: 400px;
    width: 100%;
    height: auto;
    margin-top: 60px;
    margin-bottom: 0.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Typography */
.headline {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 3.5rem;
    line-height: 1.2;
    color: var(--text-primary);
}

.tm {
    font-weight: 400;
    font-size: 0.6em;
    vertical-align: super;
}

.subheadline {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}


/* Form styles */
.email-form {
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

input[type="email"] {
    flex: 1;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    background-color: #ffffff;
    min-height: 44px; /* Touch-friendly minimum height */
    -webkit-appearance: none; /* Remove iOS default styling */
}

input[type="email"]:focus {
    border-color: var(--accent-color);
}

input[type="email"]::placeholder {
    color: var(--text-secondary);
}

button[type="submit"] {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: var(--accent-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.1s;
    white-space: nowrap;
    min-height: 44px; /* Touch-friendly minimum height */
    -webkit-appearance: none; /* Remove iOS default styling */
    outline: none;
}

button[type="submit"]:hover {
    background-color: var(--accent-hover);
}

button[type="submit"]:active {
    transform: scale(0.98);
}

button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Message styles */
.message {
    font-size: 0.875rem;
    padding: 0.75rem;
    border-radius: 6px;
    display: none;
}

.message.success {
    display: block;
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.1);
}

.message.error {
    display: block;
    color: var(--error);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Nostr link */
.nostr-link {
    margin-bottom: 1rem;
}

.nostr-link a {
    display: inline-block;
    color: white;
    background-color: #8b5cf6;
    text-decoration: none;
    font-size: 0.9375rem;
    padding: 0.375rem 1.5rem;
    border-radius: 50px;
    transition: background-color 0.2s, transform 0.1s;
    font-weight: 500;
}

.nostr-link a:hover {
    background-color: #7c3aed;
    transform: scale(1.02);
}

/* Features section */
.features-container {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

/* Desktop tabs */
.features-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: nowrap;
}

.tab-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    width: 140px;
    outline: none;
}

.tab-button:hover {
    border-bottom-color: var(--accent-color);
    opacity: 0.7;
}

.tab-button.active {
    border-bottom-color: var(--accent-color);
}

.tab-button.active .tab-icon,
.tab-button.active span {
    color: var(--accent-color);
}

.tab-icon {
    font-size: 45px;
    color: #03213F;
}

.tab-button span {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #03213F;
}

.features-content {
    display: block;
    min-height: 150px;
}

.feature-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    padding: 0.5rem 1rem;
    animation: fadeIn 0.3s ease-in;
    min-height: 150px;
}

.feature-panel.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile/Tablet grid view - hidden, using tabs everywhere */
.features {
    display: none !important;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.icon {
    font-size: 108px;
    color: #03213F;
    flex-shrink: 0;
}

.feature h3,
.feature-panel h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #03213F;
    margin: 0;
}

.feature p,
.feature-panel p {
    font-size: 1.25rem;
    color: #03213F;
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
}

/* Footer */
.footer {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

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

/* Responsive design */
@media (max-width: 1024px) {
    .features-tabs {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .tab-button {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    main {
        padding: 1rem 0.75rem;
    }

    .container {
        padding: 0 0.5rem;
        max-width: 500px;
    }

    .logo {
        max-width: 250px;
        margin-top: 40px;
        margin-bottom: 0.5rem;
    }

    .headline {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .subheadline {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }

    .email-form {
        margin-bottom: 0.75rem;
    }

    .nostr-link {
        margin-bottom: 0.75rem;
    }

    .features-container {
        margin-top: 2rem;
        padding-top: 2rem;
    }

    .features-content {
        min-height: 100px;
    }

    .feature-panel {
        padding: 0.25rem 0.5rem;
        min-height: 100px;
    }

    .tab-icon {
        font-size: 28px;
    }

    .tab-button {
        gap: 0.5rem;
        padding: 0.375rem 0.5rem;
    }

    .tab-button span {
        font-size: 0.5625rem;
    }

    .features-tabs {
        margin-top: 1rem;
    }

    .feature-panel p {
        font-size: 0.9375rem;
    }
}

@media (max-width: 640px) {
    .logo {
        max-width: 220px;
        margin-top: 30px;
    }

    .headline {
        font-size: 1.375rem;
        margin-bottom: 1.75rem;
    }

    .form-group {
        flex-direction: column;
    }

    button[type="submit"] {
        width: 100%;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.75rem 0.5rem;
        min-height: calc(100vh - 60px);
    }

    .container {
        max-width: 100%;
    }

    .logo {
        max-width: 180px;
        margin-top: 20px;
        margin-bottom: 0.5rem;
    }

    .headline {
        font-size: 1.125rem;
        margin-bottom: 1.5rem;
    }

    .subheadline {
        font-size: 0.8125rem;
        margin-bottom: 1rem;
    }

    input[type="email"],
    button[type="submit"] {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .features-container {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .features-content {
        min-height: 80px;
    }

    .feature-panel {
        padding: 0.125rem 0.25rem;
        min-height: 80px;
    }

    .tab-icon {
        font-size: 24px;
    }

    .tab-button {
        gap: 0.375rem;
        padding: 0.25rem 0.375rem;
    }

    .tab-button span {
        font-size: 0.5rem;
    }

    .features-tabs {
        margin-top: 0.75rem;
        gap: 0.5rem;
    }

    .feature-panel p {
        font-size: 0.8125rem;
    }

    .footer {
        padding: 1rem 0.5rem;
        font-size: 0.75rem;
    }
}
