/* ============================================
   RAKENNUSHUOLTO AHO — SITE STYLES
   B2B Construction / Jost only / Clean grid
   ============================================ */

/* --- Variables --- */
:root {
    --brand-bg: #f4f1ec;
    --brand-dark: #111111;
    --brand-accent: #c17f3e;
    --warm-white: #faf9f6;
    --stone: #e8e4dc;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-light: #cccccc;
    --border-color: #d8d4cc;
    --fh: 'Jost', sans-serif;
    --fb: 'Jost', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--fb);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--brand-bg);
    -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: var(--fh); font-weight: 600; line-height: 1.2; }
h1 { font-size: 2.8rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p { margin-bottom: 1rem; }

/* --- Layout --- */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 60px 0; }
.section-light { background: var(--warm-white); }
.section-dark { background: var(--brand-dark); color: #ffffff; }
.section-stone { background: var(--stone); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header p { color: var(--text-secondary); margin-top: 8px; font-size: 1.05rem; }
.section-dark .section-header p { color: var(--text-light); }

/* --- Navbar --- */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(17,17,17,0.95); backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-container {
    max-width: 1140px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--fh); font-weight: 600; font-size: 1.1rem; }
.nav-logo .logo-img { height: 40px; width: auto; }
.nav-logo .accent { color: var(--brand-accent); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links li a { color: #ccc; font-size: 0.9rem; font-weight: 400; transition: color 0.2s; }
.nav-links li a:hover, .nav-links li a.active { color: #fff; }
.nav-cta {
    background: var(--brand-accent); color: #fff !important; padding: 8px 18px;
    border-radius: 4px; font-weight: 500; font-size: 0.9rem;
    transition: background 0.2s;
}
.nav-cta:hover { background: #a96a2e; }

/* Hamburger menu */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: 0.3s; }

/* --- Hero --- */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    justify-content: center; text-align: center; color: #fff;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero-short { min-height: 50vh; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.4) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 720px; padding: 0 24px; }
.hero-tag, .location-tag {
    display: inline-block; font-size: 0.85rem; font-weight: 500;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--brand-accent); margin-bottom: 16px;
}
.hero h1 { margin-bottom: 16px; text-shadow: 0 2px 16px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.85); margin-bottom: 28px; line-height: 1.6; }
.hero-logo {
    max-width: 280px; height: auto; margin: 0 auto 24px;
    opacity: 0.95;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Buttons --- */
.btn {
    display: inline-block; padding: 12px 28px; font-family: var(--fb);
    font-size: 0.95rem; font-weight: 500; border-radius: 4px;
    transition: all 0.2s; cursor: pointer; border: none; text-align: center;
}
.btn-primary { background: var(--brand-accent); color: #fff; }
.btn-primary:hover { background: #a96a2e; }
.btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-secondary:hover { border-color: #fff; }
.section-light .btn-secondary, .section-stone .btn-secondary { color: var(--text-primary); border-color: var(--border-color); }
.section-light .btn-secondary:hover, .section-stone .btn-secondary:hover { border-color: var(--text-primary); }

/* --- Content Grid (text + image) --- */
.content-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
    align-items: center; margin-bottom: 48px;
}
.content-grid:last-child { margin-bottom: 0; }
.content-grid-reversed { direction: rtl; }
.content-grid-reversed > * { direction: ltr; }
.content-grid-image img { border-radius: 6px; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.content-grid-text .tag {
    display: inline-block; font-size: 0.8rem; font-weight: 500;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--brand-accent); margin-bottom: 12px;
}
.section-dark .content-grid-text .tag { color: var(--brand-accent); }

/* --- Link Arrow --- */
.link-arrow {
    display: inline-block; margin-top: 16px; font-weight: 500;
    color: var(--brand-accent); font-size: 0.95rem; transition: color 0.2s;
}
.link-arrow::after { content: ' \2192'; }
.link-arrow:hover { color: #a96a2e; }

/* --- Detail List --- */
.detail-list { margin: 16px 0; }
.detail-list li {
    position: relative; padding-left: 18px; margin-bottom: 8px;
    font-size: 0.95rem; color: var(--text-secondary);
}
.section-dark .detail-list li { color: rgba(255,255,255,0.7); }
.detail-list li::before {
    content: ''; position: absolute; left: 0; top: 10px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand-accent);
}

/* --- Stats Row --- */
.stats-row { display: flex; gap: 36px; margin-top: 24px; }
.stat-number { font-family: var(--fh); font-weight: 600; font-size: 1.5rem; color: var(--brand-accent); }
.stat-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 2px; }
.section-dark .stat-label { color: rgba(255,255,255,0.6); }

/* --- History Strip --- */
.history-strip {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px;
}
.history-strip img {
    width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px;
    filter: grayscale(0.3);
}

/* --- Services Grid (homepage cards) --- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px; overflow: hidden; transition: border-color 0.2s;
}
.service-card:hover { border-color: var(--brand-accent); }
.service-card img { width: 100%; height: auto; object-fit: cover; }
.service-card h3 { padding: 16px 16px 4px; font-size: 1.05rem; }
.service-card h3 a { color: #fff; transition: color 0.2s; }
.service-card h3 a:hover { color: var(--brand-accent); }
.service-card p { padding: 0 16px 16px; font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.services-cta { text-align: center; margin-top: 36px; }

/* --- Project Grid (referenssit) --- */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.project-card {
    background: #fff; border-radius: 6px; overflow: hidden;
    border: 1px solid var(--border-color); transition: box-shadow 0.2s;
}
.project-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.project-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.project-info { padding: 20px 24px; }
.project-info h3 { margin-bottom: 8px; font-size: 1.15rem; }
.project-meta { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.project-type, .project-year {
    font-size: 0.8rem; font-weight: 500; padding: 3px 10px;
    border-radius: 3px; background: var(--stone); color: var(--text-secondary);
}
.project-info p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 10px; }
.project-info ul { margin: 0; }
.project-info ul li {
    position: relative; padding-left: 16px; margin-bottom: 6px;
    font-size: 0.88rem; color: var(--text-secondary);
}
.project-info ul li::before {
    content: ''; position: absolute; left: 0; top: 9px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--brand-accent);
}

/* --- Stats Section --- */
.stats-section { text-align: center; }
.stats-section h2 { margin-bottom: 36px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-card {
    padding: 28px 16px; border-radius: 6px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
}
.stat-card .stat-number { font-size: 2rem; color: var(--brand-accent); display: block; margin-bottom: 6px; }
.stat-card .stat-label { font-size: 0.9rem; color: rgba(255,255,255,0.6); display: block; }
.stat-card p { font-size: 0.85rem; color: rgba(255,255,255,0.45); margin-top: 8px; margin-bottom: 0; }
.section-light .stat-card { background: var(--stone); border-color: var(--border-color); }
.section-light .stat-card .stat-label { color: var(--text-secondary); }
.section-light .stat-card p { color: var(--text-secondary); }

/* --- Timeline --- */
.timeline { max-width: 700px; margin: 0 auto; }
.timeline-entry {
    display: grid; grid-template-columns: 100px 1fr; gap: 24px;
    padding: 24px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.timeline-entry:last-child { border-bottom: none; }
.timeline-year {
    font-family: var(--fh); font-weight: 600; font-size: 1rem;
    color: var(--brand-accent); padding-top: 2px;
}
.timeline-text h3 { font-size: 1.05rem; margin-bottom: 8px; }
.timeline-text p { font-size: 0.92rem; color: rgba(255,255,255,0.65); margin-bottom: 0; }

/* --- Contact Section --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h2 { margin-bottom: 24px; }
.contact-item { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.contact-item:last-of-type { border-bottom: none; }
.contact-item h3 { font-size: 1.1rem; margin-bottom: 2px; }
.contact-item .role { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 10px; }
.contact-details { display: flex; flex-direction: column; gap: 6px; }
.contact-details .detail { display: flex; gap: 12px; align-items: baseline; }
.contact-details .label { font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); min-width: 90px; }
.contact-details a { color: var(--brand-accent); font-size: 0.95rem; transition: color 0.2s; }
.contact-details a:hover { color: #a96a2e; }

.address-block { margin-top: 20px; }
.address-block h3 { margin-bottom: 12px; }
.address-item { margin-bottom: 12px; }
.address-item h4 { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 4px; font-weight: 500; }
.address-item p { font-size: 0.95rem; margin-bottom: 0; line-height: 1.5; }

.billing-block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.billing-block h3 { margin-bottom: 12px; }
.billing-block .detail { display: flex; gap: 12px; margin-bottom: 6px; align-items: baseline; }
.billing-block .label { font-size: 0.82rem; font-weight: 500; color: var(--text-secondary); min-width: 90px; }
.billing-block .value { font-size: 0.95rem; }

.contact-note { margin-top: 20px; font-size: 0.95rem; color: var(--text-secondary); font-style: italic; }

/* --- Form --- */
.form-container h2 { margin-bottom: 24px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group label {
    display: block; font-size: 0.85rem; font-weight: 500;
    margin-bottom: 6px; color: var(--text-secondary);
}
.form-group input, .form-group textarea {
    width: 100%; padding: 10px 14px; font-family: var(--fb);
    font-size: 0.95rem; border: 1px solid var(--border-color);
    border-radius: 4px; background: #fff; color: var(--text-primary);
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--brand-accent); }
.form-group textarea { min-height: 120px; resize: vertical; }
.contact-form .btn { align-self: flex-start; }

/* --- CTA Band --- */
.cta-band {
    display: flex; align-items: center; justify-content: space-between;
    gap: 32px; padding: 8px 0;
}
.cta-band h2 { margin-bottom: 4px; }
.cta-band p { color: var(--text-secondary); margin-bottom: 0; }
.cta-buttons { display: flex; gap: 12px; flex-shrink: 0; }

/* --- Footer --- */
.footer { background: var(--brand-dark); color: rgba(255,255,255,0.6); padding: 48px 0 24px; }
.footer-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.footer-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-section h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.footer-section p { font-size: 0.88rem; line-height: 1.6; margin-bottom: 0; }
.footer-section a { color: var(--brand-accent); transition: color 0.2s; }
.footer-section a:hover { color: #e0a050; }
.footer-bottom {
    padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center; font-size: 0.82rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.6rem; }
    .section { padding: 48px 0; }
    .history-strip { grid-template-columns: repeat(2, 1fr); }

    /* Nav mobile */
    .nav-toggle { display: block; }
    .nav-links {
        display: none; flex-direction: column; position: absolute;
        top: 64px; left: 0; width: 100%; background: rgba(17,17,17,0.98);
        padding: 24px; gap: 16px;
    }
    .nav-links.active { display: flex; }

    /* Grids */
    .content-grid { grid-template-columns: 1fr; gap: 32px; }
    .content-grid-reversed { direction: ltr; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .project-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; gap: 24px; }
    .contact-grid { grid-template-columns: 1fr; }

    /* CTA band stack */
    .cta-band { flex-direction: column; text-align: center; }
    .cta-buttons { justify-content: center; }

    /* Stats row */
    .stats-row { flex-wrap: wrap; gap: 24px; }

    /* Timeline */
    .timeline-entry { grid-template-columns: 80px 1fr; gap: 16px; }
}

@media (max-width: 500px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    .section { padding: 36px 0; }
    .history-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .container { padding: 0 16px; }
    .hero-content { padding: 0 16px; }
    .hero-logo { max-width: 200px; }
    .services-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: center; }
    .cta-buttons { flex-direction: column; width: 100%; }
    .cta-buttons .btn { width: 100%; }
    .stats-row { flex-direction: column; gap: 16px; }
    .project-info { padding: 16px; }
}
