:root {
    --orange: #ff6600;
    --orange-deep: #e55a00;
    --ink: #1a1410;
    --ink-soft: #3d342e;
    --paper: #f7f3ef;
    --paper-2: #efe8e1;
    --line: rgba(26, 20, 16, 0.12);
    --white: #ffffff;
    --font-display: "Bricolage Grotesque", sans-serif;
    --font-body: "Martel Sans", sans-serif;
    --space: clamp(1rem, 2vw, 1.5rem);
    --max: 72rem;
    --header-h: 4.25rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-optical-sizing: auto;
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 90% -10%, rgba(255, 102, 0, 0.18), transparent 60%),
        radial-gradient(900px 500px at -10% 20%, rgba(255, 102, 0, 0.08), transparent 55%),
        linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
    line-height: 1.55;
}

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

a {
    color: var(--orange-deep);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--ink);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--ink);
    color: var(--white);
    padding: 0.5rem 1rem;
    z-index: 100;
}

.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(247, 243, 239, 0.82);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0.85rem var(--space);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: #333;
}

.brand__mark {
    display: inline-block;
    width: 1.75rem;
    height: 2.55rem;
    flex-shrink: 0;
    background-color: var(--orange);
    mask: url("/images/dsj-logo.svg") center / contain no-repeat;
    -webkit-mask: url("/images/dsj-logo.svg") center / contain no-repeat;
}

.brand__name {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 1.05rem;
    color: #333;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    justify-content: flex-end;
}

.nav a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
}

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

/* Solid dark header on all pages except the homepage */
body:not(.page-home) .site-header {
    background: #333;
    border-bottom-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: none;
}

body:not(.page-home) .brand,
body:not(.page-home) .brand__name {
    color: var(--white);
}

body:not(.page-home) .nav a {
    color: var(--white);
}

body:not(.page-home) .nav a[aria-current="page"],
body:not(.page-home) .nav a:hover {
    color: var(--orange);
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--line);
    background: rgba(26, 20, 16, 0.04);
}

.site-footer__inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 2rem var(--space) 2.5rem;
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.site-footer__brand {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 0.35rem;
}

/* Hero / home */
.hero {
    min-height: calc(100vh - var(--header-h));
    display: grid;
    align-items: center;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, var(--orange) 0%, #ff8533 42%, #ff6600 70%, #cc5200 100%);
    color: var(--white);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            -18deg,
            transparent,
            transparent 28px,
            rgba(255, 255, 255, 0.05) 28px,
            rgba(255, 255, 255, 0.05) 29px
        );
    pointer-events: none;
}

.hero__inner {
    position: relative;
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(3rem, 10vh, 6rem) var(--space);
    animation: rise 0.9s ease both;
}

.hero__logo {
    width: clamp(4.5rem, 12vw, 7rem);
    height: auto;
    margin-bottom: 1.5rem;
    animation: pop 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.hero__brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 8vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    margin: 0 0 0.85rem;
}

.hero__slogan {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    max-width: 40rem;
    margin: 0 0 1.5rem;
}

.hero__tag {
    max-width: 40rem;
    font-size: clamp(0.92rem, 1.5vw, 1rem);
    line-height: 1.55;
    margin: 0 0 1.1rem;
    opacity: 0.95;
}

.hero__tag p {
    margin: 0 0 0.85rem;
}

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

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.15rem;
    border-radius: 0;
    border: 2px solid transparent;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.btn--solid {
    background: var(--ink);
    color: var(--white);
}

.btn--solid:hover {
    background: var(--white);
    color: var(--ink);
}

.btn--ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
    background: var(--white);
    color: var(--orange);
    border-color: var(--white);
}

.btn--orange {
    background: var(--orange);
    color: var(--white);
}

.btn--orange:hover {
    background: var(--ink);
    color: var(--white);
}

/* Sections */
.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--space);
}

.section__eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
    margin: 0 0 0.65rem;
}

.section__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin: 0 0 0.85rem;
}

.section__lead {
    max-width: 38rem;
    color: var(--ink-soft);
    font-size: 1.05rem;
    margin: 0 0 2rem;
}

.page-hero {
    padding: clamp(2rem, 5vw, 3.5rem) var(--space) 0;
    max-width: var(--max);
    margin: 0 auto;
    animation: rise 0.55s ease both;
}

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

/* 3D history one-pager */
body.page-history {
    background: #120e0c;
}

/* No seam between dark nav and the 3D stage */
body.page-history .site-header {
    border-bottom-color: transparent;
}

body.page-history .site-footer {
    margin-top: 0;
    border-top-color: rgba(255, 255, 255, 0.08);
    background: #0c0a09;
    color: rgba(255, 247, 240, 0.7);
}

body.page-history .site-footer__brand,
body.page-history .site-footer a {
    color: #fff7f0;
}

.timeline3d {
    position: relative;
    color: #fff7f0;
}

.timeline3d__sticky {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow: hidden;
    z-index: 1;
    /* Solid match to WebGL clear/fog — avoid CSS bands behind the canvas */
    background: #120e0c;
}

.timeline3d__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.timeline3d__hud {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(1.25rem, 4vh, 2.5rem) var(--space);
    pointer-events: none;
    display: grid;
    grid-template-rows: 1fr auto;
}

.timeline3d__intro {
    align-self: end;
    max-width: 34rem;
    transition: opacity 0.25s ease;
}

.timeline3d__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 196, 140, 0.9);
}

.timeline3d__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 8vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    margin: 0 0 0.85rem;
    color: #fff7f0;
}

.timeline3d__lead {
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.55;
    color: rgba(255, 247, 240, 0.82);
}

.timeline3d__scroll-hint {
    margin: 1.4rem 0 0;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--orange);
    animation: timeline-bob 1.6s ease-in-out infinite;
}

.timeline3d__card {
    position: absolute;
    right: var(--space);
    top: 50%;
    transform: translateY(-40%) translateX(12px);
    width: min(24rem, calc(100% - 2 * var(--space)));
    padding: 1.25rem 1.35rem 1.4rem;
    background: rgba(18, 14, 12, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid var(--orange);
    backdrop-filter: blur(14px);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 102, 0, 0.08);
    pointer-events: auto;
    opacity: 0;
}

.timeline3d__card.is-in {
    animation: timeline-card-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.timeline3d__card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--orange);
}

.timeline3d__card-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    letter-spacing: -0.03em;
    margin: 0 0 0.55rem;
    color: #fff7f0;
}

.timeline3d__card-summary,
.timeline3d__card-body {
    margin: 0 0 0.65rem;
    color: rgba(255, 247, 240, 0.82);
    font-size: 0.98rem;
    line-height: 1.5;
}

.timeline3d__card-body:empty,
.timeline3d__card-media:empty {
    display: none;
}

.timeline3d__card-media {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.timeline3d__media {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 102, 0, 0.12);
    color: #fff7f0;
    text-decoration: none;
    font-size: 0.85rem;
}

a.timeline3d__media:hover {
    background: var(--orange);
    color: #fff;
}

.timeline3d__progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: -0.02em;
    color: rgba(255, 247, 240, 0.75);
}

.timeline3d__progress-track {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.timeline3d__progress-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff8533, #ff6600);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.1s linear;
}

.timeline3d__spacer {
    pointer-events: none;
}

.timeline3d--live .timeline3d__fallback {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.timeline3d--fallback .timeline3d__sticky {
    position: relative;
    height: auto;
    min-height: 0;
    background: transparent;
}

.timeline3d--fallback .timeline3d__canvas,
.timeline3d--fallback .timeline3d__progress,
.timeline3d--fallback .timeline3d__scroll-hint,
.timeline3d--fallback .timeline3d__spacer {
    display: none;
}

.timeline3d--fallback .timeline3d__hud {
    display: block;
    pointer-events: auto;
    max-width: var(--max);
}

.timeline3d--fallback .timeline3d__intro {
    color: var(--ink);
}

.timeline3d--fallback .timeline3d__title {
    color: var(--ink);
}

.timeline3d--fallback .timeline3d__lead {
    color: var(--ink-soft);
}

.timeline3d--fallback .timeline3d__fallback {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--space) 3rem;
    display: grid;
    gap: 1.5rem;
}

.timeline3d__fallback-event {
    padding: 1rem 0;
    border-top: 1px solid var(--line);
    color: var(--ink);
}

.timeline3d__fallback-event h3 {
    font-family: var(--font-display);
    margin: 0.35rem 0;
}

@keyframes timeline-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@keyframes timeline-card-in {
    from {
        opacity: 0;
        transform: translateY(-36%) translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

@media (max-width: 820px) {
    .timeline3d__card {
        right: var(--space);
        left: var(--space);
        width: auto;
        top: auto;
        bottom: 4.5rem;
        transform: translateY(8px);
    }

    .timeline3d__card.is-in {
        animation: timeline-card-in-mobile 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    }

    .timeline3d__intro {
        align-self: start;
        padding-top: 0.5rem;
    }
}

@keyframes timeline-card-in-mobile {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.media-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.media-slot {
    border: 1px dashed var(--line);
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
}

/* Domain search */
.domain-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.domain-search input {
    flex: 1 1 16rem;
    padding: 0.85rem 1rem;
    border: 2px solid var(--ink);
    background: var(--white);
    font: inherit;
    font-size: 1.05rem;
}

.domain-result {
    padding: 1.25rem;
    background: var(--white);
    border-left: 4px solid var(--orange);
    margin-bottom: 1.5rem;
}

.domain-result--taken {
    border-left-color: var(--ink);
}

.suggest-list {
    display: grid;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggest-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
}

/* Tools & ventures */
.tool-shell {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--space) clamp(2.5rem, 6vw, 4.5rem);
    display: grid;
    gap: 1.5rem;
}

.tool-nav {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 0 0.75rem;
    border-bottom: 1px solid var(--line);
}

.tool-nav__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange);
    margin: 0;
}

.tool-nav__label a {
    color: inherit;
    text-decoration: none;
}

.tool-nav__list {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    min-width: 0;
    padding-bottom: 0.15rem;
}

.tool-nav__link {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.45);
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.tool-nav__link:hover,
.tool-nav__link[aria-current="page"] {
    border-color: var(--orange);
    color: var(--ink);
    background: var(--white);
}

.tool-nav__link[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--orange);
}

.page-hero--tool {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
    margin: 0;
}

.section--tool {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
    margin: 0;
    padding-top: 0;
}

@media (min-width: 900px) {
    .tool-shell {
        grid-template-columns: 15.5rem minmax(0, 1fr);
        gap: 2.5rem;
        align-items: start;
        padding-top: clamp(1.5rem, 4vw, 2.5rem);
    }

    .tool-nav {
        position: sticky;
        top: calc(var(--header-h) + 1rem);
        display: block;
        overflow: visible;
        padding: 1rem 0.85rem;
        border: 1px solid var(--line);
        border-radius: 0.65rem;
        background: rgba(255, 255, 255, 0.78);
        box-shadow: 0 1px 0 rgba(26, 20, 16, 0.04);
    }

    .tool-nav__label {
        margin: 0 0 0.35rem;
    }

    .tool-nav__label a:hover {
        color: var(--ink);
    }

    .tool-nav__list {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        overflow: visible;
        min-width: 0;
        padding-bottom: 0;
    }

    .tool-nav__link {
        white-space: normal;
        border: 0;
        border-left: 3px solid transparent;
        background: transparent;
        color: var(--ink-soft);
        padding: 0.55rem 0.75rem;
        line-height: 1.3;
        border-radius: 0.35rem;
    }

    .tool-nav__link:hover,
    .tool-nav__link[aria-current="page"] {
        background: rgba(255, 255, 255, 0.95);
        color: var(--ink);
        box-shadow: none;
    }

    .tool-nav__link[aria-current="page"] {
        border-left-color: var(--orange);
        color: var(--ink);
        font-weight: 700;
    }

    .tool-main__crumb {
        display: none;
    }

    .page-hero--tool {
        padding-top: 0;
    }
}

.tool-grid,
.venture-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.tool-link,
.venture-link {
    display: block;
    padding: 1.25rem 1.15rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.tool-link:hover,
.venture-link:hover {
    border-color: var(--orange);
    background: var(--white);
    transform: translateY(-2px);
}

.tool-link h2,
.venture-link h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
}

.tool-link p,
.venture-link p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.tool-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    padding: 1.25rem;
}

.tool-panel label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.tool-panel input[type="text"],
.tool-panel input[type="number"],
.tool-panel textarea,
.tool-panel select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 2px solid var(--ink);
    background: var(--white);
    font: inherit;
    margin-bottom: 0.9rem;
}

.tool-panel textarea {
    min-height: 8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
}

.tool-output {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--ink);
    color: var(--white);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.92rem;
    word-break: break-all;
    white-space: pre-wrap;
}

.tool-error {
    color: #a10f0f;
    font-weight: 600;
}

.check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.check-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    margin: 0;
}

.ip-big {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 6vw, 3.5rem);
    letter-spacing: -0.04em;
    margin: 0 0 1rem;
}

.prose {
    max-width: 40rem;
}

.prose p {
    color: var(--ink-soft);
}

.venture-hero-img {
    width: min(12rem, 40vw);
    margin: 0 0 1.5rem;
    mix-blend-mode: multiply;
}

.login-box {
    max-width: 24rem;
    margin: 4rem auto;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--line);
}

.login-box input {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 0.85rem;
    border: 2px solid var(--ink);
    font: inherit;
}

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

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(0.85) rotate(-4deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

@media (max-width: 720px) {
    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav {
        justify-content: flex-start;
    }

    .hero__ctas .btn {
        width: 100%;
    }
}
