/* ==========================================================================
   azuren.ca — site stylesheet
   Palette and layout follow docs/colours.txt and the mockups in docs/*.png
   ========================================================================== */

:root {
    --purple:        #55286f;
    --purple-dark:   #38164d;
    --blue-dark:     #0643ce;
    --azure:         #007aff;
    --blue-light:    #6ab1ff;
    --magenta:       #ff00ff;
    --blue-vivid:    #0000ff;
    --star:          #dfd82f;
    --white:         #ffffff;
    --black:         #000000;

    /* Width of the chevron band down each edge of the page */
    --edge-w: 165px;
    /* Usable content column between the two bands */
    --content-w: 900px;

    --font: "Hanken Grotesk", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

/* Reaches screen readers only — for text that the sighted layout carries some
   other way (an icon, a symbol) but that has to be spoken to make sense. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

body {
    margin: 0;
    min-height: 100vh;
    /* Anchors the chevron bands, so they span the whole document, not the viewport */
    position: relative;
    font-family: var(--font);
    font-size: 19px;
    line-height: 1.5;
    color: var(--white);
    background-color: var(--blue-dark);
    background-image: radial-gradient(60% 55% at 50% 50%,
            var(--blue-light) 0%,
            #2b8dff 38%,
            #0a63ea 72%,
            var(--blue-dark) 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   Chevron edges
   -------------------------------------------------------------------------- */

/* Absolute, not fixed, so the band travels with the page and the chevrons keep
   alternating purple / dark purple the whole way down the document. */
.edge {
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--edge-w);
    background-image: url("/img/edge-chevrons.svg");
    background-repeat: repeat-y;
    background-size: 100% auto;
    pointer-events: none;
    z-index: 0;
}

.edge-left {
    left: 0;
}

.edge-right {
    right: 0;
    transform: scaleX(-1);
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

/* Pinned to the top of the viewport — sticky rather than fixed so the bar
   still reserves its own height and nothing scrolls underneath it. */
.topbar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 8px 24px;
    background: linear-gradient(90deg, var(--blue-dark) 0%, var(--azure) 100%);
    border-bottom: 4px solid var(--black);
}

.brand {
    font-size: clamp(30px, 4.2vw, 54px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--white);
    text-decoration: none;
    margin-right: auto;
    border-bottom: 4px solid transparent;
}

.brand-tld {
    font-weight: 600;
}

.mainnav {
    display: flex;
    align-items: center;
    gap: clamp(20px, 5vw, 80px);
    padding-right: clamp(0px, 4vw, 56px);
}

.mainnav a {
    font-size: clamp(19px, 2.2vw, 30px);
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    padding: 4px 2px;
    border-bottom: 4px solid transparent;
}

/* Underline marks the page you are on (mockups 1–4) */
.brand.active,
.mainnav a.active,
.mainnav a.active:hover,
.mainnav a.active:focus-visible {
    border-bottom-color: var(--white);
}

.mainnav a:hover,
.mainnav a:focus-visible,
.brand:hover,
.brand:focus-visible {
    border-bottom-color: rgba(255, 255, 255, 0.55);
}

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */

main {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    padding: 40px calc(var(--edge-w) + 24px) 64px;
}

.wrap {
    max-width: var(--content-w);
    margin: 0 auto;
}

h1,
h2,
h3 {
    line-height: 1.15;
    margin: 0 0 14px;
    font-weight: 800;
}

h1 {
    font-size: clamp(30px, 4vw, 46px);
}

h2 {
    font-size: clamp(26px, 3.2vw, 38px);
}

p {
    margin: 0 0 16px;
}

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

a {
    color: var(--white);
}

/* Reusable dark-blue panel used by the definition, about and music cards */
.card {
    background: var(--blue-dark);
    border-radius: 26px;
    padding: 26px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

/* --------------------------------------------------------------------------
   Home — mockup 1.png
   -------------------------------------------------------------------------- */

.page-home main {
    display: flex;
    padding-bottom: 24px;
}

/* Bounce area — the star is positioned against this box, never outside it */
.star-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 60vh;
    overflow: hidden;
}

.star {
    /* Default (no JS, or reduced motion): parked where the mockup puts it */
    position: absolute;
    right: 6%;
    bottom: 4%;
    width: clamp(160px, 22vw, 280px);
    aspect-ratio: 1 / 0.95;
    display: grid;
    place-items: center;
    background: var(--star);
    clip-path: polygon(50% 0%, 61.8% 34.5%, 98% 34.5%, 69% 56%, 80% 90%, 50% 69%, 20% 90%, 31% 56%, 2% 34.5%, 38.2% 34.5%);
    color: var(--black);
    font-size: clamp(13px, 1.4vw, 19px);
    text-align: center;
}

/* Handed over to the DVD-logo drift in site.js */
.star.is-bouncing {
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    will-change: transform;
}

.star span {
    /* sit on the wide middle band of the star, not the top point */
    margin-top: 12%;
}

/* --------------------------------------------------------------------------
   About — mockup 2.png
   -------------------------------------------------------------------------- */

.about-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 28px;
    align-items: start;
    margin-bottom: 44px;
}

.about-intro {
    display: flex;
    flex-direction: column;
    gap: 44px;
    padding-top: 10px;
}

.definition {
    align-self: start;
    padding: 16px 24px 18px;
    border-radius: 18px;
}

.definition-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.definition-head strong {
    font-size: clamp(26px, 2.6vw, 34px);
    font-weight: 800;
}

.definition-ipa {
    font-size: clamp(16px, 1.4vw, 20px);
    opacity: 0.95;
}

.say-it {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--white);
    cursor: pointer;
}

.say-it:hover,
.say-it:focus-visible {
    background: rgba(255, 255, 255, 0.18);
}

.say-it svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.definition p {
    font-size: clamp(17px, 1.5vw, 21px);
    max-width: 22ch;
}

/* Social pill */
.socials {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    align-self: start;
    padding: 14px 18px;
    border-radius: 999px;
    background: var(--blue-dark);
    list-style: none;
    margin: 0;
}

.sbtn {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 4px solid var(--white);
    color: var(--white);
}

.sbtn.is-blue {
    background: var(--blue-vivid);
}

.sbtn.is-magenta {
    background: var(--magenta);
}

a.sbtn:hover,
a.sbtn:focus-visible {
    transform: translateY(-2px);
}

/* Placeholder account — keeps the row's shape without shipping a dead link */
.sbtn.is-unset {
    cursor: default;
}

.sbtn svg {
    width: 30px;
    height: 30px;
}

.about-ref {
    justify-self: end;
}

.about-ref img {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
}

.about-body {
    padding: 26px 34px 40px;
}

.about-body h2 {
    margin-bottom: 18px;
}

.about-body p {
    font-size: clamp(18px, 1.8vw, 25px);
}

/* --------------------------------------------------------------------------
   Music — mockup 3.png
   -------------------------------------------------------------------------- */

.page-music main {
    display: flex;
    align-items: center;
}

.music-wrap {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.music-wrap h1 {
    margin-left: 6px;
}

/* Tall enough to show a run of tracks at once rather than one squashed row */
.player {
    background: var(--white);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.player iframe {
    display: block;
    width: 100%;
    height: min(560px, 62vh);
    min-height: 340px;
    border: 0;
}

.player-fallback {
    display: grid;
    place-items: center;
    min-height: 300px;
    padding: 24px;
    color: var(--black);
    text-align: center;
}

.player-fallback a {
    color: var(--blue-dark);
}

.music-more {
    margin: 16px 6px 0;
    font-size: 16px;
    text-align: right;
}

.music-more a {
    color: var(--white);
}

/* --------------------------------------------------------------------------
   Contact — mockup 4.png
   -------------------------------------------------------------------------- */

.contact-head {
    margin: 0 0 12px 18px;
}

.contact-card {
    position: relative;
    background: var(--white);
    color: var(--black);
    border: 4px solid var(--black);
    border-radius: 26px;
    padding: 26px 26px 60px;
}

.field {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.field label {
    flex: 0 0 auto;
    min-width: 110px;
    text-align: right;
    font-size: clamp(17px, 1.6vw, 22px);
}

.field input {
    flex: 1 1 auto;
    min-width: 0;
    font: inherit;
    font-size: clamp(16px, 1.4vw, 19px);
    color: var(--black);
    padding: 10px 20px;
    background: var(--white);
    border: 3px solid var(--black);
    border-radius: 999px;
}

.contact-card textarea {
    display: block;
    width: 100%;
    font: inherit;
    font-size: clamp(16px, 1.4vw, 19px);
    color: var(--black);
    min-height: 250px;
    resize: vertical;
    padding: 16px 20px;
    background: var(--white);
    border: 3px solid var(--black);
    border-radius: 26px;
}

.contact-card input:focus-visible,
.contact-card textarea:focus-visible {
    outline: 3px solid var(--azure);
    outline-offset: 2px;
}

.field-error {
    border-color: #c40000 !important;
    background: #fff2f2 !important;
}

/* Honeypot — off-screen, never shown to a person */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* The send button hangs off the bottom-left corner as a speech bubble */
.send {
    position: absolute;
    left: 14px;
    bottom: -28px;
    font: inherit;
    font-size: clamp(19px, 1.8vw, 26px);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--white);
    background: var(--blue-dark);
    border: 3px solid var(--black);
    border-radius: 8px;
    padding: 6px 20px;
    cursor: pointer;
}

.send::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 100%;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 20px solid transparent;
    border-top: 22px solid var(--black);
}

.send:hover,
.send:focus-visible {
    background: #0a52ec;
}

.send[disabled] {
    opacity: 0.7;
    cursor: progress;
}

.form-feedback {
    margin-bottom: 18px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 3px solid var(--black);
    font-weight: 600;
}

.form-feedback.success {
    background: #dff5e1;
    color: #0b3d16;
}

.form-feedback.error {
    background: #ffe3e3;
    color: #6b0000;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.notfound {
    text-align: center;
    padding: 40px 0;
}

.notfound img {
    width: 160px;
    height: 160px;
    image-rendering: pixelated;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.sitefoot {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding: 14px calc(var(--edge-w) + 24px) 18px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

.sitefoot .dot {
    margin: 0 8px;
}

.sitefoot a {
    color: inherit;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
    :root {
        --edge-w: 100px;
    }
}

@media (max-width: 860px) {
    :root {
        --edge-w: 56px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 10px 18px 12px;
    }

    .brand {
        margin-right: 0;
    }

    .mainnav {
        gap: 26px;
        padding-right: 0;
    }

    /* Stacked order is definition, ref art, then the social buttons.
       display:contents lifts .about-intro's children up to be siblings of
       .about-ref so the art can sit between them. */
    .about-top {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 28px;
        text-align: center;
    }

    .about-intro {
        display: contents;
    }

    .definition {
        order: 1;
    }

    .about-ref {
        order: 2;
    }

    .socials {
        order: 3;
    }

    .definition-head {
        justify-content: center;
    }

    .definition p {
        max-width: none;
    }

    .page-home main {
        min-height: 60vh;
    }
}

@media (max-width: 560px) {
    :root {
        --edge-w: 34px;
    }

    body {
        font-size: 18px;
    }

    main {
        padding: 24px calc(var(--edge-w) + 14px) 40px;
    }

    .sitefoot {
        padding-left: calc(var(--edge-w) + 14px);
        padding-right: calc(var(--edge-w) + 14px);
    }

    .card {
        padding: 20px 22px;
    }

    .socials {
        gap: 10px;
        padding: 10px 12px;
    }

    .sbtn {
        width: 52px;
        height: 52px;
        border-width: 3px;
    }

    .sbtn svg {
        width: 26px;
        height: 26px;
    }

    .field {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .field label {
        text-align: left;
        min-width: 0;
    }

    .contact-card {
        padding: 20px 18px 56px;
    }

    .contact-card textarea {
        min-height: 220px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    a.sbtn {
        transition: transform 0.15s ease;
    }

    .send,
    .mainnav a,
    .brand {
        transition: background 0.15s ease, border-color 0.15s ease;
    }
}
