/*===============
  global styles
===============*/

* {
  padding: 0;
  margin: 0;
  border: 0;
  outline: 0;
  background-color: inherit;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  box-shadow: none;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.5;
  color: var(--clr-fg);
  background-color: var(--clr-bg);
}

.light {
  --clr-bg: #fcfcfc;
  --clr-bg-alt: #fff;
  --clr-fg: #555;
  --clr-fg-alt: #444;
  --clr-primary: #ED1C24;
  --shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.dark {
  --clr-bg: #23283e;
  --clr-bg-alt: #2a2f4c;
  --clr-fg: #bdbddd;
  --clr-fg-alt: #cdcdff;
  --clr-primary: #90a0d9;
  --shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

::-moz-selection { background: var(--clr-primary); color: var(--clr-bg); }
::selection { background: var(--clr-primary); color: var(--clr-bg); }

h1, h2, h3, h4 {
  line-height: 1.2;
  color: var(--clr-fg-alt);
}

h1 { font-size: 4rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }

ul { list-style-type: none; }
a { text-decoration: none; }
button { cursor: pointer; }

@media (max-width: 900px) {
  h1 { font-size: 2.6rem; }
}

/* Accessibility helper */
.sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/*===================
  buttons and links
===================*/

.link {
  color: var(--clr-primary);
  padding: 0 0 0.3em 0;
  position: relative;
  font-size: 1.2rem;
}

.link::before {
  content: "";
  display: inline;
  width: 0%;
  height: 0.2em;
  position: absolute;
  bottom: 0;
  background-color: var(--clr-primary);
  transition: width 0.2s ease-in;
}

.link:hover::before,
.link:focus::before { width: 100%; }

.link--nav {
  color: var(--clr-fg);
  text-transform: lowercase;
  font-weight: 500;
}

.link--icon {
  color: var(--clr-fg);
  font-size: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8em 1.4em;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: lowercase;
  white-space: nowrap;
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
}

.btn__icon {
  width: 20px;
  height: 20px;
  background: none;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.btn--outline {
  color: var(--clr-primary);
  background-color: transparent;
  border: 2px solid var(--clr-primary);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn--outline:focus,
.btn--outline:hover { color: var(--clr-bg); }

.btn--outline:before {
  content: "";
  position: absolute;
  background-color: var(--clr-primary);
  right: 100%;
  bottom: 0;
  left: 0;
  top: 0;
  z-index: -1;
  transition: right 0.2s ease-in-out;
}

.btn--outline:hover::before,
.btn--outline:focus::before { right: 0; }

.btn--plain {
  text-transform: initial;
  background-color: var(--clr-bg-alt);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px;
  border: 0;
}

.btn--plain:hover { transform: translateY(-4px); }

.btn--icon { padding: 0; font-size: 1.2rem; }
.btn--icon:hover,
.btn--icon:focus { color: var(--clr-primary); }
.btn--icon:active { transform: translateY(-5px); }

/*========
  layout
========*/

.center {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.header {
  height: 8em;
  padding: 0.3rem 0;
  max-width: 1100px;
  width: 95%;
  margin: 0 auto;
  justify-content: space-between;
}

.header h4 {
  width: 100%;
  text-align: center;
}

@media (min-width: 601px) {
  .header h4 {
    width: auto;
    text-align: left;
    margin-right: auto;
    margin-top: 0;
  }
}


main {
  max-width: 1100px;
  width: 95%;
  margin: 0 auto;
}

.section { margin-top: 5em; }

#about.section { margin-top: 2em; }

.section__title {
  text-align: center;
  margin-bottom: 0.8em;
  text-transform: uppercase;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1em;
}

.nav__list {
  display: flex;
  gap: 1em;
  align-items: center;
  margin-right: 0.5em;
}

.display-nav-list { width: 100%; }

.nav__list-item { margin: 0; }

.btn--icon#btn-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1em;
}

.nav__hamburger { display: none; }

/* Page bits */
.profit-figure { color: green; font-weight: 550; }

.hero {
  flex-direction: column;
  padding-top: 0rem;
}

.about__logo-round {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
}

.about__role {
  font-size: 1.6rem;
  margin-top: 1.2em;
}

.about__desc {
  font-size: 1.05rem;
  max-width: 600px;
  margin-top: 1.2em;
}

/* tighter spacing between hero paragraphs */
.about__desc + .about__desc { margin-top: 0.8em; }

/* Stats split */
.plans-split {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 2rem 1rem;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.plans-split__buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 0.35rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Ensure content-width buttons (not stretched) and avoid stray margins */
.plans-split__buttons .btn { width: auto; }
.plans-split .btn--outline { margin-right: 0; }

.stats__iframe-container { width: 100%; }

/* Projects */
.projects__grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18em, 1fr));
  grid-gap: 2em;
}

.project {
  padding: 2em;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.project.visible { opacity: 1; transform: translateY(0); }
.project:hover { transform: translateY(-7px); }

.project__description { margin-top: 1em; }

/* Contact */
.contact { flex-direction: column; }

.contact__desc {
  margin-top: 0;
  margin-bottom: 1em;
  text-align: center;
}

.contact__buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  column-gap: 0.4em;
  row-gap: 0.6em;
}

.footer {
  padding: 0.3em 0;
  margin-top: 4em;
  text-align: center;
}

.scroll-top {
  display: none;
  position: fixed;
  bottom: 1em;
  right: 1em;
  background-color: transparent;
  font-size: 1.8rem;
  transition: transform 0.2s ease-in-out;
}

/* Mobile */
@media (max-width: 900px) {
  .plans-split { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .site-note { width: 100%; text-align: center; margin-top: 1.3em; padding: 0.5em 0; }

  .section { margin-top: 4em; }

  .nav { margin-top: 0.5em; }

  .nav__list {
    flex-direction: column;
    position: absolute;
    top: 4em;
    right: 0;
    left: 0;
    background-color: var(--clr-bg);
    padding: 0.5em 0;
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease-in-out;
    text-align: center;
  }

  .display-nav-list { width: 100%; }

  .nav__list-item { margin: 0.3em 0; padding: 0.5em 0; }

  .nav__hamburger {
    display: flex;
    position: absolute;
    top: 1em;
    left: 1em;
    z-index: 1000;
  }

  .btn--icon#btn-theme {
    position: absolute;
    top: 1em;
    right: 1em;
    margin: 0;
  }

  .scroll-container { display: none; }
}
