/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: #fafaf9;
    color: #1c1917;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
header {
    background: #0c0a09;
    border-bottom: none;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

header h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
}

header h1 a {
    color: inherit;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
}

nav ul li a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

nav ul li a:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

/* ── Main ───────────────────────────────────────────────────── */
main {
    flex: 1;
    padding: 0 0 80px;
}

/* ── Footer ───────────────────────────────────────────────────── */
footer {
    background: #0c0a09;
    border-top: none;
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

footer a { color: rgba(255,255,255,0.55); text-decoration: none; }
footer a:hover { color: #ffffff; }

/* ── Page Hero ─────────────────────────────────────────────── */
.page-hero {
    background: #0c0a09;
    color: #ffffff;
    padding: 40px 32px 36px;
    margin-bottom: 28px;
    text-align: center;
}

.page-hero .hero-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 20px;
}

.page-hero h2 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1.5px;
    line-height: 1.12;
    margin-bottom: 18px;
}

.page-hero h2 em {
    font-style: normal;
    color: rgba(255,255,255,0.45);
}

.page-hero p {
    color: rgba(255,255,255,0.55);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Section heading ────────────────────────────────────────────── */
.section-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: #a8a29e;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e7e5e4;
}

/* ── Tool cards ───────────────────────────────────────────────────────────── */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 56px;
}

.tool-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 16px;
    padding: 26px 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.22s, transform 0.22s;
}

.tool-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.tool-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    background: #0c0a09;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tool-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1c1917;
    margin-bottom: 6px;
}

.tool-info p {
    font-size: 0.86rem;
    color: #78716c;
    line-height: 1.6;
    margin-bottom: 10px;
}

.tool-link {
    font-size: 0.8rem;
    color: #1c1917;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* ── App list ─────────────────────────────────────────────────────────────── */
.app-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.app-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: box-shadow 0.18s;
}

.app-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.app-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.app-item h3 a {
    color: inherit;
    text-decoration: none;
}

.app-item h3 a:hover { color: #3b82f6; }

.app-item > p {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 14px;
    line-height: 1.6;
}

.app-screenshots {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.app-screenshots .screenshot {
    width: calc(20% - 8px);
    min-width: 100px;
    height: 320px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* ── Article / Privacy ────────────────────────────────────────────────────── */
.article-content, .privacy-policy-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    min-height: 300px;
    font-size: 0.93rem;
    color: #334155;
    line-height: 1.75;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    header .container { height: auto; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 16px; }
    .page-hero { padding: 26px 24px 24px; }
    .tools-grid { grid-template-columns: 1fr; }
    .app-screenshots .screenshot { width: 160px; height: 240px; }
    .container { padding: 0 20px; }
    .auth-card { margin: 32px auto; padding: 32px 24px; }
}

/* ── Auth Pages (allauth) ─────────────────────────────────────────────────── */
.auth-wrap {
    min-height: calc(100vh - 64px - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid #e7e5e4;
    border-radius: 18px;
    padding: 44px 44px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.auth-icon {
    font-size: 2.6rem;
    text-align: center;
    margin-bottom: 14px;
}

.auth-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0c0a09;
    margin-bottom: 6px;
    text-align: center;
}

.auth-sub {
    font-size: 0.88rem;
    color: #78716c;
    text-align: center;
    margin-bottom: 28px;
}

.auth-sub a {
    color: #0c0a09;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-body {
    font-size: 0.93rem;
    color: #57534e;
    line-height: 1.75;
    text-align: center;
    margin-bottom: 24px;
}

.auth-body a, .auth-hint a {
    color: #0c0a09;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-hint {
    font-size: 0.84rem;
    color: #a8a29e;
    text-align: center;
    margin-top: 16px;
}

.auth-back {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
}

.auth-back a {
    color: #78716c;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 22px;
    font-size: 0.87rem;
    color: #991b1b;
    line-height: 1.5;
}

.auth-alert p + p { margin-top: 4px; }

.auth-divider {
    border: none;
    border-top: 1px solid #e7e5e4;
    margin: 24px 0;
}

/* Auth form elements */
.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #57534e;
    margin-bottom: 6px;
}

.auth-form-group input[type="email"],
.auth-form-group input[type="password"],
.auth-form-group input[type="text"] {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #e7e5e4;
    border-radius: 9px;
    font-size: 0.93rem;
    font-family: inherit;
    background: #fff;
    color: #1c1917;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form-group input:focus {
    border-color: #0c0a09;
    box-shadow: 0 0 0 3px rgba(12,10,9,0.07);
}

.auth-check-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: #78716c;
    gap: 12px;
}

.auth-check-row label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.auth-check-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #0c0a09;
    cursor: pointer;
}

.auth-check-row a {
    color: #78716c;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.btn-auth {
    display: block;
    width: 100%;
    background: #0c0a09;
    color: #ffffff;
    border: none;
    border-radius: 9px;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.1px;
    transition: opacity 0.15s, transform 0.1s;
    margin-top: 6px;
}

.btn-auth:hover { opacity: 0.82; }
.btn-auth:active { transform: scale(0.99); }

.btn-auth-ghost {
    display: block;
    width: 100%;
    background: transparent;
    color: #57534e;
    border: 1.5px solid #e7e5e4;
    border-radius: 9px;
    padding: 11px;
    font-size: 0.93rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    margin-top: 10px;
    text-align: center;
    text-decoration: none;
}

.btn-auth-ghost:hover { border-color: #0c0a09; color: #0c0a09; }
