/*******************************************************/
/********** Hamburger Menu for Mobile Devices **********/
/*******************************************************/

.navbar-burger {
    display: block;
    position: relative;
    width: 44px;
    height: 44px;
    cursor: pointer;
    user-select: none;
}

/* Three bars, drawn */
.navbar-burger span,
.navbar-burger span::before,
.navbar-burger span::after {
    position: absolute;
    left: 8px;
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background-color: var(--color-cream);
}

.navbar-burger span {
    top: 20px;
}

.navbar-burger span::before,
.navbar-burger span::after {
    content: "";
    left: 0;
}

.navbar-burger span::before {
    top: -8px;
}

.navbar-burger span::after {
    top: 8px;
}

.navbar-toggle:focus-visible + .navbar-burger {
    outline: 2px solid var(--color-tan);
    outline-offset: 2px;
}

/* The menu drops down below the bar, in the same foliage */
.navbar-menu {
    display: none;
    position: absolute;
    top: var(--val-menu-bar-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 4px 0 12px;
    background: url("/img/foliage.svg") 0 0 / 320px 320px repeat, var(--color-foliage-dark);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.navbar-toggle:checked ~ .navbar-menu {
    display: flex;
}

.navbar-link {
    padding: 16px 24px;
    border-radius: 0;
    text-align: right;
    border-top: 1px solid rgba(247, 243, 236, 0.15);
}

/***********************************
 ********** Home Page: Hero **********
 ***********************************/

/* The trunk sits at the left on a narrow screen: line its fork up with it */
.trunk-fork {
    left: -485px;
    margin-left: 0;
}

/* The scaled footer trunk, lined up with the trunk at the left */
.home #footer-trunk {
    left: 0;
    margin-left: -342px;
}

/* Only the lower right corner rounded: on the left, the trunk grows out from under the crown */
.hero-crown {
    border-radius: 0 0 90px 0 / 0 0 80px 0;
}

/* Fewer, wider lobes on a narrow screen, starting right at the left edge, where the crown's corner
   is square (the leftmost lobe runs off the screen there) */
.hero-crown::after {
    left: 0;
    right: 8%;
    bottom: -36px;
    height: 80px;
    -webkit-mask-image:
        radial-gradient(17% 46% at 14% 50%, #000 98%, transparent 100%),
        radial-gradient(17% 48% at 46% 50%, #000 98%, transparent 100%),
        radial-gradient(17% 44% at 80% 50%, #000 98%, transparent 100%);
    mask-image:
        radial-gradient(17% 46% at 14% 50%, #000 98%, transparent 100%),
        radial-gradient(17% 48% at 46% 50%, #000 98%, transparent 100%),
        radial-gradient(17% 44% at 80% 50%, #000 98%, transparent 100%);
}

.hero-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 40px;
    padding: 40px 24px 56px;
}

.hero-wordmark {
    width: 200px;
    margin-bottom: 28px;
}

.hero-title {
    font-size: 2.3em;
}

.hero-lead {
    font-size: 1.1em;
}

.hero-script {
    flex-basis: auto;
}

.script-code {
    font-size: 13px;
}

/**************************************************
 ********** Home Page: Branching Content **********
 **************************************************/

.branching-content {
    /* Room for the trunk's fork under the crown */
    padding-top: 240px;
}

/* The trunk sits at the left, mostly off the screen */
.branching-content::before {
    left: -105px;
    margin-left: 0;
}

/***** Left Side: Intro *****/

.branching-content-intro {
	width: 100%;
    background-image: url("/img/branch-thin-right.svg");
    background-repeat: no-repeat;
    background-position: left 0px bottom 20px;
    background-size: 90% auto;
    padding-bottom: 25%;
}

.branching-content-intro-inner {
    padding-left: 50px;
    padding-right: 5%;
}

/***** Right Side: Demonstrator *****/

.branching-content-demo {
    width: 100%;
    padding-bottom: 100px;
    padding-top: 0px;
}

.martin {
    left: 10px;
}

/* Only a sliver of the trunk shows at the left edge here: too narrow for the owl's hole */
.branching-content-demo::before {
    display: none;
}

.branching-content-demo-inner {
	padding-top: 0px;
	padding-right: 5%;
}

.speech-bubble {
    position: relative;
    float: right;
    width: 80%;
    min-width: 300px;
}

/* Slimmer reply buttons, so the longer replies of the demo dialogue fit on one line */
.reply-button {
    font-size: 1.05em;
    padding: 12px 20px;
}

/***** Below the demo: the rows stack, each on a branch growing out of the trunk on the left *****/

.branch-rows > .branch-row:first-of-type,
.branch-rows > .branch-row:nth-of-type(2),
.branch-rows > .branch-row:nth-of-type(3),
.branch-rows > .branch-row:nth-of-type(4) {
  margin-top: 0;
}

.branch-row,
.branch-right {
    width: 100%;
    margin-left: 0;
    padding: 0 5% 28% 50px;
    background-image: url("/img/branch-thin-right.svg");
    background-position: left 0 bottom 20px;
    background-size: 90% auto;
}

.branch-row ~ .branch-row {
    margin-top: 0;
}

.branch-last {
    background-image: none;
    padding-bottom: 40px;
}

.feature-title {
    font-size: 1.45em;
}

.contributor-logo {
    height: 64px;
}

#contributor-logo-ccare {
    height: 40px;
    margin: 12px 0;
}

/****************************/
/********** Footer **********/
/****************************/

#footer-trunk {
    left: 0px;
    margin-left: -270px;
}

.footer-columns,
.home .footer-columns {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 130px;
    text-align: center;
}

.footer-brand img {
    margin: 0 auto;
}

.footer-brand p {
    margin-left: auto;
    margin-right: auto;
}

.footer-legal {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

/***** Full Page Mobile Styling *****/

.fullpage-main-inner {
    padding-left: 50px;
    font-size: 16px;
}

.fullpage-main-inner h1 {
    font-size: 1.6em;
}

.about-contributor {
    flex-direction: column;
    gap: 12px;
}

.about-contributor .contributor-card {
    flex-basis: auto;
    width: 100%;
    max-width: 260px;
}

.about-separator {
    margin-left: -40px;
    height: 125px;
    width: 500px;
    background-image: url("/img/branch-thin-right.svg");
    background-repeat: no-repeat;
    background-position: left 0px bottom 0px;
    background-size: 70% auto;
}

pre {
    margin-left: 20px;
}

.code-card pre,
.news-post pre {
    margin-left: 0;
}

.news-image {
    width: 100%;
  }