:root {
  --bg: #0b0b0c;
  --card: #121214;
  --text: #f5f7fb;
  --muted: #ffffff;
  --brand: #FFC000;
  --accent: #1f2937;
  --ring: rgba(245, 197, 24, .35);
  --max: 1200px;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .25);
  --font-main: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Arial;
  --font-heading: 'Oswald', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body { 
  margin: 0; 
  font: 16px/1.6 var(--font-main); 
  color: var(--text); 
  background: var(--bg); 
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin-inline: auto; padding: 0 20px; }

/* --- TYPOGRAPHY & UTILS --- */
.kicker { color: black; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; margin: .5rem 0 1.5rem; text-transform: uppercase; line-height: 1.1; }
.subtitle { color: rgba(255,255,255,0.8); max-width: 60ch; margin: 10px auto 0; font-size: 1.1rem; }
.center { text-align: center; }
.muted { color: rgba(255,255,255,0.6) !important; }
.text-brand { color: var(--brand); }

/* Pakotukset */
.text-black { color: #000000 !important; }
.white-label { color: #ffffff !important; display: block; margin-bottom: 8px; margin-top: 8px; }

/* --- BUTTONS --- */
.btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  gap: .5rem; 
  border: 1px solid transparent; 
  background: var(--brand); 
  color: #111; 
  padding: .8rem 1.1rem; 
  border-radius: 999px; 
  font-weight: 700; 
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 192, 0, 0.4); }
.full-width { width: 100%; }

/* --- HEADER --- */
.navbar { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50; backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid #1b1b1f; background: rgba(11, 11, 12, .85); }
.nav-flex { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { display: flex; align-items: center; gap: .6rem; font-weight: 900; font-size: 1.2rem; }
.nav-links { display: none; gap: 1rem; }
.nav-links a { padding: .5rem 1rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { background: #1c1c21; color: var(--brand); }
.nav-cta { display: flex; }

/* --- HERO --- */
.hero {
  position: relative;
  /* Gradient overlay + image */
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(11,11,12,1) 100%), url('pics/porukkaa.jpg');
  background-size: cover;
  background-position: center top;
  min-height: 85vh; 
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 20px 100px;
}
.hero-content h1 { text-shadow: 0 4px 30px rgba(0,0,0,0.8); margin-bottom: 1rem; }
.hero-desc { max-width: 700px; margin-bottom: 2rem; font-size: 1.1rem; }
.hero-btn { padding: 1.2rem 3rem; font-size: 1.2rem; box-shadow: 0 0 25px rgba(255, 192, 0, 0.4); }
.hero-trust { margin-top: 2rem; }

/* Hinta-korjaus (Yliviivaus) */
.crossed-price {
  text-decoration: line-through; 
  opacity: 0.7; 
  font-size: 0.8em; 
  margin-right: 10px; 
  color: #111; /* Musta teksti keltaisella napilla */
  font-weight: 600;
}

/* --- STORY SECTION (YELLOW & BLACK) --- */
.section-story { background: var(--brand); color: #0b0b0c; padding: 0; }
.story-static { padding: 80px 20px; cursor: default; }
.story-summary { padding-bottom: 20px; }
.story-label { font-size: 1.5rem; font-weight: 900; text-transform: uppercase; color: #000; }
.story-body { margin-top: 0; padding-top: 20px; border-top: 2px solid rgba(0,0,0,0.1); display: block; }

.story-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.story-step { border-left: 3px solid #000; padding-left: 20px; }
.step-time { display: block; font-size: 0.9rem; opacity: 0.7; font-weight: 800; margin-bottom: 8px; text-transform: uppercase; }
.story-step h3 { margin: 0 0 10px; font-size: 1.3rem; font-weight: 800; }

/* --- 8 VIIKKOA SECTION (DIAGONAL SQUARES) --- */
.section { padding: 100px 0; }
.limiter-line { border-top: 1px solid #1e1e22; }

/* Grid perusasetus */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid #1e1e22; border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow); }
.card-pad { padding: 40px 30px; }

/* Neliöt ja Diagonaalisuus */
.square-card {
  aspect-ratio: 1 / 1; /* Neliö */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Diagonaalinen asettelu vain työpöydällä */
@media (min-width: 900px) {
  .diagonal-cards {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
  
  /* 2. kortti putoaa alemmas */
  .diagonal-cards .card:nth-child(2) { margin-top: 60px; }
  
  /* 3. kortti putoaa vielä alemmas */
  .diagonal-cards .card:nth-child(3) { margin-top: 120px; }
}

/* --- PRICING & FORM --- */
.pricing-card.popular {
  /* Margin varmistaa, että badge ei mene edellisen sectionin päälle mobiilissa */
  margin-top: 40px; 
  background: linear-gradient(180deg, rgba(255, 192, 0, 0.03) 0%, rgba(18, 18, 20, 1) 100%);
  position: relative;
  padding: 50px 40px;
}

/* BADGE FIX MOBIILIIN */
.popular-badge {
  position: absolute; 
  left: 50%; 
  transform: translateX(-50%);
  background: var(--brand); 
  color: #000; 
  font-weight: 900; 
  text-transform: uppercase;
  border-radius: 50px; 
  letter-spacing: 0.05em;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  
  /* Pysy yhdellä rivillä */
  white-space: nowrap;
  width: max-content;
  z-index: 10;
  
  top: -20px;
  padding: 10px 24px;
  font-size: 1rem;
}

.pricing-price { text-align: center; margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.price-amount { display: block; font-size: 3rem; font-weight: 900; color: #fff; line-height: 1; }
.price-period { font-size: 1.1rem; font-weight: 700; margin-top: 5px; display: block; }

/* Form inputs */
.form-input {
  background: #0f1013;
  color: #f5f7fb;
  border: 1px solid #26262a;
  border-radius: 12px;
  padding: .8rem .9rem;
  width: 100%;
}
.form-input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }

/* --- FOOTER --- */
.footer { padding: 60px 0; color: rgba(255,255,255,0.5); font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-links a:hover { color: var(--brand); text-decoration: underline; }

/* --- RESPONSIVE --- */
@media (min-width: 768px) {
  .nav-links { display: flex; }
}

@media (max-width: 767px) {
  .hero-content h1 { font-size: 2.5rem; }
  .card-pad { padding: 30px 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
  
  /* Mobiilissa neliö voi olla liian korkea vähälle tekstille, sallitaan jousto */
  .square-card { aspect-ratio: auto; min-height: 250px; }
  
  /* Badge hieman pienemmäksi todella kapeilla näytöillä, mutta pysyy yhdellä rivillä */
  .popular-badge { font-size: 0.9rem; padding: 8px 16px; top: -16px; }
}