/* ==========================================================================
   Public pages: home, rules and sign-in. The same pirate interior as at the table.
   ========================================================================== */

/* ---------- Navigation ---------- */

.topnav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 20px;
    margin-bottom: 26px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .28));
    border: 2px solid rgba(0, 0, 0, .45);
    box-shadow: inset 0 1px 0 rgba(255, 214, 150, .16), 0 10px 30px rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
}

.topnav__brand { display: flex; margin-right: auto; text-decoration: none; }

.topnav__links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.topnav__link {
    padding: 8px 14px;
    border-radius: 9px;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s, background .2s, transform .2s;
}

.topnav__link:hover { color: var(--gold-bright); background: rgba(0, 0, 0, .3); transform: translateY(-1px); }
.topnav__link.is-active { color: var(--gold-bright); background: rgba(232, 180, 76, .14); }


/* ---------- The project logo on the front page ---------- */

.brandmark {
    position: relative;
    display: inline-flex;
    margin-bottom: 22px;
    animation: brand-in 1s cubic-bezier(.2, 1.1, .35, 1) both;
}

@keyframes brand-in {
    from { opacity: 0; transform: translateY(-14px) scale(.92); filter: blur(6px); }
}

/* slow light sweeping behind the medallion, like a lantern turning */
.brandmark__rays {
    position: absolute;
    left: -18px;
    top: 50%;
    width: 140px;
    height: 140px;
    margin-top: -70px;
    border-radius: 50%;
    background:
        conic-gradient(from 0deg,
            rgba(255, 214, 120, .32) 0deg 12deg, transparent 12deg 60deg,
            rgba(255, 214, 120, .22) 60deg 70deg, transparent 70deg 130deg,
            rgba(255, 214, 120, .3) 130deg 142deg, transparent 142deg 200deg,
            rgba(255, 214, 120, .2) 200deg 210deg, transparent 210deg 280deg,
            rgba(255, 214, 120, .28) 280deg 292deg, transparent 292deg 360deg);
    filter: blur(6px);
    animation: brand-rays 26s linear infinite;
    pointer-events: none;
}

@keyframes brand-rays { to { transform: rotate(360deg); } }

.logo--hero { position: relative; gap: 18px; }
.logo--hero .logo__mark { width: 104px; height: 104px; }

.logo--hero .logo__name {
    font-size: clamp(30px, 4.4vw, 44px);
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1;
}

.logo--hero .logo__tagline {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(232, 180, 76, .35);
    font-size: 12px;
    letter-spacing: .3em;
    color: var(--brass);
}

@media (max-width: 620px) {
    .logo--hero .logo__mark { width: 76px; height: 76px; }
    .brandmark__rays { width: 108px; height: 108px; margin-top: -54px; }
}

/* ---------- Hook ---------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 30px;
    align-items: center;
    padding: 26px 0 44px;
}

.hero__eyebrow {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--brass);
}

.hero__title {
    font-size: clamp(40px, 6.4vw, 74px);
    line-height: .96;
    color: var(--gold-bright);
    text-shadow: 0 4px 0 rgba(0, 0, 0, .5), 0 0 44px rgba(232, 180, 76, .3);
    animation: hero-in .9s cubic-bezier(.2, 1.1, .35, 1) both;
}

.hero__title span {
    display: inline-block;
    color: var(--blood-light);
    font-style: italic;
    text-shadow: 0 4px 0 rgba(0, 0, 0, .5), 0 0 40px rgba(210, 71, 47, .45);
}

@keyframes hero-in {
    from { opacity: 0; transform: translateY(24px) scale(.96); filter: blur(6px); }
}

.hero__lead {
    max-width: 54ch;
    margin: 20px 0 26px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-dim);
}

.hero__lead b { color: var(--gold-bright); }

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__cta { padding: 14px 30px; font-size: 16px; }

.hero__facts {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    margin: 32px 0 0;
    padding: 20px 0 0;
    list-style: none;
    border-top: 2px solid rgba(0, 0, 0, .4);
}

.hero__facts li { display: flex; flex-direction: column; gap: 2px; }
.hero__facts b { font-family: var(--font-display); font-size: 26px; color: var(--gold-bright); }
.hero__facts span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }

/* ---------- The thimble stage ---------- */

.hero__scene {
    position: relative;
    height: 340px;
    border-radius: 20px;
    background:
        radial-gradient(120% 90% at 50% 10%, rgba(255, 196, 96, .16), transparent 60%),
        linear-gradient(170deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .18));
    border: 2px solid rgba(0, 0, 0, .45);
    box-shadow: inset 0 1px 0 rgba(255, 214, 150, .14), 0 22px 50px rgba(0, 0, 0, .5);
    overflow: hidden;
}

.hero__lightpool {
    position: absolute;
    left: 50%;
    bottom: 44px;
    width: 82%;
    height: 170px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 196, 96, .32), transparent 70%);
    filter: blur(6px);
    animation: pool-breathe 4.5s ease-in-out infinite;
}

.hero__barrel {
    position: absolute;
    left: 50%;
    bottom: 34px;
    width: 84%;
    height: 108px;
    transform: translateX(-50%);
    border-radius: 50% / 26%;
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 3px, transparent 3px 24px),
        radial-gradient(ellipse at 50% 20%, #7c5230, #4d3119 55%, #2b1a0d 100%);
    box-shadow: 0 22px 44px rgba(0, 0, 0, .55), inset 0 6px 16px rgba(255, 200, 140, .18);
}

.hero__cups {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 74px;
    display: flex;
    justify-content: center;
    gap: clamp(6px, 3vw, 34px);
}

.hero__cup { width: clamp(84px, 12vw, 118px); filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .55)); }
.hero__cup .cup__svg { width: 100%; height: auto; }

.hero__cup:nth-child(1) { animation: cup-hover 4.4s ease-in-out infinite; }
.hero__cup:nth-child(2) { animation: cup-hover 4.4s ease-in-out -1.4s infinite; }
.hero__cup:nth-child(3) { animation: cup-hover 4.4s ease-in-out -2.8s infinite; }

@keyframes cup-hover {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(-3deg); }
}

.hero__pearl {
    position: absolute;
    left: 50%;
    bottom: 92px;
    width: 44px;
    height: 44px;
    margin-left: -22px;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 30%, #fffdf6, #ffeec0 30%, #f2c96a 58%, #b8862c 100%);
    box-shadow: 0 0 30px rgba(255, 214, 120, .9);
    animation: pearl-peek 4.4s ease-in-out infinite;
}

@keyframes pearl-peek {
    0%, 42%, 100% { opacity: 0; transform: scale(.6); }
    50%, 82% { opacity: 1; transform: scale(1); }
}

/* ---------- Bands ---------- */

.band { padding: 42px 0; }

.band__title {
    margin-bottom: 26px;
    font-size: clamp(26px, 3.4vw, 34px);
    text-align: center;
    color: var(--gold-bright);
    text-shadow: 0 3px 0 rgba(0, 0, 0, .5);
}

.band__title--left { text-align: left; margin-bottom: 18px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }

.step {
    position: relative;
    padding: 26px 22px 22px;
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .2));
    border: 2px solid rgba(0, 0, 0, .45);
    box-shadow: inset 0 1px 0 rgba(255, 214, 150, .14);
    transition: transform .25s cubic-bezier(.34, 1.4, .64, 1), box-shadow .25s;
}

.step:hover { transform: translateY(-5px); box-shadow: inset 0 1px 0 rgba(255, 214, 150, .2), 0 18px 34px rgba(0, 0, 0, .5); }

.step__num {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 22px;
    color: #38210a;
    background: radial-gradient(circle at 35% 30%, var(--gold-bright), var(--gold) 50%, var(--gold-deep));
    box-shadow: 0 0 18px rgba(232, 180, 76, .45), inset 0 -3px 6px rgba(0, 0, 0, .35);
}

.step__title { font-size: 20px; margin-bottom: 8px; color: var(--gold-bright); }
.step p, .card p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-dim); }
.step p b, .card p b { color: var(--gold-bright); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

.card {
    padding: 24px 22px;
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(0, 0, 0, .42), rgba(0, 0, 0, .18));
    border: 2px solid rgba(0, 0, 0, .4);
    border-top: 3px solid var(--brass);
    transition: transform .25s cubic-bezier(.34, 1.4, .64, 1);
}

.card:hover { transform: translateY(-4px); }
.card__icon { font-size: 30px; margin-bottom: 10px; }
.card__title { font-size: 19px; margin-bottom: 8px; color: var(--gold-bright); }

/* ---------- Referrals on the public page ---------- */

.band--referral {
    margin: 10px 0;
    padding: 34px 28px;
    border-radius: 18px;
    background:
        radial-gradient(90% 120% at 12% 0, rgba(86, 210, 155, .12), transparent 60%),
        linear-gradient(160deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .24));
    border: 2px solid rgba(0, 0, 0, .45);
    box-shadow: inset 0 1px 0 rgba(255, 214, 150, .14), 0 20px 40px rgba(0, 0, 0, .45);
}

.referral { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 28px; align-items: center; }
.referral__text p { font-size: 15px; line-height: 1.8; color: var(--text-dim); margin: 0 0 14px; }
.referral__text b { color: var(--gold-bright); }
.referral__note { font-size: 13px !important; color: var(--brass) !important; }

.referral__scheme {
    padding: 22px;
    border-radius: 14px;
    background: linear-gradient(170deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .3));
    border: 2px dashed rgba(232, 180, 76, .35);
}

.scheme__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 9px 0;
    font-size: 14px;
    color: var(--text-dim);
}

.scheme__sum { font-family: var(--font-display); font-size: 20px; color: var(--text); white-space: nowrap; }
.scheme__row--fee .scheme__sum { color: #ff9d8a; }
.scheme__row--fee .scheme__sum.gold { color: var(--emerald-light); }

.scheme__row--total {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid rgba(232, 180, 76, .3);
    color: var(--text);
}

.scheme__row--total .scheme__sum { font-size: 26px; color: var(--gold-bright); }
.scheme__arrow { text-align: center; color: var(--brass); font-size: 18px; }

/* ---------- Call to action ---------- */

.callout {
    padding: 34px 26px;
    margin: 24px 0 10px;
    text-align: center;
}

.callout__title { font-size: clamp(24px, 3.2vw, 32px); color: var(--gold-bright); margin-bottom: 10px; }
.callout__text { color: var(--text-dim); margin: 0 0 20px; font-size: 15px; }

/* ---------- The rules document ---------- */

.pagehead { padding: 20px 0 26px; text-align: center; }

.pagehead__title {
    font-size: clamp(34px, 5vw, 52px);
    color: var(--gold-bright);
    text-shadow: 0 4px 0 rgba(0, 0, 0, .5);
}

.pagehead__lead { max-width: 68ch; margin: 16px auto 0; color: var(--text-dim); line-height: 1.8; font-size: 15px; }

.toc {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 22px;
}

.toc a {
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(232, 180, 76, .25);
    color: var(--text-dim);
    font-size: 13px;
    text-decoration: none;
    transition: color .2s, background .2s, transform .2s;
}

.toc a:hover { color: var(--gold-bright); background: rgba(232, 180, 76, .16); transform: translateY(-2px); }

.doc { padding: 30px 30px 26px; margin-bottom: 18px; scroll-margin-top: 20px; }

.doc__title {
    font-size: 27px;
    margin-bottom: 16px;
    color: var(--gold-bright);
    text-shadow: 0 2px 0 rgba(0, 0, 0, .5);
}

.doc__sub { font-size: 19px; margin: 22px 0 8px; color: var(--brass); }
.doc p { font-size: 15px; line-height: 1.8; color: var(--text-dim); margin: 0 0 14px; }
.doc b { color: var(--gold-bright); }

.doc code {
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(0, 0, 0, .45);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: var(--gold-bright);
}

.doc__steps { margin: 0 0 16px; padding-left: 22px; }
.doc__steps li { margin-bottom: 12px; font-size: 15px; line-height: 1.75; color: var(--text-dim); }
.doc__steps b { color: var(--gold-bright); }

.doc__list { margin: 0 0 14px; padding-left: 22px; }
.doc__list li { margin-bottom: 9px; font-size: 15px; line-height: 1.7; color: var(--text-dim); }

.doc__note,
.doc__warn {
    padding: 14px 18px;
    border-radius: 10px;
    border-left: 4px solid var(--brass);
    background: rgba(0, 0, 0, .32);
    font-size: 14px !important;
}

.doc__warn { border-left-color: var(--blood-light); }

.calc {
    margin: 6px 0 18px;
    padding: 18px 20px;
    border-radius: 12px;
    background: linear-gradient(170deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .26));
    border: 2px dashed rgba(232, 180, 76, .3);
}

.calc__row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 14px; color: var(--text-dim); }
.calc__row b { font-family: var(--font-display); font-size: 18px; color: var(--text); }
.calc__row--fee b { color: #ff9d8a; }

.calc__row--total {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(232, 180, 76, .3);
}

.calc__row--total b { font-size: 24px; color: var(--gold-bright); }

.table-doc { width: 100%; border-collapse: collapse; font-size: 15px; }
.table-doc td { padding: 11px 12px; border-bottom: 1px solid rgba(0, 0, 0, .35); color: var(--text-dim); }
.table-doc td:last-child { text-align: right; font-family: var(--font-display); font-size: 17px; color: var(--gold-bright); white-space: nowrap; }
.table-doc tr:last-child td { border-bottom: 0; }

.faq {
    margin-bottom: 10px;
    padding: 14px 18px;
    border-radius: 10px;
    background: rgba(0, 0, 0, .3);
    border: 1px solid rgba(0, 0, 0, .4);
}

.faq summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--gold-bright);
    list-style: none;
    position: relative;
    padding-right: 26px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: -2px;
    font-size: 20px;
    color: var(--brass);
    transition: transform .25s;
}

.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 12px 0 0; font-size: 14px; }

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

.pagefoot { padding: 30px 10px 20px; text-align: center; }
.pagefoot__row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.pagefoot__row a { color: var(--brass); font-size: 14px; text-decoration: none; }
.pagefoot__row a:hover { color: var(--gold-bright); }
.pagefoot__note { margin: 0; font-size: 12px; color: var(--text-dim); }

/* ---------- Sign-in page ---------- */

.page-login .gate { padding: 2vh 0 3vh; }
.login__hint { font-size: 13px; margin-top: 22px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .hero__scene { height: 260px; order: -1; }
    .referral { grid-template-columns: 1fr; }
}

/* ---------- Language picker ---------- */

.lang {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(232, 180, 76, .25);
}

.lang__item {
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--text-dim);
    text-decoration: none;
    transition: color .2s, background .2s;
}

.lang__item:hover { color: var(--gold-bright); }

.lang__item.is-active {
    color: #38210a;
    background: linear-gradient(180deg, var(--gold-bright), #c08f2e);
}

/* ---------- Language picker ---------- */

.lang {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(232, 180, 76, .25);
}

.lang__item {
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--text-dim);
    text-decoration: none;
    transition: color .2s, background .2s;
}

.lang__item:hover { color: var(--gold-bright); }

.lang__item.is-active {
    color: #38210a;
    background: linear-gradient(180deg, var(--gold-bright), #c08f2e);
}

.pagefoot__copy {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-dim);
}

.pagefoot__copy a { color: inherit; text-decoration: underline; }
.pagefoot__copy a:hover { color: var(--gold); }
.pagefoot__sep { opacity: .5; margin: 0 4px; }

/* ---------- Error pages ---------- */

.page-error .shell { display: flex; flex-direction: column; min-height: 100vh; }

.errorpage {
    /* the auto margins centre the panel, but they also make it size to its
       own content; this pins the width to the container so the card does not
       change shape with the length of the message */
    width: 100%;
    max-width: 600px;
    margin: auto;
    padding: 40px 34px 34px;
    text-align: center;
}

.errorpage__code {
    font-family: var(--font-display);
    font-size: 78px;
    line-height: 1;
    letter-spacing: .02em;
    color: var(--gold-bright);
    text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
}

.errorpage__title {
    margin: 14px 0 0;
    font-family: var(--font-display);
    font-size: 25px;
    line-height: 1.25;
    color: var(--text);
}

.errorpage__text {
    margin: 12px auto 0;
    max-width: 44ch;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dim);
}

.errorpage__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

.errorpage__help {
    margin: 26px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 214, 150, .14);
    font-size: 12px;
    color: var(--text-dim);
}

.errorpage__help a { color: var(--gold); text-decoration: underline; }
.errorpage__help a:hover { color: var(--gold-bright); }

@media (max-width: 520px) {
    .errorpage { padding: 34px 20px 26px; }
    .errorpage__code { font-size: 60px; }
    .errorpage__title { font-size: 20px; }
    .errorpage__actions .btn { width: 100%; }
}
