/* ============================================================
   AURION — Design tokens
   ============================================================ */
:root {
  /* Color */
  --bg: #07080a;
  --bg-soft: #0c0e12;
  --surface: #12141a;
  --surface-2: #171a21;
  --border: rgba(201, 169, 97, 0.14);
  --border-strong: rgba(201, 169, 97, 0.4);

  --gold: #c9a961;
  --gold-bright: #efd9a3;
  --gold-dim: #8a7338;
  --silver: #aab0bb;

  --text: #f3efe6;
  --text-dim: #9a9da5;
  --text-faint: #5c5f68;

  /* Type */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Layout */
  --container: 1240px;
  --section-pad: clamp(4.5rem, 9vw, 8.5rem);
  --radius: 14px;
}

/* ============================================================
   Reset
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 1.5px solid var(--gold);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ============================================================
   Grain overlay — subtle 2026 texture
   ============================================================ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Typography helpers
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.eyebrow,
.section-label,
.model-tag,
.app-tags span,
.ticker-track,
.stat-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.section-label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-intro {
  max-width: 640px;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.accent {
  background: linear-gradient(110deg, var(--gold-dim) 0%, var(--gold-bright) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
  background-color: rgba(7, 8, 10, 0.72);
  border-bottom-color: var(--border);
  backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.logo-mark {
  width: 26px;
  height: 26px;
  color: var(--gold);
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: none;
  background: none;
  color: var(--text-dim);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.active {
  background: var(--gold);
  color: #0a0a0c;
}

.lang-btn.active:hover {
  color: #0a0a0c;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.25s ease;
  position: relative;
}

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  color: var(--gold-bright) !important;
  font-size: 0.85rem !important;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-cta:hover {
  background-color: rgba(201, 169, 97, 0.1);
  border-color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ============================================================
   Ticker
   ============================================================ */
.ticker {
  position: relative;
  margin-top: 76px;
  height: 42px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  animation: ticker-scroll 38s linear infinite;
  padding-left: 100%;
}

.ticker-sep {
  color: var(--gold-dim);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - 76px - 42px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201, 169, 97, 0.08), transparent 60%);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 5rem clamp(1.5rem, 4vw, 3rem);
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--gold);
  margin-bottom: 1.6rem;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.08;
  max-width: 16ch;
  margin-bottom: 1.6rem;
}

.hero-lead {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: var(--text-dim);
  max-width: 46ch;
  margin-bottom: 2.6rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: clamp(1.5rem, 4vw, 3rem);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-primary {
  background: linear-gradient(110deg, var(--gold-dim), var(--gold) 50%, var(--gold-bright));
  color: #0a0a0c;
  border: 1px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background-color: rgba(201, 169, 97, 0.08);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* ============================================================
   Sections — shared
   ============================================================ */
.section {
  padding: var(--section-pad) 0;
  scroll-margin-top: 118px;
}

#yhteys {
  scroll-margin-top: 118px;
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ============================================================
   Esittely
   ============================================================ */
.esittely-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.esittely-text p {
  color: var(--text-dim);
  margin-bottom: 1.1rem;
  max-width: 52ch;
}

.esittely-text p:last-child {
  margin-bottom: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  background: var(--surface);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--gold-bright);
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}

/* ============================================================
   Liiketoimintamalli
   ============================================================ */
.model-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.model-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.model-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

.model-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.model-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ============================================================
   Palvelut
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.service-card:hover {
  border-color: var(--border-strong);
  background-color: var(--surface);
  transform: translateY(-4px);
}

.service-icon {
  width: 42px;
  height: 42px;
  color: var(--gold);
  margin-bottom: 1.6rem;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

.service-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ============================================================
   Sovellukset
   ============================================================ */
.apps-list {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
}

.app-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease;
}

.app-row:hover {
  background-color: var(--surface);
}

.app-index {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
}

.app-info h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin-bottom: 0.5rem;
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  transition: color 0.25s ease;
}

.app-link::after {
  content: "→";
  font-size: 0.85em;
  color: var(--gold);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-link:hover,
.app-link:focus-visible {
  color: var(--gold-bright);
}

.app-link:hover::after,
.app-link:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.app-info p {
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 56ch;
}

.app-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-self: end;
}

.app-tags span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--silver);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
}

/* ============================================================
   Tiimi / Yhteyshenkilöt
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

.team-grid .team-card {
  max-width: 490px;
}

.team-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.team-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.team-logo-mark {
  position: absolute;
  top: 1.8rem;
  right: 1.8rem;
  width: 28px;
  height: 28px;
  color: var(--border-strong);
  opacity: 0.6;
}

.team-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.team-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
  flex-shrink: 0;
  overflow: hidden;
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-header h3 {
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}

.team-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.team-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
}

.team-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  transition: color 0.25s ease;
}

.team-contact a:hover {
  color: var(--gold-bright);
}

.team-contact svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--gold);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  padding-top: var(--section-pad);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
}

.footer-brand .logo {
  margin-bottom: 1.1rem;
}

.footer-brand p {
  color: var(--text-dim);
  max-width: 32ch;
}

.footer-links,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.footer-links a,
.footer-contact a,
.footer-contact p {
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--gold-bright);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
}

.back-to-top {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--text-dim);
  transition: color 0.25s ease;
}

.back-to-top:hover {
  color: var(--gold);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .model-grid,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .esittely-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .nav-right {
    gap: 0.9rem;
  }

  .logo-text {
    font-size: 0.95rem;
    letter-spacing: 0.03em;
  }

  .lang-toggle {
    padding: 2px;
  }

  .lang-btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.65rem;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    background: rgba(7, 8, 10, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 1.8rem clamp(1.5rem, 4vw, 3rem) 2.2rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .model-grid,
  .services-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .app-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .app-tags {
    justify-self: start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .ticker-track {
    animation: none;
  }

  .btn-primary:hover,
  .btn-secondary:hover,
  .model-card:hover,
  .service-card:hover,
  .team-card:hover {
    transform: none;
  }

  .app-link:hover::after,
  .app-link:focus-visible::after {
    transform: none;
  }
}