
/* =========================================================
   KODAMA JOURNAL — LEGAL PAGES
   Self-contained stylesheet
   ========================================================= */

/* ---------- FOUNDATION ---------- */

:root {
    --legal-bg: #10100f;
    --legal-panel: #151513;
    --legal-panel-hover: #1b1b18;
    --legal-text: #e8e5dd;
    --legal-muted: #a19e94;
    --legal-dim: #77766e;
    --legal-line: rgba(232, 229, 221, 0.15);
    --legal-line-soft: rgba(232, 229, 221, 0.08);
    --legal-accent: #d7ff64;
    --legal-serif: "Times New Roman", Georgia, serif;
    --legal-sans: Arial, Helvetica, sans-serif;
    --legal-container: 1440px;
    --legal-gutter: clamp(22px, 5vw, 76px);
    --legal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    background: var(--legal-bg);
}

body.legal-page {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background: var(--legal-bg);
    color: var(--legal-text);
    font-family: var(--legal-sans);
    font-size: 14px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.legal-page ::selection {
    color: var(--legal-bg);
    background: var(--legal-accent);
}

.legal-page a {
    color: inherit;
    text-decoration: none;
}

.legal-page button,
.legal-page a {
    -webkit-tap-highlight-color: transparent;
}

.legal-page img,
.legal-page svg {
    max-width: 100%;
}

.legal-container {
    width: min(100% - (var(--legal-gutter) * 2), var(--legal-container));
    margin-inline: auto;
}

.legal-page em {
    font-family: var(--legal-serif);
    font-weight: 400;
    font-style: italic;
}

.legal-page p {
    color: var(--legal-muted);
}

.legal-page a:focus-visible {
    outline: 1px solid var(--legal-accent);
    outline-offset: 5px;
}

.legal-page .legal-inline-link:focus-visible,
.legal-page .legal-contact-link:focus-visible {
    outline-offset: 7px;
}

/* ---------- READING PROGRESS ---------- */

.legal-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 10010;
    width: 100%;
    height: 2px;
    background: transparent;
    pointer-events: none;
}

.legal-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    background: var(--legal-accent);
    transform-origin: left center;
    will-change: width;
}

/* ---------- HEADER ---------- */

.legal-header {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    min-height: 88px;
    padding: 0 var(--legal-gutter);
    border-bottom: 1px solid var(--legal-line-soft);
}

.legal-wordmark {
    display: inline-flex;
    align-items: flex-start;
    width: fit-content;
    color: var(--legal-text);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.09em;
    line-height: 1;
}

.legal-wordmark span {
    margin: -2px 0 0 4px;
    color: var(--legal-accent);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0;
}

.legal-header-label {
    justify-self: center;
    color: var(--legal-dim);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-align: center;
}

.legal-back {
    display: inline-flex;
    justify-self: end;
    align-items: center;
    gap: 12px;
    color: var(--legal-muted);
    font-size: 9px;
    letter-spacing: 0.13em;
    transition: color 0.3s ease;
}

.legal-back span {
    color: var(--legal-accent);
    font-size: 15px;
    transition: transform 0.4s var(--legal-ease);
}

.legal-back:hover {
    color: var(--legal-text);
}

.legal-back:hover span {
    transform: translateX(-5px);
}

/* ---------- HERO ---------- */

.legal-hero {
    position: relative;
    padding: clamp(90px, 12vw, 180px) 0 clamp(62px, 8vw, 112px);
    border-bottom: 1px solid var(--legal-line);
    overflow: hidden;
}

.legal-hero::after {
    position: absolute;
    right: -150px;
    bottom: -270px;
    width: min(60vw, 680px);
    aspect-ratio: 1;
    border: 1px solid rgba(232, 229, 221, 0.035);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.legal-hero .legal-container {
    position: relative;
    z-index: 1;
}

.legal-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 38px;
    color: var(--legal-dim);
    font-size: 9px;
    letter-spacing: 0.17em;
}

.legal-eyebrow span {
    color: var(--legal-accent);
}

.legal-title {
    max-width: 1200px;
    margin: 0 0 clamp(45px, 7vw, 95px);
    font-size: clamp(66px, 12.2vw, 174px);
    font-weight: 500;
    letter-spacing: -0.095em;
    line-height: 0.84;
    overflow-wrap: anywhere;
}

.legal-title em {
    color: var(--legal-accent);
    letter-spacing: -0.09em;
}

.legal-hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    max-width: 1000px;
}

.legal-hero-bottom > p {
    max-width: 510px;
    margin: 0;
    font-size: clamp(14px, 1.3vw, 17px);
    line-height: 1.9;
}

.legal-updated {
    flex-shrink: 0;
    color: var(--legal-dim);
    font-size: 9px;
    letter-spacing: 0.13em;
    line-height: 2;
    text-align: right;
}

/* ---------- CONTENT LAYOUT ---------- */

.legal-layout {
    display: grid;
    grid-template-columns: minmax(180px, 250px) minmax(0, 760px);
    justify-content: space-between;
    align-items: start;
    gap: clamp(45px, 8vw, 130px);
    padding-top: clamp(65px, 8vw, 115px);
    padding-bottom: clamp(90px, 12vw, 175px);
}

.legal-sidebar {
    position: sticky;
    top: 38px;
    padding-top: 8px;
}

.legal-sidebar-label {
    display: block;
    margin-bottom: 24px;
    color: var(--legal-dim);
    font-size: 9px;
    letter-spacing: 0.16em;
}

.legal-sidebar nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.legal-sidebar nav a {
    position: relative;
    display: block;
    padding: 10px 0 10px 14px;
    border-left: 1px solid var(--legal-line);
    color: var(--legal-dim);
    font-size: 10px;
    letter-spacing: 0.035em;
    line-height: 1.5;
    transition:
        color 0.3s ease,
        border-color 0.3s ease,
        padding-left 0.3s var(--legal-ease);
}

.legal-sidebar nav a::before {
    position: absolute;
    top: -1px;
    bottom: -1px;
    left: -1px;
    width: 1px;
    background: var(--legal-accent);
    content: "";
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.35s var(--legal-ease);
}

.legal-sidebar nav a:hover,
.legal-sidebar nav a.is-active {
    padding-left: 19px;
    color: var(--legal-text);
}

.legal-sidebar nav a.is-active {
    border-color: rgba(215, 255, 100, 0.2);
}

.legal-sidebar nav a.is-active::before {
    transform: scaleY(1);
}

/* ---------- LEGAL SECTIONS ---------- */

.legal-content {
    min-width: 0;
}

.legal-section {
    position: relative;
    padding: 0 0 clamp(54px, 7vw, 94px);
    margin: 0 0 clamp(54px, 7vw, 94px);
    border-bottom: 1px solid var(--legal-line);
    translate: 0 var(--legal-parallax-y, 0px);
    scroll-margin-top: 100px;
}

.legal-section:last-of-type {
    margin-bottom: 0;
}

.legal-section-number {
    display: block;
    margin-bottom: 28px;
    color: var(--legal-accent);
    font-size: 9px;
    letter-spacing: 0.17em;
}

.legal-section h2 {
    max-width: 720px;
    margin: 0 0 30px;
    font-size: clamp(33px, 4.4vw, 57px);
    font-weight: 500;
    letter-spacing: -0.065em;
    line-height: 1.08;
}

.legal-section h2 em {
    color: var(--legal-muted);
}

.legal-section h3 {
    margin: 34px 0 12px;
    color: var(--legal-text);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.legal-section p {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 2;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-inline-link {
    display: inline;
    color: var(--legal-accent) !important;
    border-bottom: 1px solid rgba(215, 255, 100, 0.35);
    transition: border-color 0.3s ease;
}

.legal-inline-link:hover {
    border-color: var(--legal-accent);
}

/* ---------- LISTS ---------- */

.legal-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
}

.legal-list li {
    position: relative;
    padding-left: 22px;
    color: var(--legal-muted);
    font-size: 13px;
    line-height: 1.9;
}

.legal-list li::before {
    position: absolute;
    top: 0.82em;
    left: 0;
    width: 5px;
    height: 5px;
    background: var(--legal-accent);
    border-radius: 50%;
    content: "";
}

/* ---------- COOKIE CATEGORY PANELS ---------- */

.legal-cookie-types {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 34px;
}

.legal-cookie-type {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--legal-line-soft);
    background: var(--legal-panel);
    transition:
        border-color 0.35s ease,
        background 0.35s ease,
        transform 0.35s var(--legal-ease);
}

.legal-cookie-type:hover {
    border-color: var(--legal-line);
    background: var(--legal-panel-hover);
    transform: translateY(-3px);
}

.legal-cookie-index {
    padding-top: 4px;
    color: var(--legal-accent);
    font-size: 10px;
    letter-spacing: 0.1em;
}

.legal-cookie-type h3 {
    margin: 0 0 12px;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.legal-cookie-type p {
    margin-bottom: 18px;
    font-size: 12px;
}

.legal-cookie-status {
    display: inline-block;
    padding: 6px 9px;
    border: 1px solid var(--legal-line);
    color: var(--legal-dim);
    font-size: 8px;
    letter-spacing: 0.12em;
}

/* ---------- CONTACT ---------- */

.legal-contact-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin: 32px 0;
    padding: 19px 0;
    border-top: 1px solid var(--legal-line);
    border-bottom: 1px solid var(--legal-line);
    color: var(--legal-text) !important;
    font-size: clamp(15px, 2vw, 21px);
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
    transition: color 0.3s ease;
}

.legal-contact-link span {
    flex-shrink: 0;
    color: var(--legal-accent);
    transition: transform 0.35s var(--legal-ease);
}

.legal-contact-link:hover {
    color: var(--legal-accent) !important;
}

.legal-contact-link:hover span {
    transform: translate(4px, -4px);
}

.legal-note {
    padding-left: 16px;
    border-left: 1px solid var(--legal-line);
    color: var(--legal-dim) !important;
    font-size: 11px !important;
    line-height: 1.9 !important;
}

/* ---------- RELATED PAGES ---------- */

.legal-related {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-top: clamp(55px, 7vw, 90px);
}

.legal-related > span {
    margin-bottom: 20px;
    color: var(--legal-dim);
    font-size: 9px;
    letter-spacing: 0.15em;
}

.legal-related > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 19px 0;
    border-top: 1px solid var(--legal-line);
    color: var(--legal-muted);
    font-family: var(--legal-serif);
    font-size: clamp(20px, 2.5vw, 29px);
    font-style: italic;
    transition:
        padding 0.35s var(--legal-ease),
        color 0.3s ease;
}

.legal-related > a:last-child {
    border-bottom: 1px solid var(--legal-line);
}

.legal-related > a span {
    color: var(--legal-accent);
    font-family: var(--legal-sans);
    font-size: 15px;
    font-style: normal;
    transition: transform 0.35s var(--legal-ease);
}

.legal-related > a:hover {
    padding-left: 12px;
    color: var(--legal-text);
}

.legal-related > a:hover span {
    transform: translate(4px, -4px);
}

/* ---------- FOOTER ---------- */

.legal-footer {
    padding: clamp(40px, 6vw, 80px) 0 25px;
    border-top: 1px solid var(--legal-line);
    background: #0c0c0b;
}

.legal-footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: start;
    gap: 30px;
    padding-bottom: clamp(50px, 8vw, 100px);
}

.legal-footer-top > p {
    margin: 0;
    color: var(--legal-dim);
    font-family: var(--legal-serif);
    font-size: clamp(18px, 2.5vw, 27px);
    font-style: italic;
    line-height: 1.4;
}

.legal-footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 11px;
}

.legal-footer-links a {
    color: var(--legal-dim);
    font-size: 10px;
    transition: color 0.3s ease;
}

.legal-footer-links a:hover,
.legal-footer-links a[aria-current="page"] {
    color: var(--legal-accent);
}

.legal-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--legal-line-soft);
    color: var(--legal-dim);
    font-size: 8px;
    letter-spacing: 0.11em;
}

.legal-footer-bottom a {
    transition: color 0.3s ease;
}

.legal-footer-bottom a:hover {
    color: var(--legal-accent);
}

/* ---------- ENTRANCE ANIMATIONS ---------- */

.legal-page [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition:
        opacity 0.9s var(--legal-ease),
        transform 1s var(--legal-ease);
}

.legal-page [data-reveal].is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.legal-hero .legal-title {
    transition-delay: 0.08s;
}

.legal-hero .legal-hero-bottom {
    transition-delay: 0.16s;
}

.legal-content .legal-section:nth-child(2) {
    transition-delay: 0.04s;
}

.legal-content .legal-section:nth-child(3) {
    transition-delay: 0.08s;
}

/* ---------- CUSTOM CURSOR ---------- */

.legal-page #custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(232, 229, 221, 0.8);
    border-radius: 50%;
    background: transparent;
    color: var(--legal-bg);
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transform-origin: center;
    transition:
        width 0.35s var(--legal-ease),
        height 0.35s var(--legal-ease),
        background-color 0.35s ease,
        border-color 0.35s ease,
        opacity 0.25s ease;
    will-change: left, top, width, height;
}

.legal-page #custom-cursor .custom-cursor-text {
    display: none;
    color: var(--legal-bg);
    font-family: var(--legal-sans);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    white-space: nowrap;
}

.legal-page #custom-cursor.is-hovering {
    width: 66px;
    height: 66px;
    border-color: var(--legal-accent);
    background: #d8ff6444;
}

.legal-page #custom-cursor.is-hovering .custom-cursor-text {
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .legal-page,
    .legal-page a,
    .legal-page button {
        cursor: none;
    }
}

@media (hover: none), (pointer: coarse) {
    .legal-page #custom-cursor {
        display: none !important;
    }

    .legal-page,
    .legal-page a,
    .legal-page button {
        cursor: auto;
    }
}

/* ---------- RESPONSIVE ---------- */

@media (min-width: 1600px) {
    .legal-title {
        font-size: clamp(174px, 12vw, 210px);
    }
}

@media (max-width: 900px) {
    .legal-header {
        grid-template-columns: 1fr 1fr;
        min-height: 76px;
    }

    .legal-header-label {
        display: none;
    }

    .legal-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
    }

    .legal-sidebar {
        position: relative;
        top: auto;
        padding: 0 0 22px;
        border-bottom: 1px solid var(--legal-line);
    }

    .legal-sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .legal-sidebar nav a {
        padding: 7px 0;
        border-left: 0;
        font-size: 9px;
    }

    .legal-sidebar nav a::before {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        height: 1px;
        transform: scaleX(0);
    }

    .legal-sidebar nav a:hover,
    .legal-sidebar nav a.is-active {
        padding-left: 0;
    }

    .legal-sidebar nav a.is-active::before {
        transform: scaleX(1);
    }

    .legal-content {
        max-width: 760px;
        width: 100%;
        margin-inline: auto;
    }
}

@media (max-width: 600px) {
    :root {
        --legal-gutter: 22px;
    }

    .legal-header {
        min-height: 70px;
    }

    .legal-wordmark {
        font-size: 19px;
    }

    .legal-back {
        gap: 7px;
        font-size: 8px;
        letter-spacing: 0.07em;
    }

    .legal-hero {
        padding-top: 86px;
        padding-bottom: 58px;
    }

    .legal-eyebrow {
        margin-bottom: 30px;
        font-size: 8px;
    }

    .legal-title {
        margin-bottom: 42px;
        font-size: clamp(58px, 15vw, 92px);
        line-height: 0.9;
    }

    .legal-hero-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }

    .legal-hero-bottom > p {
        font-size: 13px;
    }

    .legal-updated {
        text-align: left;
    }

    .legal-layout {
        padding-top: 52px;
        padding-bottom: 80px;
        gap: 38px;
    }

    .legal-sidebar-label {
        margin-bottom: 15px;
    }

    .legal-sidebar nav {
        gap: 4px 13px;
    }

    .legal-sidebar nav a {
        font-size: 9px;
    }

    .legal-section {
        padding-bottom: 48px;
        margin-bottom: 48px;
        scroll-margin-top: 24px;
    }

    .legal-section-number {
        margin-bottom: 22px;
        font-size: 8px;
    }

    .legal-section h2 {
        margin-bottom: 23px;
        font-size: clamp(32px, 9vw, 44px);
    }

    .legal-section p,
    .legal-list li {
        font-size: 12px;
        line-height: 1.95;
    }

    .legal-cookie-type {
        grid-template-columns: 25px minmax(0, 1fr);
        gap: 12px;
        padding: 20px 16px;
    }

    .legal-cookie-type h3 {
        font-size: 14px;
    }

    .legal-cookie-type p {
        font-size: 11px;
    }

    .legal-contact-link {
        font-size: 14px;
    }

    .legal-footer-top {
        grid-template-columns: 1fr 1fr;
        row-gap: 35px;
    }

    .legal-footer-top > p {
        justify-self: end;
        font-size: 19px;
    }

    .legal-footer-links {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-self: start;
        flex-wrap: wrap;
        gap: 18px;
    }

    .legal-footer-bottom {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 14px 20px;
        font-size: 7px;
    }

    .legal-footer-bottom span:last-child {
        display: none;
    }
}

/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
    .legal-page *,
    .legal-page *::before,
    .legal-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .legal-page [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .legal-section {
        translate: none;
    }

    .legal-page #custom-cursor {
        display: none !important;
    }

    .legal-page,
    .legal-page a,
    .legal-page button {
        cursor: auto;
    }
}
