/* CSS COLOR VARIABLES */
@import url("globals.css");
@import url("nav.css");

body {
    background-color: white;
    color: var(--UI-PRIMARY-000);
    margin:0;
    padding:0;
}

/* Accessibility: skip-to-content link — visually hidden but visible on keyboard focus */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus,
.skip-link:active {
    position: fixed;
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    background: var(--UI-PRIMARY-900);
    color: white;
    z-index: 9999;
    border-radius: 4px;
}

nav {
    text-align: right;
    padding: 1em 1em;
    cursor: pointer;
   
    grid-column: span 12; /* Grid for modern browsers */
    margin-top:-66px;
}

body {
    font-family: "Noto Sans", sans-serif;
    font-size: var(--fs-2);
}

p {
    line-height: var(--fs-4);
}

a {
    font-weight: bold;
    color:  var(--UI-PRIMARY-600);
}

h1 {
    color:  var(--UI-PRIMARY-300);
}

h2 {
    font-family: "Poetsen One", sans-serif;
    font-size: var(--fs-4);
    color:  var(--UI-PRIMARY-400);
    margin-bottom: 0;
}

h3 {
    font-family: "Noto Sans", sans-serif;
    font-size: var(--fs-3);
    font-weight: 400;
    font-style: italic;
    color:  var(--UI-PRIMARY-600);
     margin-top: 0.5rem;
}

.quote {
    position: relative;
    margin: auto;
    top: 20%;
    background: var(--UI-PRIMARY-800);
    padding: 1em;
    border-left: 10px solid var(--UI-PRIMARY-400);
}
.quote figcaption,
.quote blockquote {
    margin: 1.5rem;
}
blockquote {
    font-size: var(--fs-3);
    background: var(--UI-PRIMARY-800); 
    quotes: "\201C""\201D""\2018""\2019";
}
blockquote:before {
    color: var(--UI-PRIMARY-400);
    content: open-quote;
    font-size: 4em;
    line-height: 0.1em;
    margin-right: 0.25em;
    vertical-align: -0.4em;
}
blockquote p {
    display: inline;
}

footer {
    text-align: center;
    padding: 2em 0;
    color: var(--UI-PRIMARY-800);
    background-color: var(--UI-PRIMARY-000);
}

header {
    background-color: var(--UI-PRIMARY-900);
    height: 126px;
    padding: 0 1em 0em 1em;
    border-bottom: 2px solid var(--UI-PRIMARY-600);
    background-size: auto 30%;
    background-repeat: repeat-x;
    background-position-y: 85%;
    background-position-x: 200px;
    margin: 0;
    animation: bg-scroll 30s linear infinite;
}

header, footer, main {
    /* Fallback for older browsers */
   /* width: 100%; */
    
    /* Grid for modern browsers */
    grid-column: span 12;
    margin: 0;
}

header, footer {
    & div {
        max-width: 1200px; 
        margin: 0 auto
    }
}
label {
    font-weight: 500;
    color: var(--UI-PRIMARY-300);
}
input {
    height: 2rem;
    max-width: 400px;
}
input, textarea {
    font-size: var(--fs-2);
    display: block;
    width: 95%;
    border-radius: 4px;
    padding: 8px;
    background-color: white;
    border: 1px solid var(--UI-PRIMARY-800);
}

form button {
    font-size: var(--fs-3);
    border-radius: 4px;
    padding: 0.25rem var(--fs-0);
    margin-bottom: 1rem;
    background-color: var(--UI-PRIMARY-500);
    color: white;
    text-decoration: none;
    border: none;
    &:hover {
        background-color: var(--UI-PRIMARY-700);
        cursor: pointer;
    }
}

@keyframes bg-scroll {
    from { background-position: 200px 85%; }
    to   { background-position: -200px 85%; }
}

/* GLOBAL LAYOUT STUFF BELOW */

.container {
    /* Fallback for older browsers */
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    padding: 0;
}

.main-content {
    /* Fallback for older browsers */
    width: 100%;
    
    /* Grid fallback if @supports not available */
    grid-column: span 12;
}



.logo-container {
    display: inline-block;
    background-color: var(--UI-PRIMARY-900); 
    box-shadow: 8px 0px 8px var(--UI-PRIMARY-900), -8px 0px 8px var(--UI-PRIMARY-900);
  /*  background-color: hsl(146 24% 94% / 0.6); */
    padding: 1rem 1rem 0rem 1rem;
}

.hero-section {
    text-align: left;
    margin: 0 auto;
    background-color: white;
    & .hero-text {
        /* Flexbox fallback */
        width: 75%;
        flex: 0 0 calc(66.666% - 0.4rem);
        
        /* Grid for modern browsers */
        grid-column: span 8;
        
        margin: auto;
        z-index: 999;
        & h1 {
            font-family: 'poetsen one', sans-serif;
            font-size: var(--fs-7);
            color: var(--UI-PRIMARY-500);
            margin-bottom: 0;
        }
        & p {
            font-size: var(--fs-3);
            line-height: var(--fs-5);
        }
    }
    & img {
          margin-bottom: -20%;
    }
    & img, picture {
        /* Flexbox fallback */
        width: 25%;
        flex: 0 0 calc(33.333% - 0.4rem);
        
        /* Grid for modern browsers */
        grid-column: span 4;
        width: 100%;
        height: auto;
    }

    & .width-limit {
        position: relative;
        /* Flexbox fallback */
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        flex: 0 0 100%;
        
        /* Grid for modern browsers */
        grid-column: span 12;
        max-width: 1200px; 
        margin: 0 auto;
        min-height: 270px;
        /* overflow-x: hidden; */
    }
}

#makeHero {
    & img, picture {
        margin: 2rem auto;
    }
}
#knowHero {
    & .hero-text {
       /* Flexbox fallback */
       flex: 0 0 calc(33.333% - 0.4rem);
       width: 170%;
       
       /* Grid for modern browsers */
       grid-column: span 4;
       
       margin: -1.5rem 0 0 -75%;
       padding-right: 2rem;
       & p {
            background-color: rgba(255, 255, 255, 0.8);
       }
        @media (max-width: 768px) {
            flex: 0 0 100%;
            grid-column: span 12;
            width: 90%;
            margin: 1.5rem 0 0 1rem;
        }
    }
    & img, picture {
        /* Flexbox fallback */
        flex: 0 0 calc(66.666% - 0.4rem);
        
        /* Grid for modern browsers */
        grid-column: span 8;
        
        margin-bottom: -5%;
    }
}

#aboutHero {
    /* overflow-x: hidden;  */
    & picture {
        height:450px;
        width: 450px;
        margin-bottom: 0;
        align-self: end;
    }
    & img {
        height:450px;
        width: 450px;
        margin-bottom: 0;
        bottom: 0;
    }
}

/* PAGE SPECIFIC STUFF STUFF BELOW */

#makeSection > div {
    margin: 8rem auto; 
}

.standard-section {
    border-top: 2px solid var(--UI-PRIMARY-800);
    background-color: var(--UI-PRIMARY-900);
    padding: 3rem 1.5rem;
    gap: 1rem;
    & > div {
        /* Flexbox fallback */
        display: flex;
        flex-wrap: wrap;
        max-width: 1200px; 
        margin: 2rem auto; 
    }
}

#makeNav {
    display: block;
    text-align: center;
    margin-bottom: 5rem;
   & a {
        background-color: var(--UI-PRIMARY-800);
        border-radius: 4px;
        text-decoration: none;
        color: var(--UI-PRIMARY-300);
        font-size: var(--fs-3);
        font-weight: bold;
        padding: 0.25rem 1rem;
        margin: 0 0.5rem;
        &:hover {
            text-decoration: underline;
        }
    }
}

.make-image-left-third {
    /* Flexbox fallback */
    flex: 0 0 calc(33.333% - 0.75rem);
    
    /* Grid for modern browsers */
    grid-column: span 4;
    
    width: 100%;
    height: auto;
}

.make-image-right-third {
    /* Flexbox fallback */
    flex: 0 0 calc(33.333% - 0.75rem);
    
    /* Grid for modern browsers */
    grid-column: span 4;
    
    width: 100%;
    height: auto;
}

.make-image-right-third-small {
    display: none;
}

.make-text-right-two-thirds {
    /* Flexbox fallback */
    flex: 0 0 calc(66.666% - 0.75rem);
    
    /* Grid for modern browsers */
    grid-column: span 8;
    & h2, p {
        /* Flexbox fallback */
        width: 100%;
        
        /* Grid for modern browsers */
        grid-column: span 12;
    }
    padding-left: 6rem;
}

.make-text-left-two-thirds {
    /* Flexbox fallback */
    flex: 0 0 calc(66.666% - 0.75rem);
    
    /* Grid for modern browsers */
    grid-column: span 8;
    
    & h2, p {
        /* Flexbox fallback */
        width: 100%;
        
        /* Grid for modern browsers */
        grid-column: span 12;
    }
    padding-right: 6rem;
}

#brewImg {
    background-image: url("/img/brew-prism.svg");
    background-repeat: no-repeat;
    background-position: 0 50px;
    &:hover {
        background-image: url("/img/brew-prism-hover.svg");
    }
}

#brewImgTop {
    background-repeat: no-repeat;
    background-position: 0;
}

#bundleSection {
    background-color: var(--UI-PRIMARY-900);
    padding: 1rem 0;
    gap: 1rem;
    
    /* Flexbox fallback */
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px; 
    margin: 0 auto; 
}

#linkSection {
    background-color: var(--UI-PRIMARY-900);
    padding: 1rem 0;
    gap: 1rem;
    
    /* Flexbox fallback */
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px; 
    margin: 0 auto; 
}

.green-well {
    background-color: var(--UI-PRIMARY-800);
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    color: var(--UI-PRIMARY-000);
    font-weight: bold;
    font-size: var(--fs-2);
    & > h3 {
        margin-top: 0;
        color: var(--UI-PRIMARY-000);
    }
     & > p > a {
        font-weight: 600;
        color: var(--UI-PRIMARY-400);
        &:hover {
            color: var(--UI-PRIMARY-700);
        }
    }
    & ul {
        padding-inline-start: 0;
        margin-inline-start: 1.25rem;
        margin-block-end: 0;
    }
    & li > a {
        font-weight: 600;
        color: var(--UI-PRIMARY-400);
        &:hover {
            color: var(--UI-PRIMARY-700);
        }
    }
    & > h4 {
        margin-top: 0;
        color: var(--UI-PRIMARY-000);
    }
}

.grid-third {
    /* Flexbox fallback */
    flex: 0 0 calc(33.333% - 1rem);
    
    /* Grid for modern browsers */
    grid-column: span 4;
}

#Glossary {
    padding: 1rem 1.5rem;
    gap: 1rem;
    & h2 {
        color: var(--UI-PRIMARY-400);
        margin-top: 0; 
        margin-bottom: 2rem;
    }
    & > div {
        /* Flexbox fallback */
        display: flex;
        flex-wrap: wrap;
        max-width: 1200px; 
        margin: 0rem auto; 
    }
}

.special-section {
    border-top: 2px solid var(--UI-SECONDARY-600);
    background-color: var(--UI-SECONDARY-999);
    padding: 0;
    gap: 1rem;
    & > div {
        /* Flexbox fallback */
        display: flex;
        flex-wrap: wrap;
        max-width: 1200px; 
        margin: 0rem auto; 
    }
}

.glossary-entry {
    /* Flexbox fallback */
    flex: 0 0 100%;
    
    /* Grid for modern browsers */
    grid-column: span 12;
    
    margin-bottom: 2rem;
    & h3 {
        margin-bottom: 0.5rem;
        font-weight: bold;
        color: var(--UI-PRIMARY-400); 
    }
    & p {
        margin-top: 0;
        color: var(--UI-PRIMARY-000); 
    }
}

.footer-links {
    list-style-type: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    & li a {
        text-decoration: none;
        color: white;
        font-weight: bold;
        &:hover {
            text-decoration: underline;
        }
    }
}

.footer-credit {
    font-size: var(--fs-1);
    & p {
        margin: 0.25rem 0;
        & a {
            color: white;
            text-decoration: underline;
        }
    }
}

/* ========================================== */
/* CONSOLIDATED @supports QUERIES            */
/* ========================================== */

/* Grid support detection - used for progressive enhancement */
@supports (display: grid) {
    .container {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 8px;
        row-gap: 0;
        flex-wrap: initial;
    }
    
    .standard-section > div {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
    }
    
    #bundleSection {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
    }
    
    #linkSection {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
    }
    
    #Glossary > div {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
    }
    
    .special-section > div {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
    }
    
    .hero-section .width-limit {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        width: auto;
        flex: initial;
    }
}

/* ========================================== */
/* CONSOLIDATED MEDIA QUERIES                */
/* ========================================== */

/* Tablet and smaller screens (768px and below) */
@media (max-width: 945px) {
    #aboutHero img, #aboutHero picture {
        left: 0;
        grid-column: none;
        margin: 0.5rem 0 0 0;
    }
    #aboutHero .hero-text {
        grid-column: span 12;
        width: 90%;
        z-index: 999;
    }
}


@media (max-width: 768px) {
    .main-content, .sidebar {
        width: 100%;
        grid-column: span 12;
    }
    
    .hero-section .hero-text {
        flex: 0 0 100%;
        grid-column: span 12;
        width: 90%;
        z-index: 999;
    }
    
    .hero-section .hero-text h1 {
        font-size: var(--fs-5);
    }
    
    .hero-section .hero-text p {
        font-size: var(--fs-2);
        line-height: var(--fs-4);
    }
    
    .hero-section picture {
        position: absolute;
        flex: 0 0 100%;
        grid-column: span 12;
        margin: 0 0 0 30%;
        width: 100%;
        opacity: 0.3;
        height: 350px;
    }

    .hero-section img {
        grid-column: span 12;
        height: 350px;
        width: 100%;
    }
    
    .hero-section .width-limit {
        position: relative;
        overflow-x: hidden;
    }

    #getHero .hero-text {
        grid-column: span 8;
    }
    
    #knowHero .hero-text {
        flex: 0 0 100%;
        grid-column: span 12;
        width: 90%;
        margin: 1.5rem 0 0 1rem;
    }
    
    #knowHero .hero-text p {
        background-color: transparent;
    }
    
    #knowHero img, #knowHero picture {
        flex: 0 0 100%;
        grid-column: span 12;
        margin: 1rem 0 0 0;
        height: auto;
    }
    
    #makeHero img, #makeHero picture {
        margin: 1rem 0 0 0;
        height: 250px;
    }
    
    .make-image-left-third {
        flex: 0 0 calc(50% - 0.4rem);
        grid-column: span 6;
        padding-left: 0;
        margin-bottom: -20%;
        & img {
            width: 100%;
            height: auto;
        }
    }
    
    .make-image-right-third {
        display: none;
    }
    
    .make-image-right-third-small {
        grid-column: span 6;
        grid-column-end: 12;
        display: block;
        margin-bottom: -20%;
         & img {
            width: 100%;
            height: auto;
        }
    }
    
    .make-text-right-two-thirds {
        flex: 0 0 100%;
        grid-column: span 12;
        font-size: var(--fs-2);
        padding-left: 0;
    }
    
    .make-text-right-two-thirds h2 {
        text-align: right;
    }
    
    .make-text-left-two-thirds {
        flex: 0 0 100%;
        grid-column: span 12;
        font-size: var(--fs-2);
        padding-right: 0;
    }
    
    .standard-section {
        padding: 1rem 1rem;
    }
    
    #grindSection {
        padding-top: 1rem;
        margin-top: 1rem !important;
    }
    
    #makeNav {
        margin-bottom: 1rem;
    }
    
    #makeNav a {
        font-size: var(--fs-2);
        display: inline-block;
        margin: 0rem auto;
        padding: 0.25rem 0.5rem;
    }
    
    .grid-third {
        flex: 0 0 100%;
        grid-column: span 12;
    }
    
    #equipmentSection h2,
    #equipmentSection h3 {
        text-align: left;
    }
    
    #equipmentSection .make-image-left-third {
        grid-column: span 6;
        grid-column-end: 12;
        margin-bottom: -40%;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
}

@media (max-width: 560px) {
    #getHero .hero-text {
        grid-column: span 12;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    header {
        animation: none !important;
        transition: none !important;
    }
}

