title: Site Header Responsiveness
body: <p>TLDR: The site gains a horizontal scroll bar around width 460px and I'm stumped.</p>
  <p>New to learning web development, I've learned a bit about working with grid and flexbox, but I still struggle at times with making sections of a site responsive. In this current personal project, I'm aiming to make a header section that completely fills the screen for one section and the desktop/larger layout isn't too bad. However, I can't seem to fix what's causing the horizontal scroll bar to appear around 460px width; it seems to be a padding issue but I can't seem to target the padding and reduce it with media queries. Any help is very much appreciated.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>*, *::before, *::after {
       margin: 0;
       padding: 0;
       box-sizing: border-box;
  }
   :root {
       --transition-duration: 0.3s;
       --font-size-title: calc(2rem + 2vw);
  }
   html {
       --color-primary: hsl(274, 99%, 72%);
       --color-primary-m: rgb(241, 172, 255);
       --color-secondary: hsl(274, 99%, 72%, 0.6);
       --color-secondary-m: rgba(207, 56, 200, 0.815);
       --color-secondary-m-dark: purple;
       --color-quaternary: rgb(0, 0, 255);
       --color-tertiary: #f6eedf;
       --color-tertiary-m-light: hsla(39, 56%, 92%, 0.55);
  }
   .container {
       display: grid;
       line-height: 1.7;
       width: 100vw;
  }
   header#home {
       background-color: var(--color-primary);
       grid-column: container-start / container-end;
       background: linear-gradient(var(--color-primary), var(--color-primary-m));
       background-size: cover;
       background-attachment: fixed;
  }
   .header-logo-content {
       display: grid;
       grid-template-columns: 1fr minmax(30rem, 1fr) 1fr;
       grid-template-rows: min-content;
       height: 90%;
       justify-content: center;
       height: 100vh;
  }
   .header-logo-content-logo {
       justify-self: center;
       grid-column: 2 / 3;
       letter-spacing: 0.2rem;
  }
   .header-logo-content-content {
       grid-column: 1 / -1;
       align-self: center;
  }
   .header-logo-content-title {
       font-size: calc(2rem + 2vw);
       font-weight: 300;
       color: var(--color-secondary-m);
       text-transform: uppercase;
       padding: 0 2rem 0 var(--font-size-title);
  }
   .header-logo-content-logo span {
       color: var(--color-tertiary);
       font-size: 3rem;
       font-family: 'Times New Roman', Times, serif;
  }
   .header-logo-content-p {
       font-size: calc(1rem + 2vw);
       font-weight: 500;
       padding: 2vh 2rem 6vh var(--font-size-title);
  }
   .header-logo-content-link:link, .header-logo-content-link:visited {
       margin-left: var(--font-size-title);
       border: 0.2rem solid var(--color-tertiary);
  }
   .header-logo-content-link:link::before, .header-logo-content-link:visited::before {
       content: "";
       position: absolute;
       top: 0;
       left: 0;
       height: 100%;
       width: 100%;
       background-color: var(--color-tertiary);
       transform: scaleX(0);
       transition: transform 0.45s cubic-bezier(1, 0, 0, 1);
       z-index: -1;
  }
   .header-logo-content-link:hover::before, .header-logo-content-link:active::before {
       transform: scaleX(1);
  }
   p {
       color: var(--color-secondary);
  }
   a:link, a:visited {
       color: var(--color-quaternary);
       text-decoration: none;
       font-size: calc(0.5rem + 1vw);
       padding: 1rem 2rem;
       border-radius: 0.3rem;
       position: relative;
       transition: all var(--transition-duration) cubic-bezier(1, 0, 0, 1);
       z-index: 1;
  }
   #button {
       display: flex;
       flex-direction: column;
       place-self: bottom;
       align-items: center;
       justify-content: center;
       min-height: 25vh;
       font-family: Arial, Helvetica, sans-serif;
       transition: all 0.3s ease-in-out;
       flex-wrap: wrap;
  }
   .switch {
       background-color: #333;
       color: #fff;
       border: none;
       outline: none;
       padding: 15px 30px;
       font-size: 20px;
       margin-top: 40px;
       cursor: pointer;
  }
   .color {
       font-size: 50px;
  }
   li {
       list-style: none;
       margin-bottom: 4rem;
  }
   .header-main-nav {
       position: fixed;
       top: 0;
       left: 0;
       z-index: 6;
  }
   .header-main-nav input[type="checkbox"] {
       position: absolute;
       top: 3rem;
       left: 3px;
       height: 40px;
       width: 40px;
       opacity: 0;
       cursor: pointer;
       z-index: 3;
  }
   .header-main-nav-hamburger {
       position: absolute;
       top: 3rem;
       left: 3rem;
       height: 40px;
       width: 40px;
       padding: 1rem;
       background-color: var(--color-tertiary);
       z-index: 2;
       display: grid;
       display: flex;
       place-items: center;
       animation: main-nav 2s;
  }
   @keyframes main-nav {
       0% {
           transform: translateX(150rem) rotate(1000deg);
           opacity: 0%;
      }
       100% {
           transform: translateX(0) rotate(0);
           opacity: 1;
      }
  }
   .header-main-nav-hamburger &gt; div {
       position: relative;
       height: 0.3rem;
       width: 100%;
       background-color: var(--color-secondary);
       display: grid;
       transition: var(--transition-duration) ease-in-out;
  }
   .header-main-nav-hamburger &gt; div::before, .header-main-nav-hamburger &gt; div::after {
       content: '';
       position: absolute;
       top: -1rem;
       width: 60%;
       height: inherit;
       background-color: inherit;
       z-index: 2;
  }
   .header-main-nav-hamburger &gt; div::before {
       left: 0;
  }
   .header-main-nav-hamburger &gt; div::after {
       top: 1rem;
       right: 0;
  }
   .header-main-nav input[type=checkbox]:checked + .header-main-nav-hamburger &gt; div {
       transform: rotate(135deg);
  }
   .header-main-nav input[type=checkbox]:checked + .header-main-nav-hamburger &gt; div::before {
       left: 0;
       top: 0;
       width: 100%;
       transform: rotate(270deg);
  }
   .header-main-nav input[type=checkbox]:checked + .header-main-nav-hamburger &gt; div::after {
       opacity: 0;
  }
   .header-main-nav input[type=checkbox]:checked:hover + .header-main-nav-hamburger &gt; div {
       transform: rotate(405deg);
  }
   .header-main-nav-menu {
       position: fixed;
       top: 0;
       left: 0;
       height: 100%;
       width: 100%;
       visibility: hidden;
       display: grid;
       place-items: center;
  }
   .header-main-nav-menu &gt; div {
       background-color: var(--color-secondary-m-dark);
       height: 200%;
       width: 200%;
       display: grid;
       place-items: center;
       transform: scaleX(0);
       transition: all 0.5s ease-in-out;
       opacity: 70%;
  }
   .header-main-nav-menu &gt; div &gt; div {
       text-align: center;
       max-width: 90vw;
       max-height: 100vh;
       opacity: 1;
       transition: opacity 0.5s ease-in-out;
       overflow: hidden;
  }
   .header-main-nav input[type=checkbox]:checked ~ .header-main-nav-menu {
       visibility: visible;
  }
   .header-main-nav input[type=checkbox]:checked ~ .header-main-nav-menu &gt; div {
       transform: scaleX(1);
      /*transition-duration: 0.5s;
      */
  }
   .header-main-nav-menu ul li a:link, .header-main-nav-menu ul li a:visited {
       z-index: 5;
       font-size: 1.5rem;
       position: relative;
  }
   .header-main-nav-menu ul li a:link::before, .header-main-nav-menu ul li a:visited::before {
       content: "";
       position: absolute;
       top: 0;
       left: 0;
       height: 100%;
       width: 100%;
       z-index: -1;
       transform: scaleY(0);
       background-color:crimson;
       transition: transform var(--transition-duration) ease-in-out;
  }
   .header-main-nav-menu ul li a:hover::before, .header-main-nav-menu ul li a:active:before {
       transform: scaleY(1) 
  }
   @media screen and (max-width: 485px) {
       .header-logo-content {
           grid-template-rows: max-content;
      }
       .header-logo-content h1 p{
           width: 10vh;
           text-align: center;
           word-wrap: normal;
           font-size: calc(1rem +1vh);
           word-wrap: initial;
      }
  }
   @media screen and (max-width: 600px) {
       .header-logo-content-title {
           padding-top: 0;
           grid-template-columns: 1fr minmax(10rem, 1fr) 1fr;
      }
       .header-logo-content-content-p {
           font-size: 2rem;
      }
       h1 {
           font-size: 1.8vh;
      }
  }
   @media screen and (max-width: 800px) {
       .header-logo-content-title {
           padding-bottom: 0;
           font-size: calc(1rem+2vw);
      }
       .header-main-nav-hamburger, .header-main-nav input[type="checkbox"] {
           left: 10px;
           top: 2rem;
      }
  }
   @media screen and (max-width: 1000px) {
       a:link, a:visited {
           font-size: calc(1rem + 1vw);
      }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
     &lt;head&gt;
        &lt;meta charset="utf-8"&gt;
        &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
        &lt;title&gt;Site&lt;/title&gt;
        &lt;meta name="description" content=""&gt;
        &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
        &lt;link rel="stylesheet" href="style.css"&gt;
     &lt;/head&gt;
     &lt;main&gt;
        &lt;body class="container"&gt;
           &lt;header id="home"&gt;
              &lt;!--Nav--&gt;
              &lt;nav class="header-main-nav"&gt;
                 &lt;input type="checkbox" /&gt;
                 &lt;div class="header-main-nav-hamburger"&gt;
                    &lt;div&gt;&lt;/div&gt;
                 &lt;/div&gt;
                 &lt;div class="header-main-nav-menu"&gt;
                    &lt;div&gt;
                       &lt;div&gt;
                          &lt;ul&gt;
                             &lt;li&gt;&lt;a href="#"&gt;L1&lt;/a&gt;&lt;/li&gt;
                             &lt;li&gt;&lt;a href="#"&gt;L2&lt;/a&gt;&lt;/li&gt;
                             &lt;li&gt;&lt;a href="#"&gt;L3&lt;/a&gt;&lt;/li&gt;
                             &lt;li&gt;&lt;a href="#"&gt;L4&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                       &lt;/div&gt;
                    &lt;/div&gt;
                 &lt;/div&gt;
              &lt;/nav&gt;
              &lt;div class="header-logo-content"&gt;
                 &lt;a href="#" class="header-logo-content-logo"&gt;
                 &lt;span&gt;Ho&lt;/span&gt;&lt;span&gt;me&lt;/span&gt;&lt;/a
                    &gt;
                 &lt;div class="header-logo-content-content"&gt;
                    &lt;h1 class="header-logo-content-title"&gt;Welcome to the page&lt;/h1&gt;
                    &lt;p class="header-logo-content-p"&gt;
                       A big ol menu
                    &lt;/p&gt;
                 &lt;/div&gt;
              &lt;/div&gt;
           &lt;/header&gt;
     &lt;/main&gt;
     &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>