:root {
    --ko-blue: #0038E8;
    --ko-blue-deep: #002bb4;
    --cream: #F5F2E9;
    --card: #FDFCF8;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --serif: "Didot", "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
}

body.landing {
    margin: 0;
    background: var(--ko-blue);
    color: var(--cream);
    font-family: var(--mono);
    position: relative;
}

body.landing .hero::before {
    content: "";
    position: absolute;
    top: 40px;
    left: 0;
    width: clamp(300px, 38vw, 620px);
    height: clamp(300px, 38vw, 620px);
    background: url("/docs/assets/octo_flip.png") no-repeat left top / contain;
    opacity: .25;
    z-index: -1;
    pointer-events: none;
}

/* on narrow screens center it at the top, behind the stacked title */
@media (max-width: 720px) {
    body.landing .hero::before {
        left: 50%;
        transform: translateX(-50%);
        width: min(80vw, 340px);
        height: min(80vw, 340px);
        background-position: center top;
    }
}

/* ------------------------------- hero ---------------------------- */

/* full-width blue band, used on swagger.html where the body is light */
.hero-band {
    background: var(--ko-blue);
    color: var(--cream);
    font-family: var(--mono);
}

.hero {
    max-width: 1420px;
    margin: 0 auto;
    padding: 64px 20px 8px;
    position: relative;
}

/* decorative XML sample floating on the hero's empty right half,
   echoing the "it's all about XML" idea (content mirrors example.xml) */
.hero-xml {
    position: absolute;
    top: 170px;
    right: 40px;
    pointer-events: none;
    user-select: none;
}

.hero-xml .terminal-label {
    margin-bottom: 16px;
    text-align: right;
}

/* two samples side by side: original (HU) on the left, english (EN) on the right */
.hero-xml-cols {
    display: flex;
    gap: 40px;
    align-items: center;
}

/* arrow between the two samples, signalling HU -> EN conversion */
.hero-xml-arrow {
    align-self: center;
    font-size: 28px;
    line-height: 1;
    color: rgba(255, 255, 255, .55);
}

.hero-xml-caption {
    margin: 0 0 10px 26px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .4);
}

.hero-xml pre {
    margin: 0;
    font-family: var(--mono);
    font-size: clamp(11px, 1.1vw, 15px);
    line-height: 1.75;
    color: rgba(255, 255, 255, .55);
    border-left: 1px solid rgba(255, 255, 255, .35);
    padding-left: 26px;
}

@media (max-width: 1100px) {
    .hero-xml {
        display: none;
    }
}

.hero-logo {
    display: block;
    margin-bottom: 32px;
}

.hero-kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .35em;
    text-transform: uppercase;
    opacity: .85;
}

.hero-kicker a {
    color: #fff;
    text-decoration: none;
}

.hero-kicker a:hover {
    text-decoration: underline;
}

.hero-title {
    margin: 26px 0 22px;
    font-family: var(--serif);
    font-weight: 400;
    text-transform: uppercase;
    color: #fff;
    font-size: clamp(46px, 8vw, 104px);
    line-height: .95;
    letter-spacing: .01em;
}

.hero-sub {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.hero-hint {
    margin: 0;
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    opacity: .7;
}

.hero-hint a {
    color: #fff;
}

.hero--compact {
    padding-bottom: 28px;
}

.hero--compact .hero-title {
    font-size: clamp(38px, 5vw, 64px);
}

/* ------------------------------ ctas ------------------------------ */

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 34px 0 44px;
}

.cta {
    display: inline-block;
    background: var(--cream);
    color: var(--ko-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 13px 26px;
    border: 1px solid var(--cream);
    border-radius: 2px;
}

.cta:hover {
    background: #fff;
}

.cta--ghost {
    background: transparent;
    color: var(--cream);
}

.cta--ghost:hover {
    background: rgba(255, 255, 255, .08);
}

/* ---------------------------- terminal ---------------------------- */

.terminal-label {
    margin: 0 0 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    opacity: .8;
}

.terminal {
    background: var(--card);
    border-radius: 2px;
    padding: 16px 20px;
    max-width: 720px;
    overflow-x: auto;
}

.terminal code {
    color: var(--ko-blue);
    font-family: var(--mono);
    font-size: 13px;
    white-space: nowrap;
}

/* ---------------------------- features ---------------------------- */

.features {
    max-width: 1420px;
    margin: 0 auto;
    padding: 56px 20px 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px 48px;
}

.feature {
    border-top: 1px solid rgba(255, 255, 255, .35);
    padding-top: 22px;
}

/* #1 TRANSLATE — tentacles decoration bleeding out behind the text */
.feature--tentacles {
    position: relative;
    isolation: isolate;
}

.feature--tentacles::before {
    content: "";
    position: absolute;
    top: 0;
    right: -0px;
    bottom: -40px;
    left: -30px;
    background: url("/docs/assets/tentacles_small.webp") no-repeat right top / contain;
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, #000 38%),
        linear-gradient(to top, transparent 0%, #000 30%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0%, #000 38%),
        linear-gradient(to top, transparent 0%, #000 30%);
    mask-composite: intersect;
    opacity: .18;
    z-index: -1;
    pointer-events: none;
}

/* #2 CONVERT — octopus decoration bleeding out behind the text */
.feature--octopus {
    position: relative;
    isolation: isolate;
}

.feature--octopus::before {
    content: "";
    position: absolute;
    top: 0;
    right: -0px;
    bottom: -40px;
    left: -30px;
    /* ◀▶ ADJUST POSITION HERE ▲▼ — two values: "horizontal vertical".
       1st value (80px)   = LEFT/RIGHT: negative = left (crops left), larger = right.
       2nd value (-37px)  = UP/DOWN: negative = up, positive = down. NOTE: because
                            background-size below is 100% (image == box height), a
                            PERCENTAGE here won't move it vertically — use px.
                            The box is ~244px tall, so ~15% ≈ 37px. */
    background: url("/docs/assets/octopus_small.webp") no-repeat 100px -50px;
    /* ▼ ADJUST OCTOPUS SIZE HERE ▼ — bigger % = wider/larger octopus, smaller %
       = smaller. Keep the two numbers equal so it doesn't stretch. (Was 150%.) */
    background-size: 100% 100%;
    /* Fade only the LEFT and BOTTOM edges into the blue; keep the TOP and RIGHT
       as hard crops. Two gradients intersected: opaque only where both are —
       i.e. everywhere except near the left edge and near the bottom edge. */
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, #000 38%),
        linear-gradient(to top, transparent 0%, #000 30%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0%, #000 38%),
        linear-gradient(to top, transparent 0%, #000 30%);
    mask-composite: intersect;
    opacity: .16;
    z-index: -1;
    pointer-events: none;
}

/* #3 AGGREGATE — sea decoration bleeding out behind the text */
.feature--sea {
    position: relative;
    isolation: isolate;
}

.feature--sea::before {
    content: "";
    position: absolute;
    top: -30px;
    right: -0px;
    bottom: -0px;
    left: -30px;
    /* natural (contain) size — no scaling, so nothing crops vertically */
    background: url("/docs/assets/sea_small.webp") no-repeat right top / contain;
    /* Crop via the mask (not by scaling): a hard cut removes the left 10% of
       the image, intersected with a soft fade on the bottom edge. Scaling to
       crop would enlarge height too and crop top/bottom — the mask doesn't. */
    -webkit-mask-image:
        linear-gradient(to right, transparent 0 30%, #000 50%),
        linear-gradient(to top, transparent 0%, #000 30%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0 30%, #000 50%),
        linear-gradient(to top, transparent 0%, #000 30%);
    mask-composite: intersect;
    opacity: .16;
    z-index: -1;
    pointer-events: none;
}

/* #4 FORWARD — octopus8 decoration, only its LEFT HALF showing */
.feature--forward {
    position: relative;
    isolation: isolate;
}

.feature--forward::before {
    content: "";
    position: absolute;
    top: 0;
    right: -0px;
    bottom: -40px;
    left: -30px;
    /* Octopus8 (square) sized fixed and pushed right by half its width via
       calc(100% + 150px), so its centre line sits on the card's right edge:
       the right half overflows and is clipped, leaving the LEFT HALF flush
       right. No hard-cut mask needed — the box edge does the cropping. */
    background: url("/docs/assets/octopus8_small.webp") no-repeat calc(100% + 150px) center / 300px 300px;
    /* same blend as the others: fade the left and bottom edges into the blue */
    -webkit-mask-image:
        linear-gradient(to right, transparent 48%, #000 78%),
        linear-gradient(to top, transparent 0%, #000 30%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 48%, #000 78%),
        linear-gradient(to top, transparent 0%, #000 30%);
    mask-composite: intersect;
    opacity: .16;
    z-index: -1;
    pointer-events: none;
}

.feature-no {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3em;
    text-transform: uppercase;
    opacity: .8;
}

.feature h2 {
    margin: 0 0 14px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 30px;
    line-height: 1.05;
    text-transform: uppercase;
    color: #fff;
}

.beta-tag {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .25em;
    color: var(--cream);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 2px;
    padding: 4px 8px 3px;
    position: relative;
    top: -4px;
}

.feature p {
    margin: 0;
    font-size: 11px;
    line-height: 1.9;
    letter-spacing: .12em;
}

.feature code {
    background: rgba(255, 255, 255, .12);
    padding: 2px 6px;
    border-radius: 2px;
    color: #fff;
    text-transform: none;
}

/* ---------------------------- endpoints --------------------------- */

.endpoints {
    max-width: 1420px;
    margin: 0 auto;
    padding: 56px 20px 0;
}

.endpoint-strip {
    margin: 0;
    font-size: 13px;
    line-height: 2.2;
    letter-spacing: .06em;
}

.endpoint-strip a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .45);
}

.endpoint-strip a:hover {
    border-bottom-color: #fff;
}

/* ----------------------------- footer ----------------------------- */

.colophon {
    padding: 56px 20px 44px;
    text-align: center;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--cream);
}

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

.colophon a:hover {
    text-decoration: underline;
}

/* on the light swagger page the footer sits on #fafafa */
body.swagger-page .colophon {
    color: #3b4151;
}
