/* Immonen Digital — Premium Template Base CSS
   Client: Rakennuspalvelu Marko Rantala Oy
   Accent: Warm bronze (#b8965a) — midrange construction
   Font: Cormorant Garamond (headings) + Jost (body)
*/

:root {
  --brand-bg: #f5f0e8;
  --brand-dark: #1a1a1a;
  --brand-fg: #1a1a1a;
  --brand-accent: #b8965a;
  --brand-accent-light: #d4b87a;
  --warm-white: #faf9f6;
  --stone: #e8e4dc;
  --charcoal: #2a2a2a;
  --soft-grey: #7a7a75;
  --fh: 'Cormorant Garamond', Georgia, serif;
  --fb: 'Jost', 'Helvetica Neue', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--brand-bg); color: var(--brand-fg); font-family: var(--fb); font-size: 17px; line-height: 1.7; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* NAV */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  background: rgba(26,26,26,0.92);
  backdrop-filter: blur(12px);
}
.nav-logo {
  font-family: var(--fh); font-size: 1.4rem; font-weight: 600;
  color: var(--warm-white); letter-spacing: 0.02em;
}
.nav-logo span { color: var(--brand-accent); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--stone); transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--brand-accent); }
.nav-cta {
  background: var(--brand-accent); color: var(--brand-dark) !important;
  padding: 10px 22px; font-weight: 600 !important;
  letter-spacing: 0.04em !important; transition: background 0.2s;
}
.nav-cta:hover { background: var(--brand-accent-light) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--warm-white); margin: 5px 0; transition: 0.3s; }

/* HERO */
.hero {
  position: relative; height: 100vh; min-height: 650px;
  display: flex; align-items: flex-end; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-dim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.92) 0%, rgba(26,26,26,0.5) 40%, rgba(26,26,26,0.15) 100%);
}
.hero-content {
  position: relative; z-index: 2; padding: 0 52px 72px; max-width: 800px;
  opacity: 0; animation: fadeUp 0.9s 0.3s ease forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--brand-accent); border: 1px solid var(--brand-accent);
  padding: 6px 16px; margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--fh); font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 600; line-height: 1.15; color: var(--warm-white); margin-bottom: 16px;
}
.hero p {
  font-size: 1.05rem; color: var(--stone); line-height: 1.6;
  max-width: 560px; margin-bottom: 32px; font-weight: 300;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* BUTTONS */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--brand-accent); color: var(--brand-dark);
  padding: 14px 32px; font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.06em; transition: background 0.2s; font-family: var(--fb);
}
.btn-primary:hover { background: var(--brand-accent-light); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,0.3); color: var(--warm-white);
  padding: 14px 32px; font-weight: 500; font-size: 0.9rem;
  letter-spacing: 0.06em; transition: all 0.2s; font-family: var(--fb);
}
.btn-outline:hover { border-color: var(--brand-accent); color: var(--brand-accent); }
.btn-dark {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--brand-dark); color: var(--warm-white);
  padding: 14px 32px; font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.06em; transition: background 0.2s; font-family: var(--fb);
}
.btn-dark:hover { background: var(--charcoal); }

/* INTRO LINE */
.intro-line {
  background: var(--brand-dark); color: var(--stone);
  text-align: center; padding: 20px 24px;
  font-size: 0.92rem; font-weight: 300; letter-spacing: 0.02em;
}

/* SECTIONS */
.section { padding: 100px 52px; }
.section-dark { background: var(--brand-dark); color: var(--warm-white); }
.section-light { background: var(--warm-white); }
.section-stone { background: var(--stone); }
.section-tag {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--brand-accent); margin-bottom: 12px;
}
.section-title {
  font-family: var(--fh); font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600; line-height: 1.2; margin-bottom: 20px;
}
.section-desc {
  font-size: 1rem; line-height: 1.7; max-width: 640px;
  color: var(--soft-grey); font-weight: 300;
}
.section-dark .section-desc { color: #b0ada5; }
.section-center { text-align: center; max-width: 720px; margin-left: auto; margin-right: auto; }
.section-center .section-desc { margin: 0 auto; }

/* CONTENT GRID */
.content-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center; max-width: 1200px; margin: 0 auto;
}
.content-grid.reverse { direction: rtl; }
.content-grid.reverse > * { direction: ltr; }
.content-img { position: relative; overflow: hidden; }
.content-img img { width: 100%; height: 420px; object-fit: cover; }
.content-img::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 6px; height: 80px; background: var(--brand-accent);
}

/* STAT ROW */
.stat-row { display: flex; gap: 40px; margin-top: 36px; }
.stat { text-align: left; }
.stat .num {
  font-family: var(--fh); font-size: 2.2rem; font-weight: 700;
  color: var(--brand-accent); line-height: 1;
}
.stat .label {
  font-size: 0.78rem; color: var(--soft-grey); letter-spacing: 0.06em;
  text-transform: uppercase; margin-top: 4px;
}

/* SERVICE CARDS */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  max-width: 1200px; margin: 48px auto 0;
}
.service-card {
  position: relative; overflow: hidden; cursor: pointer; height: 380px;
}
.service-card img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05); }
.service-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.88) 0%, rgba(26,26,26,0.1) 60%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 28px;
}
.service-card h3 {
  font-family: var(--fh); font-size: 1.4rem; font-weight: 600;
  color: var(--warm-white); margin-bottom: 6px;
}
.service-card p { font-size: 0.85rem; color: #c0bdb5; line-height: 1.5; font-weight: 300; }

/* WHY CHOOSE US */
.why-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  max-width: 1100px; margin: 48px auto 0;
}
.why-card { text-align: center; padding: 32px 20px; }
.why-icon {
  font-size: 2rem; color: var(--brand-accent); margin-bottom: 16px;
}
.why-card h3 {
  font-family: var(--fh); font-size: 1.15rem; font-weight: 600;
  margin-bottom: 8px;
}
.why-card p { font-size: 0.88rem; color: var(--soft-grey); font-weight: 300; line-height: 1.6; }

/* GALLERY */
.gallery-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; max-width: 1400px; margin: 48px auto 0;
}
.gallery-item { overflow: hidden; position: relative; height: 300px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item.wide { grid-column: span 2; }

/* REVIEW */
.review-block { max-width: 720px; margin: 0 auto; text-align: center; padding: 20px 0; }
.review-stars { color: var(--brand-accent); font-size: 1.3rem; margin-bottom: 20px; letter-spacing: 4px; }
.review-text {
  font-family: var(--fh); font-size: 1.35rem; font-weight: 400;
  line-height: 1.6; font-style: italic; margin-bottom: 20px;
}
.review-author { font-size: 0.82rem; color: var(--soft-grey); letter-spacing: 0.1em; text-transform: uppercase; }
.section-dark .review-author { color: #8a8880; }

/* CTA BAND */
.cta-band {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px; max-width: 1100px; margin: 0 auto;
}
.cta-band h3 { font-family: var(--fh); font-size: 1.6rem; font-weight: 600; }
.cta-band p { font-size: 0.95rem; font-weight: 300; color: #b0ada5; max-width: 500px; }

/* CONTACT */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  max-width: 1100px; margin: 0 auto;
}
.contact-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.contact-row .label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand-accent); min-width: 80px;
}
.contact-row .value { font-size: 1rem; font-weight: 300; }
.contact-row a { border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.contact-row a:hover { border-color: var(--brand-accent); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 14px 18px; border: 1px solid #d0cdc5;
  background: var(--warm-white); font-family: var(--fb); font-size: 0.9rem;
  color: var(--brand-fg); transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand-accent); }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button {
  background: var(--brand-accent); color: var(--brand-dark);
  padding: 14px 32px; border: none; font-family: var(--fb);
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.06em;
  cursor: pointer; transition: background 0.2s; align-self: flex-start;
}
.contact-form button:hover { background: var(--brand-accent-light); }

/* FOOTER */
.footer {
  background: var(--brand-dark); color: #8a8880; padding: 48px 52px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem;
}
.footer a { color: var(--brand-accent); transition: opacity 0.2s; }
.footer a:hover { opacity: 0.8; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav { padding: 14px 24px; }
  .nav-links { display: none; position: fixed; inset: 0; background: rgba(26,26,26,0.97); flex-direction: column; justify-content: center; align-items: center; gap: 24px; }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.1rem; }
  .nav-toggle { display: block; }
  .section { padding: 64px 24px; }
  .hero-content { padding: 0 24px 48px; }
  .content-grid, .content-grid.reverse { grid-template-columns: 1fr; gap: 32px; direction: ltr; }
  .content-img img { height: 300px; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { height: 300px; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item.wide { grid-column: span 1; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .footer { flex-direction: column; gap: 16px; text-align: center; }
}
@media (max-width: 500px) {
  .hero h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-outline, .btn-dark { width: 100%; justify-content: center; }
  .stat-row { flex-direction: column; gap: 20px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
}
