/* Notes from the kiosk — shared by the blog index and its posts */
:root {
    --blue: #0015b5;
    --label: #182c9e;
    --ink: #111;
}
* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
}
body {
    overflow-x: clip;
    background: white;
    color: var(--ink);
    font-family: "Times New Roman", Times, serif;
    font-size: 1.2rem;
    line-height: 1.35;
}
::selection {
    background: var(--blue);
    color: white;
}
a { color: var(--blue); }
.wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

/* Pinned to the top-left corner of the window, not the column */
.back {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.1rem;
    text-decoration: none;
}
.back:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

h1 {
    display: flex;
    align-items: center;
    gap: 0.35em;
    margin: 0.9em 0 0.2em;
    font-size: clamp(2rem, 5vw, 2.6rem);
    line-height: 1.1;
}
h1 img {
    height: 1.1em;
    width: auto;
}
.intro {
    margin: 0 0 1.6em;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    color: #555;
}

/* Index and post pages: boxes run the full width of the browser (20px gutters) */
.wrap { max-width: none; }
/* Post pages: title, description and RSS link sit in the reading column */
.wrap > h1,
.wrap > .intro {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}
/* ...the date line spans the whole box, but the post itself stays in a
   centered, normal reading-width (680px) column.
   (Percentages here are of the box's width; ".wrap" so this beats the
   plain .entry-body padding further down.) */
.wrap .entry-body {
    padding-top: 36px;
    padding-bottom: 44px;
    padding-left: max(14px, calc((100% - 680px) / 2));
    padding-right: max(14px, calc((100% - 680px) / 2));
}

/* Blog index title: much bigger, and as wide as the browser */
.masthead {
    width: 100vw;
    margin: 70px 0 80px calc(50% - 50vw);
    /* No max width; indented a touch from the post boxes' edge so the
       big letters' side bearing lines up visually with the date text */
    padding: 0 30px;
}
.masthead h1 {
    gap: 0.25em;
    margin: 0 0 0.3em;
    font-size: clamp(3rem, 9vw, 7.5rem);
    font-weight: normal;
    line-height: 1;
}
/* The bell drawing stands in for the word "bell" in the title */
.masthead h1 { display: block; }
.masthead h1 img {
    display: inline-block;
    height: 0.9em;
    margin: 0 0.05em;
    vertical-align: -0.1em;
}
/* Post pages use the same title style, a step smaller for long titles */
.masthead.post { margin: 80px 0 60px calc(50% - 50vw); }
.masthead.post h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.masthead .intro {
    max-width: 40em;
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    color: var(--blue);
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
    line-height: 1.4;
}

/* ===== One box per entry, like a log ===== */
.entry {
    margin: 0 0 24px;
    border: 1px solid var(--label);
}
/* The date bar: a toggle on the index (summary), fixed on post pages (.entry-head) */
details.entry summary,
.entry-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    color: var(--label);
    list-style: none;
}
details.entry summary { cursor: pointer; }
.entry-head { border-bottom: 1px solid var(--label); }
details.entry summary::-webkit-details-marker { display: none; }
details.entry summary::before {
    content: "▸";
    transition: transform 0.15s ease;
}
details.entry[open] summary::before { transform: rotate(90deg); }
details.entry[open] summary { border-bottom: 1px solid var(--label); }
details.entry summary img,
.entry-head img {
    height: 22px;
    width: auto;
    margin-left: auto;
}
details.entry summary:hover { background: #efefff; }

.entry-body {
    padding: 4px 14px 18px;
}
.entry-body h2 {
    margin: 0 0 0.5em;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: normal;
    line-height: 1.15;
}
.entry-body h2 a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.entry-body p {
    margin: 0 0 1.1em;
    line-height: 1.55;
}
.entry-body img.photo {
    display: block;
    width: 100%;
    height: auto;
    margin: 3.2em 0;
}
.entry-body ol {
    margin: 0 0 0.8em;
    padding-left: 1.6em;
}

/* Same blue label as the section headings on the homepage */
.more {
    display: inline-block;
    border: 0;
    cursor: pointer;
    margin-top: 0.4em;
    padding: 8px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    line-height: 1;
    background: var(--label);
    color: white;
    text-decoration: none;
}
.more:hover {
    background: white;
    color: var(--label);
    box-shadow: inset 0 0 0 1px var(--label);
}

.feed-link {
    margin: 2em 0 0;
    font-family: Arial, sans-serif;
    font-size: 1rem;
}
.shelf-row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    margin-top: 60px;
}
.shelf-row img {
    height: 36px;
    width: auto;
}
.shelf-row img.short { height: 24px; }

/* Smaller photos in the post previews on the index */
.entry-body img.photo.preview {
    width: auto;
    max-width: 100%;
    max-height: 320px;
    margin: 1.2em 0 1.4em;
}

/* Photo at the end of the index */
/* Full-width blue that fades in from the white page and runs to the
   bottom. Content inside can be up to 1240px wide (wider than the column). */
/* The blue stretches to fill the window when the page is short */
.wrap:has(.footer-band) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 0;
}
.wrap:has(.footer-band) > .back { align-self: flex-start; }
.footer-band {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    /* Side padding: at least 20px on phones, up to 60px, more once the
       content hits its 1240px max */
    padding: 300px max(clamp(20px, 5vw, 60px), calc(50vw - 620px)) 120px;
    background: linear-gradient(to bottom, white 0, var(--blue) 240px);
    color: white;
    flex-grow: 1;
}
.footer-band a { color: white; }
.footer-band ::selection {
    background: white;
    color: var(--blue);
}
.footer-band .weather { color: white; }
/* Roomier gaps between the parts of the blue footer */
.footer-band .feed-link { margin-top: 80px; }
.footer-band .shelf-row { margin-top: 90px; }
.footer-band .weather { margin-top: 80px; }
/* The homepage menu, repeated at the very bottom: centred white outlines
   with each item's shelf object, filled white on hover */
.footer-band .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 80px;
    font-family: Arial, sans-serif;
    font-size: 15px;
    line-height: 1;
}
.footer-nav a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px;
    color: white;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px white;
}
.footer-nav a::before {
    content: "";
    width: 20px;
    height: 18px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}
.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
    background: white;
    color: var(--blue);
}
.footer-nav a[href="/#services"]     { --icon: url(images/objects/stone.svg); }
.footer-nav a[href="/#portfolio"]    { --icon: url(images/objects/star.svg); }
.footer-nav a[href="/#testimonials"] { --icon: url(images/objects/human.svg); }
.footer-nav a[href="/#process"]      { --icon: url(images/objects/tree.svg); }
.footer-nav a[href="/#faqs"]         { --icon: url(images/objects/shell.svg); }
.footer-nav a[href="/blog/"]         { --icon: url(images/objects/vase.svg); }

/* Bigger, all-white shelf drawings on the blue */
.footer-band .shelf-row img {
    height: 56px;
    filter: brightness(0) invert(1);
}
.footer-band .shelf-row img.short { height: 36px; }
@media (max-width: 600px) {
    .footer-band .shelf-row img { height: 40px; }
    .footer-band .shelf-row img.short { height: 26px; }
}
.sign-off {
    display: flex;
    align-items: flex-start;
    gap: 44px;
}
.sign-off figure {
    flex: 0 1 auto;
    margin: 0;
}
.sign-off-text {
    flex: 1;
}
.sign-off-text p {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.3;
}
.sign-off-text h2 {
    margin: 0 0 0.4em;
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1.15;
}
@media (max-width: 600px) {
    .sign-off { flex-direction: column; gap: 14px; }
}
.sign-off img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 600px;
    border: 1px solid white;
}

/* Live weather from the barn, big at the very bottom of the index */
.weather {
    margin: 50px 0 0;
    text-align: center;
    color: var(--blue);
}
.weather p { margin: 0; }
.weather-now {
    font-size: clamp(2rem, 6vw, 3.6rem);
    line-height: 1.1;
}
/* Desktop: one unbroken line, as wide as the window allows */
@media (min-width: 700px) {
    .weather-now {
        width: 100vw;
        margin-left: calc(50% - 50vw) !important;
        padding: 0 clamp(20px, 5vw, 60px);
        white-space: nowrap;
        /* Grows with the window, but stops at about 1240px wide */
        font-size: min(3.2vw, 2.8rem);
    }
}

/* ===== Post pages ===== */
.entry-body a.fn-ref {
    font-size: 0.6em;
    vertical-align: super;
    line-height: 0;
    margin-left: 0.15em;
    text-decoration: none;
}
ol.notes {
    margin: 1.6em 0 1em;
    padding: 0.8em 0 0 1.4em;
    border-top: 1px dotted var(--label);
    font-family: Arial, sans-serif;
    font-size: 0.85rem;
    color: #555;
}
ol.notes .fn-back {
    margin-left: 0.4em;
    text-decoration: none;
}
/* Bottom bar of a post's box, mirroring the date bar at the top */
.entry-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding: 12px 14px;
    border-top: 1px solid var(--label);
    font-family: Arial, sans-serif;
    font-size: 1rem;
}
/* A button that looks like the links next to it */
.link-button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--blue);
    text-decoration: underline;
    cursor: pointer;
}

/* RSS link under a post lines up with the text in the bars */
.wrap > .feed-link { padding-left: 15px; }

@media (max-width: 600px) {
    body { font-size: 1.1rem; }
    .entry-body { padding: 4px 12px 14px; }
    .shelf-row { gap: 14px; }
    .shelf-row img { height: 28px; }
    .shelf-row img.short { height: 18px; }
}
