/* ============================================================
   DWNLOD — style.css
   Paage-inspired: clean white, big bold Satoshi, pill buttons,
   soft rounded cards, generous whitespace. Max-width 700px.
============================================================ */

/* === Variables === */
:root {
    --bg:          #ffffff;
    --surface:     #f6f6f7;
    --surface-2:   #f0f0f2;
    --border:      #ececee;
    --border-dark: #dcdce0;

    --text:    #0b0b0d;
    --muted:   #6e6e76;
    --light:   #a6a6ad;

    --success: #16a34a;
    --danger:  #e0392b;
    --warn:    #b45309;

    /* Warm gradient accent (the Paage signature) */
    --grad: linear-gradient(120deg, #ff8a3d 0%, #ff5757 45%, #ff3d7f 100%);

    --r-pill: 999px;
    --r-xl:   28px;
    --r-lg:   20px;
    --r:      14px;
    --r-sm:   10px;

    --w: 700px;

    --t: .18s cubic-bezier(.4, 0, .2, 1);
    --shadow:    0 1px 2px rgba(11,11,13,.04), 0 8px 24px rgba(11,11,13,.05);
    --shadow-lg: 0 4px 12px rgba(11,11,13,.06), 0 24px 60px rgba(11,11,13,.10);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: opacity var(--t), color var(--t);
}
a:hover { opacity: .6; }

::selection { background: #ffd9c2; color: var(--text); }

/* === Container — the whole site lives in 700px === */
.container { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 24px; }

/* === Buttons — Paage pill style === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--r-pill);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform var(--t), background var(--t), border-color var(--t), opacity var(--t), box-shadow var(--t);
    white-space: nowrap;
    letter-spacing: -.01em;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #28282c; opacity: 1; box-shadow: 0 6px 20px rgba(11,11,13,.18); }

.btn-ghost {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border-dark);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface); opacity: 1; }

.btn-soft {
    background: var(--surface);
    color: var(--text);
}
.btn-soft:hover:not(:disabled) { background: var(--surface-2); opacity: 1; }

.btn-sm   { padding: 9px 16px; font-size: 13.5px; }
.btn-lg   { padding: 15px 30px; font-size: 16px; }
.btn-full { width: 100%; }

/* === Header === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.72);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--border);
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    gap: 14px;
}

.logo {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: -.04em;
    flex-shrink: 0;
}
.logo:hover { opacity: 1; }
.logo-mark {
    width: 28px; height: 28px;
    background: var(--text);
    color: #fff;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    flex-shrink: 0;
}

.logo img {
    width: 25px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--r-pill);
    transition: color var(--t), background var(--t);
}
.nav-link:hover { color: var(--text); background: var(--surface); opacity: 1; }

.user-info { display: flex; align-items: center; gap: 8px; }

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 700;
    border: 1.5px solid var(--border-dark);
    letter-spacing: -.01em;
}
.badge-free    { color: var(--muted); }
.badge-premium { background: var(--text); color: #fff; border-color: var(--text); }

/* ================================================================
   HERO
================================================================ */
.hero {
    padding: 88px 0 64px;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    background: var(--surface);
    border-radius: var(--r-pill);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: -.005em;
    margin-bottom: 30px;
}

.hero-title {
    font-size: clamp(2.3rem, 6.5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.04;
    margin-bottom: 22px;
    color: var(--text);
}

.hero-sub {
    font-size: 1.12rem;
    color: var(--muted);
    max-width: 440px;
    margin: 0 auto 40px;
    line-height: 1.55;
    font-weight: 500;
}

/* === Download form === */
.dl-box { max-width: 540px; margin: 0 auto; }

.url-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1.5px solid transparent;
    border-radius: var(--r-pill);
    padding: 6px 6px 6px 8px;
    transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.url-wrapper:focus-within {
    background: var(--bg);
    border-color: var(--text);
    box-shadow: var(--shadow);
}

.url-input {
    flex: 1;
    padding: 13px 14px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    background: transparent;
    min-width: 0;
}
.url-input::placeholder { color: var(--light); font-weight: 500; }

.btn-dl {
    flex-shrink: 0;
    min-width: 130px;
    padding: 13px 22px;
}

.dl-hint {
    margin-top: 16px;
    font-size: 13.5px;
    color: var(--muted);
    font-weight: 500;
}
.dl-hint a { color: var(--text); font-weight: 700; border-bottom: 1.5px solid var(--border-dark); }
.dl-hint a:hover { opacity: 1; border-color: var(--text); }

/* Spinner */
.spinner-sm {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}

/* ================================================================
   RESULT
================================================================ */
.result-wrap { padding: 8px 0 0; }

.result-card {
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    animation: fadeUp .35s ease;
}
.result-thumb {
    width: 92px; height: 122px;
    object-fit: cover;
    border-radius: var(--r);
    flex-shrink: 0;
    background: var(--surface-2);
}
.result-info    { flex: 1; min-width: 0; }
.result-author  { font-size: 13.5px; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
.result-caption {
    font-size: 14.5px;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ================================================================
   SECTIONS
================================================================ */
.section {
    padding: 72px 0;
}
.section + .section { padding-top: 0; }

.section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--muted);
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(1.9rem, 6vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.04;
    text-align: center;
    margin-bottom: 12px;
}
.section-sub {
    text-align: center;
    font-size: 1.02rem;
    color: var(--muted);
    max-width: 420px;
    margin: 0 auto 48px;
    line-height: 1.5;
}

/* Steps — soft cards */
.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.step {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 24px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: var(--bg);
    border-radius: 50%;
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 0;
    letter-spacing: -.02em;
}
.step-body h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 4px; letter-spacing: -.02em; }
.step-body p  { font-size: 14.5px; color: var(--muted); line-height: 1.5; font-weight: 500; }
.step-body strong { color: var(--text); font-weight: 700; }

/* Features — soft cards */
.feats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.feat-item {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 26px 24px;
}
.feat-icon {
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: 13px;
    font-size: 21px;
    margin-bottom: 16px;
}
.feat-item h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 5px; letter-spacing: -.02em; }
.feat-item p  { font-size: 14.5px; color: var(--muted); line-height: 1.5; font-weight: 500; }

/* ================================================================
   PRICING
================================================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.pricing-card {
    background: var(--surface);
    border: 1.5px solid transparent;
    border-radius: var(--r-xl);
    padding: 28px 26px;
}
.pricing-card.featured {
    background: var(--text);
    color: #fff;
}

.pricing-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.pricing-label {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text);
}
.featured .pricing-label { color: #fff; }

.price {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1;
    white-space: nowrap;
}
.price sup  { font-size: 17px; top: -.7em; font-weight: 700; }
.price span { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: -.01em; }
.featured .price span { color: rgba(255,255,255,.6); }

.pricing-feats { list-style: none; margin-bottom: 24px; }
.pricing-feats:last-child { margin-bottom: 0; }
.pricing-feats li {
    font-size: 14.5px;
    font-weight: 500;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}
.featured .pricing-feats li { color: rgba(255,255,255,.78); }
.pricing-feats li strong { color: var(--text); font-weight: 700; }
.featured .pricing-feats li strong { color: #fff; }
.check   { color: var(--success); font-weight: 800; font-size: 13px; flex-shrink: 0; }
.uncheck { color: var(--light);   font-weight: 700; font-size: 13px; flex-shrink: 0; }
.featured .check { color: #6ee79e; }

/* ================================================================
   FAQ
================================================================ */
.faq-list { max-width: 620px; margin: 0 auto; }
.faq-item {
    background: var(--surface);
    border-radius: var(--r);
    margin-bottom: 8px;
    overflow: hidden;
    transition: background var(--t);
}
.faq-item[open] { background: var(--surface-2); }
.faq-q {
    padding: 18px 22px;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    letter-spacing: -.02em;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
    content: '';
    width: 11px; height: 11px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e76' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform .25s ease;
}
details[open] .faq-q::after { transform: rotate(135deg); }
.faq-a {
    padding: 0 22px 20px;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.6;
    font-weight: 500;
}
.faq-a strong { color: var(--text); font-weight: 700; }

/* ================================================================
   CTA banner — the warm gradient signature
================================================================ */
.cta {
    padding: 0 0 64px;
}
.cta-card {
    background: var(--grad);
    border-radius: var(--r-xl);
    padding: 64px 32px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.cta-card h2 {
    font-size: clamp(2rem, 7vw, 3rem);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1;
    margin-bottom: 12px;
}
.cta-card p {
    font-size: 1.05rem;
    font-weight: 500;
    color: rgba(255,255,255,.92);
    margin-bottom: 28px;
}
.cta-card .btn {
    background: #fff;
    color: var(--text);
}
.cta-card .btn:hover { background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.22); opacity: 1; }

/* ================================================================
   FOOTER
================================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
}
.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-copy {
    font-size: 13px;
    color: var(--light);
    font-weight: 500;
}

/* ================================================================
   TOAST
================================================================ */
.notif {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    padding: 13px 22px;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 600;
    z-index: 2000;
    max-width: calc(100vw - 32px);
    background: var(--text);
    color: #fff;
    box-shadow: var(--shadow-lg);
    animation: toastIn .3s cubic-bezier(.16,1,.3,1);
}
.notif-success { background: #14532d; }
.notif-error   { background: #7f1d1d; }
.notif-warn    { background: #78350f; }
.notif-info    { background: var(--text); }

/* ================================================================
   MODAL
================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11,11,13,.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg);
    border-radius: var(--r-xl);
    padding: 32px 30px;
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: modalIn .3s cubic-bezier(.16,1,.3,1);
    box-shadow: var(--shadow-lg);
}
.modal-x {
    position: absolute;
    top: 18px; right: 20px;
    background: var(--surface);
    border: none;
    width: 30px; height: 30px;
    border-radius: 50%;
    color: var(--muted);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t), color var(--t);
}
.modal-x:hover { background: var(--surface-2); color: var(--text); }

.modal-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 26px;
    background: var(--surface);
    border-radius: var(--r-pill);
    padding: 4px;
    width: fit-content;
}
.modal-tab {
    padding: 9px 20px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--r-pill);
    transition: all var(--t);
    letter-spacing: -.01em;
}
.modal-tab.active { background: var(--text); color: #fff; }

.modal-title {
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 22px;
    letter-spacing: -.03em;
}

/* === Form === */
.form-body  { display: none; }
.form-body.active { display: block; }

.fg { margin-bottom: 14px; }
.fg label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 7px;
    letter-spacing: -.01em;
}
.fg input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border-dark);
    border-radius: var(--r);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    outline: none;
    transition: border-color var(--t), box-shadow var(--t);
    background: var(--bg);
}
.fg input:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(11,11,13,.06); }
.fg input::placeholder { color: var(--light); }

.form-error {
    font-size: 13.5px;
    color: var(--danger);
    font-weight: 600;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #fef2f2;
    border-radius: var(--r-sm);
    display: none;
}
.form-body .btn-full { margin-top: 6px; }
.form-hint {
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
    margin-top: 18px;
    font-weight: 500;
}
.form-hint a { color: var(--text); font-weight: 700; }
.form-hint a:hover { text-decoration: underline; }

/* === Subscribe page === */
.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.card-center {
    background: var(--surface);
    border-radius: var(--r-xl);
    padding: 52px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
.card-center h2 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin: 16px 0 8px; }
.card-center p  { font-size: 15px; color: var(--muted); margin-bottom: 28px; line-height: 1.55; font-weight: 500; }
.big-icon { font-size: 48px; }
.page-spinner {
    width: 34px; height: 34px;
    border: 3px solid var(--border-dark);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 0 auto 18px;
}

/* === Utilities === */
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

/* === Animations === */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fadeUp  { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastIn { from { opacity:0; transform:translate(-50%,16px); } to { opacity:1; transform:translate(-50%,0); } }
@keyframes modalIn { from { opacity:0; transform:translateY(20px) scale(.98); } to { opacity:1; transform:translateY(0) scale(1); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 600px) {
    .container { padding: 0 18px; }

    .nav { gap: 2px; }
    .nav-link { display: none; }
    .user-info .badge { display: none; }

    .hero { padding: 56px 0 48px; }
    .hero-eyebrow { margin-bottom: 22px; }
    .hero-sub { font-size: 1.02rem; margin-bottom: 32px; }

    .url-wrapper { flex-direction: column; gap: 8px; border-radius: var(--r-lg); padding: 8px; }
    .url-input { width: 100%; padding: 12px 14px; }
    .btn-dl { width: 100%; min-width: unset; }

    .result-card  { flex-direction: column; padding: 18px; }
    .result-thumb { width: 100%; height: 200px; }
    .result-actions .btn { flex: 1; }

    .section { padding: 56px 0; }

    .feats-grid { grid-template-columns: 1fr; }

    .cta-card { padding: 48px 24px; }

    .modal { padding: 28px 22px; }
    .card-center { padding: 40px 24px; }

    .footer .container { flex-direction: column; align-items: flex-start; gap: 8px; }
}
