/* === Base Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  padding: 2rem clamp(1rem, 4vw, 3rem);
}

/* === Typography === */
h1 {
  font-size: 2.5rem;
  font-weight: 100;
  margin-bottom: 0.5rem;
  padding: 0 clamp(1rem, 5vw, 3rem);
}

h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

/* === Navigation === */
.sticky-nav {
  position: sticky;
  top: 0;
  background-color: #121212;
  padding: 1rem 2rem;
  border-bottom: 1px solid #333;
  z-index: 1000;
}

.sticky-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.sticky-nav a {
  color: #90caf9;
  text-decoration: none;
  font-weight: 300;
  transition: color 0.3s ease;
}

.sticky-nav a:hover {
  color: #ffffff;
}

/* === Hero === */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border: 1px;
  height: 100vh;
  border-bottom: 1px solid #333;
  animation: gradientFlow 15s ease infinite;
  background-blend-mode: overlay;
  position: relative;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.2; /* adjust to your preference */
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-video {
    display: none;
  }
}

.hero-full {
  height: 100vh;
  justify-content: center;
}

.hero-content{
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}


.site-name {
  font-weight: 300;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  color: #aaaaaa;
  margin-bottom: 2rem;
  padding: 0;
}

/* === Section Layout === */
.section-wrapper {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  gap: 2rem;
  padding: 4rem clamp(1rem, 4vw, 4rem);
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: nowrap;
}

.section-wrapper.reverse {
  flex-direction: row-reverse;
}

.section-text {
  flex: 1 1 40%;
  max-width: 650px;
}

.section-graphic {
  flex: 1 1 60%;
  display: flex;
  justify-content: center; 
  align-items: center; 
  padding: 0;
  margin: 0;    
}

.section-graphic video {
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 0;
  display: block;
}

.section-graphic img,
.section-graphic iframe {
  width: 100%;
  max-width: 900px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.section-text ul {
  margin-top: 1rem;
  padding-left: 1.2rem;
  list-style-type: disc;
}

.section-text li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  font-weight: 300;
}

.section-text h2 {
  font-size: 2rem;
  color: #ffffff;
  margin-bottom: 1rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}
.feature-tile {
  background-color: #161616;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-tile:hover {
  transform: translateY(-6px);
  border-color: #86d898;
  box-shadow: 0 4px 20px rgba(134, 216, 152, 0.2);
  transition: all 0.3s ease;
}


.feature-tile h2 {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.feature-tile p {
  font-weight: 300;
  color: #ccc;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-description {
  font-size: 0.95rem;
  color: #bbbbbb;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.cta-button {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: #86d898;
  border: 1px solid #86d898;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.cta-button:hover {
  background-color: #86d898;
  color: #121212;
  transform: scale(1.05);
}

.post-card h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.post-card p {
  font-size: 0.95rem;
  color: #bbb;
  font-weight: 300;
}

/* === Heatmap Styles === */

.heatmap-link {
  text-decoration: none;
  color: inherit;
  display: contents;
}

.heatmap-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(5, 200px);
  gap: 0.8rem;
  grid-template-areas:
    "a a b b c c"
    "d d b b e e"
    "f g g h h i"
    "f g g h h i"
    "j j k l l i";
  margin: 3rem 0;
}


/* Tile areas */
.tile-a { grid-area: a; }
.tile-b { grid-area: b; }
.tile-c { grid-area: c; }
.tile-d { grid-area: d; }
.tile-e { grid-area: e; }
.tile-f { grid-area: f; }
.tile-g { grid-area: g; }
.tile-h { grid-area: h; }
.tile-i { grid-area: i; }
.tile-j { grid-area: j; }
.tile-k { grid-area: k; }
.tile-l { grid-area: l; }

/* Tile styles */
.heatmap-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  color: #fff;
  text-align: left;
  padding: 1rem;
  box-shadow: none;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.tile-meta{
  align-self: flex-start;
}

.tile-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
}

.tile-subtitle {
  font-size: 0.7rem;
  font-weight: 300;
  color: #fcfcfc;
  margin-top: 0.2rem;
}

.tile-body {
  align-self: center;
  text-align: center;
  margin-top: auto;
}

.tile-ticker {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.tile-percent {
  font-size: 0.85rem;
  font-weight: 400;
  color: #e0e0e0;
}

.heatmap-tile:hover {
  transform: scale(1.02);
}

/* Color coding */
.good    { background-color: #2ecc71; }  /* green up */
.neutral { background-color: #7f8c8d; }  /* flat gray */
.bad     { background-color: #e74c3c; }  /* red down */

.heatmap-tile.good:hover {
  background-color: #27ae60; /* slightly darker green */
}

.heatmap-tile.neutral:hover {
  background-color: #707b7c; /* slightly darker gray */
}

.heatmap-tile.bad:hover {
  background-color: #c0392b; /* slightly darker red */
}
/* Responsive fallback */
@media (max-width: 768px) {
  .heatmap-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .heatmap-tile {
    flex: 1 1 100%;
    min-height: 150px;
  }
}


/* === Blog Page Specific Styles === */
.hero.blog-hero {
  text-align: center;
  padding: 2rem 2rem 2rem;
}
.hero-title {
  font-size: 3rem;
  font-weight: 100;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: #cccccc;
  font-weight: 300;
  margin-top: 0.5rem;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 2rem;
}
.post-card {
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
.post-card h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.post-card p {
  font-size: 0.95rem;
  color: #bbb;
  font-weight: 300;
  margin-bottom: 1rem;
}

/* === Blog Admin Modal === */
#adminBlogModal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

#adminBlogModal .modal-content {
  background-color: #1e1e1e;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  color: #fff;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

#adminBlogModal label {
  display: block;
  margin-top: 1rem;
  font-weight: 300;
}

#adminBlogModal input,
#adminBlogModal textarea {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem;
  border: 1px solid #333;
  background-color: #121212;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  border-radius: 4px;
}

#adminBlogModal button {
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  background-color: #86d898;
  border: none;
  color: #121212;
  cursor: pointer;
  border-radius: 4px;
}

#adminBlogModal button:hover {
  background-color: #ffffff;
}


/* Grid layout for The Basics */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
}

.tile {
  background-color: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}


.tile:hover {
  background-color: #2c2c2c;
  transform: translateY(-5px);
}
.tile h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}
.tile p {
  color: #bbb;
  font-size: 0.9rem;
}

.content-section {
  max-width: 800px;
  margin: 3rem auto;
  padding: 1rem clamp(1rem, 4vw, 3rem);
}
.content-section h2 {
  color: #ffffff;
  margin-bottom: 1rem;
}
.content-section p {
  color: #ddd;
  line-height: 1.6;
  font-size: 1rem;
}

.close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  color: #aaa;
  font-size: 1.5rem;
  cursor: pointer;
}
.close:hover {
  color: #fff;
}

@media (max-width: 600px) {
  .modal-content {
    padding: 1.25rem;
  }
}

/* === Blog Post Page Layout === */
.post-container {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 2rem;
}
#post-title {
  font-size: 2.2rem;
  color: #ffffff;
  margin-bottom: 1rem;
}
#post-snippet {
  font-size: 1.1rem;
  font-weight: 300;
  color: #ccc;
  margin-bottom: 2rem;
}
#post-body {
  font-size: 1rem;
  font-weight: 300;
  color: #e0e0e0;
  line-height: 1.7;
}

/* === Responsive === */
@media (max-width: 768px) {
  .section-wrapper,
  .section-wrapper.reverse {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .section-graphic img,
  .section-graphic video,
  .section-graphic iframe {
    width: 100%;
    max-width: 500px;
  }
}

/* === Buttons === */




/* === Animation === */
.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Footer === */
footer {
  font-size: 0.9rem;
  text-align: center;
  color: #888;
  padding-top: 2rem;
}

/* === Toast Notifications === */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #333;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  visibility: visible;
}

/* === Page Transitions === */

.js .page-transition {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s ease, transform .4s ease;
}

.js .page-transition.loaded {
  opacity: 1;
  transform: translateY(0);
}

.page-transition {
  transition: none;
}