/* 2x Your Grandpa — Raw / Minimal */

:root {
    --black: #1a1a1a;
    --white: #f8f6f2;
    --grey: #a09a90;
    --accent: #d14b2f;
    --rule: #d8d4cc;
    --mono: 'Space Mono', monospace;
    --serif: 'Instrument Serif', Georgia, serif;
}

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

html {
    font-size: 17px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--mono);
    color: var(--black);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Ticker ---- */

.ticker {
    position: fixed;
    left: 0;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    opacity: 0.14;
}

.ticker-top {
    top: 0;
    border-bottom: 1px solid var(--rule);
}

.ticker-bottom {
    top: auto;
    bottom: 0;
    border-top: 1px solid var(--rule);
}

.ticker-track {
    display: flex;
    gap: 2.5rem;
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
    padding: 0.45rem 0;
}

.ticker-track-reverse {
    animation: ticker-scroll-reverse 40s linear infinite;
}

.ticker-track span {
    font-family: var(--serif);
    font-size: 0.85rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.05em;
    color: var(--black);
    flex-shrink: 0;
}

.ticker-track span::after {
    content: '•';
    margin-left: 2.5rem;
    opacity: 0.5;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes ticker-scroll-reverse {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

main {
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---- Top section: header + hero + player all in view ---- */

.top {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 0;
}

/* ---- Header ---- */

header {
    display: flex;
    align-items: center;
}

.logo {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey);
}

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

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.2rem;
}

.hero p {
    font-family: var(--serif);
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 1.55;
    margin-bottom: 0.8rem;
    max-width: 540px;
    color: var(--black);
}

.hero p:last-child {
    margin-bottom: 0;
}

.hero em {
    font-style: italic;
}

.hero strong {
    font-weight: 700;
}

/* ---- Player ---- */

.player-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.player-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--black);
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
}

.play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: transparent;
    color: var(--white);
    font-size: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
    position: relative;
}

.play-btn .icon-play,
.play-btn .icon-pause {
    display: none;
}

.play-btn .icon-play {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 11px;
    border-color: transparent transparent transparent var(--white);
    margin-left: 2px;
}

.play-btn .icon-pause {
    width: 10px;
    height: 12px;
    border-left: 3px solid var(--white);
    border-right: 3px solid var(--white);
}

.play-btn[data-state="play"] .icon-play { display: block; }
.play-btn[data-state="play"] .icon-pause { display: none; }
.play-btn[data-state="pause"] .icon-play { display: none; }
.play-btn[data-state="pause"] .icon-pause { display: block; }

.play-btn:hover {
    background: var(--white);
}

.play-btn:hover .icon-play {
    border-color: transparent transparent transparent var(--black);
}

.play-btn:hover .icon-pause {
    border-left-color: var(--black);
    border-right-color: var(--black);
}

#waveform {
    flex: 1;
    height: 40px;
    display: block;
}

.duration {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--grey);
    flex-shrink: 0;
    min-width: 9ch;
    text-align: right;
    white-space: nowrap;
    margin-right: 0.5rem;
}

/* Controls row */

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.speed-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 240px;
}

.speed-row label {
    font-size: 0.7rem;
    color: var(--grey);
    user-select: none;
    flex-shrink: 0;
}

#speedSlider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 3px;
    background: var(--rule);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    touch-action: none;
}

#speedSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--black);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px var(--black);
    transition: transform 0.1s;
}

#speedSlider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

#speedSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--black);
    cursor: pointer;
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px var(--black);
}

.speed-readout {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 3.5ch;
    color: var(--black);
}

.time-saved {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--accent);
    white-space: nowrap;
}

/* Source row */

.source-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.source-label {
    font-size: 0.7rem;
    color: var(--grey);
}

.upload-btn {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--black);
    background: none;
    border: 1px solid var(--rule);
    border-radius: 3px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: border-color 0.15s;
}

.upload-btn:hover {
    border-color: var(--black);
}

/* ---- Divider ---- */

hr {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 4rem 0;
}

/* ---- Coming Soon ---- */

.coming-soon {
    max-width: 480px;
}

.coming-soon-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 0.5rem;
}

.coming-soon h2 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 400;
    margin-bottom: 0.8rem;
}

.coming-soon > p {
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--black);
    margin-bottom: 1.5rem;
}

.waitlist form {
    display: flex;
    gap: 0.4rem;
}

.waitlist input[type="email"] {
    font-family: var(--mono);
    font-size: 0.8rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: transparent;
    color: var(--black);
    outline: none;
    width: 220px;
    transition: border-color 0.15s;
}

.waitlist input[type="email"]:focus {
    border-color: var(--black);
}

.waitlist input[type="email"]::placeholder {
    color: var(--grey);
}

.waitlist button {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.55rem 0.9rem;
    background: var(--black);
    color: var(--white);
    border: 1px solid var(--black);
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.waitlist button:hover {
    opacity: 0.8;
}

.waitlist-done {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
}


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

@media (max-width: 500px) {
    html { font-size: 15px; }

    .player-bar {
        padding: 0.5rem 0.6rem;
        gap: 0.5rem;
    }

    .play-btn {
        width: 30px;
        height: 30px;
    }

    .play-btn .icon-play {
        border-width: 5px 0 5px 9px;
    }

    .play-btn .icon-pause {
        width: 8px;
        height: 10px;
        border-left-width: 2.5px;
        border-right-width: 2.5px;
    }

    .duration {
        display: none;
    }

    .speed-row { min-width: 100%; }

    .source-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .waitlist form {
        flex-direction: column;
    }

    .waitlist input[type="email"] {
        width: 100%;
    }
}
