/*
 * Radiant Karats styles.
 * Loaded after Bootstrap 5.3, so these rules change Bootstrap's defaults.
 * Every text colour pair meets WCAG AA contrast (4.5:1 or more).
 */

/* ---------- Colours and fonts ---------- */
:root {
    --rk-ink: #1c2430;
    --rk-ink-soft: #2e3a4b;
    --rk-gold: #d4af37;
    --rk-gold-hover: #c29b25;
    --rk-gold-text: #7d5f12;
    --rk-ivory: #faf7f2;
    --rk-champagne: #f1e8da;
    --rk-line: #e3d9c8;
    --rk-muted: #5b6370;
    --rk-danger: #b02a37;
    --rk-radius: 0.75rem;
    --rk-serif: "Cormorant Garamond", Georgia, serif;

    --bs-body-font-family: "Lato", Arial, sans-serif;
    --bs-body-color: var(--rk-ink);
    --bs-body-bg: var(--rk-ivory);
    --bs-link-color: var(--rk-gold-text);
    --bs-link-color-rgb: 125, 95, 18;
    --bs-link-hover-color: var(--rk-ink);
    --bs-link-hover-color-rgb: 28, 36, 48;
    --bs-secondary-color: var(--rk-muted);
}
/* Ring names, usernames and descriptions can hold very long words or
   links. This lets them wrap, so they never push the page sideways. */
body {
    overflow-wrap: anywhere;
}

h1,
h2,
.h1,
.h2,
.display-5,
.brand,
.ring-card .card-title {
    font-family: var(--rk-serif);
    font-weight: 600;
}

.text-secondary {
    color: var(--rk-muted) !important;
}

/* The main area only gets focus from the skip link. */
main:focus {
    outline: none;
}

h1.helperbird-editor {
    text-transform: capitalize;
}
/* ---------- Keyboard focus ---------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus,
.form-select:focus {
    outline: 3px solid var(--rk-ink);
    outline-offset: 2px;
    box-shadow: none;
}

.navbar a:focus-visible,
.navbar button:focus-visible,
.hero a:focus-visible,
.cta-section a:focus-visible,
.site-footer a:focus-visible {
    outline-color: var(--rk-gold);
}

.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2000;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #fff;
    color: var(--rk-ink);
    font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn {
    font-weight: 700;
}

.btn-gold {
    --bs-btn-color: var(--rk-ink);
    --bs-btn-bg: var(--rk-gold);
    --bs-btn-border-color: var(--rk-gold);
    --bs-btn-hover-color: var(--rk-ink);
    --bs-btn-hover-bg: var(--rk-gold-hover);
    --bs-btn-hover-border-color: var(--rk-gold-hover);
    --bs-btn-active-color: var(--rk-ink);
    --bs-btn-active-bg: var(--rk-gold-hover);
    --bs-btn-active-border-color: var(--rk-gold-hover);
}

.btn-ink {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--rk-ink);
    --bs-btn-border-color: var(--rk-ink);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--rk-ink-soft);
    --bs-btn-hover-border-color: var(--rk-ink-soft);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--rk-ink-soft);
    --bs-btn-active-border-color: var(--rk-ink-soft);
}

.btn-outline-ink {
    --bs-btn-color: var(--rk-ink);
    --bs-btn-border-color: var(--rk-ink);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--rk-ink);
    --bs-btn-hover-border-color: var(--rk-ink);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--rk-ink);
    --bs-btn-active-border-color: var(--rk-ink);
}

.btn-outline-gold {
    --bs-btn-color: var(--rk-gold-text);
    --bs-btn-border-color: var(--rk-gold-text);
    --bs-btn-hover-color: var(--rk-ink);
    --bs-btn-hover-bg: var(--rk-gold);
    --bs-btn-hover-border-color: var(--rk-gold);
    --bs-btn-active-color: var(--rk-ink);
    --bs-btn-active-bg: var(--rk-gold-hover);
    --bs-btn-active-border-color: var(--rk-gold-hover);
}

.btn-outline-danger {
    --bs-btn-color: var(--rk-danger);
    --bs-btn-border-color: var(--rk-danger);
    --bs-btn-hover-bg: var(--rk-danger);
    --bs-btn-hover-border-color: var(--rk-danger);
}

/* ---------- Navigation ---------- */
.bg-ink {
    background-color: var(--rk-ink) !important;
}

.navbar-dark {
    --bs-navbar-color: rgba(255, 255, 255, 0.85);
    --bs-navbar-hover-color: #fff;
    --bs-navbar-active-color: #fff;
}

.navbar .nav-link.active {
    text-decoration: underline;
    text-decoration-color: var(--rk-gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.45rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--rk-gold) !important;
    font-size: 1.6rem;
}

/* ---------- Home page ---------- */
.hero {
    background:
        radial-gradient(1.5px 1.5px at 8% 18%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 22% 72%, rgba(212, 175, 55, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 41% 12%, rgba(212, 175, 55, 0.7), transparent),
        radial-gradient(1px 1px at 55% 86%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 67% 24%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 93% 64%, rgba(212, 175, 55, 0.8), transparent),
        radial-gradient(circle at 78% 45%, #3a4860 0%, #2e3641 62%);
    color: #fff;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.88);
}

.hero-image {
    width: min(100%, 340px);
    height: auto;
}

.eyebrow {
    margin-bottom: 0.75rem;
    color: var(--rk-gold);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.steps {
    counter-reset: step;
    padding: 0;
    list-style: none;
}

.steps li {
    position: relative;
    padding-top: 3.25rem;
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: 0;
    left: calc(var(--bs-gutter-x) * 0.5);
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid var(--rk-gold);
    border-radius: 50%;
    background: var(--rk-champagne);
    font-weight: 700;
}

.section-white {
    border-top: 1px solid var(--rk-line);
    background: #fff;
}

/* ------ hero, collection and custom ring ----- */
.hero {
    position: relative;
    overflow: hidden;
    padding-bottom: 50px;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 5rem 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    line-height: 1.05;
}

.hero h1 em {
    color: var(--rk-gold);
}

.hero-copy {
    max-width: 34rem;
    margin: 1.25rem 0 2rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.15rem;
}

.hero-button {
    padding: 0.75rem 1.75rem;
}

.hero-note {
    position: absolute;
    right: clamp(1rem, 3vw, 3rem);
    bottom: clamp(1rem, 2vw, 2rem);
    z-index: 0;
    display: none;
    width: clamp(220px, 28vw, 420px);
    height: clamp(220px, 28vw, 420px);
    background: url("../images/hero-ring.svg") center / contain no-repeat;
    filter: drop-shadow(0 1rem 1.5rem rgba(212, 175, 55, 0.25));
    pointer-events: none;
}

.collection-section {
    padding: 4rem 0;
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem 2rem;
    margin-bottom: 2rem;
}

.section-heading h2,
.custom-ring h2 {
    margin-bottom: 0.5rem;
}

.section-intro {
    max-width: 30rem;
    margin-bottom: 0;
    color: var(--rk-muted);
}

.collection-section .eyebrow {
    color: var(--rk-gold-text);
}

.collection-section .ring-card {
    height: 100%;
    background: #fff;
}

.ring-image-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--rk-champagne);
}

.ring-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ring-label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--rk-ink);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.ring-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
}

.ring-info h2,
.ring-info h3 {
    margin-bottom: 0.25rem;
    font-family: var(--rk-serif);
    font-size: 1.5rem;
    font-weight: 600;
}

.ring-info p {
    margin-bottom: 0;
    color: var(--rk-muted);
}

.ring-price {
    color: var(--rk-gold-text);
    font-weight: 700;
    white-space: nowrap;
}

.custom-ring {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 2rem;
    border: 1px solid var(--rk-line);
    border-radius: var(--rk-radius);
    background: var(--rk-champagne);
}

.custom-ring p:last-child {
    margin-bottom: 0;
}

/* ---------- Ring cards ---------- */
.ring-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--rk-line);
    border-radius: var(--rk-radius);
}

.ring-card__image {
    aspect-ratio: 4 / 3;
    background: var(--rk-champagne);
}

.ring-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-soft {
    background: var(--rk-champagne);
    color: var(--rk-ink);
    font-weight: 700;
}

.price {
    color: var(--rk-gold-text);
    font-weight: 700;
}

/* ---------- Ring page ---------- */
.ring-photo {
    overflow: hidden;
    border-radius: var(--rk-radius);
    background: var(--rk-champagne);
}

.ring-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.ring-facts dt {
    color: var(--rk-muted);
    font-weight: 400;
}

/* ---------- Forms, panels and empty states ---------- */
.form-card,
.empty-state {
    border: 1px solid var(--rk-line);
    border-radius: var(--rk-radius);
    background: #fff;
}

.form-card {
    --bs-body-bg: #fff;
    padding: 1.5rem;
}

.empty-state {
    padding: 3rem 1.5rem;
    border-style: dashed;
    text-align: center;
}

.form-label {
    font-weight: 700;
}

.asteriskField {
    margin-left: 0.15rem;
    color: var(--rk-danger);
}

/* ---------- Error pages ---------- */
.error-code {
    margin-bottom: 0;
    color: var(--rk-gold-text);
    font-family: var(--rk-serif);
    font-size: 6rem;
    line-height: 1;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--rk-ink);
    color: rgba(255, 255, 255, 0.85);
}

.site-footer a {
    color: var(--rk-gold);
}

.site-footer a:hover {
    color: #fff;
}

/* ---------- Page links (Previous and Next) ---------- */
.pagination {
    --bs-pagination-color: var(--rk-ink);
    --bs-pagination-border-color: var(--rk-line);
    --bs-pagination-hover-color: var(--rk-ink);
    --bs-pagination-hover-bg: var(--rk-champagne);
    --bs-pagination-hover-border-color: var(--rk-line);
    --bs-pagination-focus-color: var(--rk-ink);
    --bs-pagination-focus-bg: var(--rk-champagne);
    --bs-pagination-focus-box-shadow: none;
    --bs-pagination-active-bg: var(--rk-ink);
    --bs-pagination-active-border-color: var(--rk-ink);
}

/* The same keyboard outline as the rest of the site. */
.page-link:focus-visible {
    outline: 3px solid var(--rk-ink);
    outline-offset: 2px;
}

/* ---------- The whole card links to the ring's page ---------- */
.ring-card:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(28, 36, 48, 0.12);
}

.ring-info a {
    color: inherit;
    text-decoration: none !important;
    text-transform: capitalize;
}

.ring-card:hover .ring-info a,
.ring-info a:focus-visible {
    text-decoration: underline;
}


@media (min-width: 992px) {
    .hero-note {
        display: block;
    }
}

@media (min-width: 768px) {
    .form-card {
        padding: 2rem;
    }
}

/* ---------- Christmas snow (home page hero) ----------
   Snow falls behind the hero text and ring from 1 November to 6 January,
   shown by templates/includes/christmas.html. Only CSS moves it, and the
   switch pauses it, because moving things must be easy to stop
   (WCAG 2.2.2). */
.christmas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.christmas-shapes {
    position: absolute;
}

/* Each flake sits at the top of a full-height column, which slides down
   the hero. Its position, size, speed and start come from its style. */
.snowflake {
    position: absolute;
    top: 0;
    left: var(--x);
    width: var(--s);
    height: 100%;
    animation: snow-fall var(--d) linear var(--w) infinite;
}

.snowflake::before {
    content: "";
    display: block;
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    opacity: var(--o);
    animation: snow-sway 3s ease-in-out infinite alternate;
}

.snowflake.crystal::before {
    display: none;
}

.snowflake.crystal svg {
    display: block;
    width: var(--s);
    height: var(--s);
    fill: none;
    stroke: #fff;
    stroke-width: 1.6;
    stroke-linecap: round;
    opacity: 0.85;
    animation: snow-spin 8s linear infinite;
}

/* A snowdrift in the page colour, so the hero melts into the page */
.christmas-drift {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: clamp(24px, 4vw, 48px);
    fill: var(--rk-ivory);
}

@keyframes snow-fall {
    from { transform: translateY(-20px); }
    to { transform: translateY(100%); }
}

@keyframes snow-sway {
    from { transform: translateX(-12px); }
    to { transform: translateX(12px); }
}

@keyframes snow-spin {
    to { transform: rotate(360deg); }
}

/* Keep a photo's space while it loads (drawings have a width, photos don't). */
.ring-photo img:not([width]) {
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

/* The Pause the snow switch, in the top corner of the hero */
.season-pause {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(28, 36, 48, 0.7);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.season-pause::before {
    content: "";
    width: 1.9rem;
    height: 1.05rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.3) radial-gradient(circle at 0.55rem 50%, #fff 0.35rem, transparent 0.38rem);
}

.season-pause-input:checked + .season-pause::before {
    background: var(--rk-gold) radial-gradient(circle at calc(100% - 0.55rem) 50%, var(--rk-ink) 0.35rem, transparent 0.38rem);
}

.season-pause-input:focus-visible + .season-pause {
    outline: 3px solid var(--rk-gold);
    outline-offset: 2px;
}

.season-pause-input:checked ~ .season-effect *,
.season-pause-input:checked ~ .season-effect *::before {
    animation-play-state: paused;
}

/* People who turn off motion see the snowdrift, but no falling snow */
@media (prefers-reduced-motion: reduce) {
    .snowflake,
    .season-pause,
    .season-pause-input {
        display: none;
    }
}

/* ---------- Ring picture (home page hero) ----------
   A gold ring on the right of the hero text on large screens. It's only
   decoration, so it's a CSS background: screen readers skip it, and phones,
   which don't show it, never download it. At Christmas the snow falls
   behind it. */

/* 62em is 992px at the normal text size. Because it's in em, the ring
   also hides when someone sets a bigger text size in their browser, so it
   never sits behind the words. */
@media (min-width: 62em) {
    .hero-content::after {
        content: "";
        position: absolute;
        top: 50%;
        right: calc(var(--bs-gutter-x) * 0.5);
        z-index: -1;
        width: clamp(300px, 30vw, 440px);
        height: clamp(300px, 30vw, 440px);
        background: url("../images/hero-ring.svg") center / contain no-repeat;
        transform: translateY(-50%);
        margin-right: 30px;
    }
}

/* ---------- Home page: buttons and numbers in the hero ---------- */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2.5rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.85);
}

.hero-stats strong {
    display: block;
    color: var(--rk-gold);
    font-family: var(--rk-serif);
    font-size: 2.25rem;
    font-variant-numeric: lining-nums;
    line-height: 1;
}

/* ---------- Home page: the four highlights ----------
   A white panel that sits over the bottom of the hero. */
.highlights {
    position: relative;
    z-index: 2;
    margin-top: -2.5rem;
}

.highlight-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 1.75rem;
    border: 1px solid var(--rk-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1.25rem 2.5rem rgba(28, 36, 48, 0.12);
    list-style: none;
}

.highlight {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.highlight-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--rk-champagne);
    color: var(--rk-gold-text);
}

.highlight-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.highlight p {
    margin-bottom: 0;
    color: var(--rk-muted);
}

.highlight .highlight-title {
    margin-bottom: 0.25rem;
    color: var(--rk-ink);
    font-weight: 700;
    font-size: 1rem;
}

/* ---------- Home page: browse by style ---------- */
.style-section {
    padding: 1rem 0 0;
}

.style-section .eyebrow,
.how-it-works .eyebrow {
    color: var(--rk-gold-text);
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.style-tile {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem 1rem 1.25rem;
    border: 1px solid var(--rk-line);
    border-radius: var(--rk-radius);
    background: var(--rk-champagne);
    color: var(--rk-ink);
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.style-tile:hover {
    border-color: var(--rk-gold);
    box-shadow: 0 0.75rem 1.5rem rgba(28, 36, 48, 0.12);
    color: var(--rk-ink);
    transform: translateY(-4px);
}

.style-tile img {
    width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
}

.style-name {
    font-family: var(--rk-serif);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.style-count {
    color: var(--rk-muted);
    font-size: 0.95rem;
}

/* ---------- Home page: the dark box at the bottom ---------- */
.cta-section {
    padding: 4rem 0;
}

.cta-section .custom-ring {
    margin-top: 0;
    padding: clamp(2rem, 5vw, 3.5rem);
    border: 0;
    background: radial-gradient(circle at 85% 20%, #3a4860 0%, var(--rk-ink) 70%);
    color: #fff;
}

.cta-section .custom-ring p {
    color: rgba(255, 255, 255, 0.85);
}

.cta-section .custom-ring .eyebrow {
    color: var(--rk-gold);
}

/* No sliding tiles for people who turn off motion */
@media (prefers-reduced-motion: reduce) {
    .style-tile {
        transition: none;
    }

    .style-tile:hover {
        transform: none;
    }
}


@media (max-width: 767px) {
    .collection-section {
        padding: 2rem 0;
    }
    .hero-button {
        padding: 0.5rem 0.75rem;
    }
    .hero-content {
        padding: 4rem 1.5rem 1rem;
    }
    .hero-copy {
        margin: 1.25rem 0 1rem;
        font-size: 15px;
    }
    .hero-stats {
        margin: 1.5rem 0 0;
    }
    .highlight p {
        font-size: 13px;
    }
    .cta-section {
        padding: 2rem 0;
    }
}