:root {
    --bulma-primary-h: 194deg;
    --bulma-primary-s: 20%;
    --bulma-primary-l: 49%;

    /* Brown
    --bulma-link-h: 0deg;
    --bulma-link-s: 21%;
    --bulma-link-l: 25%;
     */

    --bulma-link-h: 0deg;
    --bulma-link-s: 0%;
    --bulma-link-l: 90%;

    --bulma-family-primary: "Instrument Sans", sans-serif;
    --bulma-family-secondary: "Instrument Sans", sans-serif;
    --bulma-body-family: "Instrument Sans", sans-serif;

    /* Body type target: ~16px → ~18px across small → large phones */
    --min-root: 100%;    /* ~16px baseline (respects user/browser settings) */
    --max-root: 112.5%;  /* ~18px upper bound */

    /* Comfortable reading settings */
    --body-line-height: 1.5;
}

html {
    font-size: clamp(var(--min-root), 96% + 0.8vw, var(--max-root)); /* ~16px -> 18px */
    -webkit-text-size-adjust: 100%;
}

body {
    line-height: var(--body-line-height);
    text-rendering: optimizeLegibility;
    letter-spacing: normal;
    font-weight: 400;
}

/* Apply these rules to all links that are not of class "button" */
a:not(.button) {
    text-decoration: underline;
}

/* Remove underline on hover for all links that are not of class "button" */
a:not(.button):hover {
    text-decoration: none;
}

/* Ensure link color remains the same for visited and active states for all links that are not of class "button" */
a:not(.button):visited, a:not(.button):active {
    color: inherit;
}

/* Override the rules for any link that is a child of the <header><nav> structure */
.navbar-brand a, #novelcraftedNavbar a {
    text-decoration: none;
}

header nav a:hover {
    text-decoration: none; /* This line is redundant but can be included for clarity */
}

header nav a:visited, header nav a:active {
    color: inherit;
}

.aboreto-regular {
    font-family: "Aboreto", system-ui;
    font-style: normal;
    font-weight: 400;
}

/* Explicit stacking order */
#main-hero { z-index: 0; }
.hero-container .hero-layer.back { z-index: 1; }
.hero-container .floaty { z-index: 2; }
.hero-container .hero-layer.front { z-index: 3; }
#heroText { z-index: 4; }

#main-hero {
    position: relative;
    margin-bottom: clamp(5px, 0.5vh, 10px);
}

/* Container sets the visual height so following content never overlaps */
.hero-container {
    position: relative;
    /* At least 700px (hero background min-height), or 85vh if bigger.
        Don't let it shrink below this. Start clipping from here to preserve the image appearance */
    min-height: max(85vh, 700px); /* never shorter than the hero height */
    height: 100%;
    width: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.hero-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

img.hero-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;              /* preserve aspect, fill, crop as needed */
    object-position: left top;      /* framing */
    display: block;                 /* remove inline whitespace gaps */
}

.hero-container .floaty {
    position: absolute;
    object-fit: none;
    object-position: center center;
    inset: auto;
    opacity: 0;

    /* Radii (set ry slightly smaller than rx for a subtle ellipse) */
    --rx: 600px;            /* horizontal radius  */
    --ry: 220px;     /* vertical radius (make < rx for a slight ellipse) */

    /* Animation visuals */
    --duration: 4s;         /* loop time */

    --start-pct: 75%;
    --end-pct: 60%;
    /* For full lap, use 0% -> 100% in the keyframes */

    will-change: offset-distance, opacity, transform;

    /* Elliptical path centered at (--cx, --cy) */
    offset-path: ellipse(var(--rx) var(--ry) at var(--cx) var(--cy));

    /* Start/end along that path */
    offset-distance: var(--start-pct);

    /* Keep comet's own rotation independent of tangent */
    offset-rotate: 0deg;
    transform: rotate(var(--tilt));

    /* Same cadence as your original */
    animation: comet-ellipse-arc  var(--duration) linear infinite;

    filter: drop-shadow(0 0 6px rgba(255,255,255,.9))
    drop-shadow(0 0 14px rgba(255,255,255,.6));
}

/* Homepage floaty animations */
/* Partial circular arc (counter clockwise), auto-restarts with fade/reset */
.homepage .hero-container .floaty {
    /* Center of the ellipse  */
    --cx: 550px;
    --cy: 300px; /* 230-290 */

    /* Radii (set ry slightly smaller than rx for a subtle ellipse) */
    --rx: 600px;            /* horizontal radius  */
    --ry: 300px;     /* vertical radius (make < rx for a slight ellipse) */

    --tilt: -12deg;         /* sprite tilt */
}

/* Browse floaty animations */
.browse .hero-container .floaty {
    /* Center of the ellipse  */
    --cx: 800px;
    --cy: 675px;
    --start-pct: 80%;
    --ry: 600px;
    --tilt: -6deg;         /* sprite tilt */
}

/* Fade-in → run arc → fade-out → jump back invisible (like your original) */
@keyframes comet-ellipse-arc {
    0%   { opacity: 0; offset-distance: var(--start-pct); }
    4%   { opacity: 1; offset-distance: var(--start-pct); }
    88%  { opacity: 1; offset-distance: var(--end-pct); }
    96%  { opacity: 0; offset-distance: var(--end-pct); }
    100% { opacity: 0; offset-distance: var(--end-pct); }
}


/* Hero Text styles -------------------------- */
#heroText {
    position: absolute;
    right: 0;
    white-space: nowrap;
    max-width: 100%;
}

#heroText > span {
    float: right;
    clear: right;
    margin: 5px 0;
    padding: 5px 20px;
}

/* Homepage specific Hero Text styles --- */
.homepage #heroText {
    font-size: 2.5em;
    right: 15vw;
    top: 70px;
}

/* Browse page specific Hero Text styles --- */
.browse #heroText {
    font-size: 2.5em;
    right: 10vw;
    top: 60px;
}

@media screen and (max-width: 768px) {
    /* Homepage specific Hero Text styles --- */
    .homepage #heroText {
        top: 90px;
        right: 5vw;
        font-size: 1.8em;
    }
    /* Browse page specific Hero Text styles --- */
    .browse #heroText {
        font-size: 1.8em;
    }
}

@media screen and (max-width: 420px) {
    html {
        font-size: clamp(106.25%, 100% + 1vw, var(--max-root)); /* ~17px -> 18px */
    }
    /* Homepage specific --- */
    .homepage #heroText {
        right: 3vw;
        font-size: 1.3em;
    }
    /* Browse page specific --- */
    .browse #heroText {
        font-size: 1.5em;
    }
}

/* End Hero Text styles -------------------------- */








.text-container {
    max-width: 64ch;
    margin-left: auto;
    margin-right: auto;
}

.text-container a:link.disabled,
.text-container a.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

#cy {
    touch-action: none;
    -ms-touch-action: none;
}

/* Spam styles */
#website-wrapper {
    position:absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#how-you-heard-wrapper {
    position:absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.checkout-container {
}

#paypal-button-container {
    position: relative;
    z-index: 2;
}