/* =========================================================
   Vnt0n — shared design system
   Minimal, system-native, automatic light/dark. No JS needed.
   ========================================================= */

:root {
    --bg: #fbfbfd;
    --bg-elev: #ffffff;
    --bg-subtle: #f5f5f7;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --border: rgba(0, 0, 0, 0.10);
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
    --radius: 18px;
    --radius-sm: 12px;
    --max: 980px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --bg-elev: #1c1c1e;
        --bg-subtle: #161617;
        --text: #f5f5f7;
        --text-secondary: #a1a1a6;
        --border: rgba(255, 255, 255, 0.14);
        --accent: #0a84ff;
        --accent-hover: #409cff;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.55);
    }
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent); color: #fff; }

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Navigation ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.brand {
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    color: var(--text);
}
.brand:hover { color: var(--text); opacity: 0.7; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.back-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}
.back-link:hover { color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
    text-align: center;
    padding: clamp(64px, 12vw, 128px) 0 clamp(48px, 5vw, 80px);
}

.hero h1 {
    font-size: clamp(2.1rem, 5.5vw, 3.4rem);
    line-height: 1.07;
    font-weight: 600;
    letter-spacing: -0.025em;
    max-width: 16ch;
    margin: 0 auto;
}

.lead {
    font-size: clamp(1.1rem, 2.3vw, 1.35rem);
    color: var(--text-secondary);
    max-width: 36ch;
    margin: 1.1em auto 0;
    line-height: 1.45;
}

/* ---------- Sections ---------- */

.section { padding: clamp(48px, 8vw, 88px) 0; }
.section + .section { padding-top: 0; }

.section-title {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 2rem;
}

/* ---------- Prose ---------- */

.prose {
    max-width: 38rem;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
    text-align: center;
}
.prose p + p { margin-top: 1em; }
.prose strong { color: var(--text); font-weight: 600; }

/* ---------- Apps grid ---------- */

.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 820px;
    margin: 0 auto;
}

.app-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.app-card:hover {
    color: var(--text);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: transparent;
}

.app-icon {
    width: 68px;
    height: 68px;
    border-radius: 22%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px var(--border);
}

.app-meta h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.app-meta p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 4px;
    line-height: 1.4;
}

.badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 9px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 100px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    border: none;
    border-radius: 100px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn:active { transform: scale(0.98); }

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-subtle); color: var(--text); border-color: var(--accent); }

/* App Store badge image */
.app-store-badge { width: 150px; height: auto; margin: 0 auto; }
.app-store-badge:hover { opacity: 0.85; }
/* the badge is a block-level <img>, so center its inline <a> wrapper */
.app-hero a { display: inline-block; }

/* ---------- Support / Donate ---------- */

.support { text-align: center; }
.donate-form { display: inline; }

.support-card {
    max-width: 40rem;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(28px, 5vw, 44px);
}
.support-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 33rem;
    margin: 0 auto 1.5rem;
}
.support-card p strong { color: var(--text); font-weight: 600; }
.support-note {
    margin-top: 14px !important;
    font-size: 0.82rem !important;
    color: var(--text-secondary) !important;
    opacity: 0.75 !important;
}

/* ---------- Sticky tip bar ---------- */

.tip-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.10);
    transform: translateY(110%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.tip-bar.is-visible { transform: translateY(0); }

.tip-bar-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.tip-bar-text {
    flex: 1;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.4;
    color: var(--text-secondary);
}
.tip-bar-text strong { color: var(--text); font-weight: 600; }
.tip-bar-btn { padding: 9px 18px; font-size: 0.92rem; white-space: nowrap; }
.tip-bar-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s ease, color 0.15s ease;
}
.tip-bar-close:hover { background: var(--bg-subtle); color: var(--text); }

body.has-tip-bar { padding-bottom: 76px; }

@media (max-width: 640px) {
    .tip-bar-inner { flex-wrap: wrap; gap: 10px 14px; padding: 12px 20px; }
    .tip-bar-text { flex-basis: 100%; font-size: 0.85rem; }
    .tip-bar-btn { flex: 1; }
    body.has-tip-bar { padding-bottom: 138px; }
}

@media (prefers-reduced-motion: reduce) {
    .tip-bar { transition: none; }
}

/* ---------- Contact form ---------- */

.contact-card {
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 36px);
    box-shadow: var(--shadow);
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.styled-select {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.styled-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.styled-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%236e6e73" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-group .btn { width: 100%; margin-top: 4px; }

.g-recaptcha { margin: 4px 0 18px; }

/* form success state */
#messageContainer {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0;
}
#messageContainer h3 { font-size: 1.4rem; font-weight: 600; margin-top: 8px; }

.server-error {
    background: color-mix(in srgb, #ff3b30 12%, transparent);
    border: 1px solid color-mix(in srgb, #ff3b30 40%, transparent);
    color: #ff453a;
    padding: 10px 12px;
    margin-top: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* ---------- App detail page ---------- */

.app-hero {
    text-align: center;
    padding: clamp(48px, 9vw, 96px) 0 clamp(32px, 5vw, 56px);
}
.app-hero .app-icon {
    width: 110px;
    height: 110px;
    margin: 0 auto 24px;
}
.app-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.025em;
}
.app-hero .badge { margin: 14px 0 24px; }
.app-tagline {
    font-size: clamp(1.1rem, 2.3vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 34ch;
    margin: 0 auto 28px;
    line-height: 1.45;
}

.screenshot-frame {
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.screenshot-frame img { width: 100%; }

.features {
    max-width: 38rem;
    margin: 0 auto;
    list-style: none;
}
.features li {
    position: relative;
    padding: 14px 0 14px 32px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    line-height: 1.5;
}
.features li:last-child { border-bottom: none; }
.features li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 21px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

/* ---------- Privacy page ---------- */

.policy { padding: clamp(40px, 8vw, 80px) 0; }
.policy .policy-icon {
    width: 88px;
    height: 88px;
    border-radius: 22%;
    margin: 0 auto 20px;
    box-shadow: inset 0 0 0 1px var(--border);
}
.policy h1 {
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
}
.policy .updated {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
    margin-bottom: 40px;
}
.policy h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 32px 0 8px;
}
.policy p { color: var(--text-secondary); line-height: 1.65; }
.policy a { word-break: break-word; }

/* ---------- Footer ---------- */

.footer {
    border-top: 1px solid var(--border);
    margin-top: clamp(48px, 8vw, 96px);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer p + p { margin-top: 8px; }
.footer .footer-links a { color: var(--text-secondary); }
.footer .footer-links a:hover { color: var(--accent); }
.footer .muted { opacity: 0.7; }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
    .apps-grid { grid-template-columns: 1fr; max-width: 460px; }
}

@media (max-width: 420px) {
    body { font-size: 16px; }
    .app-card { padding: 16px; gap: 14px; }
    .app-icon { width: 58px; height: 58px; }
}

/* ---------- Checkmark animation (form success) ---------- */

.checkmark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 #34c759;
}
.checkmark.animate {
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}
.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #34c759;
    fill: none;
}
.checkmark.animate .checkmark__circle {
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
}
.checkmark.animate .checkmark__check {
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0 0 0 40px #34c759; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .app-card { transition: none; }
    .checkmark.animate, .checkmark.animate .checkmark__circle, .checkmark.animate .checkmark__check { animation: none; }
}

/* =========================================================
   Fil'o — coming-soon app (AI file renamer)
   Self-contained block; safe to remove once Fil'o is retired.
   ========================================================= */

/* Accent variant of .badge — used for the "Coming soon" tag */
.badge-accent {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Hero status pill (stands in for the App Store badge before release) */
.soon-note {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}
.soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 11px 22px;
    border-radius: 100px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    font-size: 1rem;
}
.soon-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.soon-sub { font-size: 0.85rem; color: var(--text-secondary); }

/* Before → after filename demo (no screenshot needed) */
.rename-demo {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rename-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.rename-chip {
    flex: 1;
    text-align: center;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.92rem;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    word-break: break-word;
}
.rename-chip.after {
    background: var(--bg-elev);
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    box-shadow: var(--shadow);
}
.rename-arrow {
    flex-shrink: 0;
    color: var(--accent);
    font-size: 1.3rem;
    line-height: 1;
}

/* Two-tier "private intelligence" cards (macOS 26 vs macOS 27) */
.ai-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 820px;
    margin: 0 auto;
}
.ai-card {
    padding: 28px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.ai-card .ai-os {
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--accent);
}
.ai-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 6px 0 10px;
}
.ai-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.55;
}

@media (max-width: 720px) {
    .ai-cards { grid-template-columns: 1fr; max-width: 460px; }
}
@media (max-width: 480px) {
    .rename-row { flex-direction: column; gap: 10px; }
    .rename-arrow { transform: rotate(90deg); }
}
