/* ==========================================================================
   SkyViews — Legal documents
   Editorial "paper" register: the site is cinematic and dark, legal pages
   deliberately go to paper. Cream ground reused from the site footer
   (#EDE9D2), black ink, one typeface, hairline rules, long measure.
   Built to be read, searched (Ctrl+F) and printed by a reviewer.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap");

:root {
    --paper: #ede9d2;
    --paper-deep: #e4dfc4;
    --ink: #141414;
    --ink-soft: #3d3a31;
    --ink-mute: #736d5c;
    --rule: rgba(20, 20, 20, 0.14);
    --rule-strong: rgba(20, 20, 20, 0.3);
    --accent: #141414;

    --measure: 64ch;
    --shell: 1240px;
    --gutter: clamp(22px, 5vw, 64px);

    --font: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

body.legal {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    font-weight: 350;
    line-height: 1.72;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

/* --------------------------------------------------------------- top bar */

.legal-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px var(--gutter);
    background: rgba(237, 233, 210, 0.9);
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--rule);
}

.legal-bar__logo img {
    height: 26px;
    width: auto;
}

.legal-bar__right {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.4vw, 30px);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--ink-soft);
    transition: color 0.25s ease;
}

.legal-back svg {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

.legal-back:hover {
    color: var(--ink);
}

.legal-back:hover svg {
    transform: translateX(-3px);
}

.legal-langs {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--rule);
    border-radius: 999px;
}

.legal-langs a {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    transition: background 0.25s ease, color 0.25s ease;
}

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

.legal-langs a[aria-current="true"] {
    background: var(--ink);
    color: var(--paper);
}

/* ----------------------------------------------------------------- header */

.legal-hero {
    max-width: var(--shell);
    margin: 0 auto;
    padding: clamp(60px, 11vw, 140px) var(--gutter) clamp(36px, 5vw, 64px);
}

.legal-eyebrow {
    margin: 0 0 clamp(22px, 4vw, 40px);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.legal-title {
    margin: 0;
    font-size: clamp(2.5rem, 7.6vw, 5.5rem);
    font-weight: 450;
    line-height: 0.94;
    letter-spacing: -0.035em;
    max-width: 20ch;
    text-wrap: balance;
}

.legal-lede {
    margin: clamp(28px, 4vw, 44px) 0 0;
    max-width: 56ch;
    font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
    line-height: 1.66;
    color: var(--ink-soft);
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: clamp(40px, 6vw, 72px);
    border-top: 1px solid var(--rule-strong);
}

.legal-meta > div {
    flex: 1 1 180px;
    padding: 18px 22px 18px 0;
    border-right: 1px solid var(--rule);
}

.legal-meta > div:last-child {
    border-right: 0;
}

.legal-meta dt {
    margin: 0 0 4px;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.legal-meta dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- body */

.legal-shell {
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 var(--gutter) clamp(80px, 12vw, 160px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

/* index / table of contents */

.legal-index {
    display: none;
}

.legal-index__label {
    margin: 0 0 18px;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.legal-index ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}

.legal-index li {
    counter-increment: toc;
}

.legal-index a {
    display: grid;
    grid-template-columns: 2.1em 1fr;
    gap: 6px;
    padding: 5px 0;
    font-size: 0.845rem;
    line-height: 1.35;
    color: var(--ink-mute);
    transition: color 0.2s ease;
}

.legal-index a::before {
    content: counter(toc, decimal-leading-zero);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    opacity: 0.6;
}

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

.legal-index a.is-active {
    color: var(--ink);
    font-weight: 500;
}

.legal-index a.is-active::before {
    opacity: 1;
}

/* document flow */

.legal-doc {
    counter-reset: sec;
    min-width: 0;
}

.legal-section {
    counter-increment: sec;
    padding: clamp(44px, 6vw, 76px) 0;
    border-top: 1px solid var(--rule);
}

.legal-section:first-child {
    border-top: 1px solid var(--rule-strong);
}

.legal-section__num {
    display: block;
    margin-bottom: 14px;
    font-size: 0.78rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
}

.legal-section__num::before {
    content: counter(sec, decimal-leading-zero);
}

.legal-section h2 {
    margin: 0 0 clamp(18px, 2.4vw, 28px);
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    font-weight: 450;
    line-height: 1.14;
    letter-spacing: -0.022em;
    max-width: 34ch;
    text-wrap: balance;
}

.legal-section h3 {
    margin: clamp(30px, 4vw, 42px) 0 12px;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    max-width: var(--measure);
}

.legal-section p,
.legal-section li {
    max-width: var(--measure);
}

.legal-section p {
    margin: 0 0 1.15em;
    color: var(--ink-soft);
}

.legal-section > p:last-child,
.legal-section > ol:last-child,
.legal-section > ul:last-child {
    margin-bottom: 0;
}

.legal-section strong {
    font-weight: 600;
    color: var(--ink);
}

/* numbered clauses — the spine of the document */

/* A clause list that is interrupted by a table or a data block continues its
   numbering via --clause-start (one less than the first clause number), so the
   printed numbers keep matching the cross-references in the text. */
ol.clauses {
    margin: 0 0 1.15em;
    padding: 0;
    list-style: none;
    counter-reset: clause var(--clause-start, 0);
}

ol.clauses > li {
    counter-increment: clause;
    position: relative;
    padding-left: 3.1em;
    margin-bottom: 0.95em;
    color: var(--ink-soft);
}

ol.clauses > li::before {
    content: counter(sec) "." counter(clause);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.86rem;
    line-height: 1.95;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--ink-mute);
}

ol.clauses > li:last-child {
    margin-bottom: 0;
}

/* plain bullet list */

ul.ticks {
    margin: 0 0 1.15em;
    padding: 0;
    list-style: none;
}

ul.ticks li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
    color: var(--ink-soft);
}

ul.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.82em;
    width: 9px;
    height: 1px;
    background: var(--ink-mute);
}

/* identification data */

.legal-facts {
    margin: 0;
    max-width: 640px;
    border-top: 1px solid var(--rule);
}

.legal-facts > div {
    display: grid;
    grid-template-columns: minmax(140px, 34%) 1fr;
    gap: 4px 24px;
    padding: 13px 0;
    border-bottom: 1px solid var(--rule);
}

.legal-facts dt {
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--ink-mute);
    padding-top: 2px;
}

.legal-facts dd {
    margin: 0;
    font-size: 0.98rem;
    font-variant-numeric: tabular-nums;
}

.legal-facts a {
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 1px;
    transition: border-color 0.2s ease;
}

.legal-facts a:hover {
    border-color: var(--ink);
}

/* cancellation ladder table */

.legal-table-wrap {
    margin: 0 0 1.4em;
    max-width: 720px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.legal-table {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

table.legal-table caption {
    text-align: left;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
    padding-bottom: 12px;
}

table.legal-table th,
table.legal-table td {
    text-align: left;
    padding: 14px 20px 14px 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}

table.legal-table thead th {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-mute);
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 10px;
}

table.legal-table tbody th {
    font-weight: 400;
    color: var(--ink-soft);
}

table.legal-table td.figure {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    white-space: nowrap;
}

/* callout — for the withdrawal-right exemption, the one thing a reviewer
   and a guest both need to see without reading 12 sections first */

.legal-note {
    margin: 0 0 1.4em;
    max-width: var(--measure);
    padding: 22px 26px;
    background: var(--paper-deep);
    border-left: 2px solid var(--ink);
}

.legal-note p {
    margin: 0 0 0.8em;
}

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

.legal-note__label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

/* inline link inside prose */

.legal-section p a,
.legal-section li a {
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 1px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.legal-section p a:hover,
.legal-section li a:hover {
    color: var(--ink);
    border-color: var(--ink);
}

/* small print / statutory references */

.legal-ref {
    font-size: 0.86rem;
    color: var(--ink-mute);
}

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

.legal-footer {
    border-top: 1px solid var(--rule-strong);
    padding: clamp(40px, 6vw, 64px) var(--gutter);
}

.legal-footer__inner {
    max-width: var(--shell);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
    align-items: baseline;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--ink-mute);
}

.legal-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.legal-footer__links a {
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.legal-footer__links a:hover {
    color: var(--ink);
    border-color: var(--ink);
}

.legal-footer__company {
    max-width: 60ch;
    line-height: 1.6;
}

/* -------------------------------------------------------------- ≤ phone */

@media (max-width: 619px) {
    /* The wordmark already links home, so the back label only costs a
       three-line wrap in the bar. Keep the arrow as the affordance. */
    .legal-back span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .legal-back {
        padding: 4px;
    }

    .legal-back svg {
        width: 17px;
        height: 17px;
    }

    .legal-langs a {
        padding: 5px 9px;
    }

    /* Stacked meta rows read as a list, not as a broken column grid. */
    .legal-meta > div {
        flex: 1 1 100%;
        padding: 14px 0;
        border-right: 0;
        border-bottom: 1px solid var(--rule);
    }

    .legal-meta > div:last-child {
        border-bottom: 0;
    }

    .legal-facts > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }
}

/* ------------------------------------------------------------- ≥ tablet */

@media (min-width: 700px) {
    .legal-facts > div {
        gap: 4px 32px;
    }
}

/* ------------------------------------------------------------ ≥ desktop */

@media (min-width: 1080px) {
    .legal-shell {
        grid-template-columns: 232px minmax(0, 1fr);
        gap: clamp(48px, 7vw, 112px);
    }

    .legal-index {
        display: block;
        position: sticky;
        top: 104px;
        align-self: start;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        padding-bottom: 20px;
    }

    .legal-hero {
        padding-bottom: clamp(48px, 6vw, 88px);
    }
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}

/* ----------------------------------------------------------------- print */

@media print {
    .legal-bar,
    .legal-index,
    .legal-langs,
    .legal-back {
        display: none !important;
    }

    body.legal {
        background: #fff;
        color: #000;
        font-size: 10.5pt;
        line-height: 1.5;
    }

    .legal-shell {
        display: block;
        padding: 0;
    }

    .legal-hero {
        padding: 0 0 24pt;
    }

    .legal-title {
        font-size: 26pt;
    }

    .legal-section {
        padding: 16pt 0;
        break-inside: avoid;
    }

    .legal-section h2 {
        font-size: 13pt;
    }

    .legal-note {
        background: none;
        border-left: 2pt solid #000;
    }

    a {
        text-decoration: none;
        color: #000;
    }
}
