/**
 * Shared Yak marketing/legal web page styles (yakapp.co).
 * Used by privacy, terms, support, email/unsubscribe, and edge-function
 * confirmation pages. See docs/web-design-system.md.
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000000;
    color: #f5f5f5;
    overflow-x: hidden;
    min-height: 100vh;
}

header {
    padding: 32px 24px;
    max-width: 640px;
    margin: 0 auto;
}

header a {
    font-family: 'Climate Crisis', cursive;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

header a:hover { color: #D1D1D1; }

main {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.section-label {
    font-family: 'Alexandria', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

h1 {
    font-family: 'Alexandria', sans-serif;
    font-size: clamp(22px, 6vw, 28px);
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    line-height: 1.3;
}

h2 {
    font-family: 'Alexandria', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-top: 40px;
    margin-bottom: 12px;
}

h2:first-of-type { margin-top: 0; }

.effective-date {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #666;
    font-weight: 400;
    margin-bottom: 48px;
}

p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #D1D1D1;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 12px;
}

a {
    color: #D1D1D1;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

a:hover { color: white; }

.contact-block { margin-top: 40px; }
.contact-block p { margin-bottom: 4px; }

.resources { margin-top: 40px; }
.resources p { margin-bottom: 8px; }

footer {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px 32px;
    border-top: 1px solid #1a1a1a;
}

footer span {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #444;
}

/* Centered status pages (unsubscribe redirect, confirmations) */
.page-status main {
    padding-top: 24px;
    padding-bottom: 64px;
}

.page-status h1 {
    margin-bottom: 16px;
}

.page-status .status-lede {
    margin-bottom: 24px;
}

.page-status .status-links {
    margin-top: 32px;
}

.page-status .status-links p {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

/* Support page — extra space below title (no effective date) */
.page-support h1 {
    margin-bottom: 48px;
}

/* Centered auth / deep-link pages (web/auth/*, web/mountain/) */
.page-auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.page-auth .container {
    text-align: center;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-auth .logo {
    width: 96px;
    height: 96px;
    margin-bottom: 32px;
}

.page-auth .logo img {
    width: 100%;
    height: 100%;
    display: block;
}

.page-auth h1 {
    font-family: 'Alexandria', sans-serif;
    color: #FFFFFF;
    font-size: clamp(20px, 6vw, 24px);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
    text-align: center;
}

.page-auth .sub,
.page-auth p {
    font-family: 'Inter', sans-serif;
    color: #D1D1D1;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 32px;
    text-align: center;
}

.page-auth .sub {
    margin-bottom: 24px;
}

.page-auth .button {
    display: inline-block;
    background: #FFFFFF;
    color: #000000;
    padding: 16px 40px;
    border-radius: 100px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.page-auth .button:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.page-auth .button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.page-auth a.button {
    text-decoration: none;
    text-align: center;
}

.page-auth .form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-auth .form .button {
    width: 100%;
}

.page-auth input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border-radius: 100px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-family: inherit;
}

.page-auth input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.page-auth input:focus {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

.page-auth .message {
    font-size: 14px;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
}

.page-auth .message.error {
    background: rgba(246, 115, 124, 0.15);
    color: #f6737c;
}

.page-auth .message.success {
    background: rgba(169, 228, 76, 0.15);
    color: #a9e44c;
}

.page-auth .hidden {
    display: none !important;
}

/* Marketing landing (web/index.html) */
.page-landing {
    min-height: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.page-landing .container {
    text-align: center;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.page-landing h1 {
    font-family: 'Climate Crisis', cursive;
    color: white;
    font-size: clamp(24px, 7vw, 36px);
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 0.5px;
}

.page-landing .subhead {
    font-family: 'Alexandria', sans-serif;
    color: #D1D1D1;
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 400;
    margin-bottom: clamp(32px, 8vw, 48px);
}

.page-landing .video-container {
    width: clamp(200px, 60vw, 300px);
    height: clamp(200px, 60vw, 300px);
    margin-bottom: clamp(32px, 8vw, 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.page-landing .video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-landing .app-store-badge img {
    height: clamp(40px, 12vw, 50px);
    width: auto;
}

.page-landing .app-store-btn {
    display: inline-block;
    margin-top: 4px;
}

.page-landing .app-store-btn img {
    height: 48px;
    width: auto;
    display: block;
    transition: opacity 0.2s;
}

.page-landing .app-store-btn:hover img {
    opacity: 0.8;
}

.page-landing footer {
    width: 100%;
    padding: 40px 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: none;
    border-top: none;
}

.page-landing footer nav {
    display: flex;
    gap: 24px;
}

.page-landing footer nav a {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.page-landing footer nav a:hover {
    color: #D1D1D1;
}

.page-landing footer .copyright {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #444;
}

@media (max-height: 600px) {
    .page-landing .video-container {
        width: 150px;
        height: 150px;
        margin-bottom: 24px;
    }

    .page-landing h1 {
        margin-bottom: 8px;
    }

    .page-landing .subhead {
        margin-bottom: 24px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .page-landing {
        padding: 16px;
    }

    .page-landing .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
    }

    .page-landing .video-container {
        width: 120px;
        height: 120px;
        margin-bottom: 0;
    }

    .page-landing h1 {
        font-size: 20px;
    }

    .page-landing .subhead {
        margin-bottom: 8px;
    }
}

.page-auth .spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top: 3px solid #FFFFFF;
    border-radius: 50%;
    animation: yak-spin 1s linear infinite;
    margin-bottom: 32px;
}

@keyframes yak-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

html.page-auth-root,
html.page-auth-root body,
html.page-landing-root,
html.page-landing-root body {
    height: 100%;
    width: 100%;
}
