/*
Theme Name: Tranquillity
Theme URI: https://www.michael-scannell.com/web/themes/
Author: Michael Scannell
Author URI: https://www.michael-scannell.com/web/
Description: Theme for a personal blog
Version: 1.0
Requires at least: 5.6
Tested up to: 6.8
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl.html
Tags: responsive-layout, translation-ready
Text Domain: tranquillity
*/

:root { 
    --text-colour: hsl( 42, 35%, 25% );  /*brownish black*/
    --pale-text: hsla( 42, 35%, 25%, 0.5 );
    
    --red-shade: hsl( 2, 75%, 60% );
    
    --invisible-mend: hsla( 42, 35%, 71%, 0.5 );
    
    --heading-colour: hsl( 42, 42%, 21% );  /*brownish dark grey*/
    --heading-shadow: hsl(282, 100%, 21%); /*very dark violet*/
    --subhead-colour: hsl( 42, 42%, 28% );  /*lighter version*/
    
    --link-colour: hsl( 120, 75%, 60% );  /*light green*/
    --hover-colour: hsl( 120, 100%, 50% );  /*pure green*/
    --active-colour: hsl( 0, 100%, 50% );  /*red*/
    --border-colour: hsl(45, 100%, 50%); /*an orange*/
    --button-bg: hsl(60, 100%, 50%); /*yellow*/
    --button-text: 	hsl(354, 88%, 43%);  /*a red*/
    --button-shadow: hsl(0, 0%, 27%); /*greyish black*/

    --tranquil-bg: hsla( 60, 100%, 50%, 0.1 );  /*pure yellow, minimal opacity*/
    --overlay-bg: hsla( 60, 100%, 50%, 0.5 );
}

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

.central {
    text-align: center;
}

.contained {
    margin-bottom: 0;
}

.hidden {
    display: none;
}

/* Text meant only for screen readers. */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #eee;
    clip: auto !important;
    clip-path: none;
    color: #444;
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000; /* Above WP toolbar. */
}

/* divisions and sections */
/* font-size calculation from Mike at madebymike.com.au */
div#page {
    background-color: var( --tranquil-bg );
    font-size: calc(16px + (24 - 16) * ((100vw - 320px) / (1920 - 320)));
    font-family: 'Lato', sans-serif;
    padding: 1.75em 4vw;
}

div#full-page {
    font-size: calc(16px + (24 - 16) * ((100vw - 320px) / (1920 - 320)));
    font-family: 'Lato', sans-serif;
}

header, main, footer {
    color: var(--text-colour);
}

header.posed {
	position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    color: white;
	padding: 1.75em 5vw;
    z-index: 1;
}

/*main sections*/
main {
    margin-top: 1.75em;
    margin-bottom: 1.75em;
}

#full-page main {
    margin: 0;
}

div#site-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2em;
}

div.blurb p:first-child::first-letter, span.emphatic {
    font-size: 1.25em;
    vertical-align: middle;
    padding: 0 0.25em;
    background-color: var( --red-shade );
    color: white;
}

div.lead1, div.lead2 {
    width: fit-content;
    max-width: 400px;
    margin: 0 auto 1.75em;
    background-color: white;
    border: 2px solid var( --red-shade );
}

div.lead1 a, div.lead2 a {
    text-decoration: none;
    color: inherit;
}

div.nav-links div {
    line-height: 1.75em;
}

div.separator {
    width: 16vw;
    margin: 0 auto;
    padding-bottom: 2.1875em;
    border-bottom: 4px solid var( --red-shade );
    margin-bottom: 2em;
}

div.sidebar {
    width: 28vw;
    padding-right: 4vw;
    display: none;
}

div.sidebar form, div.sidebar ul {
    margin-bottom: 2.625em;
}

div.sidebar ul {
    list-style: none;
}

div.group-intro p::before {
    content: "➠ ";
    color: var( --red-shade );
}

header.atomic {
    padding-bottom: 2em;
}

section.message p {
    position: fixed;
    bottom: 10.5em;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
	padding: 1.75em 1vw;
    text-align: center;
    z-index: 1;
}

section#categories-2 ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border-top: 1px solid var( --invisible-mend );
    border-bottom: 1px solid var( --invisible-mend );
    margin-bottom: 0.865em;  /*Allows for borders*/
}

section#categories-2 ul li {
    display: inline-block;
    padding-right: 4vw;
    margin: 0.21875em 0;
}

section#categories-2 ul li::before {
    content: "➠ ";
    color: var( --red-shade );
}

section.listing {
    margin-bottom: 1.75em;
}

section.primary {
    background-image: url('/wp-content/uploads/2025/06/Bougainvillea-blurred.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 20px;
    padding: 1.75em 0;
}

/* footer */
div#copyright {
    margin-top: 0.875em;
    font-size: 0.875em;
}

/* effects */
div.blurb p {
    opacity: 0;
    transform: translate(0, 10vh);
    transition: opacity 1.5s ease-out, transform 0.5s ease-out;
}

div.blurb p.visible {
    opacity: 1;
    transform: translate(0);
}

span.char {
    display: inline-block;
}

.char.wobble {
  animation: wobble 3s ease-in-out infinite;
}

@keyframes wobble {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(1px, -1px) rotate(-1deg); }
  50%  { transform: translate(0px, 1px) rotate(0.5deg); }
  75%  { transform: translate(-1px, -1px) rotate(1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* post formats */
/*.format-quote .entry-header{
    display: none;
} the template part doesn't include the header */

.format-quote .entry-content {
    max-width: 40em;
    margin: auto;
    padding: 0.875em 1vw;
    background-color: var( --overlay-bg );
}

.format-quote .entry-content p:first-of-type {
    padding-left: 1vw;
    border-left: 4px solid var( --red-shade );
}

.format-quote .entry-content p:nth-of-type(2) {
    font-weight: 600;
    text-align: right;
    margin-bottom: 0;
}

.format-quote .entry-content p:nth-of-type(2)::before {
    content: '\2014 \20';
}

/* forms */
form#first-form {
    margin-top: 0.21875em;
}

form#searchform input[type=text] {
    width: 99%;
    border-radius: 20px;
    font-size: 1em;
    padding: 0.75em 2vw;
    display: inline-block;
    margin-bottom: 0.75em;
}

form#searchform input[type=submit] {
    box-shadow: 1px 1px #ccc;
    text-align: center;
    border-radius: 15px;
    padding: 0.4em 1em;
    font-size: 1em;
    line-height: 1.05em;
    background-color: var( --link-colour );
    color: white;
}

input[type="text"] {
    font-size: 1em;
    padding: 0.5em 0.625em;
}

input[type=submit] {
    text-align: center;
    border-radius: 15px;
    font-size: 1em;
    padding: 0.25em 0.5em;
    margin-left: 1vw;
    background-color: var( --link-colour );
    color: white;
}

input::placeholder {
    color: var( --pale-text );
}

/* images plus */
img, .wp-caption {
	max-width: 100%;
	height: auto;
}

img.text-bg {
    filter: blur(10px);
}

p.container img {
    border-radius: 24px;
    box-shadow: 2px 3px var( --button-shadow );
}

.options-area img {
    max-width: 180px;
    width: 100%;
    height: auto;
    border-radius: 20px;
    border: 1px solid var( --invisible-mend );
}

#ivs-video1 {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    object-fit: cover;
}

/* WP: user alignments */
.alignleft, .inset {
    float: left;
    margin: 1em 2vw 0 0;
}

.alignright {
	float: right;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

figcaption, .wp-caption-text, .gallery-caption {
    font-style: italic;
    margin-bottom: 1.75em;
}

/* elements */
a:link, a:visited {
    text-decoration: none;
    color: var(--link-colour);
}

a:hover {
    text-decoration: underline;
    color: var(--hover-colour);
}

a:active {
    color: var(--active-colour);
}

p.post-page-navigation a {
    padding: 1vw;
    border: 1px solid var(--link-colour);
}

p.post-page-navigation a + a {
    margin-left: 4vw;
}

button.singular {
    font-size: 1em;
    margin-bottom: 0.875em;
    margin-right: 0.5em;
    padding: 0.25em 1vw;
    background-color: var( --button-bg );
    color: var( --button-text );
    border: 1px solid var( --border-colour );
    border-radius: 15px;
    box-shadow: 2px 3px var( --button-shadow );
    cursor: pointer;
}

button.transit {
	position: fixed;
    bottom: 1.75em;
    right: 2.5vw;
    width: 7vw;
    padding: 0.875em 1vw;
    background-color: black;
    color: hsl(120, 100%, 50%);
    z-index: 1;
}

button.transit:hover {
    background-color: hsl(120, 100%, 50%);
    color: black;
}

h1.logotype a:hover, nav li a:hover {
    text-decoration: none;
}

blockquote {
    font-family: monospace;
}

h1, h2, h3, h4, h5 {
	font-family: 'Crimson Text', serif;
    color: var(--heading-colour);
}

h1 {
    font-size: 2.625em;
    margin-top: 0.4375em;
    margin-bottom: 0.4375em;
}

h1.logotype {
    font-size: 1.75em;
    font-weight: 700;
    line-height: 1;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    text-transform: uppercase;
}

h1.logotype span {
    display: block;
}

h1.logotype a:link, nav li a:link, h1.logotype a:visited, nav li a:visited, h1.logotype a:hover, nav li a:hover, h1.logotype a:active, nav li a:active {
    color: var(--text-colour);
}

header.posed h1 {
    margin: 0;
    color: inherit;
}

h2 {
    font-size: 1.75em;
    line-height: 1;
    margin-top: 0.4375em;
    margin-bottom: 1em; /*'em' = now this element's font-size */
}

h2.overlay {
    color: white;
    text-shadow: 2px 2px var( --heading-shadow );
    z-index: 2;
    width: 100%;
    text-align: center;
}

h2.subhead { /* over-ridden by child theme */
    font-size: 1.25em;
    line-height: 1.4;
    color: var( --subhead-colour);
    font-weight: 600;
    text-align: center;
}

h2.subhead::after {
    display: block;
    width: 16vw;
    margin: 0 auto;
    padding-top: 1.35em;
    border-bottom: 4px solid var( --red-shade );
    content: "";
}

h3 {
    font-size: 1.5em;
    margin-top: 0.25em;
    margin-bottom: 0.2em;
}

h3.item-title a {
    display: inline-block;
    padding: 0.1em 1vw;
    white-space: pre-wrap;
    text-align: center;
}

h3.top {
    margin-top: 0;
    border-left: 4px solid var( --red-shade );
    padding-left: 2vw;
    text-transform: uppercase;
}

h4 {
    font-size: 1.25em;
    line-height: 1.4;
}

h4#signpost {
    margin-bottom: 1.5em;
    text-transform: uppercase;
}

h4#signpost span {
    border-bottom: 4px solid var( --red-shade );
}

h4#signpost a:hover {
    text-decoration: none;
}

h5 {
    font-size: 1em;
    line-height: 1.75;
}

h5.item-title, h5.list-title {
    padding-left: 1vw;
    border-left: 4px solid var( --red-shade );
    text-transform: uppercase;
}

h5.item-title {
    margin-bottom: 0.875em;
}

h5.list-title {
    margin-bottom: 0;
}

li, p, tr {
	line-height: 1.75;
}

li, p {
    margin-bottom: 1.75em;
}

.content li, .content p {
    max-width: 39em;
}

div.sidebar li {
    margin-bottom: 0;
}

ol {
    list-style: decimal inside;
}

p.subhead {
    margin-bottom: 0;
}

section.entry-meta p {
    max-width: none;
    text-align: right;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

a.leader {
    display: inline-block;
    font-size: 3.5em;
    text-decoration: none;
}

/* display adjustments */
@media (prefers-reduced-motion: reduce) {
  animation: none !important;
}

/* widths variable by design */
@media screen and (min-width: 640px) {
  main {
    display: flex;
    margin-top: 3.5em;
  }
  div#site-options {
    display: none;
  }
  section#categories-2 {
    display: none;
  }
  div.sidebar {
    display: block;
  }
  div.content {
    margin: 0 auto 1.75em;
  }
  h2.entry-title, h2.page-title {
    margin-top: 0;
    line-height: 1;
  }
  .format-standard section.entry-content {
    display: flex;
    justify-content: center;
  }
  p.container {
    margin-right: 4vw;
    max-width: 37%;
  }
}

@media screen and (min-width: 800px) {
  section.primary {
    height: 66.6666667vh;
    display: grid;
    align-items: center;
  }
  section.secondary {
    display: flex;
    justify-content: space-evenly;
  }
  div.lead1, div.lead2 {
    max-width: 24vw;
  }
  div.sidebar ul {
    margin-bottom: 2em;
  }
}

@media screen and (min-width: 1120px) {
  div.content {
    width: 84vw;
  }
  .format-standard section.entry-content {
    display: flex;
    justify-content: space-between;
  }
}

@media screen and (min-width: 1280px) {
  div.content {
    width: 72vw;
  }
}

@media screen and (min-width: 1600px) {
  div.lead1, div.lead2 {
    max-width: 400px;
  }
}

/* EOF */