/* ============================================================
   CONVERTY — redesigned CSS
   Aesthetic: industrial-editorial, monochrome + amber accent
   ============================================================ */

:root {
    --bg:        #0e0e0e;
    --surface:   #161616;
    --border:    #2a2a2a;
    --border-hi: #444;
    --text:      #e8e2d9;
    --muted:     #666;
    --accent:    #f5a623;
    --accent-dk: #c07c0a;
    --accent-bk: #92610c;

    --error:     #ff4d4d;
    --success:   #4dff91;
    --font-disp: 'Bebas Neue', sans-serif;
    --font-mono: 'DM Mono', monospace;
    --radius:    4px;
    --transition: 0.2s cubic-bezier(.4,0,.2,1);
}

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

html { height: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Grain texture overlay */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .045;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ---- Header ---- */
header {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
    padding: 52px 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo {
    font-family: var(--font-disp);
    font-size: clamp(64px, 10vw, 106px);
    line-height: 1;
    letter-spacing: -1px;
    color: var(--text);
    width: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 0%) no-repeat left bottom;
    background-size: 0% 3px;
    padding-bottom: 6px;
    animation: logoLine 1s 0.2s cubic-bezier(.4,0,.2,1) forwards;
}

@keyframes logoLine {
    to { background-size: 100% 3px; }
}

.tagline {
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0;
    transform: translateY(6px);
    animation: fadeUp 0.5s 0.6s ease forwards;
}

/* ---- Main ---- */
main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
    padding: 0 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.5s 0.4s ease forwards;
}

/* ---- Drop Zone ---- */
.drop-zone {
    border: 1.5px dashed var(--border-hi);
    border-radius: var(--radius);
    padding: 64px 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    background: var(--surface);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(245,166,35,.04);
}

.drop-zone.drag-over .drop-zone__icon {
    color: var(--accent);
    transform: translateY(-6px) scale(1.05);
}

.drop-zone__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-zone__icon {
    color: var(--muted);
    transition: color var(--transition), transform 0.3s ease;
}

.drop-zone__text {
    font-size: 16px;
    color: var(--text);
    letter-spacing: 1px;
}

.drop-zone__sub {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.drop-zone__formats {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 4px;
}

/* ---- Buttons ---- */
.btn-primary {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 10px 28px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent);
    color: #000;
}

.btn-primary:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* ---- Convert Card ---- */
.convert-card {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.open-page{
    text-decoration: none;
    color: var(--accent);
}
.page-card{
    background-color: var(--surface);
    border: var(--accent-bk);
    border-style: solid;
    border-radius: 10px;
    height: 100px;
    padding: 10px;
    text-align: left;
    border-width: 1px;
    
}
.pc:hover { border-color: var(--accent); background: rgba(245,166,35,0.04); }

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

.convert-card__file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    flex: 1;
    min-width: 0;
    border-right: 1px solid var(--border);
}

.convert-card__icon {
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
}

.convert-card__name {
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.convert-card__arrow {
    padding: 0 16px;
    color: var(--muted);
    font-size: 18px;
    flex-shrink: 0;
}

.convert-card__controls {
    padding: 0 16px 0 0;
    flex-shrink: 0;
}

/* Select */
.select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.select-wrapper select {
    appearance: none;
    background: transparent;
    border: 1.5px solid var(--border-hi);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    padding: 8px 36px 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color var(--transition);
    outline: none;
}

.select-wrapper select:focus,
.select-wrapper select:hover {
    border-color: var(--accent);
}

.select-wrapper select option {
    background: #1a1a1a;
    color: var(--text);
}

.select-arrow {
    position: absolute;
    right: 10px;
    pointer-events: none;
    color: var(--muted);
    font-size: 12px;
}

/* ---- About button ---- */
.btn-about {
    opacity: 0;
    animation: fadeUp 0.5s 0.6s ease forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: none;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    flex-shrink: 0;
    width: 50%;
    height: 40px;
    border-radius: 50px;
    margin-left: auto;
}

.btn-about:hover {
    background: var(--accent);
    color: #000;
}

.btn-about:active {
    transform: scale(0.98);
}

/* ---- Convert button ---- */
.btn-convert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: #000;
    border: none;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 20px 28px;
    cursor: pointer;
    transition: background var(--transition), gap var(--transition);
    flex-shrink: 0;
    height: 100%;
    align-self: stretch;
}

.btn-convert:hover {
    background: var(--accent-dk);
    gap: 12px;
}

.btn-convert:active {
    transform: scale(0.98);
}

/* ---- Status ---- */
.status-message {
    font-size: 12px;
    letter-spacing: 1.5px;
    min-height: 18px;
    padding-left: 2px;
}

.status-message.error   { color: var(--error); }
.status-message.success { color: var(--success); }

/* ---- Footer ---- */
footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding: 24px 32px;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
}

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

.seo-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ABOUT OVERLAY — fixed, always covers full viewport
   ============================================================ */

.about {
    position: fixed;        /* ← copre sempre tutta la viewport */
    inset: 0;               /* top/right/bottom/left: 0 */
    z-index: 200;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* flex-start così su mobile si scrolla */
    overflow-y: auto;
    padding: 60px 24px 60px;
    box-shadow:
        inset 0 0 80px rgba(245, 166, 35, 0.06),
        inset 0 0 200px rgba(0, 0, 0, 0.5);
}

/* ---- About content card ---- */
.about__content {
    width: min(800px, 100%);
    opacity: 0;
    transform: translateY(-16px);
    animation: fadeUp 0.35s 0.05s ease forwards;
}

.about__header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 40px;
}

.about__label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--accent);
    text-transform: uppercase;
}

.about__layout {
    display: flex;
    align-items: flex-start;
    gap: 48px;
    flex-wrap: wrap;
}

.about__grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    flex: 1;
    min-width: 260px;
}

.about__block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.about__num {
    font-family: var(--font-disp);
    font-size: 40px;
    line-height: 1;
    color: var(--border-hi);
}

.about__title {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text);
    font-weight: 400;
}

.about__body {
    font-size: 13px;
    line-height: 1.75;
    color: var(--muted);
}

.about__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.about__tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 2px 6px;
    border-radius: var(--radius);
    margin-right: 8px;
    vertical-align: middle;
    opacity: 0.85;
}

.about__dog {
    flex-shrink: 0;
    width: 180px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 1px;
}

.about__dog-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1.5px solid var(--border-hi);
    filter: grayscale(20%);
    transition: filter var(--transition);
    display: block;
    margin-bottom: 8px;
}

.about__dog-img:hover {
    filter: grayscale(0%);
}

/* ---- Close button ---- */
.out-button {
    position: fixed;    /* fixed così rimane visibile anche scrollando */
    top: 24px;
    right: 28px;
    background: rgba(14,14,14,0.8);
    border: 1.5px solid var(--border-hi);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    z-index: 201;
}

.out-button:hover {
    border-color: var(--text);
    color: var(--text);
    background: rgba(30,30,30,0.9);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .convert-card {
        flex-wrap: wrap;
    }
    .convert-card__file {
        border-right: none;
        border-bottom: 1px solid var(--border);
        width: 100%;
    }
    .convert-card__arrow { display: none; }
    .convert-card__controls { padding: 12px 16px; }
    .btn-convert { width: 100%; justify-content: center; }
}

@media (max-width: 720px) {
    .about {
        padding: 72px 20px 40px;
        align-items: flex-start;
    }

    .about__layout {
        flex-direction: column;
        gap: 28px;
    }

    .about__dog {
        width: 140px;
        align-self: center;
    }

    .about__dog-img {
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 480px) {
    .about__num {
        font-size: 32px;
    }

    .about__dog {
        width: 110px;
    }

    .out-button {
        top: 14px;
        right: 14px;
        width: 38px;
        height: 38px;
    }

    .about__header {
        margin-bottom: 24px;
    }
}