:root {
    --bg-color: #000000;
    --card-bg: #0b0d10;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --accent: #00ff9f;
    --accent-dim: rgba(0, 255, 159, 0.15);
    --border: rgba(255, 255, 255, 0.08);
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', sans-serif;

    /* Logo Sizing Variables */
    --logo-fs: 2.8rem;
    --logo-width: calc(var(--logo-fs) * 1.1 * 266 / 55);
}

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

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    background-color: #000000;
}

/* Keyboard focus ring — accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 0;
}

/* Offset anchored sections so the fixed nav doesn't cover them */
section[id],
footer[id] {
    scroll-margin-top: 80px;
}

/* Logo link — strip default anchor styles */
.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: inherit;
    font-size: var(--logo-fs);
}

.logo-link:hover .logo {
    opacity: 0.85;
}

body {
    background-color: #000000;
    background: radial-gradient(circle at center, #0b1830 0%, #03060f 65%, #000000 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Scanlines Effect --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 4px;
    z-index: 100;
    pointer-events: none;
    opacity: 0.12;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    box-sizing: border-box;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: 100%;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.logo-container {
    display: inline-flex;
    flex-direction: column;
    width: fit-content;
}

.logo {
    display: flex;
    align-items: center;
    line-height: 1;
}

.logo-svg {
    height: 0.814em;
    width: auto;
    display: block;
}

.logo-svg path,
.logo-svg circle {
    stroke: #ffffff;
    stroke-width: 0.5px;
}

.logo-tagline {
    font-family: var(--font-mono);
    font-size: 0.29em;
    color: #999999;
    font-weight: 700;
    margin-top: -0.4em;
    justify-content: space-evenly;
    width: 100%;
    letter-spacing: 0.15em;
    box-sizing: border-box;
    padding-left: 1.0%;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700 !important;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 140px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--accent);
}

.cta-nav {
    background-color: #ffffff;
    color: #000000 !important;
    padding: 0.5rem 1rem;
    border-radius: 0;
    border: 1px solid transparent;
    font-weight: 700 !important;
    transition: box-shadow 0.3s !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.cta-nav:hover {
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.3);
}

.secondary-nav {
    border: 1px solid #999999;
    color: #999999 !important;
    padding: 0.5rem 1rem;
    border-radius: 0;
    font-weight: 700 !important;
    text-transform: uppercase;
    transition: border-color 0.3s, background-color 0.3s !important;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.secondary-nav:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

/* --- Hero Section --- */
.hero {
    padding: 10rem 0 5rem 0;
    position: relative;
    overflow-x: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5rem;
    align-items: flex-start;
}

.hero-content {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    height: auto;
    width: 100%;
    max-width: 1100px;
}

.hero-text-body {
    display: block;
    /* padding-top: 0.5rem; */
}

.badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.6rem 1.6rem;
    margin-bottom: 1.0rem;
    border-radius: 0;
    margin-left: calc(var(--logo-fs) * 0.08);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.05;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: -1.5px;
    color: #ffffff;
}

.subtitle {
    font-size: 1.5rem;
    color: #999999;
    max-width: 920px;
    margin-top: 1.5rem;
    line-height: 1.6;
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    color: var(--accent);
    border-radius: 0;
    width: fit-content;
    margin-top: 2.0rem;
}

.subtitle strong {
    color: #b7b7b7;
    font-weight: 700;
}

.hero-visual {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    position: relative;
    width: 100%;
    max-width: 340px;
    height: auto;
    margin: 0 140px 0 0;
    perspective: 1200px;
}

/* --- High-Definition Smartphone Mockup --- */
.hero-phone-img {
    width: 100%;
    max-width: 340px;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.75));
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
    margin: 0 auto;
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@media (hover: hover) {
    .hero-phone-img:hover {
        transform: translate3d(0, -8px, 0) scale(1.02);
        filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.85));
    }
}

/* --- Smartphone Mockup Frame for Data Receipt Specimen --- */
.receipt-specimen-container {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    position: relative;
}

.receipt-specimen-img {
    width: 100%;
    max-width: 340px;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.75));
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@media (hover: hover) {
    .receipt-specimen-img:hover {
        transform: translate3d(0, -8px, 0) scale(1.02);
        filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.85));
    }
}

/* --- Section II Data Receipt --- */
.data-receipt-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
    overflow-x: hidden;
}

.receipt-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5rem;
    align-items: flex-start;
}

.receipt-text {
    margin-top: 0;
    width: 100%;
    max-width: 1000px;
}

.receipt-text h2 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1.5px;
}

.receipt-desc {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    line-height: 1.6;
}

.receipt-desc strong {
    color: #b7b7b7;
    font-weight: 700;
}

.receipt-list {
    list-style-type: none;
    margin-top: 1.5rem;
    padding-left: 1.2rem;
}

.receipt-list li {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 2.2rem;
}

.receipt-list li:last-child {
    margin-bottom: 0;
}

.receipt-list li::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0.85em;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--text-secondary);
    border-radius: 50%;
}

.receipt-list li strong {
    color: #b7b7b7;
    font-weight: 700;
}

.receipt-visual {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    position: relative;
    width: 100%;
    max-width: 340px;
    height: auto;
    margin: 0 140px 0 0;
    perspective: 1200px;
}

/* --- Section: The Reality --- */
.reality-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
    background: transparent;
}

.reality-header {
    margin-bottom: 4rem;
}

.reality-header h2 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1.5px;
}

.reality-desc {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 100%;
}

.reality-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.reality-card {
    background: #0b0d10;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    padding: 2rem 1.8rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.reality-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(0, 255, 159, 0.1);
}

.reality-card-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.reality-card-title {
    font-family: var(--font-sans);
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1.25;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.reality-card-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-top: 0.5rem;
}

/* --- Section III Features/Protocol --- */
.features {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

.section-header {
    margin-bottom: 5rem;
}

.step-num {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

h1 {
    text-align: left;
    font-size: 3.5rem;
    font-weight: 700;
    /* margin-bottom: 2rem; */
    letter-spacing: -1.5px;
}

h2 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1.5px;
}

.section-arrow {
    display: inline-flex;
    align-items: center;
    margin-right: 0.2em;
    vertical-align: middle;
    position: relative;
    top: -0.05em;
}

.protocol-desc {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    line-height: 1.6;
}

.protocol-desc strong {
    color: #b7b7b7;
    font-weight: 700;
}

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

/* --- Card Flip Design --- */
.card-container {
    background-color: transparent;
    width: 100%;
    height: 340px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    cursor: pointer;
}

@media (hover: hover) {
    .card-container:hover .card-inner {
        transform: rotateY(180deg);
    }
}

.card-container.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.card-front {
    background-color: var(--card-bg);
    color: var(--text-primary);
    justify-content: flex-start;
}

.card-back {
    background-color: #0d1017;
    color: var(--text-primary);
    transform: rotateY(180deg);
    border-color: var(--accent-dim);
    justify-content: center;
    align-items: center;
}

@media (hover: hover) {

    .card-container:hover .card-front,
    .card-container:hover .card-back {
        border-color: var(--accent);
        box-shadow: 0 0 25px rgba(0, 255, 159, 0.15);
    }
}

.card-container.flipped .card-front,
.card-container.flipped .card-back {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(0, 255, 159, 0.15);
}

.card-container.force-front .card-inner {
    transform: rotateY(0deg) !important;
}

/* Touch screen card hints */
@media (hover: none) {
    .card-front::after {
        content: 'TAP TO REVEAL';
        position: absolute;
        bottom: 1.25rem;
        right: 1.25rem;
        font-family: var(--font-mono);
        font-size: 0.55rem;
        font-weight: 700;
        color: var(--accent) !important;
        opacity: 1 !important;
        letter-spacing: 1px;
    }

    .card-back::after {
        content: 'TAP TO CLOSE';
        position: absolute;
        bottom: 1.25rem;
        right: 1.25rem;
        font-family: var(--font-mono);
        font-size: 0.55rem;
        font-weight: 700;
        color: var(--accent) !important;
        opacity: 1 !important;
        letter-spacing: 1px;
    }
}

.card-num {
    font-family: var(--font-mono);
    font-size: 1.6rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 2rem;
    display: block;
}

.card-subtitle {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
}

.card-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-desc {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-primary);
    text-align: left;
}

/* --- Reality & Protocol Section Card Centering Overrides --- */
#reality .card-front,
#protocol .card-front {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2.5rem;
}

#reality .card-num,
#protocol .card-num {
    position: absolute;
    top: 2.5rem;
    left: 2.5rem;
    margin-bottom: 0;
    line-height: 1;
}

#reality .card-subtitle,
#protocol .card-subtitle {
    margin-bottom: 0;
    line-height: 1.15;
    font-family: var(--font-mono);
    font-size: 2.0rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* --- Section IV Business API --- */
.business-api-section {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
    flex-grow: 1;
}

.terminal-clean {
    background-color: #07090e;
    border: 1px solid #33363d;
    border-radius: 0;
    padding: 4.5rem;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.terminal-title {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    letter-spacing: -1px;
    text-transform: uppercase;
    font-weight: 700;
}

.terminal-subheader {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.terminal-form-box {
    border-top: 1px dashed var(--border);
    padding-top: 2.5rem;
}

.registration-label {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Sleek Developer Console Waitlist Form */
.developer-console-form {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.console-input-group {
    display: flex;
    align-items: center;
    background: rgba(8, 12, 18, 0.6);
    border: 1px solid #33363d;
    border-radius: 0;
    padding: 6px 6px 6px 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.console-input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(0, 255, 159, 0.15), 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

/* After submission, fade the green border back to neutral */
.console-input-group.submitted {
    border-color: #33363d !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(0) !important;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.console-input {
    flex-grow: 1;
    width: 0;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 0.5rem 0.2rem;
    line-height: normal;
}

.console-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: normal;
}

.console-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #000000;
    border: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.6rem 1.2rem;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 255, 159, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-text-mobile {
    display: none;
}

.btn-arrow {
    font-weight: 700;
    letter-spacing: 0;
    transition: letter-spacing 0.3s ease;
}

@media (max-width: 520px) {
    .console-input-group {
        flex-direction: row;
        align-items: center;
        padding: 4px 4px 4px 12px;
        gap: 6px;
    }

    .console-input {
        font-size: 16px;
        padding: 0.4rem 0.1rem;
    }

    .console-input::placeholder {
        font-size: 0.85rem;
    }

    .console-submit-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }

    .btn-text-desktop {
        display: none;
    }

    .btn-text-mobile {
        display: inline;
    }
}

@media (max-width: 400px) {
    .console-input-group {
        padding: 4px 4px 4px 10px;
        gap: 4px;
    }

    .console-input {
        font-size: 16px;
    }

    .console-input::placeholder {
        font-size: 0.8rem;
    }

    .console-submit-btn {
        font-size: 0.76rem;
        padding: 0.45rem 0.6rem;
    }
}

.terminal-form-message {
    margin-top: 1.5rem;
    font-family: var(--font-mono) !important;
    font-size: 0.95rem;
    color: var(--accent);
    display: none;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 520px) {
    .terminal-form-message {
        font-size: 0.82rem;
    }
}

@media (max-width: 400px) {
    .terminal-form-message {
        font-size: 0.74rem;
    }
}

/* --- Footer --- */
footer {
    padding: 15px 0;
    border-top: 1px solid var(--border);
    background-color: #000000;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 4.5rem;
}

.footer-logo-link {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    font-size: calc(var(--logo-fs) / 1.538);
}

.footer-logo-link .logo-svg {
    transform: none;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.footer-copy {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
    line-height: 1.5;
    white-space: normal;
    text-align: center;
}

.footer-link,
.footer-separator {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
    line-height: 1.5;
    white-space: nowrap;
}

.footer-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.footer-link {
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:visited {
    color: var(--text-secondary);
}

@media (hover: hover) {
    .footer-link:hover {
        color: var(--text-primary);
    }
}

.footer-link:focus,
.footer-link:active {
    color: var(--text-secondary);
}

.footer-separator {
    margin: 0 1.25rem;
    user-select: none;
}

/* --- Modal Design --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: #0b0d10;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 650px;
    max-height: 80vh;
    padding: 2.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 255, 159, 0.05);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--accent);
}

.modal-title {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.modal-body {
    overflow-y: auto;
    flex: 1;
    padding-right: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.modal-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.modal-body h3 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

/* --- Tagline Bar Block --- */
.tagline-bar-block {
    width: 100%;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    display: flex;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.tagline-layer {
    display: flex;
    align-items: center;
}

.protective-layer {
    color: rgba(255, 255, 255, 0.35);
}

.growth-layer {
    color: #ffffff;
}

.tagline-layer .comma {
    display: inline;
    color: rgba(255, 255, 255, 0.2);
    margin-right: 0.4rem;
}

/* --- Dynamic Background Canvas --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* =============================================================
   RESPONSIVE SYSTEM
   Order: 1024px → 968px → 768px → 480px → 360px
   ============================================================= */

/* --- 1024px and below: footer stacks, terminal fills container --- */
@media (max-width: 1024px) {
    body {
        background-attachment: scroll;
    }

    :root {
        --logo-fs: 2rem;
    }



    /* Terminal box: fill container fully so it centers properly */
    .terminal-clean {
        max-width: 100%;
        width: 100%;
    }

    /* Ensure business-api container centres the terminal */
    .business-api-section .container {
        display: flex;
        justify-content: center;
    }

    footer {
        padding: 15px 0;
    }

    .footer-content {
        padding: 0 1.5rem;
        gap: 15px;
    }

    .footer-copy {
        font-size: clamp(12px, 1.8vw, 0.85rem);
        white-space: normal;
    }

    .footer-link,
    .footer-separator {
        font-size: clamp(12px, 1.8vw, 0.85rem);
        white-space: nowrap;
    }
}

/* --- Tagline bar: desktop (≥969px) --- */
@media (min-width: 969px) {
    .tagline-bar-block {
        flex-direction: row;
        justify-content: center;
        gap: 3.5rem;
    }

    .tagline-layer {
        flex-direction: row;
        gap: 0.1rem;
    }

    .tagline-layer span {
        white-space: nowrap;
    }
}

/* --- 968px and below: single-column layout --- */
@media (max-width: 968px) {
    .container {
        padding: 0 1.5rem;
    }

    nav {
        height: 64px;
    }

    .nav-container {
        padding: 0 1.5rem;
        height: 100%;
    }

    .hero {
        padding: 7.5rem 0 3.5rem 0;
    }

    section[id],
    footer[id] {
        scroll-margin-top: 64px;
    }

    .hero-title {
        font-size: 3.2rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: left;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        justify-content: flex-start;
    }

    .subtitle {
        max-width: 100%;
    }

    .desktop-br {
        display: none;
    }

    /* Receipt visual mirrors hero-visual on single-column layout */
    .hero-visual,
    .receipt-visual {
        margin: 0 auto;
        justify-content: center;
        max-width: 100%;
    }

    .hero-phone-img,
    .receipt-specimen-container,
    .receipt-specimen-img {
        margin: 0 auto;
    }

    .data-receipt-section,
    .reality-section,
    .features,
    .business-api-section {
        padding: 3.5rem 0;
    }

    .receipt-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: left;
    }

    .receipt-text .hero-title,
    .features .hero-title,
    .reality-header .hero-title {
        font-size: 2.6rem;
    }

    .section-header {
        margin-bottom: 3.5rem;
    }

    .reality-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-container {
        height: 280px;
    }

    .card-front,
    .card-back {
        padding: 1.8rem !important;
    }

    #reality .card-num,
    #protocol .card-num {
        top: 1.8rem;
        left: 1.8rem;
    }

    .terminal-clean {
        padding: 2.5rem 1.5rem;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
    }

    /* Tagline bar: tablet */
    .tagline-bar-block {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .tagline-layer {
        flex-direction: row;
        justify-content: center;
        gap: 0.1rem;
        flex-wrap: wrap;
        text-align: center;
    }
}

/* --- 768px and below --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1.2rem;
    }

    .nav-container {
        padding: 0 1.2rem;
        height: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    nav .nav-links a.secondary-nav,
    nav .nav-links a.cta-nav {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.76rem;
        padding: 0.35rem 0.65rem;
        width: 105px;
        font-weight: 700 !important;
    }

    nav .nav-links {
        gap: 0.8rem;
    }

    /* Receipt visual and specimen: mirror hero on mobile */
    .hero-visual,
    .receipt-visual {
        margin: 0 auto;
        justify-content: center;
        max-width: 100%;
    }

    .hero-phone-img,
    .receipt-specimen-container,
    .receipt-specimen-img {
        margin: 0 auto;
    }

    .card-container {
        height: 240px;
    }

    .card-front,
    .card-back {
        padding: 1.5rem !important;
    }

    #reality .card-num,
    #protocol .card-num {
        top: 1.5rem;
        left: 1.5rem;
    }

    .card-desc {
        font-size: 1.15rem;
    }

    .footer-logo-link {
        font-size: calc(var(--logo-fs) / 1.50);
    }

    .legal-section {
        padding: 5.5rem 0 3rem 0;
    }

    .legal-title {
        font-size: 1.8rem;
        line-height: 1.1;
        letter-spacing: -0.5px;
    }
}

/* --- 480px and below --- */
@media (max-width: 480px) {
    :root {
        --logo-fs: 1.8rem;
    }

    nav {
        height: 56px;
    }

    .hero {
        padding: 7rem 0 3.5rem 0;
    }

    section[id],
    footer[id] {
        scroll-margin-top: 56px;
    }

    nav .nav-links a.secondary-nav,
    nav .nav-links a.cta-nav {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.6rem;
        padding: 0.25rem 0.45rem;
        width: 82px;
        font-weight: 700 !important;
    }

    nav .nav-links {
        gap: 0.4rem;
    }

    .hero-title {
        font-size: 2.3rem;
    }

    .hero-title br {
        display: none;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
        margin-bottom: 1.2rem;
    }

    .subtitle {
        font-size: 1.15rem;
        line-height: 1.6;
    }

    .hero-tagline {
        font-size: 0.95rem;
    }

    .receipt-text .hero-title,
    .features .hero-title,
    .reality-header .hero-title {
        font-size: 2rem;
        letter-spacing: -0.8px;
    }

    .receipt-desc,
    .protocol-desc,
    .receipt-list li {
        font-size: 1.15rem;
        line-height: 1.6;
    }

    .hero-phone-img,
    .receipt-specimen-container,
    .receipt-specimen-img {
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-visual,
    .receipt-visual {
        height: auto;
        margin: 0 auto;
        justify-content: center;
        max-width: 100%;
    }

    .terminal-title {
        font-size: 1.7rem;
    }

    .terminal-subheader {
        font-size: 1.15rem;
        margin-bottom: 2rem;
    }

    .registration-label {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    footer .container {
        padding: 0 0.75rem;
    }

    .footer-content {
        padding: 0 0.75rem;
    }

    .footer-copy {
        font-size: 3.4vw;
        white-space: normal;
    }

    .footer-link,
    .footer-separator {
        font-size: 3.4vw;
        white-space: nowrap;
    }

    .footer-separator {
        margin: 0 0.6rem;
    }

    /* Tagline bar: mobile */
    .tagline-bar-block {
        flex-direction: row;
        justify-content: center;
        gap: 1.8rem;
    }

    .tagline-layer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        text-align: left;
    }

    .tagline-layer .comma {
        display: none;
    }
}

/* --- 360px and below --- */
@media (max-width: 360px) {
    :root {
        --logo-fs: 1.15rem;
    }

    nav {
        height: 48px;
    }

    .hero {
        padding: 6.5rem 0 3.5rem 0;
    }

    section[id],
    footer[id] {
        scroll-margin-top: 48px;
    }

    nav .nav-links a.secondary-nav,
    nav .nav-links a.cta-nav {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.55rem;
        padding: 0.2rem 0.4rem;
        width: 82px;
        font-weight: 700 !important;
    }

    nav .nav-links {
        gap: 0.35rem;
    }

    .hero-phone-img,
    .receipt-specimen-container,
    .receipt-specimen-img {
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-visual,
    .receipt-visual {
        height: auto;
        margin: 0 auto;
        justify-content: center;
        max-width: 100%;
    }



    .footer-content {
        padding: 0 0.5rem;
    }

    .footer-separator {
        margin: 0 0.5rem;
    }

    .footer-tagline-bar {
        font-size: 0.75rem;
    }
}

/* --- 320px and below --- */
@media (max-width: 320px) {
    .footer-logo-link {
        display: none;
    }

    .footer-content {
        padding: 0 0.5rem;
        gap: 15px;
    }

    footer {
        padding: 15px 0;
    }

    .footer-separator {
        margin: 0 0.35rem;
    }

    .console-input::placeholder {
        font-size: 0.72rem;
    }
}

/* --- Legal Pages (Privacy / Terms) --- */
.legal-section {
    padding: 7.5rem 0 4rem 0;
    flex-grow: 1;
}

.legal-grid {
    display: flex;
    justify-content: center;
    width: 100%;
}

.legal-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding-right: 1.5rem;
    border-right: 1px solid var(--border);
}

.legal-sidebar::-webkit-scrollbar {
    width: 4px;
}

.legal-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.legal-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
}

.legal-menu-title {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.legal-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.legal-menu-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.2s ease;
    display: block;
}

.legal-menu-link:hover,
.legal-menu-link.active {
    color: var(--accent);
}

.legal-body {
    font-family: var(--font-sans);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 18px;
    max-width: 800px;
    width: 100%;
}

.legal-title {
    font-family: var(--font-sans);
    font-size: 40px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    line-height: 1.15;
}

.legal-date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.legal-body section {
    margin-top: 3rem;
    margin-bottom: 0;
    scroll-margin-top: 100px;
}

.legal-body h2 {
    font-family: var(--font-sans);
    font-size: 24px;
    color: #ffffff;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.legal-body h3 {
    font-family: var(--font-sans);
    font-size: 17px;
    color: #ffffff;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-body h2+h3,
.legal-body h2+p,
.legal-body h2+ul {
    margin-top: 1.25rem;
}

.legal-body p {
    margin-bottom: 1.25rem;
}

.legal-body ul,
.legal-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    list-style-type: none;
}

.legal-body ul.legal-list-main {
    padding-left: 0;
}

.legal-body li {
    margin-bottom: 0.5rem;
}

.legal-body strong {
    color: #ffffff;
}

/* Responsive Styles for Legal Grid */
@media (max-width: 968px) {
    .legal-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .legal-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 1.5rem;
        margin-bottom: 1rem;
    }

    .legal-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .legal-menu-link {
        font-size: 0.85rem;
        border: 1px solid var(--border);
        padding: 0.35rem 0.75rem;
        border-radius: 0;
    }

    .legal-menu-link.active {
        border-color: var(--accent);
        background-color: var(--accent-dim);
    }
}

@media (max-width: 768px) {
    .legal-sidebar {
        display: none;
    }
}