/* Lava Lamp - A Free Design by Bryant Smith (bryantsmith.com)
   A groovy page built with nothing but HTML and CSS: a tapered glass
   vessel, a warm glowing base, and soft wax blobs that drift behind
   the words. Every colour and shape on the page is set below.

   Sections:
     1. Palette and page base
     2. The room (backdrop)
     3. The lamp shell (cap, neck, base)
     4. The glass vessel
     5. The wax blobs (keyframe animation)
     6. The content and type
     7. Sidebar panel
     8. Footer
     9. Small screens
    10. Reduced motion
    11. Print                                                        */


/* ---- 1. PALETTE AND PAGE BASE ---------------------------------- */

:root {
    --room:        #150d23;   /* the dark room behind the lamp   */
    --glass:       #2a1738;   /* the glass body                  */
    --glass-deep:  #1b0e2a;   /* the glass near the bottom       */
    --wax-orange:  #ff7a18;
    --wax-amber:   #ffb02e;
    --wax-pink:    #ff3d9a;
    --wax-coral:   #ff5a3c;
    --brass:       #c07a34;
    --brass-dark:  #46230f;
    --cream:       #f7eeda;   /* body text                       */
    --cream-dim:   #d8cbb6;   /* quieter text                    */
    --link:        #ffce6a;   /* links and small accents         */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--room);
    color: var(--cream);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 17px;
    line-height: 1.75;
    padding: 48px 18px 0 18px;
    text-align: center;
}


/* ---- 2. THE ROOM ----------------------------------------------- */

#room {
    max-width: 880px;
    margin: 0 auto;
    padding-bottom: 72px;
    position: relative;
}

/* a warm pool of light spilling out across the floor */
#room::before {
    background: radial-gradient(ellipse at 50% 100%,
                rgba(255, 122, 24, 0.30),
                rgba(255, 61, 154, 0.10) 45%,
                transparent 72%);
    bottom: 30px;
    content: "";
    height: 70%;
    left: 50%;
    pointer-events: none;
    position: absolute;
    transform: translateX(-50%);
    width: 140%;
    z-index: 0;
}


/* ---- 3. THE LAMP SHELL ----------------------------------------- */

#lamp {
    position: relative;
    text-align: left;
    z-index: 1;
}

/* the little brass knob on the very top */
#cap {
    background: linear-gradient(180deg, #e0b273, #8a5222 60%, #5a3216);
    border-radius: 10px 10px 4px 4px;
    box-shadow: inset 0 2px 3px rgba(255, 240, 200, 0.6),
                inset 0 -3px 6px rgba(0, 0, 0, 0.4);
    height: 26px;
    margin: 0 auto;
    position: relative;
    width: 54px;
    z-index: 5;
}

#cap::before {
    background: linear-gradient(180deg, #d9a86a, #7a431c);
    border-radius: 50% 50% 30% 30%;
    content: "";
    height: 10px;
    left: 50%;
    position: absolute;
    top: -7px;
    transform: translateX(-50%);
    width: 22px;
}

/* the tapered neck: a narrow cone that joins the cap to the glass */
#tip {
    background: linear-gradient(180deg, #6d4a7d, #3d2550 38%, var(--glass) 100%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    height: 240px;
    margin: -2px auto -2px auto;
    position: relative;
    width: 34%;
    z-index: 4;
}

/* a soft highlight down the left of the neck, like curved glass */
#tip::after {
    background: linear-gradient(rgba(255, 255, 255, 0.30), transparent);
    border-radius: 50%;
    content: "";
    filter: blur(4px);
    height: 60%;
    left: 24%;
    position: absolute;
    top: 12%;
    width: 8px;
}

/* the glowing brass base the glass rests in */
#base {
    background:
        linear-gradient(180deg,
            rgba(255, 214, 140, 0.85), rgba(255, 170, 70, 0.25) 9%, transparent 18%),
        linear-gradient(180deg, var(--brass), #6e3a18 48%, #33180a);
    border-radius: 10px 10px 26px 26px;
    box-shadow: 0 30px 60px rgba(255, 122, 24, 0.26),
                inset 0 2px 0 rgba(255, 220, 150, 0.5);
    height: 170px;
    margin: -46px auto 0 auto;
    position: relative;
    width: 74%;
    z-index: 4;
}

/* the row of cooling vents near the foot of the base */
#base::before {
    background: repeating-linear-gradient(90deg,
                rgba(0, 0, 0, 0.4) 0 12px, transparent 12px 40px);
    border-radius: 7px;
    bottom: 22px;
    content: "";
    height: 22px;
    left: 16%;
    opacity: 0.75;
    position: absolute;
    right: 16%;
}

/* the halo of light the base throws onto the floor */
#base::after {
    background: radial-gradient(ellipse at 50% 0%,
                rgba(255, 140, 40, 0.45), transparent 70%);
    bottom: -50px;
    content: "";
    height: 140px;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 190%;
    z-index: -1;
}


/* ---- 4. THE GLASS VESSEL --------------------------------------- */

#glass {
    /* the warm light at the bottom, over a cool plum glass body */
    background:
        radial-gradient(ellipse 90% 55% at 50% 104%,
            rgba(255, 140, 40, 0.55),
            rgba(255, 61, 154, 0.18) 45%,
            transparent 72%),
        linear-gradient(180deg, var(--glass) 0%, #241333 45%, var(--glass-deep) 100%);
    border-radius: 33% 33% 28% 28% / 6% 6% 4% 4%;
    box-shadow: inset 0 0 0 1px rgba(255, 214, 150, 0.14),
                inset 0 18px 40px rgba(0, 0, 0, 0.28);
    margin-top: -2px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* a soft sheen down the left of the glass, like a window reflection */
#glass::after {
    background: linear-gradient(180deg,
                rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 35%, transparent 72%);
    border-radius: 50%;
    content: "";
    filter: blur(6px);
    height: 60%;
    left: 3%;
    pointer-events: none;
    position: absolute;
    top: 14%;
    width: 22px;
    z-index: 2;
}

/* the blobs, the glow and the veil all stack on this layer */
#blobs {
    bottom: 0;
    left: 0;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
}

/* the warm wash rising from the base, sat just under the veil */
#glow {
    background: radial-gradient(ellipse at 50% 100%,
                rgba(255, 170, 60, 0.55),
                rgba(255, 80, 20, 0.15) 45%,
                transparent 72%);
    bottom: 0;
    height: 46%;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    z-index: 1;
}

/* a gentle dark wash so cream text keeps its contrast over the wax */
#veil {
    background: linear-gradient(180deg,
                rgba(20, 12, 34, 0.55) 0%,
                rgba(20, 12, 34, 0.42) 35%,
                rgba(20, 12, 34, 0.46) 70%,
                rgba(20, 12, 34, 0.58) 100%);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}


/* ---- 5. THE WAX BLOBS ------------------------------------------ */

.blob {
    border-radius: 44% 56% 58% 42% / 55% 44% 56% 45%;
    display: block;
    filter: blur(18px);
    mix-blend-mode: screen;      /* touching blobs glow together */
    opacity: 0.9;
    position: absolute;
    will-change: top, transform;
}

/* shared motion: a slow rise and fall, plus an organic shape change */
@keyframes rise {
    0%   { top: 82%; }
    100% { top: 4%; }
}

@keyframes morph {
    0%   { border-radius: 44% 56% 58% 42% / 55% 44% 56% 45%; transform: scale(1) rotate(0deg); }
    50%  { border-radius: 60% 40% 42% 58% / 42% 60% 40% 58%; transform: scale(1.12) rotate(6deg); }
    100% { border-radius: 52% 48% 60% 40% / 58% 42% 55% 45%; transform: scale(0.92) rotate(-5deg); }
}

/* each blob gets its own size, colour, home and timing */

.blob-a {
    background: radial-gradient(circle at 38% 32%, #ffd77a, var(--wax-orange) 55%, #e05a10);
    height: 230px;
    left: 2%;
    top: 66%;
    width: 260px;
    animation: rise 17s ease-in-out -1s infinite alternate,
               morph 12s ease-in-out infinite alternate;
}

.blob-b {
    background: radial-gradient(circle at 40% 35%, #ff9ad0, var(--wax-pink) 55%, #b8156a);
    height: 210px;
    left: 64%;
    top: 72%;
    width: 210px;
    animation: rise 20s ease-in-out -4s infinite alternate,
               morph 14s ease-in-out -2s infinite alternate;
}

.blob-c {
    background: radial-gradient(circle at 35% 30%, #ffb27a, var(--wax-coral) 55%, #c2300f);
    height: 170px;
    left: 20%;
    top: 80%;
    width: 180px;
    animation: rise 13s ease-in-out -2s infinite alternate,
               morph 10s ease-in-out infinite alternate;
}

.blob-d {
    background: radial-gradient(circle at 42% 34%, #ffe49a, var(--wax-amber) 58%, #e08a10);
    height: 200px;
    left: 46%;
    top: 58%;
    width: 200px;
    animation: rise 18s ease-in-out -7s infinite alternate,
               morph 16s ease-in-out -1s infinite alternate;
}

.blob-e {
    background: radial-gradient(circle at 40% 32%, #ffa0e0, #ff5cb8 55%, #a5156a);
    height: 150px;
    left: 76%;
    top: 34%;
    width: 160px;
    animation: rise 15s ease-in-out -5s infinite alternate,
               morph 11s ease-in-out -3s infinite alternate;
}

.blob-f {
    background: radial-gradient(circle at 40% 35%, #ffd27a, #ff8a1f 60%, #d0450a);
    height: 110px;
    left: 40%;
    top: 86%;
    width: 110px;
    animation: rise 9s ease-in-out -1s infinite alternate,
               morph 8s ease-in-out infinite alternate;
}


/* ---- 6. THE CONTENT AND TYPE ----------------------------------- */

#content {
    padding: 104px 64px 72px 64px;
    position: relative;
    z-index: 3;
}

#content p {
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

#content a,
#content a:visited {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

#content a:hover,
#content a:focus {
    color: #fff3cf;
}

.kicker {
    color: var(--wax-amber);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 4px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

#masthead h1 {
    color: #fff6e6;
    font-size: 72px;
    font-weight: normal;
    letter-spacing: -1px;
    line-height: 1;
    text-shadow: 0 2px 18px rgba(255, 122, 24, 0.45),
                 0 1px 2px rgba(0, 0, 0, 0.55);
}

.tagline {
    color: var(--cream-dim);
    font-style: italic;
    margin-top: 12px;
}

#menu {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 1.5px;
    margin: 28px 0 34px 0;
    text-transform: uppercase;
}

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: var(--cream-dim);
    margin-right: 20px;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#menu a:hover,
#menu a:focus {
    border-bottom-color: var(--wax-amber);
    color: var(--wax-amber);
}

.lead {
    color: #fbf5e8;
    font-size: 21px;
    line-height: 1.65;
}

h2 {
    color: #fff6e6;
    font-size: 27px;
    font-weight: normal;
    margin: 40px 0 16px 0;
}

h2::before {
    background: linear-gradient(135deg, var(--wax-amber), var(--wax-pink));
    border-radius: 50%;
    content: "";
    display: inline-block;
    height: 12px;
    margin-right: 12px;
    vertical-align: middle;
    width: 12px;
}

code {
    background: rgba(255, 206, 106, 0.12);
    border-radius: 4px;
    color: var(--link);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.92em;
    padding: 1px 5px;
}

blockquote {
    border-left: 3px solid var(--wax-orange);
    color: #fbf0da;
    font-size: 23px;
    font-style: italic;
    line-height: 1.5;
    margin: 40px 0;
    padding: 4px 0 4px 26px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

blockquote p {
    margin: 0;
}


/* ---- 7. SIDEBAR PANEL ------------------------------------------ */

.columns {
    display: flex;
    flex-wrap: wrap;
    gap: 36px;
    margin-top: 8px;
}

.col-main {
    flex: 1 1 380px;
    min-width: 0;
}

.col-side {
    flex: 1 1 220px;
    min-width: 0;
}

.panel {
    background: rgba(255, 206, 106, 0.10);
    border: 1px solid rgba(255, 206, 106, 0.35);
    border-radius: 18px;
    margin-top: 40px;
    padding: 24px 26px 26px 26px;
}

.panel h3 {
    color: #fff6e6;
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 10px;
}

.panel p {
    color: var(--cream-dim);
    font-size: 15px;
}

.ticks {
    list-style: none;
    margin-top: 12px;
}

.ticks li {
    border-top: 1px solid rgba(255, 206, 106, 0.22);
    color: #f3ead7;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    padding: 9px 0 9px 24px;
    position: relative;
}

.ticks li::before {
    background: var(--wax-orange);
    border-radius: 50%;
    content: "";
    height: 8px;
    left: 2px;
    position: absolute;
    top: 15px;
    width: 8px;
}


/* ---- 8. FOOTER ------------------------------------------------- */

#footer {
    color: #8d7fa0;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 22px 0 44px 0;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    color: #bda3d8;
    text-decoration: none;
}

#footer a:hover,
#footer a:focus {
    color: var(--link);
}


/* ---- 9. SMALL SCREENS ------------------------------------------ */

@media (max-width: 640px) {
    body {
        font-size: 16px;
        padding: 24px 12px 0 12px;
    }

    #glass {
        border-radius: 28% 28% 12% 12% / 4% 4% 3% 3%;
    }

    #tip {
        height: 150px;
        width: 44%;
    }

    #base {
        height: 120px;
        width: 88%;
    }

    #content {
        padding: 72px 26px 56px 26px;
    }

    #masthead h1 {
        font-size: 46px;
    }

    #menu a {
        display: inline-block;
        margin-bottom: 8px;
    }

    .lead {
        font-size: 18px;
    }

    .columns {
        flex-direction: column;
        gap: 24px;
    }

    .panel {
        margin-top: 8px;
    }

    blockquote {
        font-size: 19px;
    }
}


/* ---- 10. REDUCED MOTION: hold the wax still -------------------- */

@media (prefers-reduced-motion: reduce) {
    .blob {
        animation: none !important;
    }
}


/* ---- 11. PRINT: drop the lamp and keep the words -------------- */

@media print {
    body {
        background: #ffffff;
        color: #222222;
        padding: 0;
    }

    #room,
    #room::before,
    #blobs,
    #glow,
    #veil,
    #tip,
    #cap,
    #base,
    #menu {
        display: none;
    }

    #glass {
        background: none;
        border-radius: 0;
        box-shadow: none;
    }

    #content {
        padding: 0;
    }

    #content p,
    #masthead h1,
    blockquote {
        text-shadow: none;
    }

    #masthead h1,
    h2,
    .panel h3 {
        color: #111111;
    }

    #content a {
        color: #111111;
    }

    #footer {
        color: #555555;
    }

    #footer a {
        color: #111111;
    }
}
