/* ================================================
   Rakennuttamisen Insinööritoimisto Arki Oy
   Design: Centered hero → scrollytelling vertical flow
   Colors: Deep navy + warm amber gold
   Fonts: Playfair Display + Inter
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── CSS CUSTOM PROPERTIES ─────────────────────── */
:root {
  --primary:    #1A2B4A;
  --secondary:  #2D5A8E;
  --accent:     #D4A843;
  --accent-dark:#B8902E;
  --dark-bg:    #0F1C2E;
  --light-bg:   #F5F3EE;
  --alt-bg:     #EEF2F7;
  --text:       #1A1A2E;
  --text-light: #FFFFFF;
  --text-muted: #6B7A8D;
  --border:     #E5E0D8;
  --shadow:     0 8px 32px rgba(15,28,46,0.15);
  --shadow-lg:  0 16px 48px rgba(15,28,46,0.25);
  --radius:     8px;
  --radius-lg:  16px;
  --max-w:      1200px;
  --transition: 0.3s ease;
}

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

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--light-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── TYPOGRAPHY ────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.5rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
p  { font-size: 1.05rem; line-height: 1.75; color: var(--text-muted); }

.section-label {
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

.section-heading {
  position: relative;
  padding-left: 1.25rem;
  border-left: 4px solid var(--accent);
  margin-bottom: 1.5rem;
}

/* ─── LAYOUT UTILITIES ──────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 100px 0; }
.section--dark  { background: var(--dark-bg); }
.section--navy  { background: var(--primary); }
.section--light { background: var(--light-bg); }
.section--alt   { background: var(--alt-bg); }

/* Fade-in reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── NAVIGATION ────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

#navbar.scrolled {
  background: rgba(15, 28, 46, 0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  padding: 0.85rem 0;
  backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  flex-direction: column;
}
.nav-logo .logo-main {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.2;
}
.nav-logo .logo-sub {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--accent);
  color: var(--dark-bg) !important;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700 !important;
  transition: background var(--transition), transform var(--transition) !important;
}
.nav-cta:hover {
  background: var(--accent-dark) !important;
  transform: translateY(-2px);
}
.nav-cta::after { display: none !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  transition: var(--transition);
}

/* ─── HERO ──────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--dark-bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  transform: scale(1.05);
  transition: transform 8s ease;
}

#hero.loaded .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15,28,46,0.88) 0%,
    rgba(15,28,46,0.78) 50%,
    rgba(26,43,74,0.82) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 0 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212,168,67,0.15);
  border: 1px solid rgba(212,168,67,0.4);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

.hero-title {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-title .accent-line {
  color: var(--accent);
  display: block;
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--dark-bg);
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(212,168,67,0.35);
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(212,168,67,0.45);
}

.btn-secondary {
  background: transparent;
  color: white;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.5);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounceScroll 2.5s ease infinite;
}

.hero-scroll .arrow {
  width: 1.5px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
}

@keyframes bounceScroll {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ─── STATS BAR ─────────────────────────────────── */
#stats {
  padding: 70px 0;
  background: var(--dark-bg);
  position: relative;
}

#stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--secondary), var(--accent));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item { padding: 1rem; }

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* ─── SERVICES ──────────────────────────────────── */
#services {
  background: var(--light-bg);
}

.services-intro {
  max-width: 600px;
  margin-bottom: 3.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: default;
}

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

.service-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-card-img {
  transform: scale(1.05);
}

.service-card-img-wrap {
  overflow: hidden;
}

.service-card-body {
  padding: 1.75rem;
}

.service-number {
  display: inline-block;
  background: var(--accent);
  color: var(--dark-bg);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
}

.service-card h3 {
  margin-bottom: 0.75rem;
  color: var(--text);
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.65;
}

.service-price {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
}

/* ─── ABOUT ─────────────────────────────────────── */
#about {
  background: var(--primary);
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
}

.about-img-wrap {
  position: relative;
}

.about-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--accent);
  color: var(--dark-bg);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 8px 24px rgba(212,168,67,0.4);
}

.about-badge .badge-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  display: block;
}

.about-badge .badge-text {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.about-content .section-label { color: var(--accent); }
.about-content h2 { color: var(--text-light); }
.about-content p  { color: rgba(255,255,255,0.72); font-size: 1rem; }

.about-features {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}

.feature-icon {
  width: 36px;
  height: 36px;
  background: rgba(212,168,67,0.15);
  border: 1.5px solid rgba(212,168,67,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

/* ─── TESTIMONIALS ───────────────────────────────── */
#testimonials {
  background: var(--alt-bg);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform var(--transition);
}

.testimonial-card:hover { transform: translateY(-4px); }

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.35;
  line-height: 1;
}

.stars {
  display: flex;
  gap: 3px;
  margin-bottom: 1rem;
}

.star {
  width: 16px;
  height: 16px;
  background: var(--accent);
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}

.testimonial-card p {
  font-size: 0.95rem;
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 1.25rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.author-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
}

.author-city {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── CTA BANNER ────────────────────────────────── */
#cta-banner {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/cta-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(15,28,46,0.88),
    rgba(26,43,74,0.92)
  );
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.cta-content p {
  color: rgba(255,255,255,0.78);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-urgency {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1rem;
  font-style: italic;
}

/* ─── CONTACT ────────────────────────────────────── */
#contact {
  background: var(--light-bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 { margin-bottom: 1rem; }
.contact-info > p { margin-bottom: 2rem; }

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item-text strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.contact-item-text span {
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
}

/* Contact Form */
.contact-form {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.contact-form h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.form-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--light-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(45,90,142,0.12);
}

.form-group textarea { resize: vertical; min-height: 110px; }

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-submit:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.form-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ─── FOOTER ─────────────────────────────────────── */
footer {
  background: var(--dark-bg);
  padding: 60px 0 30px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-main {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  line-height: 1.3;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-brand .logo-sub {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.footer-brand p {
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-top: 1rem;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}

.footer-cert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

/* ─── MOBILE RESPONSIVE ──────────────────────────── */
@media (max-width: 1024px) {
  .services-grid        { grid-template-columns: 1fr 1fr; }
  .about-grid           { grid-template-columns: 1fr; gap: 3rem; }
  .about-img            { height: 380px; }
  .about-badge          { right: 1rem; bottom: -1rem; }
  .contact-grid         { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-top           { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section              { padding: 70px 0; }
  .container            { padding: 0 1.25rem; }

  .nav-links            { display: none; }
  .nav-links.open       {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15,28,46,0.98);
    padding: 1.5rem;
    gap: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-toggle           { display: flex; }

  .services-grid        { grid-template-columns: 1fr; }
  .stats-grid           { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .testimonials-grid    { grid-template-columns: 1fr; }
  .form-row             { grid-template-columns: 1fr; }
  .footer-top           { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom        { flex-direction: column; gap: 0.75rem; text-align: center; }

  .hero-cta-group       { flex-direction: column; align-items: center; }
  .btn-primary,
  .btn-secondary        { width: 100%; max-width: 320px; justify-content: center; }
}

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