/* ============================================================================
 * Suunta.ai Landing v2 — Footer (dark anchor, v2-rebuild 2026-05)
 * ----------------------------------------------------------------------------
 * Premium-merkit:
 *   - Light catcher rim ::before (1px gradient yläreunaan)
 *   - Subtle emerald radial-glow alaoikealla (dark theme)
 *   - Pre-footer CTA-banneri (secondary path)
 *   - Mailing list signup -form
 *
 * Rakenne:
 *   CTA-banneri (Still thinking? + secondary button)
 *   ─── hairline ───
 *   5-col grid: Brand+mailing / Product / Customers / Resources / Company
 *   ─── hairline ───
 *   Bottom 3-col: legal-links | location+business-id | copyright
 *
 * Ops styleguide:
 *   - Hairline-divider yläreunaan
 *   - Social-iconit 36px circle (ennen 32px)
 *   - Linkit text-secondary → text-primary, EI emerald
 *   - Eyebrow column-otsikot
 * ============================================================================ */

.v2-footer {
  position: relative;
  /* Kevyt yläpadding (footeria edeltää jo final-cta:n iso alapadding),
     täysi anchor-alapadding sivun loppuun. */
  padding-block: var(--space-12) var(--section-y-anchor-mobile);
  background: var(--bg-page);
  color: var(--text-primary);
  overflow: hidden;
}

/* Light catcher rim — premium-merkki yläreunaan */
.v2-footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.10) 50%,
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

/* Subtle emerald radial glow alaoikealla — vain dark themessä */
.v2-footer__glow {
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.07), transparent 65%);
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
}

/* Subtle dot-grid pattern reunoilla — sama "viimeinen silaus" -estetiikka
   kuin hero-osiossa. Pattern fade:taa keskeltä radial-mask:lla jotta
   sisältö (CTA-banneri + 5-col grid + bottom-row) pysyy puhtaalla pohjalla.
   Käyttää ::after koska ::before on jo light catcher rim:n käytössä.
   Footer on hero:a paljon korkeampi → vertikaalinen mask 75% jotta
   center-clear -alue on suhteellisesti samaa kokoa kuin herossa. */
.v2-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.11) 1.2px,
    transparent 1.6px
  );
  background-size: 26px 26px;
  background-position: 0 0;
  -webkit-mask-image: radial-gradient(
    ellipse 55% 75% at center,
    transparent 0%,
    transparent 25%,
    black 88%
  );
  mask-image: radial-gradient(
    ellipse 55% 75% at center,
    transparent 0%,
    transparent 25%,
    black 88%
  );
  pointer-events: none;
  z-index: 0;
}

.v2-footer > .container {
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .v2-footer { padding-block: var(--space-16) var(--section-y-anchor-tablet); }
}

@media (min-width: 1024px) {
  .v2-footer { padding-block: var(--space-16) var(--section-y-anchor-desktop); }
}


/* ═══════════════════════════════════════════════════════════════════════════
 * 5-col grid: Brand+mailing / Product / Customers / Resources / Company
 * ═══════════════════════════════════════════════════════════════════════════ */
.v2-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

@media (min-width: 640px) {
  .v2-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10) var(--space-8);
  }
}

@media (min-width: 1024px) {
  .v2-footer__grid {
    /* Brand-sarake leveämpi (tagline + social), sitten 3 linkkisaraketta.
       Aiempi repeat(4) jätti tyhjän 5. sarakkeen kun mailing-list +
       Company poistettiin HTML:stä → footer näytti epätasapainoiselta. */
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: var(--space-10) var(--space-12);
  }
}

@media (min-width: 1280px) {
  .v2-footer__grid {
    gap: var(--space-10) var(--space-16);
  }
}

/* ─── Brand column ────────────────────────────────────────────────────── */
.v2-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  max-width: 340px;
}

@media (min-width: 640px) {
  /* Mobile/tablet brand spannaa 2 saraketta */
  .v2-footer__brand { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .v2-footer__brand { grid-column: auto; max-width: 320px; }
}

/* Optical alignment fix: SuuntaLogo-SVG:n viewBox alkaa x=0.98 ja
   S-monogrammin ympärillä on subtle inner-padding (~3px) joten "S":n
   visual-vasen reuna on optisesti 3px oikealla kuin tagline-tekstin
   alku. Negatiivinen margin-left vetää SVG:n niin että S:n optinen
   vasen reuna täsmää tagline:n / signup-input:in vasempaan reunaan. */
.v2-footer__brand svg {
  height: 22px;
  width: auto;
  display: block;
  margin-left: -3px;
}

.v2-footer__tagline {
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: -0.005em;
}

/* ─── Mailing list signup ─────────────────────────────────────────────── */
.v2-footer__signup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-2);
}

.v2-footer__signup-label {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Integroitu input + nappi: yhtenäinen kontrolli, ei gap.
   Input saa border-radius vasemmalla, nappi oikealla — yksi visuaalinen
   elementti. Premium-detalji: focus-state vaikuttaa koko ryhmään. */
.v2-footer__signup-row {
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition-hover);
}

.v2-footer__signup-row:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.v2-footer__signup-row:focus-within {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.v2-footer__signup-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding-inline: var(--space-3) 8px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  outline: none;
}

.v2-footer__signup-input::placeholder {
  color: var(--text-muted);
}

/* Nappi integroituna right-edge:lle ilman gap:ia. Hover/focus säilyy
   napissa itsessään — emerald-painike, ei rim:n vaikutusta. */
.v2-footer__signup-btn {
  flex-shrink: 0;
  height: 38px;
  margin: 2px;
  border-radius: calc(var(--radius-md) - 2px);
  padding-inline: 14px;
  font-size: 13px;
  font-weight: 500;
}

.v2-footer__signup-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
  margin-top: 6px;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

/* ─── Social icons (34px circles, 15px glyph) ─────────────────────────── */
.v2-footer__social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-3);
}

.v2-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}

.v2-footer__social a:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.v2-footer__social a:active { transform: translateY(0); }

.v2-footer__social a svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* ─── Link columns ────────────────────────────────────────────────────── */
.v2-footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.v2-footer__col-title {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
  /* Sama korkeus kuin SuuntaLogo-svg (~22px) jotta sarakkeet
     linjautuvat horisontaalisesti samalle "x-height"-tasolle */
  line-height: 22px;
}

.v2-footer__col-links {
  display: flex;
  flex-direction: column;
  gap: 11px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.v2-footer__col-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  letter-spacing: -0.005em;
  /* Inline-element jotta hover-alue ei mene koko sarakkeen yli */
  display: inline-block;
}

.v2-footer__col-links a:hover {
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
 * Bottom row — legal-links | location | copyright
 * ═══════════════════════════════════════════════════════════════════════════ */
.v2-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: var(--tracking-tight);
}

@media (min-width: 900px) {
  .v2-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
  }
}

.v2-footer__legal-links {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.v2-footer__legal-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.v2-footer__legal-links a:hover { color: var(--text-primary); }

.v2-footer__sep {
  color: var(--text-muted);
  user-select: none;
  opacity: 0.7;
}

.v2-footer__location,
.v2-footer__copyright {
  color: var(--text-muted);
  line-height: 1.55;
}

/* Sijoita location keskelle desktopilla, copyright oikealle */
@media (min-width: 900px) {
  .v2-footer__location {
    flex: 1;
    text-align: center;
    max-width: 480px;
  }
}

.v2-footer__location a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}

.v2-footer__location a:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}
