/* ============================================================
   Kuljetusliike Antti Luttinen — index.css
   Design: Split-screen B, Warm Amber, Fraunces + Instrument Sans
   ============================================================ */

/* ── Custom Properties ── */
:root {
  /* Colors — OKLCH */
  --brand: oklch(0.45 0.15 35);
  --brand-light: color-mix(in oklab, var(--brand) 30%, white);
  --brand-dark: color-mix(in oklab, var(--brand) 70%, black);
  --surface-1: oklch(0.99 0.005 35);
  --surface-2: oklch(0.94 0.01 35);
  --surface-3: oklch(0.18 0.02 35);
  --text-primary: oklch(0.14 0.01 35);
  --text-secondary: oklch(0.44 0.03 35);
  --accent: oklch(0.72 0.18 55);
  --accent-dark: color-mix(in oklab, var(--accent) 70%, black);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Typography */
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--surface-1);
  overflow-x: hidden;
}

::selection {
  background: color-mix(in oklab, var(--accent) 35%, white);
  color: var(--text-primary);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background 150ms ease-out;
  text-decoration: none;
  border: 2px solid transparent;
  min-height: 44px;
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--surface-3);
  border-color: var(--accent);
  &:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 4px 16px color-mix(in oklab, var(--accent) 40%, transparent);
    transform: translateY(-1px);
  }
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: color-mix(in oklab, var(--text-primary) 30%, transparent);
  &:hover {
    border-color: var(--text-primary);
    transform: translateY(-1px);
  }
}

.btn-white {
  background: white;
  color: var(--surface-3);
  border-color: white;
  &:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }
}

.btn-outline-white {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.6);
  &:hover {
    border-color: white;
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
  }
}

/* ── Section Tag ── */
.section-tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-3xl);

  h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
  }

  p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
  }
}

/* ── Scroll Animations ── */
.reveal-up {
  animation: fadeUp linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 70%;
}

.reveal-left {
  animation: fadeLeft linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 70%;
}

.reveal-right {
  animation: fadeRight linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 70%;
}

.reveal-card {
  animation: cardReveal linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 80%;
  animation-delay: var(--delay, 0ms);
}

@keyframes fadeUp {
  from { opacity: 0; translate: 0 40px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes fadeLeft {
  from { opacity: 0; translate: -50px 0; clip-path: inset(0 20% 0 0); }
  to { opacity: 1; translate: 0 0; clip-path: inset(0 0 0 0); }
}

@keyframes fadeRight {
  from { opacity: 0; translate: 50px 0; clip-path: inset(0 0 0 20%); }
  to { opacity: 1; translate: 0 0; clip-path: inset(0 0 0 0); }
}

@keyframes cardReveal {
  from { opacity: 0; translate: 0 30px; }
  to { opacity: 1; translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal-left, .reveal-right, .reveal-card {
    animation: none;
  }
}

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;

  .logo-icon { font-size: 1.4rem; }

  .logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    em {
      font-style: italic;
      color: var(--accent);
    }
  }
}

.main-nav {
  flex: 1;

  ul {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
  }

  a {
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 150ms ease-out;
    &:hover { color: var(--accent); }
  }
}

.header-cta {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  transition: color 150ms ease-out;
  flex-shrink: 0;
  &:hover { color: white; }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    transition: transform 200ms ease-in-out;
  }
}

/* ── HERO — Split Screen ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
}

.hero-image-panel {
  position: relative;
  overflow: hidden;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: parallax linear;
    animation-timeline: scroll();
  }
}

@keyframes parallax { to { transform: translateY(-20%); } }

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--brand) 70%, black) 0%,
    color-mix(in oklab, var(--brand) 40%, black) 60%,
    transparent 100%
  );
}

.hero-badge {
  position: absolute;
  bottom: var(--space-3xl);
  left: var(--space-xl);
  background: var(--accent);
  color: var(--surface-3);
  padding: var(--space-md) var(--space-lg);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  text-align: center;

  .badge-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
  }

  .badge-text {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
}

.hero-content-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-4xl) var(--space-3xl);
  background: var(--surface-1);
}

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-2xl);
  max-width: 440px;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
}

.hero-trust {
  display: flex;
  gap: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid color-mix(in oklab, var(--text-primary) 15%, transparent);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  flex-direction: column;
  strong {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
  }
  span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
  }
}

/* ── STATS BAR ── */
.stats-bar {
  background: var(--surface-3);
  padding: var(--space-3xl) 0;

  .stats-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-4xl);
    flex-wrap: wrap;
  }
}

.stat-item {
  text-align: center;
  .stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--accent);
  }
  .stat-plus {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--accent);
  }
  .stat-label {
    color: rgba(255,255,255,0.65);
    font-size: 0.9375rem;
    margin-top: var(--space-xs);
  }
}

/* ── SERVICES ── */
.services {
  padding: var(--space-4xl) 0;
  background: var(--surface-2);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.service-card {
  background: var(--surface-1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
  border-bottom: 3px solid transparent;

  &:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-bottom-color: var(--accent);
  }

  .card-image {
    height: 220px;
    overflow: hidden;
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 400ms ease-out;
    }
  }

  &:hover .card-image img {
    transform: scale(1.04);
  }

  .card-body {
    padding: var(--space-lg) var(--space-xl);
  }

  h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
  }

  p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--space-md);
    line-height: 1.55;
  }

  .card-price {
    display: inline-block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--accent);
    background: color-mix(in oklab, var(--accent) 12%, transparent);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    margin-bottom: var(--space-md);
  }

  .card-link {
    display: block;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 150ms ease-out, translate 150ms ease-out;
    &:hover {
      color: var(--accent);
      translate: 4px 0;
    }
  }
}

/* ── ABOUT ── */
.about {
  padding: var(--space-4xl) 0;
  background: var(--surface-1);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about-image {
  position: relative;
  img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    border-radius: 16px;
  }
  .about-image-accent {
    position: absolute;
    inset: -12px -12px auto auto;
    width: 60%;
    height: 60%;
    border: 3px solid var(--accent);
    border-radius: 16px;
    z-index: -1;
  }
}

.about-content {
  h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--space-lg);
    margin-top: var(--space-md);
  }

  p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.65;
  }
}

.about-features {
  margin: var(--space-lg) 0 var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  li {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid color-mix(in oklab, var(--text-primary) 8%, transparent);
  }
}

/* ── TESTIMONIALS ── */
.testimonials {
  padding: var(--space-4xl) 0;
  background: var(--brand);
}

.testimonials .section-header {
  h2 { color: white; }
  .section-tag { color: var(--accent); }
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.testimonial-card {
  background: color-mix(in oklab, var(--brand-dark) 50%, transparent);
  border-radius: 12px;
  padding: var(--space-xl);
  border: 1px solid rgba(255,255,255,0.12);

  p {
    color: rgba(255,255,255,0.88);
    line-height: 1.6;
    font-style: italic;
    margin-bottom: var(--space-lg);
    font-size: 0.9375rem;
  }
}

.testimonial-quote {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: var(--accent);
  line-height: 0.8;
  margin-bottom: var(--space-md);
  font-weight: 900;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  strong { color: white; font-weight: 600; }
  span { color: rgba(255,255,255,0.6); font-size: 0.875rem; }
}

/* ── CTA SECTION ── */
.cta-section {
  position: relative;
  padding: var(--space-4xl) 0;
  text-align: center;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--surface-3) 80%, transparent);
}

.cta-content {
  position: relative;
  z-index: 1;

  h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900;
    color: white;
    margin-bottom: var(--space-md);
  }

  p {
    color: rgba(255,255,255,0.8);
    font-size: 1.125rem;
    max-width: 560px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.6;
  }
}

.cta-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.cta-note {
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--surface-3);
  color: rgba(255,255,255,0.7);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3xl);
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.footer-brand {
  .logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: white;
    font-weight: 700;
    display: block;
    margin-bottom: var(--space-md);
    em { font-style: italic; color: var(--accent); }
  }
  p { font-size: 0.9375rem; line-height: 1.6; }
}

.footer-links, .footer-contact {
  h4 {
    color: white;
    font-weight: 600;
    margin-bottom: var(--space-md);
    font-size: 0.9375rem;
  }
  a {
    transition: color 150ms ease-out;
    &:hover { color: var(--accent); }
  }
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  li a { font-size: 0.9375rem; }
}

.footer-contact p {
  font-size: 0.9375rem;
  margin-bottom: var(--space-sm);
  a { transition: color 150ms ease-out; &:hover { color: var(--accent); } }
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-md) var(--space-xl);
  text-align: center;
  p {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-image-panel {
    height: 50vw;
    min-height: 240px;
    max-height: 380px;
  }

  .hero-content-panel {
    padding: var(--space-2xl) var(--space-xl);
  }

  .hero-actions { flex-direction: column; }
  .hero-trust { gap: var(--space-lg); }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .about-image img { height: 280px; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .main-nav { display: none; }
  .hamburger { display: flex; }
  .header-cta { font-size: 0.8rem; }

  .main-nav.is-open {
    display: block;
    position: fixed;
    inset: 64px 0 0;
    background: var(--surface-3);
    padding: var(--space-xl);
    ul {
      flex-direction: column;
      align-items: center;
      gap: var(--space-xl);
    }
    a { font-size: 1.25rem; }
  }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }
  .stats-bar .stats-grid { gap: var(--space-xl); }
}
