@font-face {
  font-family: 'GT America';
  src: url('../fonts/gtamerica/GT-America-Standard-Regular.woff2') format('woff2'),
    url('../fonts/gtamerica/GT-America-Standard-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'GT America';
  src: url('../fonts/gtamerica/GT-America-Standard-Bold.woff2') format('woff2'),
    url('..fonts/gtamerica/GT-America-Standard-Bold.woff') format('woff');
  font-weight: 700;
  /* Bold weight */
  font-style: normal;
}

@font-face {
  font-family: 'GT America Condensed';
  src: url('../fonts/gtamerica/GT-America-Condensed-Bold.woff2') format('woff2'),
    url('../fonts/gtamerica/GT-America-Condensed-Bold.woff') format('woff');
  font-weight: 700;
  /* Bold weight */
  font-style: normal;
}

@font-face {
  font-family: 'Gamuth';
  src: url('../fonts/gamuth/GamuthTextWeb-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Gamuth';
  src: url('../fonts/gamuth/GamuthTextWeb-Medium.woff2') format('woff2');
  font-weight: 500;
  /*medium*/
  font-style: normal;
}


@font-face {
  font-family: 'Gamuth';
  src: url('../fonts/gamuth/GamuthTextWeb-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: visible !important;
}

/* NAVBAR RELATED CSS */
.navbar {
  font-family: system-ui, sans-serif;
  font-weight: 600;
  font-size: 12px;
  --bs-navbar-padding-x: 0;
  --bs-navbar-padding-y: 0.2rem;
  letter-spacing: 0.8px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* to match that of data.aclum.org */
.navbar .container {
  padding-left: 0;
  padding-right: 0;
}

.navbar-brand {
  margin-left: 1.5rem;
}

.navbar-brand img {
  height: 50px;
  /* Adjust logo height */
}

/* skip to main content css*/
a.skip-main {
  left: -999px;
  position: absolute;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -999;
}

a.skip-main:focus,
a.skip-main:active {
  color: #fff;
  background-color: #000;
  left: auto;
  top: auto;
  width: 30%;
  height: auto;
  overflow: auto;
  margin: 10px 35%;
  padding: 5px;
  border-radius: 15px;
  border: 4px solid yellow;
  text-align: center;
  font-size: 1.2em;
  z-index: 999;
}

/* INTRO (header) related CSS */
#main {
  max-width: 100%;
  margin: 1rem auto;
  text-align: center;
  margin-bottom: 20%;
  /* Adjust this value to decrease spacing */
  /* background-color: rgba(255, 0, 0, 0.1); */
  /* for debugging */
}

.byline {
  margin-top: 5px;
  color: #696968;
  font-size: 0.9em;
}

figure{
  margin-top: 30px;
}

figcaption {
  font-size: small;
  font-style: italic;
  margin-top: 10px;
  margin-bottom: 30px;
  text-align: center;
}


/* title */
.intro__hed {
  font-family: 'GT America Condensed';
  text-align: left;
  font-weight: 500;
  font-size: 2.1em;
  line-height: 1.1;
  ;
  margin: -3rem auto 1rem auto;
  /* change depending if navbar is fixed or not */
}

.intro__dek {
  /* for debugging */
  /* background-color: lightblue; */
  max-width: 700px;
  width: 90%;
  margin: 0 auto;
  box-sizing: border-box;
  color: #3d3d3d;
  font-size: 1.2em;
  line-height: 1.4;
  text-align: left;
}

/* OUTRO - not currently used? */
#outro {
  width: 100%;
}


.iframe-container {
  /* including datawapper */
  margin: 2rem auto 2rem auto;
}

#iframe-container iframe {
  width: 100%;
  /* height: auto; */
  display: block;
  border: none;
}

.return-to-top {
  font-size: small;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1em;

}

.appendix-iframe {
  max-width: 992px;
  margin: 2em auto;
  /* centers the wrapper */
  width: 90%;
  /* responsive */
}


.iframe-wrapper {
  position: relative;
  width: 100%;
  padding-top: 157.3%;
  /* (1403 / 892) * 100% = aspect ratio */
  overflow: hidden;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ------- TEXT RELATED CSS ------- */
body {
  font-family: 'GT America', sans-serif;
  /* font-family: 'Century Schoolbook';  */
  margin: 0;
  padding: 0;
  min-height: 1280px;
  /* color: #3b3b3b; */
  /* font-size: 29px; */
}

p,
h1,
h2,
h3,
h4 {
  margin: 0;
  text-align: left;
  font-weight: 400;
  margin-bottom: 1em;
}

/*link CSS*/
a,
a:visited,
a:hover {
  color: teal;
  text-decoration: underline;
  /* no margin-bottom here */
}

/* subtitles within body text*/
h5 {
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  font-weight: 700;
}


svg {
  overflow: visible !important;
  vertical-align: middle;
}

main {
  overflow-x: visible !important;
}

.scroll-indicator {
  text-align: center;
  margin: 10em auto 2em auto;
  font-size: 0.7rem;
  text-transform: uppercase;
  animation: bounce 5s infinite;
  /* Apply bounce animation */
}

/* this was being used for the bouncy arrow which disappeared */
@keyframes bounce {

  0%,
  50%,
  100% {
    transform: translateY(0);
    /* Initial position */
  }

  25%,
  75% {
    transform: translateY(5px);
    /* Move up */
  }
}


#scrolly {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  background-color: #fff;
  padding: 1rem;
  /*where?*/
  margin-bottom: 30vh;
}

#scrolly>* {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

article {
  position: relative;
  padding: 0 1rem;
  max-width: 40%;
}

/* for d3 chart */
#chart-container {
  display: flex;
  align-items: center;
  /* vertical centering */
  justify-content: center;
  /* horizontal centering */
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  /* required for sticky positioning to work */
  width: 100%;
  height: 50vh;
  /* or whatever is appropriate */
  margin: 0;
  /* background-color: lightpink; */
  z-index: 0;

  /* Optional: smoother rendering for GPU-accelerated animations */
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.step {
  margin: 0 auto 50vh 15vw;
  /*convention: top right bottom left*/
  background-color: #fff;
  color: #3b3b3b;
  /*text color*/

  display: flex;
  /* enable flexbox */
  align-items: center;
  /* vertical center */
  justify-content: center;
  /* horizontal center */
  flex-direction: column;
  /* keep p block stacking if more content */
}

.step:last-child {
  margin-bottom: 0;
  /*must be 0*/
}

/* is this doing anything right now? */
.step.is-active {
  background-color: goldenrod;
  color: #3b3b3b;
}

.step p {
  text-align: left;
  padding: 1rem;
  font-size: 1.3rem;
  line-height: 1.2;
}


/* loading spinner */
/* Fullscreen loader background */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Spinner animation */
.spinner {
  width: 35px;
  height: 35px;
  border: 3px solid #ccc;
  border-top-color: #545454;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Keyframes for rotation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Default layout */
body {
  background-color: white;
}

/* Mobile layout */
/* @media (max-width: 600px) and (pointer: coarse) {
  body {
    background-color: lightblue !important;
  }
} */

/* Narrow desktop layout */
@media (max-width: 800px) and (pointer: fine) {
  /* body {
    background-color: lightgreen !important;
  } */
  .step {
    margin: 25rem 0 !important;
    /* Reset big margins */
    padding: 0rem;
    width: 100% !important;
    box-sizing: border-box;
  }

   
}

@media only screen and (max-width: 800px) {

  #chart-container {
    display: none;
    /* hide sticky container on mobile*/
  }

  article {
    max-width: 100% !important;
    /* Override desktop constraint */
    padding: 0 !important;
    /* Prevent doubled padding */
    margin: 0 auto !important;
    /* Centering */
    box-sizing: border-box;
  }

  .step {
    margin: 25rem 0 !important;
    /* Reset big margins */
    padding: 1rem;
    width: 100% !important;
    box-sizing: border-box;
  }

  .mobile-chart {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  #scrolly {
    display: block;
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
    margin-bottom: 50vh;
  }

  #scrolly article {
    display: block;
    width: 100%;
    box-sizing: border-box;

  }

  #scrolly article .step {
    height: auto !important;
    width: 100% !important;
    padding: 0 1rem;
    box-sizing: border-box;

  }

  #scrolly .step {
    width: 100% !important;
    margin-bottom: 1.5rem;
  }


  .intro__hed {
    line-height: 1.1;
    font-size: 2.2rem;
  }

  h5 {
    font-size: 1.5rem;
  }
}
