/* Stained Glass - A Free Design by Bryant Smith (bryantsmith.com)
   The page is a window: a grid of coloured panes divided by thick black
   lead lines. Scroll through the section headings below to find anything
   you want to change. */


/* ---- COLOUR SYSTEM: every colour on the page lives here ---- */

:root {
    --lead:        #17140f;   /* the black came lines between panes      */
    --frame:       #2c261d;   /* the stone frame around the window       */
    --cream:       #f6eeda;   /* light text on the dark glass            */
    --ink:         #221d17;   /* dark text on the clear (pale) glass     */
    --gold:        #ffd98a;   /* links and highlights on dark glass      */
    --palegold:    #f3dca0;   /* tagline on the dark glass               */
    --rubylink:    #8c1c34;   /* links on the clear glass                */

    /* the jewel colours used by the glass gradients */
    --sapphire:    #3a6bb8;
    --sapphire-dk: #0c1b3d;
    --ruby:        #c22a46;
    --ruby-dk:     #5d1020;
    --amber:       #f4c15a;
    --amber-dk:    #8a4c0c;
    --emerald:     #2f9366;
    --emerald-dk:  #0d3a27;
    --violet:      #7a49b0;
    --violet-dk:   #2c1547;

    /* the pale "clear glass" used behind all body text */
    --glass-top:   #f8f0da;
    --glass-deep:  #e6d3aa;
}


/* ---- RESET + BODY: the dark wall the window hangs on ---- */

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

body {
    padding: 56px 16px;
    color: var(--cream);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.7;
    /* faint stone courses on a dim, vignetted wall */
    background:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px) 0 0 / 100% 72px,
        radial-gradient(ellipse at 50% -20%, #37353f, #19181c 62%),
        #131217;
}


/* ---- WINDOW: the grid itself, plus its heavy timber frame ---- */

#window {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 7px;
    max-width: 900px;
    margin: 0 auto;
    padding: 9px;
    background: var(--lead);          /* the gaps show through as lead */
    border: 14px solid var(--frame);
    box-shadow:
        0 0 0 3px #0c0a07,
        0 10px 24px rgba(0, 0, 0, 0.5),
        0 34px 80px rgba(0, 0, 0, 0.65);
}


/* ---- PANE BASE: every pane is a box of glass ----
   A shared recipe gives each pane its depth: a diagonal gleam, a soft
   highlight near the top-left, and a colour gradient behind both. */

.pane {
    padding: 26px 28px;
    color: var(--ink);
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0) 62%),
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 60%),
        linear-gradient(155deg, var(--glass-top), var(--glass-deep));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        inset 0 0 46px rgba(0, 0, 0, 0.30);
}

.pane p {
    margin-bottom: 16px;
}

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


/* ---- TRACERY: the small panes along the very top ---- */

.tracery {
    grid-column: span 1;
    min-height: 74px;
    padding: 0;
}

.tracery--sapphire { --glass-top: #3a6bb8; --glass-deep: #122a55; }
.tracery--ruby     { --glass-top: #c22a46; --glass-deep: #5d1020; }
.tracery--amber    { --glass-top: #f4c15a; --glass-deep: #93530e; }
.tracery--emerald  { --glass-top: #2f9366; --glass-deep: #0d3a27; }
.tracery--violet   { --glass-top: #7a49b0; --glass-deep: #31184f; }


/* ---- MASTHEAD: the tall upper light with the title and menu ---- */

.masthead {
    grid-column: span 6;
    padding: 46px 40px 36px;
    text-align: center;
    color: var(--cream);
    /* two thin vertical leads split this pane into three tall lights */
    background:
        linear-gradient(90deg,
            transparent 0 33.1%,
            var(--lead) 33.1% 33.5%,
            transparent 33.5% 66.4%,
            var(--lead) 66.4% 66.8%,
            transparent 66.8%),
        linear-gradient(120deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0) 62%),
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 60%),
        linear-gradient(155deg, #3564ad, #0c1b3d);
}

.masthead h1 {
    font-size: 56px;
    font-weight: normal;
    letter-spacing: 1px;
    line-height: 1.05;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(0, 0, 0, 0.6);
}

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

.tagline::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin: 16px auto 0;
    background: linear-gradient(90deg, transparent, var(--amber), transparent);
}


/* ---- MENU: the row of navigation links ---- */

#menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 22px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#menu a,
#menu a:visited {
    color: #d9e4f5;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

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


/* ---- LIGHTSTRIP: narrow vertical lights beside the rose ---- */

.lightstrip {
    grid-column: span 1;
    padding: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0) 60%),
        repeating-linear-gradient(0deg, transparent 0 76px, var(--lead) 76px 84px),
        linear-gradient(160deg, var(--strip-top), var(--strip-deep));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        inset 0 0 30px rgba(0, 0, 0, 0.35);
}

.lightstrip--ruby  { --strip-top: #b52844; --strip-deep: #5d1020; }
.lightstrip--amber { --strip-top: #f2b953; --strip-deep: #8a4c0c; }


/* ---- ROSEROW + ROSE: the circular window at the centre ---- */

.roserow {
    grid-column: span 4;
    --glass-top: #1b2130;
    --glass-deep: #080b12;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px;
}

.rose {
    width: min(76%, 330px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    box-shadow:
        0 0 0 6px var(--lead),
        0 0 34px 4px rgba(255, 214, 140, 0.14),
        inset 0 0 46px rgba(0, 0, 0, 0.6);
    /* layers, top to bottom: gleam, radial lead spokes, two ring leads,
       the golden boss in the middle, then the eight jewel wedges */
    background:
        radial-gradient(circle at 34% 27%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 42%),
        repeating-conic-gradient(from 0deg, var(--lead) 0 1deg, transparent 1deg 30deg),
        radial-gradient(circle,
            transparent 0 19%,
            var(--lead) 19% 21%,
            transparent 21% 46%,
            var(--lead) 46% 48%,
            transparent 48% 72%,
            var(--lead) 72% 74%,
            transparent 74%),
        radial-gradient(circle, #f4c15a 0 14%, #7a3f0c 14% 18.5%, transparent 18.5%),
        conic-gradient(from 0deg,
            #2f5aa0 0 45deg,
            #b52844 45deg 90deg,
            #e8a33a 90deg 135deg,
            #2f9366 135deg 180deg,
            #7143a8 180deg 225deg,
            #3a6bb8 225deg 270deg,
            #c22a46 270deg 315deg,
            #f4c15a 315deg 360deg);
}


/* ---- HEADINGS + LINKS inside the clear-glass panes ---- */

h2 {
    color: var(--rubylink);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

h2::after {
    content: "";
    display: block;
    width: 46px;
    height: 3px;
    margin-top: 10px;
    background: var(--lead);
}

.pane a,
.pane a:visited {
    color: var(--rubylink);
    border-bottom: 1px solid rgba(140, 28, 52, 0.4);
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.pane a:hover,
.pane a:focus {
    color: var(--ruby-dk);
    border-bottom-color: var(--ruby-dk);
}

code {
    padding: 1px 5px;
    background: rgba(23, 20, 15, 0.08);
    border: 1px solid rgba(23, 20, 15, 0.15);
    border-radius: 3px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
}


/* ---- ABOUT: a wide pane split into two columns by a lead rule ---- */

.about {
    grid-column: span 6;
    column-count: 2;
    column-gap: 34px;
    column-rule: 3px solid var(--lead);
}


/* ---- QUOTE: a violet pane with light text ---- */

.quote {
    grid-column: span 2;
    --glass-top: #7143a8;
    --glass-deep: #2c1547;
    display: flex;
    align-items: center;
    color: #f7efe0;
}

.quote p {
    font-size: 19px;
    font-style: italic;
    line-height: 1.6;
}

.quote p::before {
    content: "\201C";
    display: block;
    color: #e6b45c;
    font-size: 52px;
    line-height: 0.6;
    margin-bottom: 8px;
}


/* ---- ENTRIES: a small list of glass colours ---- */

.entries {
    grid-column: span 4;
}

.entries ul {
    list-style: none;
}

.entries li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(23, 20, 15, 0.22);
}

.entries li:last-child {
    border-bottom: none;
}

.entries .date {
    display: inline-block;
    width: 96px;
    color: #8a6a2a;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.entries a {
    font-size: 17px;
}


/* ---- HOWTO: the template note, also split into two columns ---- */

.howto {
    grid-column: span 6;
    column-count: 2;
    column-gap: 34px;
    column-rule: 3px solid var(--lead);
}


/* ---- FOCUS: a clear ring for keyboard visitors ---- */

a:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}


/* ---- FOOTER: the required credit link, on the wall below ---- */

#footer {
    max-width: 900px;
    margin: 26px auto 0;
    color: #8f8a80;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-align: center;
    text-transform: uppercase;
}

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

#footer a:hover {
    color: var(--gold);
}


/* ---- SMALL SCREENS: stack the wide panes and drop to one column ---- */

@media (max-width: 640px) {
    body {
        padding: 24px 10px;
    }

    #window {
        gap: 5px;
        padding: 6px;
        border-width: 8px;
    }

    .pane {
        padding: 22px 18px;
    }

    .masthead {
        padding: 32px 18px 26px;
    }

    .masthead h1 {
        font-size: 34px;
    }

    .tagline {
        letter-spacing: 2px;
    }

    .tracery,
    .lightstrip,
    .roserow {
        padding: 0;
    }

    .roserow {
        padding: 18px;
    }

    .tracery {
        min-height: 44px;
    }

    .about,
    .quote,
    .entries,
    .howto {
        grid-column: span 6;
    }

    .about,
    .howto {
        column-count: 1;
        column-rule: none;
    }

    .quote {
        padding: 24px 20px;
    }

    .entries .date {
        display: block;
        width: auto;
        margin-bottom: 3px;
    }
}


/* ---- PRINT: drop the wall and shadows, keep it clean ---- */

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

    #window {
        border-width: 0;
        box-shadow: none;
        max-width: 100%;
    }

    #menu {
        display: none;
    }
}
