/* GoodLink landing, version 4: the whole page is the product. */

:root {
    --paper: #f5f2ea;
    --paper-yours: #eef2e4;
    --ink: #20261f;
    --muted: #5b6457;
    --green: #1f5c34;
    --green-deep: #14401f;
    --line: rgba(32, 38, 31, 0.14);
    --focus: #2e7d46;
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: clip;
}

body {
    margin: 0;
    overflow-x: clip;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font-family: "Quicksand", "Segoe UI", sans-serif;
    font-weight: 500;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease;
}

body.is-yours {
    background: var(--paper-yours);
}

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 20;
    background: var(--green-deep);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0 0 10px 10px;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

a {
    color: var(--green);
}

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

/* The page itself */

.gl-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 0 auto;
}

.gl-banner {
    width: 100%;
    height: calc(18vw + 4.5rem);
    max-height: 9.5rem;
    background:
        linear-gradient(rgba(20, 40, 24, 0.16), rgba(20, 40, 24, 0.16)),
        url("/k3/images/unsplash/canopy.jpg") center 40% / cover no-repeat;
}

.gl-avatar {
    position: relative;
    width: 96px;
    height: 96px;
    margin-top: -48px;
    border-radius: 50%;
    border: 4px solid var(--paper);
    background: var(--green-deep);
    overflow: hidden;
    flex: none;
    transition: border-color 0.5s ease;
}

body.is-yours .gl-avatar {
    border-color: var(--paper-yours);
}

.gl-avatar-img,
.gl-avatar-initial {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.gl-avatar-img {
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.gl-avatar-initial {
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 2.5rem;
    color: #fff;
    background: var(--green-deep);
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

body.is-yours .gl-avatar-img {
    opacity: 0;
    transform: scale(1.06);
}

body.is-yours .gl-avatar-initial {
    opacity: 1;
    transform: scale(1);
}

.gl-handle {
    margin: 0.7rem 0 0;
    padding: 0 1rem;
    max-width: 100%;
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;
    overflow-wrap: anywhere;
    transition: color 0.3s ease;
}

body.is-yours .gl-handle {
    color: var(--green-deep);
}

.gl-urlchip {
    margin: 0.45rem 0 0;
    max-width: calc(100% - 2rem);
    padding: 0.22rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    overflow-wrap: anywhere;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.is-yours .gl-urlchip {
    background: rgba(31, 92, 52, 0.1);
    border-color: rgba(31, 92, 52, 0.3);
    color: var(--green-deep);
}

.gl-bio {
    margin: 0.55rem 0 1.4rem;
    padding: 0 1.5rem;
    max-width: 24rem;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

/* Claim */

.gl-claim {
    width: 100%;
    max-width: 23rem;
    padding: 0 1.1rem;
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gl-claim-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    background: var(--green-deep);
    border-radius: 999px;
    padding: 0.45rem 0.45rem 0.45rem 1.1rem;
    color: #fff;
}

.gl-claim-row:focus-within {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.gl-prefix {
    font-weight: 600;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

.gl-claim input {
    flex: 1 1 4ch;
    min-width: 0;
    width: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.45rem 0;
}

.gl-claim input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.gl-claim input:focus {
    outline: none;
}

.gl-claim button {
    flex: none;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--green-deep);
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
}

.gl-claim button:hover {
    background: #e9f2ea;
}

.gl-claim-hint {
    margin-top: 0.55rem;
    font-size: 0.8rem;
    color: var(--green-deep);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

body.is-yours .gl-claim-hint {
    opacity: 0.9;
    visibility: visible;
    transform: translateY(0);
}

/* Link rows */

.gl-rows {
    width: 100%;
    max-width: 23rem;
    padding: 0 1.1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.row-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(32, 38, 31, 0.05);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: 0.98rem;
    text-align: left;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.row-toggle:hover {
    background: rgba(31, 92, 52, 0.1);
}

.row-icon {
    position: relative;
    flex: none;
    width: 12px;
    height: 12px;
    transition: transform 0.25s ease;
}

.row-icon::before,
.row-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    margin-top: -1px;
    border-radius: 2px;
    background: var(--green-deep);
}

.row-icon::after {
    transform: rotate(90deg);
}

.gl-row.open .row-icon {
    transform: rotate(45deg);
}

.row-panel {
    display: grid;
    grid-template-rows: 1fr;
}

.js .row-panel {
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s ease;
}

.js .gl-row.open .row-panel {
    grid-template-rows: 1fr;
}

.row-panel-inner {
    overflow: hidden;
    min-height: 0;
}

.row-panel-inner p {
    margin: 0;
    padding: 0.85rem 1.3rem 0.4rem;
    color: var(--muted);
    font-size: 0.95rem;
    text-align: center;
}

.row-panel-inner .money-line {
    color: var(--green-deep);
    font-weight: 600;
    font-size: 1.05rem;
}

/* Footer */

.gl-footer {
    flex: none;
    padding: 1.5rem 1.25rem 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-align: center;
}

.gl-footer p {
    margin: 0;
}

.gl-footstamp {
    font-size: 0.78rem;
    color: var(--muted);
}

.gl-meta {
    font-size: 0.8rem;
    color: var(--muted);
}

.gl-meta a {
    color: var(--green);
    font-weight: 600;
    text-decoration: none;
    padding: 0.2rem 0.15rem;
}

.gl-meta a:hover {
    text-decoration: underline;
}

.gl-credits {
    font-size: 0.72rem;
    color: var(--muted);
    opacity: 0.8;
}

@media (min-width: 48rem) {
    .gl-banner {
        height: 10rem;
        max-height: 10rem;
    }

    .gl-handle {
        font-size: 1.45rem;
    }
}

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