:root {
  color-scheme: dark;
  --bg: #080808;
  --surface: #151515;
  --surface-2: #1f1f1f;
  --text: #f7f2ea;
  --muted: #b7b1a7;
  --border: #312b24;
  --accent: #ff8a3d;
  --accent-2: #ffb36b;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

body[data-theme='light'] {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #ea580c;
  --accent-2: #f97316;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.65;
  background: radial-gradient(circle at top left, #161616 0%, var(--bg) 55%);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body[data-theme='light'] {
  background: radial-gradient(circle at top left, #ffffff 0%, var(--bg) 60%);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071018;
  font-weight: 800;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}

.top-nav a {
  transition: color 0.2s ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--text);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: translateY(0) scale(0.96);
}

body[data-theme='dark'] .moon-icon {
  display: none;
}

body[data-theme='light'] .sun-icon {
  display: none;
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  padding: 4.5rem 0 3rem;
}

.hero-copy {
  max-width: 760px;
  display: grid;
  grid-template-rows: auto auto auto auto;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.8rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero-title {
  min-height: 8.4rem;
  height: 8.4rem;
  margin: 0 0 1rem;
  display: block;
  overflow: hidden;
  line-height: 1.1;
  white-space: normal;
}

.hero-title #typedText {
  display: inline;
  min-height: 2.2em;
  line-height: 1.1;
}

.typing-cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-text {
  min-height: 4.5rem;
  margin: 0 0 1.2rem;
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.hero-text,
.section p,
.contact-list,
.note,
.small,
.testimonial-text {
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border-radius: 0.6rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

body[data-theme='dark'] .button {
  color: #061018;
  font-weight: 700;
}

.button:hover,
.button:focus-visible {
  background: var(--accent-2);
}

.button:active {
  transform: scale(0.97);
}

.secondary-btn {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  transition: all 0.2s ease;
}

.secondary-btn:hover,
.secondary-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.secondary-btn:active {
  transform: scale(0.97);
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0;
  margin-bottom: 1rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s ease;
  text-align: left;
}

.text-btn:hover,
.text-btn:focus-visible {
  text-decoration-color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.benefit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.benefit-pill {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(128, 128, 128, 0.05);
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: 2.2rem 0 3rem;
}

.section-heading {
  margin-bottom: 1.25rem;
}

.cards {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: stretch;
}

.card,
.contact-form,
.contact-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card > p:first-of-type {
  margin-bottom: auto;
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.card .small {
  margin: 0.5rem 0 0 0;
  line-height: 1.4;
}

/* --- RULLAAVA ASIAKASKOKEMUKSET-OSIO --- */
.marquee-container {
  overflow: hidden;
  user-select: none;
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  gap: 1.5rem;
  min-width: 100%;
  animation: scroll-left 25s linear infinite;
}

/* Pysäytetään rullaus kun hiiri viedään päälle */
.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.5rem;
  width: 320px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.testimonial-text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.5;
}

.testimonial-author {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}

@keyframes scroll-left {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(calc(-100% - 1.5rem));
  }
}
/* -------------------------------------- */

.about {
  max-width: 760px;
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-media img {
  width: min(100%, 480px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.3s ease;
}

.contact-section {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.contact-list {
  padding-left: 1.1rem;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, outline 0.2s ease, background-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-color: var(--accent);
}

.form-message {
  min-height: 1.4rem;
  margin: 0;
  color: var(--accent);
}

/* Modal Styles */
.modal {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface);
  color: var(--text);
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}

.modal[open] {
  opacity: 1;
  transform: translateY(0);
}

@starting-style {
  .modal[open] {
    opacity: 0;
    transform: translateY(20px);
  }
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease, overlay 0.3s allow-discrete, display 0.3s allow-discrete;
}

.modal[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .modal[open]::backdrop {
    opacity: 0;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table td {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.price-table tr:last-child td {
  border-bottom: none;
}

.price-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.site-footer {
  padding: 2rem 1.5rem 2.5rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 840px) {
  .hero,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .top-nav {
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 3rem;
  }

  .price-row {
    flex-direction: column;
  }
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

::-moz-selection {
  background: var(--accent);
  color: #ffffff;
}