:root {
    --example-pic-height: 20rem;
    --example-pic-horizontal-drift: 9rem;
    --example-pic-vertical-drift: -9rem;
    --border-color: #4f5d80;
    --border: 3px solid var(--border-color);
}

html {
    background: url("/static/img/homepage/bgtile.webp");
    font-family: VHSGothic;
    background-size: 400px;
    cursor: url("/static/img/cursor.png?v=32"), auto;
}

a,
button,
[role="button"],
input[type="submit"],
input[type="button"],
select,
summary {
    cursor: url("/static/img/cursor-pointer.png?v=24"), pointer;
}

@media (min-width: 768px) {
    :root {
        /* On desktop all four screenshots share the hero's right half, so the
           collage has to scale with the viewport — at a fixed size it doesn't
           fit anywhere under ~1600px. The maximums are the sizes the layout
           was drawn at, reached on wide screens. */
        --example-pic-height: clamp(15rem, 27vw, 24rem);
        --example-pic-horizontal-drift: clamp(3rem, 6vw, 7.5rem);
        --example-pic-vertical-drift: calc(var(--example-pic-height) * -0.25);
    }
}

@media (min-width: 768px) {
    html {
        background-size: 600px;
    }
}

body {
    background-color: transparent;
    border-radius: 0;
    margin-top: 0;
}

/* Much wider than base.html's max-w-6xl — the two-column hero needs the room,
   and the collage has space to breathe next to the pitch. Has to name the
   Tailwind class: a bare `body` selector loses to `.max-w-6xl`. */
body.max-w-6xl {
    max-width: 105rem;
}

.cows-description {
    font-family: RetroGaming;
    font-weight: 400;
    color: #233e4b;
    --outline-width: 4px;
    /* A proper, uniform cream outline around the dark text. paint-order draws
       the stroke first, then the fill on top at full size, so the fill stays
       crisp and readable while the stroke peeks out as a clean border. */
    -webkit-text-stroke: var(--outline-width) #f5f8eb;
    paint-order: stroke fill;
    text-align: center;
    padding: 0.7rem;
    font-size: 2rem;
}

@media (min-width: 768px) {
    .cows-description {
        width: 80%;
        --outline-width: 6px;
        font-size: 2.7rem;
    }
}

.punchline--bold {
    color: #fecaca;
    font-size: 2.2rem;
    line-height: 0;
}

@media (min-width: 768px) {
    .punchline-small {
        font-size: 3.5rem;
        padding-top: 2rem;
    }
    .punchline--bold {
        font-size: 3.8rem;
    }
}

@keyframes cool-bg-animation {
    0%,
    100% {
        background-position: 0 0;
    }
    50% {
        background-position: 0 100%;
    }
}

@media (min-width: 768px) {
    .punchline {
        padding-top: 4rem;
    }
}

.example-pics {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.25rem;
    padding-right: calc(var(--example-pic-horizontal-drift) + 0.25rem);
}

@media (min-width: 768px) {
    .example-pics.desktop {
        display: flex;
    }
}

.example-pics img {
    border-width: 5px;
    border-color: #9b8294;
    box-shadow: -5px 5px 0 #d3929b;
    margin-bottom: var(--example-pic-vertical-drift);
    height: var(--example-pic-height);
    /* These are sized by height, so opt out of Tailwind preflight's
       `max-width: 100%` — inside the narrow hero column it clamps the width
       while the height stays put, which squashes the screenshots. */
    width: auto;
    max-width: none;
}

.example-pics .example-pic-drifted {
    position: relative;
    left: var(--example-pic-horizontal-drift);
    top: var(--example-pic-vertical-drift);
}

.landing--site-name {
    width: 100%;
    padding: 1rem;
}

.topic-ideas--title {
    text-align: center;
    color: rgb(var(--color-primary));
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .topic-ideas--title {
        font-size: 1.6rem;
    }
}

@media (min-width: 768px) {
    .examples-card-container {
        width: 50%;
    }
}

.examples-card {
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .examples-card {
        display: flex;
        justify-content: center;
    }
}

.landing--sectionTitle {
    font-family: RetroGaming;
    text-align: center;
    padding: 0.25rem;
    padding-top: 1rem;
    color: rgb(var(--color-primary));
    font-size: 1.4rem;
}

@media (min-width: 768px) {
    .landing--sectionTitle {
        font-size: 2.4rem;
    }
}

.landing--signup {
    border-radius: 15px;
    border-color: rgb(var(--color-primary));
    border-width: 3px;
    font-size: 2rem;
    text-align: center;
    color: white;
    padding: 0.8rem;
    cursor: pointer;
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, rgb(var(--color-primary)) 80%, white),
        color-mix(in srgb, rgb(var(--color-primary)) 60%, white)
    );
    width: 100%;
}

.landing--btn,
.landing_generalSectionCard form input#submit {
    background-color: #f5f8eb;
    color: #233e4b;
    text-transform: uppercase;
    border: var(--border);
}

@media (max-width: 768px) {
    .landing--signup {
        width: 80%;
        margin-bottom: 1rem;
    }
}

.motto {
    max-height: 25rem;
    padding: 0.25rem;
}

/* Hero: stacked on mobile (identical to the old layout), two columns on
   desktop — pitch on the left, example screenshots on the right. */
.landing--hero {
    display: flex;
    flex-direction: column;
    /* Centred so the mobile stack sizes exactly as it did before the wrapper
       existed; desktop switches to a stretched two-column row below. */
    align-items: center;
    width: 100%;
}

.landing--heroPitch {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Medium screens: two columns for pitch + screenshots, but the bullets get a
   full-width row of their own underneath — half a page is too narrow for them
   and they turn into a tall ladder of two-word lines. */
@media (min-width: 768px) {
    .landing--hero {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "pitch examples"
            "bullets bullets";
        align-items: start;
        gap: 1rem;
        padding-top: 1rem;
    }

    .landing--heroPitch {
        grid-area: pitch;
    }

    .landing--heroExamples {
        grid-area: examples;
    }

    .landing--heroPitch,
    .landing--heroExamples {
        min-width: 0;
    }

    /* The tagline's full-width size doesn't quite fit half a page, and
       "straightforward" is one unbreakable word — below ~1200px it has to
       shrink with the column or it spills over the screenshots. */
    .landing--heroPitch .cows-description {
        width: 100%;
        font-size: clamp(1.5rem, 3.1vw, 2.5rem);
        --outline-width: 0.15em;
    }

    /* In the hero the pics float on the page background instead of sitting
       in their own card. Needs both classes to beat .landing--examples-section,
       which is declared later in this file. */
    .landing--examples-section.landing--heroExamples {
        background-color: transparent;
        border: none;
        margin: 0;
        padding: 0 var(--example-pic-horizontal-drift) 0 0;
    }

    .landing--heroExamples .landing--sectionTitle {
        display: none;
    }
}

/* Desktop only — mobile keeps the shorter, image-led pitch. */
.landing--heroBullets {
    display: none;
}

@media (min-width: 768px) {
    .landing--heroBullets {
        grid-area: bullets;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        margin-top: 1rem;
        padding: 1.25rem 1.25rem 1.25rem 2.5rem;
        list-style: disc;
        font-family: RetroGaming;
        font-size: 1.1rem;
        color: #233e4b;
        background-color: #f5f8eb;
        border: var(--border);
    }
}

/* Wide screens: enough room for the bullets to sit back under the pitch, with
   the screenshots spanning both rows on the right. */
@media (min-width: 1400px) {
    .landing--hero {
        grid-template-areas:
            "pitch examples"
            "bullets examples";
        align-content: start;
    }

    .landing--heroBullets {
        width: 80%;
        justify-self: center;
    }
}

.landing--examples-section {
    background-color: #f5f8eb;
    border: var(--border);
    margin: 0.25rem;
}

/* On mobile this is a card like any other section, so it gets the same inset.
   (The cowshed panel shares .landing--examples-section but draws its own
   edge-to-edge header/body, so the padding stays scoped to the hero one.) */
.landing--heroExamples {
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .landing--examples-section {
        padding-left: var(--example-pic-horizontal-drift);
        padding-right: var(--example-pic-horizontal-drift);
    }
}

.landing--examples-pics-container {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .landing--examples-pics-container {
        flex-direction: row;
    }
}

.landing--footer {
    margin: 0.25rem;
    margin-top: 2rem;
    padding: 0.5rem;
    border: var(--border);
    background-color: #f5f8eb;
    font-family: Monda;
}

.landing_generalSectionCard {
    /* The page wrapper centres its children instead of stretching them, so
       cards have to opt into full width themselves — otherwise they shrink to
       their content and end up inset differently from the other sections. */
    align-self: stretch;
    border: var(--border);
    background-color: #f5f8eb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    margin: 0.25rem;
    font-family: Monda;
    line-height: 1.5rem;
}

.landing--pitchSection {
    margin-top: 2rem;
    padding-bottom: 2rem;
}

.landing--pitchesContainer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.landing--pitchPic {
    padding-top: 1rem;
    max-width: 200px;
    align-self: center;
    margin-inline-start: 2rem;
}

@media (min-width: 768px) {
    .landing--pitchPic {
        margin-inline-start: 4rem;
    }
}

.landing--pitchItemContainer {
    padding-inline-start: 1rem;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding-top: 1rem;
    align-items: end;

    &.-answer {
        margin-inline-start: -1rem;
    }

    &.-question {
        margin-inline-start: 1rem;
        flex-direction: row-reverse;
    }
}

@media (min-width: 600px) {
    .landing--pitchItemContainer {
        &.-answer {
            margin-inline-start: -2rem;
        }

        &.-question {
            margin-inline-start: 2rem;
        }
    }
}

@media (min-width: 768px) {
    .landing--pitchItemContainer {
        &.-answer {
            margin-inline-start: 0;
        }

        &.-question {
            margin-inline-start: 16rem;
        }
    }
}

.landing--pitchItemBeforeImg {
    height: 2.5rem;
}

@media (min-width: 768px) {
    .landing--pitchItemBeforeImg {
        height: 4rem;
    }
}

.landing--speechBubble {
  position: relative;
  background: #ffffff;
  border: var(--border);
  padding: 0.8rem;
  padding-inline-start: 1rem;
  max-width: 450px;
  image-rendering: pixelated;
  box-shadow: -3px 3px 0 #9b8294;

  &.-answer {
    margin-inline-start: 0.5rem;
  }

  &.-question {
    margin-inline-end: 0.5rem;
  }
}

.landing--speechBubble:after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;

}

.landing--speechBubble.-answer:after {
    left: -10px;
    bottom: 5px;
    border-right: 12px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: none;
}

.landing--speechBubble.-question:after {
    right: -10px;
    bottom: 5px;
    border-left: 12px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: none;
}

.landing--speechBubble:before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    z-index: 0;
}

.landing--speechBubble.-answer:before {
    left: -14px;
    bottom: 4px;
    border-right: 12px solid var(--border-color);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: none;
}

.landing--speechBubble.-question:before {
    right: -14px;
    bottom: 4px;
    border-left: 12px solid var(--border-color);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: none;
}

.landing--duoRow {
    align-self: stretch;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    /* Stacked on mobile the two cards are sections like any other, so the space
       between them has to match the 2rem section rhythm (their own 0.25rem
       margins make up the rest of it). */
    gap: 2rem;
}

.landing--duoRow .landing--newsletter,
.landing--duoRow .landing--socials {
    margin-top: 0;
}

@media (min-width: 768px) {
    .landing--duoRow {
        flex-direction: row;
        /* Side by side, the cards' own margins are the whole gap. */
        gap: 0;
    }

    .landing--duoRow .landing--newsletter,
    .landing--duoRow .landing--socials {
        width: auto;
        flex: 1;
    }
}

.about_personName {
    font-size: 1.5rem;
    color: rgb(var(--color-primary));
}

.about_personPic {
    width: 10rem;
}

.about_personWebsite {
    text-decoration: underline;
}

@media (max-width: 768px) {
    nav {
        background: #f5f8eb;
        border-bottom: var(--border);
    }
}

@media (min-width: 768px) {
    nav {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #f5f8eb;
        padding-bottom: 0.25rem;
        padding-right: 0.5rem;
        padding-left: 0.5rem;
        border-right-width: 3px;
        border-left-width: 3px;
    }
}

p {
    padding-bottom: 1rem;
}
