/* ==========================================================================
   DESIGN SYSTEM — ikkunaremontti.fi
   Nordic minimal renovation brand
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand colors */
  --c-primary:        #1E4D3A;
  --c-primary-dark:   #163829;
  --c-primary-mid:    #2A6650;
  --c-secondary:      #3A7D6A;
  --c-secondary-light:#4E9E87;
  --c-accent:         #F4A261;
  --c-accent-hover:   #E8923D;
  --c-bg:             #F8FAF9;
  --c-bg-section:     #EEF3F0;
  --c-text:           #1A1A1A;
  --c-text-muted:     #556B62;
  --c-border:         #E6ECEA;
  --c-white:          #FFFFFF;

  /* Typography */
  --f-heading: 'Poppins', sans-serif;
  --f-body:    'Inter', sans-serif;

  /* Font sizes (fluid scale) */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Border radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  /* Shadows (green-tinted) */
  --shadow-sm: 0 1px 4px rgba(30,77,58,0.08);
  --shadow-md: 0 4px 16px rgba(30,77,58,0.10);
  --shadow-lg: 0 8px 32px rgba(30,77,58,0.13);

  /* Transitions */
  --t-fast: 0.15s ease;
  --t-base: 0.25s ease;

  /* Layout */
  --container:        1200px;
  --container-narrow: 800px;
  --container-px:     1.5rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--f-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--f-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-text);
}

h1 { font-size: clamp(2rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(1.5rem, 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(1.125rem, 2vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }

p { max-width: min(68ch, 100%); }

.text-muted { color: var(--c-text-muted); }
.text-white  { color: var(--c-white); }

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--sp-20);
}

.section--alt {
  background-color: var(--c-bg-section);
}

.section--dark {
  background-color: var(--c-primary);
  color: var(--c-white);
}

.section-header {
  margin-bottom: var(--sp-12);
}

.section-header h2 {
  margin-bottom: var(--sp-4);
}

.section-label {
  display: inline-block;
  font-family: var(--f-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-secondary);
  margin-bottom: var(--sp-3);
}

.section-label--light {
  color: var(--c-secondary-light);
}

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-6);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.875rem 1.75rem;
  font-family: var(--f-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Primary — orange accent */
.btn--primary {
  background-color: var(--c-accent);
  color: var(--c-primary-dark);
  border-color: var(--c-accent);
  box-shadow: 0 4px 14px rgba(244,162,97,0.35);
}

.btn--primary:hover {
  background-color: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
  box-shadow: 0 6px 20px rgba(244,162,97,0.45);
}

/* Secondary — outlined white (on dark bg) */
.btn--outline-white {
  background-color: transparent;
  color: var(--c-white);
  border-color: rgba(255,255,255,0.5);
}

.btn--outline-white:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: var(--c-white);
}

/* Secondary — outlined green (on light bg) */
.btn--outline {
  background-color: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}

.btn--outline:hover {
  background-color: var(--c-primary);
  color: var(--c-white);
}

/* Ghost text link */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--f-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-secondary);
  text-decoration: none;
  transition: gap var(--t-base), color var(--t-base);
}

.link-arrow:hover {
  gap: var(--sp-3);
  color: var(--c-primary);
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--t-base);
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Alert Banner — lives inside .site-header, sticky with the nav
   -------------------------------------------------------------------------- */
.alert-banner {
  background-color: var(--c-accent);
  display: block;
  width: 100%;
}
.alert-banner__inner {
  display: block;
  text-align: center;
  padding: 0.55rem var(--container-px);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-primary-dark);
  line-height: 1.4;
  text-decoration: none;
  transition: background-color var(--t-fast);
}
.alert-banner__inner:hover {
  background-color: var(--c-accent-hover);
  color: var(--c-primary-dark);
}
.alert-banner__inner strong {
  font-weight: 800;
}
@media (max-width: 480px) {
  .alert-banner__inner {
    font-size: 0.78rem;
  }
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: var(--sp-8);
}

.nav__logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.nav__logo-icon {
  flex-shrink: 0;
  display: block;
}

.nav__logo-name {
  font-family: var(--f-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -0.02em;
}

.nav__logo-tagline {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  letter-spacing: 0.04em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav__link {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}

.nav__link:hover {
  color: var(--c-primary);
  background-color: var(--c-bg-section);
}

.nav__cta {
  margin-left: var(--sp-4);
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-2);
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--c-primary);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-base);
}

/* Dropdown */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.nav__dropdown-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--t-fast);
}

.nav__dropdown:hover .nav__dropdown-toggle svg,
.nav__dropdown-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: var(--sp-2);
  padding-top: calc(var(--sp-2) + 8px);
  list-style: none;
  z-index: 200;
}

/* Bridge the gap so hover doesn't break when moving mouse down */
.nav__dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown-menu.is-open {
  display: block;
}

.nav__dropdown-item {
  display: block;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text);
  border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast);
  text-decoration: none;
}

.nav__dropdown-item:hover {
  background: var(--c-bg-section);
  color: var(--c-primary);
}

/* Mobile nav open state */
.nav__links.is-open {
  display: flex;
}

@media (max-width: 900px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
    padding: var(--sp-4) var(--container-px);
    gap: var(--sp-1);
    box-shadow: var(--shadow-md);
  }

  .nav__link {
    padding: var(--sp-3) var(--sp-4);
  }

  .nav__cta {
    margin-left: 0;
    margin-top: var(--sp-2);
  }

  .nav__toggle {
    display: flex;
  }

  /* Dropdown in mobile menu */
  .nav__dropdown-toggle {
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
    justify-content: space-between;
  }

  .nav__dropdown-menu {
    position: static;
    border: none;
    border-left: 2px solid var(--c-border);
    border-radius: 0;
    box-shadow: none;
    margin-left: var(--sp-4);
    margin-bottom: var(--sp-2);
    padding: var(--sp-1) 0;
  }

  .nav__dropdown:hover .nav__dropdown-menu {
    display: none;
  }

  .nav__dropdown-menu.is-open {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  background-color: var(--c-primary);
  /* Subtle diagonal pattern overlay */
  background-image:
    linear-gradient(160deg, var(--c-primary) 0%, var(--c-primary-dark) 100%),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.015) 40px,
      rgba(255,255,255,0.015) 80px
    );
  background-blend-mode: normal;
  color: var(--c-white);
  padding-block: var(--sp-24) var(--sp-20);
  position: relative;
  overflow: hidden;
}

/* Decorative arc at bottom */
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--c-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.hero__content {
  max-width: 580px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-accent);
  margin-bottom: var(--sp-6);
  letter-spacing: 0.04em;
}

.hero__eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background-color: var(--c-accent);
  flex-shrink: 0;
}

.hero h1 {
  color: var(--c-white);
  margin-bottom: var(--sp-6);
  letter-spacing: -0.02em;
}

.hero__lead {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.78);
  margin-bottom: var(--sp-10);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-12);
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  padding-top: var(--sp-8);
  border-top: 1px solid rgba(255,255,255,0.12);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
}

.trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--c-accent);
  flex-shrink: 0;
}

/* Hero visual (right side) */
.hero__visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero__window-graphic {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3/4;
  background-color: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--sp-3);
  position: relative;
}

.hero__window-graphic::before {
  content: 'Ikkunaremontti';
  position: absolute;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.window-pane {
  background-color: rgba(58,125,106,0.2);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
}

.window-pane::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero__visual { display: none; }
}

/* --------------------------------------------------------------------------
   Cards (shared)
   -------------------------------------------------------------------------- */
.card {
  background-color: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(30,77,58,0.15);
}

.card__icon {
  width: 48px;
  height: 48px;
  background-color: var(--c-bg-section);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-6);
  flex-shrink: 0;
}

.card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--c-primary);
}

.card h3 {
  margin-bottom: var(--sp-3);
  font-size: var(--text-xl);
}

.card p {
  color: var(--c-text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
  margin-bottom: var(--sp-6);
  flex: 1;
}

.card .link-arrow {
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   Services Section (#palvelut)
   -------------------------------------------------------------------------- */
.palvelut { }

/* --------------------------------------------------------------------------
   Window Types Section (#ikkunatyypit)
   -------------------------------------------------------------------------- */
.ikkunatyypit { }

.type-card {
  background-color: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base), transform var(--t-base);
}

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

.type-badge {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 600;
  background-color: var(--c-bg-section);
  color: var(--c-secondary);
  margin-bottom: var(--sp-4);
  letter-spacing: 0.04em;
}

.type-card h3 {
  margin-bottom: var(--sp-3);
}

.type-card p {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Pricing Section (#hinta)
   -------------------------------------------------------------------------- */
.hinta { }

.price-factors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-6);
  margin-bottom: var(--sp-10);
}

.price-factor {
  background-color: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}

.price-factor__number {
  font-family: var(--f-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--c-primary);
  margin-bottom: var(--sp-2);
  line-height: 1;
}

.price-factor h4 {
  margin-bottom: var(--sp-2);
  font-size: var(--text-base);
}

.price-factor p {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: 1.6;
}

.price-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--sp-8);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}

.price-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  background-color: var(--c-white);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.price-table th {
  background-color: var(--c-primary);
  color: var(--c-white);
  font-family: var(--f-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--sp-4) var(--sp-6);
  text-align: left;
}

.price-table td {
  padding: var(--sp-4) var(--sp-6);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}

.price-table tr:last-child td {
  border-bottom: none;
}

.price-table tr:nth-child(even) td {
  background-color: var(--c-bg-section);
}

/* --------------------------------------------------------------------------
   Steps / Timeline (#vaiheet)
   -------------------------------------------------------------------------- */
.vaiheet { }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

/* Connecting line */
.steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(12.5% + 16px);
  right: calc(12.5% + 16px);
  height: 2px;
  background: linear-gradient(90deg, var(--c-secondary) 0%, var(--c-secondary-light) 100%);
  z-index: 0;
}

.step {
  padding: 0 var(--sp-6) var(--sp-6);
  text-align: center;
  position: relative;
  z-index: 1;
}

.step__number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--c-primary);
  color: var(--c-white);
  font-family: var(--f-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-6);
  box-shadow: 0 4px 16px rgba(30,77,58,0.25);
  position: relative;
}

.step__number::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(30,77,58,0.2);
}

.step h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--sp-3);
}

.step p {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: 1.6;
  max-width: none;
}

@media (max-width: 700px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .steps::before {
    top: 32px;
    left: 32px;
    right: auto;
    width: 2px;
    height: calc(100% - 64px);
    background: linear-gradient(180deg, var(--c-secondary) 0%, var(--c-secondary-light) 100%);
  }

  .step {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-6);
    text-align: left;
    padding: 0 0 var(--sp-8) var(--sp-4);
  }

  .step__number {
    margin: 0;
    flex-shrink: 0;
  }

  .step p { max-width: 60ch; }
}

/* --------------------------------------------------------------------------
   Service Areas (#palvelualueet)
   -------------------------------------------------------------------------- */
.palvelualueet { }

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-3);
}

.city-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  background-color: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--f-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-primary);
  text-decoration: none;
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
}

.city-link:hover {
  background-color: var(--c-primary);
  color: var(--c-white);
  border-color: var(--c-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.city-link svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
  flex-shrink: 0;
}

.city-link:hover svg {
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   City accordion (Palvelualueet)
   -------------------------------------------------------------------------- */
.city-accordion {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.city-accordion__toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: var(--sp-4) var(--sp-6);
  font-family: var(--f-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-primary);
  cursor: pointer;
  background: var(--c-white);
  user-select: none;
  transition: background var(--t-fast);
}

.city-accordion__toggle::-webkit-details-marker { display: none; }

.city-accordion__toggle:hover { background: var(--c-bg-section); }

.city-accordion__icon {
  flex-shrink: 0;
  transition: transform var(--t-base);
}

.city-accordion[open] .city-accordion__icon {
  transform: rotate(180deg);
}

.city-accordion > nav {
  padding: var(--sp-4) var(--sp-6) var(--sp-6);
  background: var(--c-bg-section);
  border-top: 1px solid var(--c-border);
}

/* --------------------------------------------------------------------------
   FAQ (#ukk)
   -------------------------------------------------------------------------- */
.ukk { }

.faq-list {
  max-width: 740px;
}

.faq-item {
  border-bottom: 1px solid var(--c-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--c-border);
}

details.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-6) 0;
  font-family: var(--f-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--c-text);
  user-select: none;
  transition: color var(--t-fast);
}

details.faq-item summary::-webkit-details-marker {
  display: none;
}

details.faq-item summary:hover {
  color: var(--c-primary);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--c-bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t-base), transform var(--t-base);
}

.faq-icon svg {
  width: 14px;
  height: 14px;
  color: var(--c-primary);
  transition: transform var(--t-base);
}

details.faq-item[open] summary .faq-icon {
  background-color: var(--c-primary);
  transform: rotate(180deg);
}

details.faq-item[open] summary .faq-icon svg {
  color: var(--c-white);
}

details.faq-item[open] summary {
  color: var(--c-primary);
}

.faq-answer {
  padding-bottom: var(--sp-6);
  color: var(--c-text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
}

.faq-answer p + p {
  margin-top: var(--sp-3);
}

/* --------------------------------------------------------------------------
   Lead Form (#tarjous)
   -------------------------------------------------------------------------- */
.tarjous {
  background-color: var(--c-primary);
}

.tarjous-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: start;
}

.tarjous__intro h2 {
  color: var(--c-white);
  margin-bottom: var(--sp-4);
}

.tarjous__intro p {
  color: rgba(255,255,255,0.72);
  font-size: var(--text-lg);
  margin-bottom: var(--sp-8);
}

.tarjous__bullets {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.tarjous__bullet {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: rgba(255,255,255,0.8);
  font-size: var(--text-sm);
}

.tarjous__bullet svg {
  width: 18px;
  height: 18px;
  color: var(--c-accent);
  flex-shrink: 0;
}

.form-card {
  background-color: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-10);
  box-shadow: var(--shadow-xl);
}

.form-title {
  font-family: var(--f-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--sp-6);
}

.form-group {
  margin-bottom: var(--sp-4);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: var(--sp-2);
}

.form-group label span {
  color: var(--c-accent-hover);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.75rem var(--sp-4);
  background-color: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  color: var(--c-text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--c-secondary);
  box-shadow: 0 0 0 3px rgba(58,125,106,0.12);
}

.form-control::placeholder {
  color: #AAB8B3;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%23556B62' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
  padding-right: 2.5rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: var(--text-base);
  margin-top: var(--sp-2);
}

.form-note {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  margin-top: var(--sp-3);
}

@media (max-width: 860px) {
  .tarjous-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-10);
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--c-primary-dark);
  color: rgba(255,255,255,0.65);
  padding-block: var(--sp-16) var(--sp-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-10);
  margin-bottom: var(--sp-12);
}

.footer-brand__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--c-white);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: 1.65;
  max-width: 280px;
  margin-bottom: var(--sp-6);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-2);
}

.footer-contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--c-accent);
  flex-shrink: 0;
}

.footer-col h4 {
  font-family: var(--f-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  transition: color var(--t-fast);
}

.footer-links a:hover {
  color: var(--c-white);
}

.footer-bottom {
  padding-top: var(--sp-8);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
  font-size: var(--text-xs);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

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

/* --------------------------------------------------------------------------
   Content Page — specific styles (used in templates/content-page.html)
   -------------------------------------------------------------------------- */
.content-hero {
  background-color: var(--c-primary);
  padding-block: var(--sp-16) var(--sp-12);
  color: var(--c-white);
}

.content-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--sp-6);
}

.content-hero__breadcrumb a {
  color: rgba(255,255,255,0.55);
  transition: color var(--t-fast);
}

.content-hero__breadcrumb a:hover {
  color: var(--c-white);
}

.content-hero__breadcrumb span {
  color: rgba(255,255,255,0.3);
}

.content-hero h1 {
  color: var(--c-white);
  margin-bottom: var(--sp-4);
  max-width: 760px;
}

.content-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
}

.content-layout {
  padding-block: var(--sp-16);
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-12);
  align-items: start;
}

.content-main h2 {
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-4);
}

.content-main h2:first-child {
  margin-top: 0;
}

.content-main h3 {
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
  color: var(--c-primary);
}

.content-main p {
  margin-bottom: var(--sp-4);
  color: var(--c-text);
  line-height: 1.75;
}

.content-main ul, .content-main ol {
  margin-bottom: var(--sp-4);
  padding-left: var(--sp-6);
}

.content-main ul { list-style: disc; }
.content-main ol { list-style: decimal; }

.content-main li {
  margin-bottom: var(--sp-2);
  color: var(--c-text);
  line-height: 1.65;
}

/* Table of contents */
.toc {
  background-color: var(--c-bg-section);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-10);
}

.toc h4 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-4);
}

.toc ol {
  list-style: none;
  padding: 0;
  counter-reset: toc-counter;
}

.toc li {
  counter-increment: toc-counter;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  font-size: var(--text-sm);
}

.toc li::before {
  content: counter(toc-counter) '.';
  font-family: var(--f-heading);
  font-weight: 600;
  color: var(--c-secondary);
  font-size: var(--text-xs);
  min-width: 20px;
}

.toc a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}

.toc a:hover {
  color: var(--c-secondary);
  text-decoration: underline;
}

/* Sidebar */
.content-sidebar {
  position: sticky;
  top: calc(68px + var(--sp-6));
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.sidebar-cta {
  background-color: var(--c-primary);
  color: var(--c-white);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
}

.sidebar-cta h4 {
  color: var(--c-white);
  margin-bottom: var(--sp-3);
  font-size: var(--text-lg);
}

.sidebar-cta p {
  color: rgba(255,255,255,0.72);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-6);
}

.sidebar-cta .btn {
  width: 100%;
  justify-content: center;
}

.sidebar-related h4 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-4);
}

.related-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.related-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background-color: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-primary);
  text-decoration: none;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.related-link:hover {
  background-color: var(--c-bg-section);
  border-color: rgba(30,77,58,0.2);
}

.related-link svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

/* CTA block within content */
.cta-block {
  background-color: var(--c-bg-section);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--r-md);
  padding: var(--sp-8);
  margin-block: var(--sp-10);
}

.cta-block h3 {
  margin-bottom: var(--sp-2);
}

.cta-block p {
  margin-bottom: var(--sp-6);
  color: var(--c-text-muted);
}

.cta-block .btn {
  margin-right: var(--sp-3);
}

/* --------------------------------------------------------------------------
   Company cards (remonttiyritykset hub + city pages)
   -------------------------------------------------------------------------- */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.company-card {
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t-base), border-color var(--t-base), transform var(--t-fast);
}

.company-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--c-primary);
  transform: translateY(-2px);
}

.company-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 0.25rem;
  font-family: var(--f-heading);
}

.company-card__type {
  font-size: var(--text-xs);
  color: var(--c-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.company-card__desc {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex: 1;
}

.company-card .link-arrow {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-top: auto;
}

/* Info strip (highlighted CTA band) */
.info-strip {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: var(--c-white);
  border-radius: var(--r-lg);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  box-shadow: 0 4px 24px rgba(30,77,58,.25);
}

.info-strip p {
  margin: 0;
  color: rgba(255,255,255,.9);
  font-size: 1rem;
  flex: 1;
  min-width: 200px;
  line-height: 1.6;
}

.info-strip .btn {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 1rem;
  padding: 0.875rem 1.75rem;
}

@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  .content-sidebar {
    position: static;
  }
}

/* --------------------------------------------------------------------------
   Info Box
   -------------------------------------------------------------------------- */
.info-box {
  display: flex;
  gap: var(--sp-4);
  background-color: rgba(30,77,58,0.06);
  border: 1px solid rgba(30,77,58,0.15);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  margin-block: var(--sp-6);
}

.info-box__icon {
  width: 20px;
  height: 20px;
  color: var(--c-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.info-box p {
  font-size: var(--text-sm);
  color: var(--c-text);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Responsive tweaks
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  :root {
    --container-px: 1rem;
  }

  .section {
    padding-block: var(--sp-16);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .city-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   Virheet section grid (homepage)
   -------------------------------------------------------------------------- */
.virheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 700px) {
  .virheet-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --------------------------------------------------------------------------
   Responsive — small screen fixes (≤ 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --container-px: 0.875rem;
  }

  /* Allow buttons to wrap text on very small screens */
  .btn {
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  /* Stack hero action buttons vertically */
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

  /* Reduce hero padding */
  .hero {
    padding-block: var(--sp-16) var(--sp-12);
  }

  /* FAQ question text doesn't overflow */
  details.faq-item summary {
    font-size: var(--text-base);
  }

  /* City links: single column on very small screens */
  .city-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Footer bottom stack */
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }

  /* Trust items wrap better */
  .hero__trust {
    flex-direction: column;
    gap: var(--sp-3);
  }

  /* Steps vertical line fix */
  .steps::before {
    left: 31px;
  }

  /* Info strip stacks on small screens */
  .info-strip {
    padding: 1.25rem;
    flex-direction: column;
    align-items: stretch;
  }

  .info-strip .btn {
    width: 100%;
    justify-content: center;
  }

  /* CTA block button full width */
  .cta-block .btn {
    width: 100%;
    margin-right: 0;
    margin-bottom: var(--sp-3);
  }
}

/* Very small screens (≤ 360px) */
@media (max-width: 360px) {
  .city-grid {
    grid-template-columns: 1fr;
  }

  .nav__logo-name {
    font-size: 1.05rem;
  }

  /* Ensure tables always scroll, never overflow */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --------------------------------------------------------------------------
   Print styles
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .nav__toggle,
  .tarjous { display: none; }

  body { font-size: 12pt; }
}
