/* =========================
   Variables / Base
========================= */

:root{
  --bg:#0b1220;
  --card: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.95);
  --muted: rgba(255,255,255,0.75);
  --line: rgba(255,255,255,0.16);
  --accent: #f2d27a;
}

*{
  box-sizing: border-box;
}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(242,210,122,0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(99,102,241,0.18), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.skip-link{
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2000;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(11,18,32,0.96);
  color: var(--text);
  transform: translateY(-140%);
  transition: transform 160ms ease;
}

.skip-link:focus{
  transform: translateY(0);
}

.visually-hidden{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

a{
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.16em;
  transition: opacity 160ms ease, text-decoration-color 160ms ease;
}

a:hover,
a:focus-visible{
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible{
  outline: 2px solid rgba(242,210,122,0.7);
  outline-offset: 2px;
}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

/* =========================
   Header
========================= */

.nav{
  background: rgba(11,18,32,0.65);
  border-bottom: 1px solid var(--line);
}

.nav-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand{
  display: flex;
  flex-direction: column;
}

.brand .name{
  font-size: 18px;
  font-weight: 600;
}

.brand .role{
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.nav-links a{
  margin-left: 18px;
  font-size: 14px;
  opacity: 0.85;
}

.nav-links a:hover{
  opacity: 1;
}

/* =========================
   Hero (TWO CARDS)
========================= */

.hero{
  padding: 36px 0 56px;
}

.hero-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

/* Shared card style */

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.28);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.26);
  box-shadow: 0 22px 68px rgba(0,0,0,0.3);
}

/* Left card – text */

.hero-text{
  padding: 22px;
}

.hero-text h1{
  margin: 0 0 12px;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-text h1 span{
  color: var(--accent);
}

.hero-text p{
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
}

/* Buttons */

.actions{
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  font-size: 14px;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.btn:hover{
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.btn:focus-visible{
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.btn.primary{
  background: rgba(242,210,122,0.18);
  border-color: rgba(242,210,122,0.45);
  color: var(--text);
}

.btn.primary:hover{
  background: rgba(242,210,122,0.26);
  border-color: rgba(242,210,122,0.60);
}

/* Right card – image */

.hero-image img{
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: 50% 12%; /* AINOA MUUTOS: yläosa näkyviin */
  display: block;
}

/* =========================
   Footer
========================= */

footer{
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 24px 0 32px;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.back-to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.20);
  color: var(--text);
  box-shadow: 0 16px 44px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.back-to-top.visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover{
  background: rgba(255,255,255,0.14);
  border-color: rgba(242,210,122,0.55);
}

.back-to-top:focus-visible{
  outline: 2px solid rgba(242,210,122,0.7);
  outline-offset: 2px;
}

.back-to-top__icon{
  font-size: 18px;
  line-height: 1;
}

/* =========================
   Responsive
========================= */

@media (max-width: 900px){
  .hero-grid{
    grid-template-columns: 1fr;
  }

  .hero-text h1{
    font-size: 38px;
  }

  .hero-image img{
    height: 420px;
    object-position: 50% 12%;
  }
}

@media (max-width: 520px){
  .hero-text h1{
    font-size: 32px;
  }

  .hero-image img{
    height: 340px;
    object-position: 50% 12%;
  }
}

@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .btn:focus-visible,
  .card:hover{
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce){
  .back-to-top,
  .back-to-top.visible{
    transition: none;
    transform: none;
  }
}
