/* MASF Software | masf.us */

/* --- Fonts (self-hosted, no third-party requests) --- */
@font-face {
    font-family: "Exo 2";
    src: url("fonts/exo2-latin.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Roboto";
    src: url("fonts/roboto-latin.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* --- Tokens --- */
:root {
    --ink: #06070f;
    --night: #12173f;
    --indigo: #3a4ab3;
    --periwinkle: #c3c8ea;
    --orange: #ff8a00;

    --paper: #f5f4ef;
    --paper-line: #d9d7cb;
    --text: #16182d;
    --text-soft: #4d5068;

    --display: "Exo 2", "Segoe UI", system-ui, sans-serif;
    --body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* --- Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--ink);
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

h1, h2, h3 {
    font-family: var(--display);
    line-height: 1.1;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

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

svg {
    fill: currentColor;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
    border-radius: 4px;
}

.wrap {
    width: min(100% - 2.5rem, 1120px);
    margin-inline: auto;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 20;
    padding: 0.6rem 1rem;
    background: var(--orange);
    color: #1a0f00;
    font-weight: 700;
    border-radius: 6px;
}

.skip-link:focus {
    top: 1rem;
}

html:not(.js) .js-only {
    display: none;
}

/* --- Header --- */
.site-header {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 10;
    padding: 1.4rem 0;
    color: #fff;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.wordmark {
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--periwinkle);
    text-decoration: none;
    white-space: nowrap;
}

.wordmark b {
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #fff;
}

.site-nav {
    display: flex;
    gap: clamp(1rem, 3vw, 2.2rem);
    font-size: 0.95rem;
}

.site-nav a {
    padding: 0.4rem 0;
    color: var(--periwinkle);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover {
    color: #fff;
    border-color: var(--orange);
}

/* --- Hero --- */
.hero {
    color: #fff;
    /* The diagonal indigo sheen from the MMPlayer store banner */
    background: linear-gradient(112deg, #05060f 0%, #12173f 28%, #3a4ab3 60%, #171d55 82%, #05060f 100%);
    padding: clamp(6.5rem, 12vw, 9rem) 0 clamp(3.5rem, 7vw, 5.5rem);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.eyebrow {
    font-family: var(--display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 1.2rem;
}

.hero h1 {
    font-size: clamp(2.1rem, 4.7vw, 3.6rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.015em;
}

.hl {
    color: var(--orange);
}

.lead {
    margin-top: 1.4rem;
    max-width: 34rem;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    color: var(--periwinkle);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 2rem;
    margin-top: 2.2rem;
}

/* Official badge art has built-in clear space; pull it back to the text edge. */
.play-badge {
    display: inline-block;
    margin: -13px;
    border-radius: 14px;
    transition: transform 0.15s;
}

.play-badge:hover {
    transform: translateY(-2px);
}

.play-badge:focus-visible {
    outline-offset: -9px;
}

.play-badge img {
    width: 215px;
    height: auto;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid var(--orange);
    padding-bottom: 0.15rem;
}

.text-link svg {
    width: 1.1rem;
    height: 1.1rem;
    transform: rotate(90deg);
    transition: transform 0.15s;
}

.text-link:hover svg {
    transform: rotate(90deg) translateX(3px);
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.6rem;
    margin-top: 2.4rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.92rem;
    color: var(--periwinkle);
}

.hero-facts li::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 0.55rem;
    border-left: 7px solid var(--orange);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* --- Interface preview (drawn in CSS, sample data only) --- */
.hero-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.phone {
    --a-bg: #121212;
    --a-status: #3d3d3d;
    --a-bar: #525252;
    --a-bar-fg: #fff;
    --a-tab-dim: rgba(255, 255, 255, 0.62);
    --a-row: #232323;
    --a-fg: #fff;
    --a-soft: #b5b5b5;
    --a-icon: #c4c4c4;
    --a-accent: #f4600c;
    --a-mini: #525252;
    --a-cover: #2b2b2b;
    --a-cover-fg: #cfcfcf;

    width: min(300px, 100%);
    padding: 9px;
    border-radius: 40px;
    background: #0a0a0d;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.14),
        0 30px 60px -18px rgba(0, 0, 0, 0.75);
    font-family: "Roboto", system-ui, sans-serif;
}

.phone[data-theme="pink"] {
    --a-status: #2a2a2a;
    --a-bar: #3b3b3b;
    --a-accent: #ec1e8f;
    --a-mini: #3b3b3b;
}

.phone[data-theme="indigo"] {
    --a-bg: #f1f1f1;
    --a-status: #303f9f;
    --a-bar: #3f51b5;
    --a-row: #fff;
    --a-fg: #151515;
    --a-soft: #666;
    --a-icon: #222;
    --a-accent: #ff4081;
    --a-mini: #3f51b5;
    --a-cover: #e6e6e6;
    --a-cover-fg: #111;
}

.phone[data-theme="green"] {
    --a-bg: #dedede;
    --a-status: #1f7d08;
    --a-bar: #2e9d12;
    --a-row: #f4f4f4;
    --a-fg: #151515;
    --a-soft: #666;
    --a-icon: #7a7a7a;
    --a-accent: #f4600c;
    --a-mini: #2e9d12;
    --a-cover: #e8e8e8;
    --a-cover-fg: #7a7a7a;
}

.phone-screen {
    display: flex;
    flex-direction: column;
    height: 580px;
    border-radius: 31px;
    overflow: hidden;
    background: var(--a-bg);
    color: var(--a-fg);
    transition: background-color 0.25s;
}

.phone svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.app-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 24px;
    padding: 0 18px;
    background: var(--a-status);
    color: #fff;
    font-size: 11px;
    transition: background-color 0.25s;
}

.app-status svg {
    width: 12px;
    height: 12px;
}

.app-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 48px;
    padding: 0 14px;
    background: var(--a-bar);
    color: var(--a-bar-fg);
    transition: background-color 0.25s;
}

.app-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.app-tabs {
    position: relative;
    display: flex;
    flex: none;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--a-bar);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: background-color 0.25s;
    z-index: 1;
}

.app-tabs::-webkit-scrollbar {
    display: none;
}

.app-tabs button {
    flex: none;
    height: 40px;
    padding: 0 13px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--a-tab-dim);
    font: 500 10.5px/1 "Roboto", system-ui, sans-serif;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
}

.app-tabs button[aria-selected="true"] {
    color: var(--a-bar-fg);
    border-bottom-color: var(--a-accent);
}

.app-tabs button:focus-visible {
    outline-offset: -3px;
}

.app-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 6px 8px;
}

.app-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    margin-bottom: 6px;
    padding: 0 4px 0 10px;
    background: var(--a-row);
    font-size: 13px;
    transition: background-color 0.25s;
}

.app-list li > svg:first-child {
    width: 24px;
    height: 24px;
    color: var(--a-icon);
}

.app-list li > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Second line of a folder row: its path */
.app-list li > span i {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 9.5px;
    font-style: normal;
    line-height: 1.3;
    color: var(--a-soft);
}

.app-list li > span:has(i) {
    line-height: 1.1;
}

.app-list small {
    font-size: 10.5px;
    white-space: nowrap;
}

.app-list .more {
    width: 18px;
    height: 18px;
}

.app-grid:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.app-grid li {
    min-width: 0;
    padding-bottom: 6px;
    background: var(--a-row);
    transition: background-color 0.25s;
}

.cover {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background: var(--a-cover);
    color: var(--a-cover-fg);
    transition: background-color 0.25s;
}

.app-grid .cover svg {
    width: 68%;
    height: 68%;
}

.app-grid b,
.app-grid small {
    display: block;
    padding: 0 5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.app-grid b {
    margin-top: 5px;
    font-size: 10.5px;
    font-weight: 400;
}

.app-grid small {
    font-size: 9px;
    color: var(--a-soft);
}

.app-mini {
    position: relative;
    display: flex;
    align-items: center;
    flex: none;
    height: 54px;
    background: var(--a-mini);
    color: #fff;
    transition: background-color 0.25s;
}

.app-mini .cover {
    width: 54px;
    flex: none;
}

.app-mini .cover svg {
    width: 36px;
    height: 36px;
}

.now {
    flex: 1;
    min-width: 0;
    padding: 0 8px 0 10px;
}

.now b,
.now small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.now b {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.now small {
    font-size: 10.5px;
    opacity: 0.8;
}

.app-mini button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

.app-mini button:last-child {
    margin-right: 6px;
}

.app-mini button svg {
    width: 24px;
    height: 24px;
}

.app-mini button:focus-visible {
    outline-offset: -4px;
}

.app-progress {
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: var(--a-accent);
    transform: scaleX(0);
    transform-origin: left;
    animation: track-progress 24s linear forwards paused;
}

.is-playing .app-progress {
    animation-play-state: running;
}

@keyframes track-progress {
    to { transform: scaleX(1); }
}

.theme-picker {
    display: none;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--periwinkle);
}

.js .theme-picker {
    display: flex;
}

.theme-picker span {
    margin-right: 0.2rem;
}

.theme-picker button {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s;
}

.theme-picker button:hover {
    transform: scale(1.1);
}

.theme-picker button[aria-pressed="true"] {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.theme-picker [data-set-theme="orange"] { background: linear-gradient(135deg, #1b1b1b 50%, #f4600c 50%); }
.theme-picker [data-set-theme="pink"]   { background: linear-gradient(135deg, #1b1b1b 50%, #ec1e8f 50%); }
.theme-picker [data-set-theme="indigo"] { background: linear-gradient(135deg, #3f51b5 50%, #ff4081 50%); }
.theme-picker [data-set-theme="green"]  { background: linear-gradient(135deg, #2e9d12 50%, #f4600c 50%); }

.demo-note {
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: var(--periwinkle);
    text-align: center;
}

/* --- Features: the track list --- */
.features {
    background: var(--paper);
    padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.product-head {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.app-icon {
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 22px;
    box-shadow: 0 10px 24px -10px rgba(6, 7, 15, 0.55);
}

.product-head p {
    margin-top: 0.6rem;
    max-width: 38rem;
    color: var(--text-soft);
}

.sides {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(2.5rem, 6vw, 5rem);
    counter-reset: track;
}

.side {
    margin-bottom: 2.75rem;
}

.side h3 {
    padding-bottom: 0.8rem;
    font-size: 1.35rem;
    font-weight: 700;
    border-bottom: 2px solid var(--text);
}

.side li {
    counter-increment: track;
    display: grid;
    grid-template-columns: 2.6rem 1fr;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--paper-line);
}

.side li::before {
    content: counter(track, decimal-leading-zero);
    grid-row: span 2;
    font-family: var(--display);
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.7;
    color: var(--indigo);
}

.side li b {
    font-weight: 500;
    font-size: 1.05rem;
}

.side li span {
    font-size: 0.95rem;
    color: var(--text-soft);
}

.formats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem 1rem;
    padding-top: 0.5rem;
}

.formats-label {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.1rem;
}

.formats ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.formats li {
    padding: 0.25rem 0.75rem;
    font-family: var(--display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #fff;
    background: var(--text);
    border-radius: 4px;
}

.formats-note {
    font-size: 0.95rem;
    color: var(--text-soft);
}

/* --- Screenshots --- */
.screens {
    background: var(--ink);
    color: #fff;
    padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.section-lead {
    margin-top: 0.7rem;
    color: var(--periwinkle);
}

.gallery {
    --h: clamp(320px, 27vw, 440px);
    display: flex;
    gap: 20px;
    margin-top: 2.5rem;
    padding: 0 1.25rem 1rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-color: #3a3d5c transparent;
}

.gallery figure {
    flex: none;
    scroll-snap-align: center;
}

.gallery figure:first-child { margin-left: auto; }
.gallery figure:last-child { margin-right: auto; }

.gallery img {
    height: var(--h);
    width: auto;
    max-width: none;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.gallery figcaption {
    width: 0;
    min-width: 100%;
    margin-top: 0.7rem;
    font-size: 0.85rem;
    color: var(--periwinkle);
}

/* --- Get the app --- */
.get {
    color: #fff;
    background: linear-gradient(112deg, #171d55 0%, #3a4ab3 55%, #12173f 100%);
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.get-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.get-copy p {
    margin: 0.8rem 0 1.8rem;
    color: #dfe2f7;
}

.glance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 2.5rem;
}

.glance div {
    padding: 0.9rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.glance dt {
    font-family: var(--display);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #dfe2f7;
}

.glance dd {
    margin-top: 0.2rem;
    font-size: 1rem;
}

.glance a {
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* --- About + Support --- */
.about {
    background: var(--paper);
    padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2.5rem, 6vw, 5rem);
}

.about-copy,
.support {
    scroll-margin-top: 2rem;
}

.about-copy p {
    margin-top: 1.1rem;
    max-width: 32rem;
    color: var(--text-soft);
}

.support ul {
    margin-top: 1.1rem;
    border-top: 2px solid var(--text);
}

.support li {
    display: grid;
    gap: 0.15rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--paper-line);
}

.support li span {
    font-size: 0.9rem;
    color: var(--text-soft);
}

.support a {
    width: fit-content;
    font-weight: 500;
    font-size: 1.1rem;
    color: #2b3990;
    text-decoration-color: var(--orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.support a:hover {
    color: var(--text);
}

/* --- Footer --- */
.site-footer {
    background: var(--ink);
    color: #9da3c9;
    padding: 2.75rem 0;
    font-size: 0.85rem;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    gap: 2rem 4rem;
}

.site-footer .wordmark {
    margin-bottom: 0.3rem;
}

.footer-legal {
    max-width: 34rem;
    text-align: right;
}

.footer-legal p + p {
    margin-top: 0.4rem;
    font-size: 0.78rem;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero-grid,
    .get-grid,
    .about-grid,
    .sides {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-demo {
        margin-top: 1rem;
    }

    .footer-row {
        flex-direction: column;
    }

    .footer-legal {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .nav-optional {
        display: none;
    }

    .product-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.1rem;
    }

    .app-icon {
        width: 72px;
        height: 72px;
        border-radius: 17px;
    }

    .glance {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }

    .app-progress {
        animation: none;
    }
}
