:root {
    --bg: #0f1115;
    --bg-soft: rgba(18, 21, 28, 0.78);
    --bg-card: rgba(25, 29, 38, 0.82);
    --bg-card-strong: rgba(31, 36, 48, 0.92);
    --text: #f3f0e8;
    --text-muted: #c7c0b4;
    --text-dim: #928b82;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #d6b36a;
    --accent-strong: #f1c76d;
    --accent-dark: #8c6930;
    --shadow: rgba(0, 0, 0, 0.35);
    --max-width: 1180px;
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

p {
    margin-top: 0;
}

h1,
h2,
h3 {
    margin-top: 0;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(3rem, 8vw, 6.8rem);
    margin-bottom: 1.25rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
}

.container {
    width: min(var(--max-width), calc(100% - 2rem));
    margin: 0 auto;
}

.narrow {
    max-width: 820px;
}

/* ---------- Matrix Background ---------- */

#matrix-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(214, 179, 106, 0.12), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(120, 120, 120, 0.12), transparent 36rem),
        #0f1115;
}

.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 17, 21, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(214, 179, 106, 0.55);
    border-radius: 14px;
    color: var(--accent-strong);
    background: linear-gradient(145deg, rgba(214, 179, 106, 0.18), rgba(255, 255, 255, 0.04));
    box-shadow: 0 14px 34px var(--shadow);
}

.brand-text {
    font-size: 1.04rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0.1rem;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--accent-strong);
}

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

.hero {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    padding: clamp(4rem, 9vw, 8rem) 0;
    background:
        linear-gradient(90deg, rgba(15, 17, 21, 0.94), rgba(15, 17, 21, 0.64)),
        radial-gradient(circle at 78% 30%, rgba(214, 179, 106, 0.12), transparent 28rem);
}

.app-hero {
    min-height: auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin-bottom: 0.9rem;
    color: var(--accent-strong);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-text {
    max-width: 680px;
    color: var(--text-muted);
    font-size: clamp(1.1rem, 2vw, 1.32rem);
}

.large-text {
    color: var(--text);
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.small-note {
    color: var(--text-dim);
    font-size: 0.92rem;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.72rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    color: #16120a;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    box-shadow: 0 18px 38px rgba(214, 179, 106, 0.20);
}

.button.secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line);
}

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

.hero-panel {
    display: grid;
    gap: 1rem;
}

.panel-card,
.info-card,
.support-card,
.support-form,
.contact-box {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 22px 60px var(--shadow);
    backdrop-filter: blur(12px);
}

.panel-card {
    padding: 1.5rem;
}

.panel-card.accent {
    border-color: rgba(214, 179, 106, 0.34);
    background:
        linear-gradient(145deg, rgba(214, 179, 106, 0.14), rgba(255, 255, 255, 0.045)),
        var(--bg-card);
}

.panel-card p,
.info-card p,
.support-card p {
    color: var(--text-muted);
}

.panel-card a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 800;
}

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

.section {
    padding: clamp(4rem, 8vw, 7rem) 0;
    background: rgba(15, 17, 21, 0.74);
}

.section:nth-of-type(even) {
    background: rgba(18, 21, 28, 0.72);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 2rem;
}

.section-heading p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

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

.info-card {
    padding: 1.35rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    border-radius: 16px;
    color: var(--accent-strong);
    background: rgba(214, 179, 106, 0.12);
    border: 1px solid rgba(214, 179, 106, 0.24);
    font-weight: 900;
}

/* ---------- Product / App Preview ---------- */

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

.feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 1.5rem 0 0;
}

.feature-list span {
    display: inline-flex;
    padding: 0.48rem 0.72rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.92rem;
}

.app-preview {
    display: grid;
    place-items: center;
}

.phone-frame {
    width: min(320px, 82vw);
    aspect-ratio: 9 / 18.5;
    padding: 16px;
    border-radius: 42px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)),
        #151820;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.phone-frame.small {
    width: min(230px, 70vw);
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(214, 179, 106, 0.18), transparent 12rem),
        linear-gradient(180deg, #171b24, #090a0d);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.app-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.74rem;
    font-weight: 800;
}

.note-display {
    margin: 0;
    font-size: clamp(4.5rem, 18vw, 8rem);
    line-height: 0.9;
    font-weight: 900;
    color: var(--text);
    text-shadow: 0 0 34px rgba(214, 179, 106, 0.25);
}

.meter {
    display: flex;
    align-items: end;
    gap: 0.45rem;
    height: 58px;
}

.meter span {
    display: block;
    width: 12px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.meter span:nth-child(1),
.meter span:nth-child(5) {
    height: 20px;
}

.meter span:nth-child(2),
.meter span:nth-child(4) {
    height: 40px;
}

.meter .center {
    height: 58px;
    background: var(--accent-strong);
    box-shadow: 0 0 22px rgba(241, 199, 109, 0.42);
}

.tuning-status {
    color: var(--accent-strong);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ---------- Screenshot Grid ---------- */

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

.screenshot-placeholder {
    display: grid;
    place-items: center;
    min-height: 420px;
    padding: 1.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
}

/* ---------- Instructions ---------- */

.steps-list {
    counter-reset: steps;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: grid;
    gap: 0.75rem;
}

.steps-list li {
    position: relative;
    padding: 1rem 1rem 1rem 3.3rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg-card);
    color: var(--text-muted);
}

.steps-list li::before {
    counter-increment: steps;
    content: counter(steps);
    position: absolute;
    left: 1rem;
    top: 0.82rem;
    width: 1.65rem;
    height: 1.65rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #16120a;
    background: var(--accent-strong);
    font-weight: 900;
}

/* ---------- Contact / Support ---------- */

.contact-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: clamp(1.4rem, 4vw, 2.4rem);
}

.contact-box p {
    color: var(--text-muted);
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.support-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
    gap: 1rem;
    align-items: start;
}

.support-card,
.support-form {
    padding: 1.35rem;
}

.support-card a {
    color: var(--accent-strong);
}

.support-form {
    display: grid;
    gap: 0.75rem;
}

.support-form label {
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.92rem;
}

.support-form input,
.support-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.065);
    font: inherit;
}

.support-form input:focus,
.support-form textarea:focus {
    outline: 2px solid rgba(214, 179, 106, 0.35);
    border-color: rgba(214, 179, 106, 0.55);
}

.form-hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

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

.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--line);
    background: rgba(10, 11, 14, 0.9);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-dim);
    font-size: 0.92rem;
}

.footer-inner p {
    margin: 0;
}

.footer-inner nav {
    display: flex;
    gap: 1rem;
}

.footer-inner a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-inner a:hover {
    color: var(--accent-strong);
}

/* ---------- Utility ---------- */

.about-section p,
.product-section p,
.narrow p {
    color: var(--text-muted);
}

::selection {
    color: #16120a;
    background: var(--accent-strong);
}

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

@media (max-width: 900px) {
    .hero-grid,
    .product-grid,
    .support-grid {
        grid-template-columns: 1fr;
    }

    .card-grid,
    .screenshot-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .header-inner {
        min-height: auto;
        padding: 1rem 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .hero {
        padding-top: 3.5rem;
    }

    .card-grid,
    .screenshot-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .hero-actions {
        width: 100%;
    }

    .phone-frame {
        width: min(280px, 88vw);
    }
}

/* =========================================================
   Tune Up Product Page
   ========================================================= */

.app-hero {
    position: relative;
    overflow: hidden;
    padding-top: clamp(4rem, 8vw, 7rem);
    padding-bottom: clamp(4rem, 8vw, 7rem);
}

.app-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 72% 34%, rgba(241, 199, 109, 0.16), transparent 24rem),
        radial-gradient(circle at 24% 82%, rgba(255, 255, 255, 0.08), transparent 28rem);
    pointer-events: none;
}

.app-hero h1 {
    margin-bottom: 0.45rem;
    font-size: clamp(4.4rem, 14vw, 10rem);
    letter-spacing: -0.075em;
}

.app-hero .large-text {
    margin-bottom: 1rem;
    color: var(--accent-strong);
}

.app-hero .hero-text {
    max-width: 640px;
}

/* ---------- Tune Up Phone Hero ---------- */

.app-hero .phone-frame {
    position: relative;
    transform: rotate(2deg);
}

.app-hero .phone-frame::before {
    content: "";
    position: absolute;
    inset: -22px;
    z-index: -1;
    border-radius: 58px;
    background:
        radial-gradient(circle, rgba(241, 199, 109, 0.20), transparent 62%),
        radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 66%);
    filter: blur(10px);
}

.app-hero .phone-screen {
    position: relative;
}

.app-hero .phone-screen::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 50%;
    width: 82px;
    height: 22px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-hero .app-label {
    margin-top: 1.5rem;
}

.app-hero .note-display {
    font-size: clamp(7rem, 20vw, 10rem);
}

.app-hero .tuning-status {
    margin-bottom: 1.5rem;
}

/* ---------- App Store Placeholder ---------- */

#app-store {
    position: relative;
}

#app-store .contact-box {
    border-color: rgba(241, 199, 109, 0.28);
    background:
        linear-gradient(135deg, rgba(241, 199, 109, 0.10), rgba(255, 255, 255, 0.035)),
        rgba(25, 29, 38, 0.86);
}

#app-store h2 {
    color: var(--text);
}

/* ---------- Tune Up Feature Cards ---------- */

#features .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#features .info-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

#features .info-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(241, 199, 109, 0.08);
    pointer-events: none;
}

#features .info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(241, 199, 109, 0.30);
    background: rgba(31, 36, 48, 0.92);
}

#features .icon-box {
    font-size: 1.25rem;
}

/* ---------- Screenshots Section ---------- */

#screenshots {
    background:
        linear-gradient(180deg, rgba(18, 21, 28, 0.76), rgba(15, 17, 21, 0.82));
}

.screenshot-grid {
    align-items: stretch;
}

.screenshot-placeholder {
    position: relative;
    overflow: hidden;
    min-height: 470px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.12);
}

.screenshot-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 18%, rgba(241, 199, 109, 0.10), transparent 16rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
    pointer-events: none;
}

.screenshot-placeholder .phone-frame {
    z-index: 1;
}

.screenshot-placeholder:nth-child(1) .phone-frame {
    transform: rotate(-3deg);
}

.screenshot-placeholder:nth-child(2) .phone-frame {
    transform: translateY(-8px);
}

.screenshot-placeholder:nth-child(3) .phone-frame {
    transform: rotate(3deg);
}

/* ---------- Tune Up Instructions ---------- */

#instructions {
    background:
        radial-gradient(circle at 16% 20%, rgba(241, 199, 109, 0.08), transparent 22rem),
        rgba(15, 17, 21, 0.78);
}

#instructions .narrow {
    padding: clamp(1.5rem, 4vw, 2.4rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(25, 29, 38, 0.76);
    box-shadow: 0 22px 60px var(--shadow);
    backdrop-filter: blur(12px);
}

#instructions .steps-list li {
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease;
}

#instructions .steps-list li:hover {
    transform: translateX(4px);
    border-color: rgba(241, 199, 109, 0.28);
    background: rgba(31, 36, 48, 0.92);
}

/* ---------- Tune Up Support ---------- */

#support {
    background:
        linear-gradient(180deg, rgba(15, 17, 21, 0.82), rgba(10, 11, 14, 0.92));
}

#support .section-heading {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.support-grid {
    margin-top: 2rem;
}

.support-card {
    position: sticky;
    top: 96px;
}

.support-card h3 {
    color: var(--accent-strong);
}

.support-card p {
    margin-bottom: 1rem;
}

.support-form {
    position: relative;
    overflow: hidden;
}

.support-form::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(241, 199, 109, 0.08);
    pointer-events: none;
}

.support-form label,
.support-form input,
.support-form textarea,
.support-form button {
    position: relative;
    z-index: 1;
}

.support-form button {
    margin-top: 0.5rem;
    justify-self: start;
}

/* ---------- Tune Up Page Responsive ---------- */

@media (max-width: 900px) {
    #features .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .support-card {
        position: static;
    }

    .app-hero .phone-frame {
        transform: none;
    }
}

@media (max-width: 640px) {
    .app-hero h1 {
        font-size: clamp(4rem, 22vw, 6.5rem);
    }

    #features .card-grid {
        grid-template-columns: 1fr;
    }

    .screenshot-placeholder {
        min-height: 410px;
    }

    #instructions .narrow {
        padding: 1.1rem;
    }

    .support-form button {
        width: 100%;
    }
}

/* =========================================================
   Support Result Page
   ========================================================= */

.support-result-hero {
    min-height: calc(100vh - 72px);
    background:
        linear-gradient(90deg, rgba(15, 17, 21, 0.96), rgba(15, 17, 21, 0.72)),
        radial-gradient(circle at 74% 30%, rgba(241, 199, 109, 0.14), transparent 26rem);
}

.support-result-card {
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(25, 29, 38, 0.86);
    box-shadow: 0 22px 60px var(--shadow);
    backdrop-filter: blur(12px);
}

.support-result-card.success {
    border-color: rgba(121, 214, 150, 0.35);
}

.support-result-card.error {
    border-color: rgba(240, 120, 120, 0.35);
}

.support-result-card h1 {
    font-size: clamp(3rem, 8vw, 6rem);
}