/* Reservu help centre. Reservu's sales site design language (Hanken Grotesk, ink, mist and blue) on Trybe's help
   centre layout. Hand written, no build step. */

:root {
    --ink: #161c2d;
    --ink-soft: #2f3649;
    --muted: #586073;
    --line: #e3e5ec;
    --line-soft: #eef0f4;
    --mist: #f4f5f8;
    --paper: #ffffff;
    --blue: #121eff;
    --blue-deep: #0a12c2;
    --blue-wash: #eceefe;
    --night: #10152a;
    --on-night: #e9ebf3;
    --on-night-muted: #a9b0c4;
    --radius-lg: 22px;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 18px 44px -26px rgb(16 21 42 / 0.32), 0 3px 10px -6px rgb(16 21 42 / 0.12);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 1.5rem;
}

body {
    margin: 0;
    background: var(--mist);
    color: var(--ink);
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--blue-wash);
    color: var(--ink);
}

a {
    color: var(--blue);
    text-underline-offset: 0.18em;
}

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    border-radius: 6px;
}

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

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-weight: 600;
}

.skip:focus {
    top: 1rem;
}

.wrap {
    width: min(100% - 2rem, 1120px);
    margin-inline: auto;
}

.wrap--narrow {
    width: min(100% - 2rem, 820px);
}

/* The notice across the top of every page (Site settings in the control panel). */
.notice {
    margin: 0;
    padding: 0.55rem 1rem;
    background: var(--blue-wash);
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
}

.notice a {
    font-weight: 600;
}

/* The navy band ------------------------------------------------------------------------------------------------ */

.band {
    position: relative;
    padding: 1.1rem 0 1.75rem;
    background:
        radial-gradient(circle at 85% 0%, rgb(18 30 255 / 0.32), transparent 52%),
        radial-gradient(circle at 0% 100%, rgb(214 184 120 / 0.1), transparent 45%),
        var(--night);
    color: var(--on-night);
}

.band--home {
    padding-bottom: clamp(3.5rem, 2rem + 5vw, 6rem);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--on-night);
    text-decoration: none;
}

.brand img {
    width: auto;
    height: 1.35rem;
}

.brand span {
    padding-left: 0.75rem;
    border-left: 1px solid rgb(255 255 255 / 0.25);
    font-size: 0.95rem;
    color: var(--on-night-muted);
}

.topbar__links {
    display: flex;
    gap: 1.25rem;
    font-size: 0.92rem;
}

.topbar__links a {
    color: var(--on-night-muted);
    text-decoration: none;
}

.topbar__links a:hover {
    color: #fff;
}

.band__title {
    margin: clamp(1.5rem, 1rem + 3vw, 3rem) 0 1.5rem;
    font-size: clamp(2.2rem, 1.6rem + 3vw, 3.6rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: #fff;
}

/* Search ------------------------------------------------------------------------------------------------------- */

.search {
    position: relative;
    max-width: 720px;
}

.search input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    border: 1px solid rgb(255 255 255 / 0.14);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.1);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.search input::placeholder {
    color: var(--on-night-muted);
}

.search input:focus {
    outline: none;
    border-color: rgb(255 255 255 / 0.4);
    background: rgb(255 255 255 / 0.16);
}

.search--large input {
    padding: 1.15rem 1.25rem 1.15rem 3.4rem;
    border-color: transparent;
    background: var(--paper);
    color: var(--ink);
    font-size: 1.15rem;
    box-shadow: 0 24px 50px -24px rgb(0 0 0 / 0.55);
}

.search--large input::placeholder {
    color: var(--muted);
}

.search--large input:focus {
    background: var(--paper);
    border-color: transparent;
    box-shadow: 0 0 0 3px rgb(18 30 255 / 0.35), 0 24px 50px -24px rgb(0 0 0 / 0.55);
}

.search__icon {
    position: absolute;
    left: 1.05rem;
    top: 50%;
    width: 1.2rem;
    height: 1.2rem;
    transform: translateY(-50%);
    color: var(--on-night-muted);
    pointer-events: none;
}

.search--large .search__icon {
    left: 1.25rem;
    width: 1.35rem;
    height: 1.35rem;
    color: var(--muted);
}

.search__results {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    top: calc(100% + 0.5rem);
    margin: 0;
    padding: 0.4rem;
    list-style: none;
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 24px 60px -20px rgb(16 21 42 / 0.45), 0 0 0 1px rgb(16 21 42 / 0.06);
}

.search__results a {
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
}

.search__results a strong {
    display: block;
    font-weight: 600;
    line-height: 1.3;
}

.search__results a span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.4;
}

.search__results [aria-selected='true'] a,
.search__results a:hover {
    background: var(--blue-wash);
}

.search__results .search__empty {
    padding: 0.75rem 0.85rem;
    font-size: 0.92rem;
    color: var(--muted);
}

/* Pages -------------------------------------------------------------------------------------------------------- */

.page {
    padding: 2rem 0 clamp(3rem, 2rem + 4vw, 5rem);
}

/* The topic cards overlap the bottom of the band, so they sit above it. The search results list stays above both. */
.band--home + .page {
    position: relative;
    z-index: 1;
    margin-top: calc(-1 * clamp(2rem, 1rem + 3vw, 3.5rem));
}

.page-title {
    margin: 0 0 1.25rem;
    font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
    color: var(--muted);
}

.crumbs li + li::before {
    content: '/';
    margin-right: 0.35rem;
    color: #b6bbc8;
}

.crumbs a {
    color: var(--muted);
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--blue);
}

.panel {
    margin: 0 0 1.25rem;
    padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.panel > h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Topic cards on the home page --------------------------------------------------------------------------------- */

.topics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.topic-card {
    display: flex;
    gap: 1rem;
    height: 100%;
    padding: 1.4rem;
    border-radius: var(--radius-lg);
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 26px 54px -26px rgb(16 21 42 / 0.4), 0 3px 10px -6px rgb(16 21 42 / 0.14);
}

.topic-card__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 14px;
    background: var(--blue-wash);
    color: var(--blue);
}

.topic-card__icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.topic-card__icon--large {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 16px;
}

.topic-card__icon--large svg {
    width: 1.8rem;
    height: 1.8rem;
}

.topic-card__text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.topic-card__text strong {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.topic-card__text span {
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--muted);
}

.topic-card__text small {
    margin-top: auto;
    padding-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.topic-card__external {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.topic-card__external svg {
    width: 0.9rem;
    height: 0.9rem;
}

/* Topic page --------------------------------------------------------------------------------------------------- */

.topic-head {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.topic-head h1 {
    margin: 0;
    font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.topic-head p {
    margin: 0.3rem 0 0;
    color: var(--muted);
}

.article-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-list li + li {
    border-top: 1px solid var(--line-soft);
}

.article-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0.25rem;
    color: var(--ink);
    text-decoration: none;
}

.article-list a > span {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.article-list strong {
    font-weight: 500;
}

.article-list a > span > span {
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--muted);
}

.article-list a:hover strong {
    color: var(--blue);
}

.article-list__chevron {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
    color: #a2a8b6;
    transition: transform 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

.article-list a:hover .article-list__chevron {
    transform: translateX(3px);
    color: var(--blue);
}

/* Article ------------------------------------------------------------------------------------------------------ */

.article {
    margin-bottom: 1.25rem;
    padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.article h1 {
    margin: 0;
    font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-wrap: balance;
}

.article__summary {
    margin: 0.75rem 0 0;
    font-size: 1.15rem;
    color: var(--ink-soft);
}

.article__meta {
    margin: 0.75rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.contents {
    margin: 1.75rem 0 0;
    padding: 1.1rem 1.3rem;
    border-radius: var(--radius);
    background: var(--mist);
}

.contents h2 {
    margin: 0 0 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.contents ol {
    margin: 0;
    padding-left: 1.2rem;
}

.contents li {
    padding: 0.1rem 0;
}

.contents a {
    text-decoration: none;
}

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

.prose {
    margin-top: 1.75rem;
}

/* Text keeps a comfortable line length; screenshots use the article's full width, and open full size when clicked. */
.prose > :where(p, ul, ol, h2, h3, blockquote) {
    max-width: 68ch;
}

.prose > p:has(> img) {
    max-width: none;
}

.prose img {
    width: auto;
    height: auto;
    max-height: min(78vh, 720px);
    cursor: zoom-in;
}

.prose > :first-child {
    margin-top: 0;
}

.prose h2 {
    margin: 2.25rem 0 0.6rem;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.prose h3 {
    margin: 1.75rem 0 0.4rem;
    font-size: 1.12rem;
    font-weight: 600;
}

.prose p,
.prose ul,
.prose ol {
    margin: 0.85rem 0;
}

.prose li {
    margin: 0.35rem 0;
    padding-left: 0.2rem;
}

.prose ol > li::marker {
    font-weight: 600;
    color: var(--blue);
}

.prose strong {
    font-weight: 600;
}

.prose img {
    display: block;
    margin: 1.25rem 0;
    border-radius: var(--radius);
    box-shadow: 0 16px 40px -24px rgb(16 21 42 / 0.4), 0 0 0 1px rgb(16 21 42 / 0.08);
}

.prose blockquote {
    margin: 1.25rem 0;
    padding: 0.9rem 1.15rem;
    border-radius: var(--radius);
    background: var(--blue-wash);
    color: var(--ink-soft);
}

.prose blockquote p {
    margin: 0;
}

.prose blockquote strong:first-child {
    color: var(--blue-deep);
}

.prose code {
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    background: var(--mist);
    font-size: 0.92em;
}

.prose table {
    width: 100%;
    margin: 1.25rem 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.prose th,
.prose td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.prose th {
    font-weight: 600;
    background: var(--mist);
}

/* Lightbox for screenshots -------------------------------------------------------------------------------------- */

.lightbox {
    /* Shrink to the image, so a small screenshot sits in the middle rather than at the left of a full width box. */
    width: fit-content;
    height: fit-content;
    margin: auto;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    overflow: visible;
    cursor: zoom-out;
}

.lightbox::backdrop {
    background: rgb(10 13 28 / 0.82);
    backdrop-filter: blur(3px);
}

.lightbox img {
    display: block;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
    width: auto;
    height: auto;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.6);
}

.lightbox__close {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.92);
    color: var(--ink);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox[open] {
    animation: lightbox-in 0.25s var(--ease-out);
}

@keyframes lightbox-in {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
}

/* Feedback ----------------------------------------------------------------------------------------------------- */

.feedback {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.feedback h2 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 600;
}

.feedback__faces {
    display: inline-flex;
    gap: 0.75rem;
}

.feedback__faces button {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--muted);
    cursor: pointer;
    transition: transform 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), background 0.25s var(--ease-out);
}

.feedback__faces button:hover {
    transform: scale(1.08);
    border-color: var(--blue);
    background: var(--blue-wash);
    color: var(--blue);
}

.feedback__faces svg {
    width: 1.9rem;
    height: 1.9rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.feedback__faces svg .fill {
    fill: currentColor;
    stroke: none;
}

.feedback__more {
    display: grid;
    gap: 0.6rem;
    max-width: 30rem;
    margin: 0 auto;
    text-align: left;
}

.feedback__more label {
    font-weight: 600;
}

.feedback__more label span {
    font-weight: 400;
    color: var(--muted);
}

.feedback__more textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.98rem;
    resize: vertical;
}

.feedback__more textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgb(18 30 255 / 0.15);
}

.feedback__thanks {
    margin: 0;
    font-weight: 500;
    color: var(--ink-soft);
}

.button {
    justify-self: start;
    padding: 0.65rem 1.4rem;
    border: 0;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.button:hover {
    background: var(--blue-deep);
}

.not-found h1 {
    margin: 0 0 0.5rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}

/* Updates ------------------------------------------------------------------------------------------------------ */

.updates-head {
    margin-bottom: 1.5rem;
}

.updates-head h1 {
    margin: 0;
    font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.updates-head p {
    margin: 0.4rem 0 0;
    color: var(--muted);
}

.update h2 {
    margin: 0.35rem 0 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.update__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.update__body {
    margin-top: 0.75rem;
}

.update__body figure {
    margin: 1rem 0 0;
}

.update__body img {
    display: block;
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--mist);
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge--new {
    background: var(--blue-wash);
    color: var(--blue-deep);
}

.badge--improvement {
    background: #e6f6ee;
    color: #11603a;
}

.badge--fix {
    background: #fdf1dc;
    color: #8a4b08;
}

/* Contact ------------------------------------------------------------------------------------------------------ */

.contact h1 {
    margin: 0;
    font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem);
    font-weight: 400;
    letter-spacing: -0.03em;
}

.contact > p {
    max-width: 62ch;
    margin: 0.6rem 0 1.25rem;
    color: var(--ink-soft);
}

.contact__form {
    display: block;
    width: 100%;
    height: 760px;
    border: 0;
}

/* Footer ------------------------------------------------------------------------------------------------------- */

.site-footer {
    padding: 2rem 0 2.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--muted);
}

.site-footer p {
    margin: 0;
}

.site-footer__small {
    margin-top: 0.4rem !important;
    font-size: 0.82rem;
}

@media (max-width: 640px) {
    .brand img {
        height: 1.15rem;
    }

    .brand span,
    .topbar__links a {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Room for three links beside the logo: "Help centre" and the word "support" give way on a phone. */
    .brand span,
    .topbar__long {
        display: none;
    }

    .topbar__links {
        gap: 1rem;
    }

    .topic-card {
        padding: 1.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}
