/* --- Unified Stylesheet ---
   Merged base/global styles (from styles2.css) placed BEFORE page-specific rules,
   so page-specific rules in this file continue to override. */

/* -- VÄRIMUUTTUJAT -- */
:root {
    --bg-dark-primary: #0D0D18; /* Syvä tummansininen, melkein musta */
    --bg-dark-secondary: #1A1A2E; /* Hieman vaaleampi sininen */
    --text-primary: #E0E0E0; /* Hieman pehmeä valkoinen */
    --text-headlines: #FFFFFF;
    --accent-primary: #00A9FF; /* Sähkönsininen */
    --accent-secondary: #3D5AFE; /* Syvempi sininen */
}

/* -- YLEISET TYYLIT -- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

h1, h2 { color: var(--text-headlines); font-weight: 600; line-height: 1.2; margin-bottom: 1rem; }
h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { color: var(--text-headlines); margin-bottom: 0.5rem; font-size: 1.5rem; }
p { margin-bottom: 1rem; max-width: 70ch; }
a { color: var(--accent-primary); text-decoration: none; }
section { padding: 100px 0; }
.text-center { text-align: center; }
.text-center p { margin-left: auto; margin-right: auto; }
.dark-section { background-color: var(--bg-dark-secondary); }
.accent-text { color: var(--accent-primary); }

/* -- NAVIGAATIO -- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: background-color 0.3s, padding 0.3s;
}
#main-header .container { display: flex; justify-content: space-between; align-items: center; }
#main-header.scrolled { background-color: rgba(13, 13, 24, 0.9); padding: 10px 0; backdrop-filter: blur(5px); }
.logo { font-weight: 700; font-size: 1.5rem; color: var(--text-headlines); }
nav a { color: var(--text-primary); margin-left: 25px; font-weight: 400; transition: color 0.3s; }
nav a:hover { color: var(--accent-primary); }

/* -- NAPIT -- */
.btn { display: inline-block; padding: 12px 30px; border-radius: 50px; font-weight: 600; text-align: center; transition: all 0.3s ease; border: 2px solid transparent; }
.btn-primary { background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 169, 255, 0.2); }
.btn-secondary { border: 2px solid var(--accent-primary); color: var(--accent-primary); }
.btn-secondary:hover { background-color: var(--accent-primary); color: #fff; }

/* -- SANKARIOSIO -- */
#hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; padding: 0 20px; background-image: url(''); background-size: cover; background-position: center; }
.background-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, rgba(13, 13, 24, 0.7) 0%, rgba(13, 13, 24, 0.95) 100%); }
.hero-content { position: relative; z-index: 2; max-width: 900px; }
#hero h1 { margin-bottom: 1.5rem; }
#hero p { font-size: 1.2rem; color: #b0b0b0; max-width: 600px; margin: 0 auto 2.5rem auto; }
.cta-buttons a:first-child { margin-right: 15px; }

/* -- TODISTE-OSIO -- */
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 50px; }
.competitor, .hyperhost { background: var(--bg-dark-secondary); padding: 40px; border-radius: 10px; border: 1px solid #2a2a4a; }
.speed-gauge { width: 150px; height: 150px; border-radius: 50%; margin: 20px auto; display: flex; align-items: center; justify-content: center; border: 5px solid #444; }
.speed-gauge span { font-size: 2rem; font-weight: 700; color: #fff; }
.speed-gauge.fast { border-color: var(--accent-primary); box-shadow: 0 0 25px rgba(0, 169, 255, 0.4); }
.hyperhost .highlight { font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); margin-top: 1rem; }

/* -- PILARI-OSIO -- */
.pillars-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; }
.pillar { padding: 40px 30px; background-color: var(--bg-dark-primary); border-radius: 8px; border: 1px solid #2a2a4a; transition: transform 0.3s, box-shadow 0.3s; }
.pillar:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.pillar i { font-size: 2.5rem; color: var(--accent-primary); margin-bottom: 1.5rem; }

/* -- PROSESSI-OSIO -- */
.process-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; margin-top: 60px; position: relative; }
.step { text-align: center; position: relative; }
.step span { display: block; width: 60px; height: 60px; line-height: 60px; border-radius: 50%; background: var(--bg-dark-secondary); border: 2px solid var(--accent-primary); font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); margin: 0 auto 20px auto; }

/* -- YHTEYDENOTTO-OSIO -- */
.cta-section p { max-width: 600px; margin: 0 auto 2rem auto; }

/* -- FOOTER -- */
footer { padding: 40px 0; text-align: center; color: #777; }

/* -- ANIMAATIOT -- */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.pillar:nth-child(2) { transition-delay: 0.2s; }
.pillar:nth-child(3) { transition-delay: 0.4s; }
.step:nth-child(2) { transition-delay: 0.2s; }
.step:nth-child(3) { transition-delay: 0.4s; }

/* -- RESPONSIVE TYYLIT -- */
@media (max-width: 768px) {
    #main-header .container { flex-direction: column; }
    nav { margin-top: 15px; }
    nav a { margin: 0 10px; }
    .comparison { grid-template-columns: 1fr; }
    .cta-buttons { display: flex; flex-direction: column; gap: 15px; align-items: center; }
    .cta-buttons a:first-child { margin-right: 0; }
}

/* Hyperhost2 page-specific styles. Uses global tokens from ../styles.css */

/* Hero compact variant */
.hero-compact {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 0 20px;
}
.hero-compact .hero-content h1 {
  margin-bottom: 1rem;
}
.hero-compact .hero-content p {
  color: #b0b0b0;
  max-width: 760px;
  margin: 0 auto 2rem auto;
}

/* Speed demo */
.demo-box {
  margin: 2rem auto 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.demo-box input {
  min-width: 280px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #2a2a4a;
  background: var(--bg-dark-primary);
  color: var(--text-primary);
}
.demo-box .result {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  color: #9fd3ff;
  font-weight: 600;
}

/* ROI */
.roi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.roi-card {
  background: var(--bg-dark-primary);
  border: 1px solid #2a2a4a;
  border-radius: 12px;
  padding: 24px;
  text-align: left;
}
.roi-card .value {
  margin-top: 6px;
  font-weight: 700;
}
.roi-card.highlight {
  background: linear-gradient(180deg, rgba(0,169,255,0.08), rgba(61,90,254,0.06));
  border-color: rgba(0,169,255,0.35);
}
.roi-card.highlight h3 {
  margin-bottom: 12px;
}
.roi-card .pair {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
}
.roi-card .pair.big {
  font-size: 1.25rem;
}
.roi-card hr { border: 0; border-top: 1px solid #2a2a4a; margin: 12px 0; }

/* Eco */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.eco-card {
  background: var(--bg-dark-secondary);
  border: 1px solid #2a2a4a;
  border-radius: 12px;
  padding: 22px;
}
.eco-number { font-size: 2rem; font-weight: 800; color: var(--accent-primary); }
.eco-label { color: #b0b0b0; margin-bottom: 6px; }

/* Comparison */
.table-wrap { overflow-x: auto; margin-top: 24px; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 14px 16px; border-bottom: 1px solid #2a2a4a; text-align: left; }
.table-wrap thead th { color: var(--text-headlines); }
.table-wrap td.our, .table-wrap th.our { color: var(--accent-primary); font-weight: 700; }

/* Testimonials */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.testi-grid blockquote {
  background: var(--bg-dark-secondary);
  border-radius: 12px;
  border: 1px solid #2a2a4a;
  padding: 20px;
}
.testi-grid cite { display: block; margin-top: 8px; color: #9aa0b4; font-style: normal; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
.plan { background: var(--bg-dark-primary); border: 1px solid #2a2a4a; border-radius: 12px; padding: 24px; position: relative; }
.plan .price { font-size: 2rem; font-weight: 800; margin: 10px 0 16px 0; }
.plan ul { list-style: none; margin: 0 0 16px 0; padding: 0; }
.plan li { margin: 8px 0; color: #c8c8c8; }
.plan-featured { border-color: var(--accent-primary); box-shadow: 0 0 0 2px rgba(0,169,255,0.2); }
.plan-featured .badge { position: absolute; top: 12px; right: 12px; background: var(--accent-primary); color: #fff; font-size: 12px; padding: 6px 8px; border-radius: 999px; }

/* Waitlist */
.waitlist-form { display: flex; gap: 12px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.waitlist-form input { min-width: 280px; padding: 14px 16px; border-radius: 8px; border: 1px solid #2a2a4a; background: var(--bg-dark-primary); color: var(--text-primary); }
.thanks { color: #9fd3ff; margin-top: 8px; }

/* Minor tweaks */
#main-header { background: transparent; }
#main-header.scrolled { background-color: rgba(13, 13, 24, 0.9); }

@media (max-width: 768px) {
  .hero-compact { min-height: 70vh; }
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #1a1a2e;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 4px;
  padding: 8px 0;
  border: 1px solid #2a2a4a;
}

.dropdown-content a {
  color: #E0E0E0;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.dropdown-content a:hover {
  background-color: #2a2a4a;
  color: #9fd3ff;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropbtn {
  cursor: pointer;
}

/* --- Responsive Navigation (Hamburger Menu) --- */

.hamburger-menu {
  display: none; /* Hidden by default */
  cursor: pointer;
  padding: 15px;
  z-index: 1001; /* Above other header content */
  position: absolute;
  right: 20px;
  top: 15px;
}

.hamburger-menu .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: #E0E0E0;
  transition: all 0.3s ease-in-out;
}

/* Overlay styles */
.overlay-nav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  background-color: rgba(13, 13, 24, 0.98);
  overflow-x: hidden;
  transition: 0.5s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.overlay-nav .close-btn {
  position: absolute;
  top: 20px;
  right: 45px;
  font-size: 60px;
  color: #E0E0E0;
  text-decoration: none;
}

.overlay-nav a {
  padding: 15px;
  text-decoration: none;
  font-size: 28px;
  color: #E0E0E0;
  display: block;
  transition: 0.3s;
  text-align: center;
  font-weight: 600;
}

.overlay-nav a:hover, .overlay-nav a:focus {
  color: #9fd3ff;
}

.mermaid {
    fill: var(--bg-dark-primary);
    stroke: var(--text-primary);
}

/* Media Query for screens <= 1000px */
@media screen and (max-width: 1000px) {
  #main-header nav > a, #main-header nav > .dropdown {
    display: none; /* Hide the original nav links and dropdowns */
  }

  .hamburger-menu {
    display: block; /* Show the hamburger icon */
  }
}
