/* --- Design tokens (Figma: Portfolio / 1440w default, node 4401:2512) --- */
:root {
  --color-bg-card: #f7f7f7;
  --color-text: #1a1a1a;
  --color-text-muted: #555555;
  --color-hero-title: #f3f3f3;
  --color-gallery-placeholder: #e0e0e0;
  --shadow-banner: 0 4px 9.3px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 2px 3px rgba(0, 0, 0, 0.1);
  --shadow-gallery: 0 2px 3px rgba(0, 0, 0, 0.1);
  --radius-card: 10px;
  --radius-gallery: 4px;
  --border-card: 0.5px solid rgba(125, 125, 125, 0.25);
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Figma card: soft top highlight + gentle falloff (replaces flat #f7f7f7) */
  --gradient-intro-card: linear-gradient(
    162deg,
    #fbfbfb 0%,
    #f6f6f6 42%,
    #efefef 100%
  );
}

/* --- Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 24px;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: #ffffff;
}

p {
  color: rgba(44, 38, 38, 1);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  background-color: var(--color-gallery-placeholder);
}

a {
  color: #1a5f7a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #1a5f7a;
  outline-offset: 2px;
}

/* --- Hero --- */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-banner {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  box-shadow: var(--shadow-banner);
  overflow: hidden;
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.hero-title-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  padding: 12px 32px;
  color: var(--color-hero-title);
  text-align: center;
  pointer-events: auto;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 45px;
  letter-spacing: normal;
  color: var(--color-hero-title);
}

.hero-subtitle {
  display: block;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  margin-top: 0;
  line-height: 1.3;
  color: #ffffff;
  opacity: 0.95;
}

@media (max-width: 599px) {
  .hero-image-wrap {
    height: min(450px, 70vh);
    min-height: 280px;
  }

  .hero h1 {
    line-height: 1.25;
  }

  .hero-title-box {
    padding: 12px 1rem;
  }
}

/* --- Sections common --- */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 16px 3rem;
  display: flex;
  flex-direction: column;
  row-gap: 56px;
}

main > section {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

section h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2.4rem;
  color: var(--color-text);
}

/* --- Single content card (intro + toteutus + hinta) --- */
.section-card {
  position: relative;
  background: var(--color-bg-card);
  border: var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
  overflow: hidden;
}

.intro.section-card {
  background: var(--gradient-intro-card);
}

#intro-heading {
  color: rgba(44, 38, 38, 1);
}

.section-card-block + .section-card-block {
  margin-top: 40px;
}

.section-card h2 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2.4rem;
}

.section-card h3 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2.4rem;
  color: var(--color-text);
}

.subsection-title {
  margin: 16px 0 0;
  font-size: 1.1375rem;
  font-weight: 600;
  line-height: 1.92rem;
  color: var(--color-text);
}

.section-card-block .subsection-title:first-of-type {
  margin-top: 0;
}

.intro-emphasis {
  font-weight: 500;
}

.section-card p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.6rem;
}

.section-card p:last-child {
  margin-bottom: 0;
}

/* --- Gallery --- */
.gallery-inner {
  width: 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#gallery-heading,
.gallery h2 {
  width: 100%;
  max-width: 100%;
  margin-bottom: 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gallery-item {
  margin: 0;
  padding: 0;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 228 / 207;
  object-fit: cover;
  border-radius: var(--radius-gallery);
  cursor: pointer;
  transition: opacity 0.2s ease;
  box-shadow: var(--shadow-gallery);
}

.gallery-item img:hover {
  opacity: 0.9;
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.75rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
  background: transparent;
}

/* --- Contact --- */
.contact {
  background: linear-gradient(180deg, #2f0000 0%, #6b3400 100%);
  border: 2px solid rgba(238, 225, 103, 0.25);
  border-radius: var(--radius-card);
  padding: 24px 0 0;
  color: #ffffff;
  overflow: hidden;
}

.contact-inner {
  padding: 0 24px 24px;
}

.contact h2 {
  color: #ffffff;
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: normal;
}

.contact-body {
  margin: 0;
}

.contact p {
  margin: 0 0 8px;
  font-size: 1.25rem;
  line-height: 1.75rem;
  color: #ffffff;
}

.contact-name {
  font-weight: 400;
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.contact-links {
  line-height: 35px;
}

.contact a {
  color: #ffffff;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact a:hover {
  opacity: 0.9;
}

.contact a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.contact-accent {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 0;
}

.contact-accent-stripe {
  display: block;
  width: 100%;
  flex-shrink: 0;
}

.contact-accent-stripe--1 {
  height: 4px;
  background: #fff170;
}

.contact-accent-stripe--2 {
  height: 6px;
  background: #e77d08;
}

.contact-accent-stripe--3 {
  height: 7px;
  background: #de5e1c;
}

/* --- Footer --- */
.site-footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 16px;
  text-align: center;
  font-size: 0.875rem;
  line-height: 23px;
  color: var(--color-text-muted);
  background: #ffffff;
}

.site-footer p {
  margin: 0;
  color: var(--color-text-muted);
}
