/*

My customisation of Skeleton V2.0.4.
I'm using CSS grid rather than Skeleton's.

*/


/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––

*/




/* Base Styles
–––––––––––––––––––––––––––––––––––––––––––––––––– */
/* NOTE
html is set to 62.5% so that all the REM measurements throughout Skeleton
are based on 10px sizing. So basically 1.5rem = 15px :) */
html {
  font-size: 62.5%; }
body {
  font-size: 1.8em; /* currently ems cause chrome bug misinterpreting rems on body element */
  line-height: 1.6;
  font-weight: 300;
  /* font-family: "PT Serif", 'Times New Roman', Times, serif; */
  font-family: "Figtree", "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #151924; }

/* Grid
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.col-1  { grid-column: span 1; }
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-6  { grid-column: span 6; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.wrapper {
    grid-template-columns: 1fr;
    margin: 0 auto;
    padding: 0 3rem;
}
section.logos .wrapper {
    grid-template-columns: repeat(12, 1fr);
}

/* Typography
–––––––––––––––––––––––––––––––––––––––––––––––––– */
h1, h2, h3, h4, h5, h6 {
  font-family: "Figtree", "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin-top: 0;
  margin-bottom: 2.5rem;
  font-weight: 800; 
  line-height: 1.3;
  letter-spacing: 0;
}
h1 { font-size: 4.5rem;}
h2 { font-size: 3.5rem;}
h3 { font-size: 2rem;}
h4 { font-size: 1.6rem;}

p {
    margin-top: 0; 
    font-size: 1.9rem;
}

span.divider {
    height: 2px;
    width: 50px;
    display: block;
    background: #151924;
    margin-bottom: 2.5rem;
}
span.pre-head {
    text-transform: uppercase;
    font-weight: 700; 
    display: block;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.home .about span.divider, footer span.divider {
    background: #fff;
}
.home .about span.pre-head, footer span.pre-head {
    color: #fff;
}

/* Links
–––––––––––––––––––––––––––––––––––––––––––––––––– */
a {
  color: #2497d8; 
  text-decoration: underline;
}
a:hover {
    color: #055f90;
    text-decoration: none;
}

.button, a.button {
    color: #151924;
    height: 44px;
    line-height: 44px;
    font-size: 1.2rem;
}
.button:hover, a.button:hover {
    color: #2497d8; 
}

ul {
    list-style: circle outside;
    padding-left: 2rem;
}

/* ==============================================
    My code
   ============================================== */
.hidden,
.skip-link {
    display: none;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    box-sizing: border-box;
}

/* Images
–––––––––––––––––––––––––––––––––––––––––––––––––– */
img {
    max-width: 100%;
    display: block;
    height: auto;
    margin: 0 auto;
}

figure {
    margin: 5rem 0 5rem 0;
    width: 100%;
}

figure img {
    margin-bottom: 1rem;
}

figcaption {
    color: #666;
    font-size: 1.4rem;
    font-weight: 300;
}

/* Containers
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.wrapper > * {
    grid-column: span 8;
}

.wrapper > .contact-deets {
    grid-column: 10 / span 3;
}

/* header .content, footer .content, .newsletter .content {
    grid-column: span 8;
} */
   
/* Header
–––––––––––––––––––––––––––––––––––––––––––––––––– */
header {
    padding: 0;
    background: #FEFAF2;
    color: #151924;
}

header .wrapper {
    padding: 5rem 3rem 5rem;
}


.home header {
    background: #fff;
}

   
/* Sections and Footer
–––––––––––––––––––––––––––––––––––––––––––––––––– */
section,
footer {
    margin: 0;
    padding: 10rem 0;
}
footer {
    padding: 10rem 0 5rem;
}

footer ul.socials li {
    margin-right: 1.5rem;
}

section.logos {
    padding: 7rem 0;
    background: #fff;
    color: #999;
}
section.logos .wrapper {
    grid-column: 1 / -1;
    display: grid;
}
section.logos .wrapper .col-2 {
    grid-column: span 4;
}

section.work,
section.newsletter {
    background: #FEFAF2;

}

section.about, section#contact-form, .about .section_4 {
    background: #151924;
    background-image: none;
    color: #858da5;
}
section#contact-form {
    color: #fff;
}
section.about h2 {
    color: #fff;
}
.about .section_4 h2 {
    color: #fff;
}
.home .about .button {
    color: #ccc;
}
.home .about .button:hover {
    color: #2497d8; 
}



.about .section_0 {
    background: #fff url("/img/background-images/bm.jpg") 50% 100% no-repeat;
    padding-bottom: 75rem;
}
.about .section_1 {
    background: #f5f5f5 url("/img/background-images/Thirst-Studios-2017.jpg") 50% 100% no-repeat;
    padding-bottom: 75rem;
}

section.approach, section.case-studies {
    background: #f5f5f5;
}

footer {
    background: #151924;
    color: #858da5;
    padding-bottom: 5rem;
}

footer h2 {
    color: #fff;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    color: #2497d8;
}
footer .footer-lower {
    clear: both;
    padding: 2rem 0;
}
footer .footer-lower p {
    font-size: 1.6rem;
} 

footer ul {
    list-style: none;
    font-size: 1.9rem;
    padding: 0;
}

footer ul li {
    float: left;
}

a.twitter,
a.twitter:hover {
    text-decoration: line-through;
}
   
/* Navigation
–––––––––––––––––––––––––––––––––––––––––––––––––– */
#navbar {
    font-family: "Figtree", "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
    padding: 2.5rem 0;
    position: relative;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1;
    font-weight: 400;
}

#navbar .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#navbar.opened {
    height: 100vh;
    background: #151924;
}

#navbar.opened .logo a,
#navbar.opened {
    color: #fff;
}

.nav-links,
#navbar ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 1.7rem;
}

.nav-links li {
    margin: 0 15px;
}

nav#navbar .feed {
    display: none;
}

#navbar a,
.nav-links a {
    text-decoration: none;
    color: #151924;
}

#navbar a:hover,
.nav-links a:hover {
    color: #2497d8;
}

#navbar .logo a:hover,
.nav-links .logo a:hover {
    color: #151924;
}
.nav-links .active a {
    border-bottom: 2px solid #151924;
}
.logo {
    margin: 0;
}

.logo a {
    font-weight: 700;
    font-size: 2.6rem;
    text-decoration: none;
    color: #151924;
}

/* Mobile Navigation */
button.mobile-nav-button {
    display: block;
    background: transparent;
    border: 1px solid #1d2939;
    color: #1d2939;
    margin: 0;
    height: 4.2rem;
}

#navbar.opened button.mobile-nav-button {
    border: 1px solid #fff;
    color: #fff;
}

#navbar #mobile-nav-links li a {
    color: #fff;
    font-size: 3rem;
}

#navbar #mobile-nav-links li {
    margin-top: 2rem;
    text-align: right;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.desktop-nav,
#mobile-nav-links {
    display: none;
}

/* Fade In Animation for Mobile Nav */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobile-nav-links.menu-visible li {
    opacity: 0;
    animation: fadeIn 0.5s cubic-bezier(.48, .43, .56, .82) forwards;
}
   


p.service-title {
    margin-bottom: 1.5rem;
    font-weight: 600;
} 

.prev-title, .next-title {
    text-transform: uppercase;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 500;
}
.next-title {
    text-align: right;
}
   
/* Blog, posts and work lists
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.thoughts .post {
    background: #fff;
}

ul ul {
    margin-left: 0;
    font-size: 100%;
}

ul.work_items {
    grid-template-columns: 1fr;
    list-style: none;
    padding-left: 0;
}
ul.work_items li.work-item {
    grid-column: span 4;
    margin-top: 3rem;
}
p + h3, p + h2 {
    margin-top: 5rem;
}

.thoughts .post {
    padding-top: 30rem;
    padding-bottom: 5rem;
}
.thoughts .post h1 {
    grid-column: span 12;
}
section.article-nav {
    padding-top: 0;
}
section.article-nav p {
    font-weight: 500;
}
section.article-nav .content {
    border-top: 1px solid #f2f2f2;
    padding-top: 5rem;
    display: flex;
    justify-content: space-between;
    grid-column: span 12;
}

.thoughts .post p.date {
    margin-bottom: 10rem;
}

.date {
    color: #bebebe;
    margin-bottom: 0;
    font-size: 1.6rem;
}

.thoughts .post p.date figure {
    margin-top: 0;
}

.post-metadata {
    list-style: none;
}

ol.thoughts-list h3,
ol.work-history h3 {
    margin-bottom: 1rem;
}
ol.work-history h4 {
    margin-bottom: 0.5rem;
}
ol.work-history .date {
    margin-bottom: 1rem;
}

ol.thoughts-list,
ol.work-history {
    list-style: none;
    padding-left: 0;
}


ol.thoughts-list li,
ol.work-history li {
    border-bottom: 1px solid #ddd;
    padding-bottom: 3rem;
    margin-bottom: 3rem;
}

ol.work-history li:first-child, 
ol.thoughts-list li:first-child {
    padding-top: 3rem;
    border-top: 1px solid #ddd;
    margin-top: 3rem;
}

ol.thoughts-list li a {
    color: #151924;
    text-decoration: none;
}

ol.thoughts-list li a:hover {
    color: #2497d8;
    text-decoration: underline;
}

.back-link a {
    font-size: 2.2rem;
    text-decoration: none;
}

.contact-deets ul {
    list-style: none;
    padding: 0;
}
.contact-deets a {
    color: #fff;
    text-decoration: none;
}
.contact-deets a:hover {
    color: #2497d8;
    text-decoration: underline;
}
.contact-deets h2 {
    display: none;
}
.contact-deets ul.socials li {
    float: left;
    margin-right: 1.5rem;
}
.contact-deets p.email {
    margin-bottom: 1rem;
}

ol.links-nextprev,
ul.links-nextprev {
    list-style: none;
    display: flex;
    justify-content: space-between;
    margin-top: 10rem;
}

ul.links-nextprev li {
    width: 45%;
}

span.link-title {
    color: #ccc;
    font-size: 1.4rem;
    text-transform: uppercase;
    font-weight: 500;
}

/* 1) Make each row a columnar flex-container */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;              /* space between label, field & errors */
  margin-bottom: 1.5rem;    /* extra breathing room between fields */
}

/* 2) Force label and field to span 100% */
.form-row label,
.form-row .p-1 {
  width: 100%;
}

/* 3) Ensure the actual inputs fill their wrapper */
#c-form input,
#c-form textarea,
#c-form select {
  width: 100%;
  box-sizing: border-box;   /* include padding in that 100% */
}

/* 4) Tweak your submit button too, if you like ’em full-width */
#c-form button[type="submit"] {
  width: 100%;
  max-width: none;
  align-self: stretch;
}

/* 1. Limit Name, Email and Submit widths, keep them from stretching */
#c-form input[name="name"],
#c-form input[name="email"],
#c-form button[type="submit"] {
  width: 60%;
  align-self: flex-start;
  background: #262c3c;
  border: none;
  color: #fff;
  font-size: 1.6rem;
}

#c-form button[type="submit"] {
    border: 1px solid #fff;
    width: 40%;  
    background: none;
    font-size: 1.4rem;
}

/* 2. Give your textarea some extra depth */
#c-form textarea {
  min-height: 200px;       /* adjust for your ideal height */
  height: auto;            /* allows it to grow if needed */
  background: #262c3c;
  border: none;
  color: #fff;
  font-size: 1.6rem;
}


/* Substack form
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.custom-substack-widget button, .custom-substack-widget input {
    border: 1px solid #151924 !important;
    box-sizing: border-box; /* NEW */
}
.custom-substack-widget button {
    flex: 0 0 auto; /* NEW: don't grow, don't shrink, size to content */
    background: #f2ece0 !important;
}
.custom-substack-widget input {
    color: #151924 !important;
    flex: 1 1 auto !important;
}
.custom-substack-widget input::placeholder {
    color: #999 !important;
}
.custom-substack-widget {
    flex-direction: column !important; /* NEW */
    align-items: stretch !important; /* NEW */
    max-width: 100% !important;
}
/* Adds a 8px gap between the input and the button */
.custom-substack-widget .csw-container {
    display: flex;     /* ensure it’s flex */
    gap: 8px;          /* or 1rem, 0.5rem, whatever you like */
}



   
/* Media queries
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* Larger than mobile */
@media (min-width: 400px) {
}

/* Larger than phablet (grid activation) */
@media (min-width: 550px) {
}

/* Larger than tablet */
@media (min-width: 750px) {

    h1 { font-size: 6rem;}
    h2 { font-size: 4.5rem;}
    h3 { font-size: 3rem;}
    h4 { font-size: 2rem;}
    header .wrapper {
        padding: 30rem 3rem 15rem;
    }
    .thoughts header .wrapper, .contact header .wrapper {
    padding: 18rem 3rem 8rem;
}
    section,
    footer {
        margin: 0;
        padding: 15rem 0;
    }
    footer {
        padding: 15rem 0 10rem;
    }
    .mobile-nav {
        display: none;
    }
    .desktop-nav {
        display: flex;
    }
    #navbar {
        position: fixed;
    }
    nav#navbar .wrapper {
        align-items: center;
    }
    .newsletter-form-container {
        margin: 5rem 0 0 0;
        max-width: 55rem;
    }
    .custom-substack-widget {
        display: flex !important; /* MODIFIED: changed from inline-flex */
        flex-direction: row !important; /* NEW */
        flex-wrap: nowrap !important; /* MODIFIED: changed from wrap */
        
    }


}

/* Start grid */
@media (min-width: 800px) {

}

/* Larger than desktop */
@media (min-width: 1000px) {
    footer .footer-lower {
        grid-column: span 12;
        display: flex;
        justify-content: space-between;  /* push items to the edges */
        align-items: center;             /* vertically centre if they differ in height */
        align-items: flex-end;
    }
    section.logos .wrapper .col-2 {
        grid-column: span 2;
    }
    .wrapper {
        max-width: 120rem;
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 0 3rem; 
    }
    ul.work_items {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 3rem;
        list-style: none;
        padding-left: 0;
}

/* Larger than Desktop HD */
@media (min-width: 1200px) {
    section.about {
        background: #151924 url("/img/background-images/bt-cutout.png") 55vw 100% no-repeat;
    }
}

/* Larger than Desktop HD */
/* @media (min-width: 1400px) {
    section.about {
        background: #151924 url("../img/bt-cutout.png") 80vw 100% no-repeat;
    }
} */