/* ─── Self-hosted Fonts ─── */

@font-face {
  font-family: 'DM Sans';
  src: url('fonts/DMSans-variable.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/InstrumentSerif-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/InstrumentSerif-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ─── Design Tokens ─── */

:root {
  /* Brand colors */
  --partneria: #E04040;
  --partneria-dark: #C13030;
  --alustapalvelu: #7C3AED;
  --alustapalvelu-dark: #5B21B6;
  --vuokralaispalvelu: #16803A;
  --vuokralaispalvelu-dark: #14652E;
  --adversary: #1A2744;
  --adversary-dark: #0F172A;
  --adversary-accent: #3B82F6;
  --ripattila: #57606A;
  --ripattila-dark: #3D444D;

  /* Surfaces */
  --bg: #FAFAF9;
  --text: #1C1917;
  --text-muted: #78716C;
  --surface: #FFFFFF;
  --border: #E7E5E4;

  /* Typography */
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --space-2xl: 120px;

  /* Shared UI */
  --radius-card: 20px;
  --radius-badge: 50%;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);

  /* SVG counter fill — matches background */
  --counter-fill: #FAFAF9;
}

/* ─── No-Tracking Statement ─── */

.no-tracking {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin-bottom: var(--space-md);
  font-style: italic;
}

/* ─── Automatic Dark Mode ─── */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #E2E8F0;
    --text-muted: #94A3B8;
    --surface: #1E1E1E;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --counter-fill: #121212;
  }
}


* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Hero ─── */

.hero {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg) var(--space-xl);
}

.hero-mark {
  width: 120px;
  height: 120px;
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Section Labels ─── */

.section-label {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) var(--space-md);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ─── Family Badge Row ─── */

.family-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
  flex-wrap: wrap;
}

.badge {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-badge);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.badge:hover {
  transform: scale(1.08);
}

.connector {
  width: 36px;
  height: 2px;
  background: #D6D3D1;
  flex-shrink: 0;
}

/* ─── Company Cards ─── */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-xl);
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.card-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-badge);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-mark {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.card-mark svg {
  width: 100%;
  height: 100%;
}

.card-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
}

.card-legal {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.card-desc {
  font-size: 0.92rem;
  color: #57534E;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.card-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.card-link .arrow {
  transition: transform 0.2s ease;
}

.card:hover .card-link .arrow {
  transform: translateX(4px);
}

.card-link .coming {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.7;
}

/* ─── Contact ─── */

.contact {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-xl);
}

.contact-content {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.contact-holding h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: var(--space-md);
}

.contact-details {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.contact-details a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.contact-details a:hover {
  border-color: var(--text);
}

.contact-subsidiaries p {
  font-size: 0.92rem;
  color: #57534E;
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.contact-subsidiaries ul {
  list-style: none;
  font-size: 0.92rem;
  line-height: 1.8;
}

.contact-subsidiaries a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

.contact-subsidiaries a:hover {
  border-color: var(--text);
}

/* ─── About ─── */

.about {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-xl);
}

.about-content {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
}

.about-content p {
  font-size: 0.95rem;
  color: #57534E;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.about-content p:last-child {
  margin-bottom: 0;
}

.about-content .detail {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── Footer ─── */

footer {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--text);
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
  .hero {
    padding: var(--space-xl) var(--space-md) var(--space-lg);
  }

  .hero-mark {
    width: 88px;
    height: 88px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .section-label {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .family-row {
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .connector {
    display: none;
  }

  .badge {
    width: 56px;
    height: 56px;
  }

  .badge svg {
    width: 28px;
    height: 28px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--space-md) var(--space-lg);
  }

  .contact {
    padding: 0 var(--space-md) var(--space-lg);
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .about {
    padding: 0 var(--space-md) var(--space-lg);
  }

  footer {
    padding: var(--space-lg) var(--space-md);
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}
