/* Grace Catering – päätyylit  
   Versio 1.0  */

/* ------------------------------
   Perusasetukset & muuttujat
--------------------------------*/
:root {
  --brand: #3b7f5c; /* pääväri (vihreä) */
  --brand-dark: #2f6449; /* hover / tumma */
  --text: #1f2937; /* runkoteksti */
  --muted: #6b7280; /* vaalea teksti */
  --bg: #ffffff; /* tausta */
  --bg-alt: #f7f7f7; /* vaihtoehtoinen taustaosioille */
  --accent: #f1f8f4; /* hero-ylägradientti */
  --border: #e5e7eb; /* rajat */
  --radius: 16px; /* korttien pyöristys */
  --font-heading: "Fraunces", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  body {
    font-family: var(--font-body);
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.2px;
  }
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}

/* Linkit */
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Säilö */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

/* ------------------------------
     Ylänavigaatio
  --------------------------------*/
header:not(.hero-header) {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 40;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand .logo {
  width: 80px;
  height: 80px;
  border-radius: 0; /* ei enää ympyrä */
  background: transparent url("images/RK.png") center/contain no-repeat;
}
.brand h1 {
  font-size: 28px;
  margin: 0;
  letter-spacing: 0.2px;
}
nav ul {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  font-weight: 600;
  color: #374151;
}

/* CTA-napit */
.cta {
  display: flex;
  gap: 10px;
}
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  font-weight: 600;
  cursor: pointer;
  background: #fff;
}
.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn.primary:hover {
  background: var(--brand-dark);
}
.btn.ghost {
  color: var(--brand);
  background: #fff;
}

/* ------------------------------
     Hero-alue
  --------------------------------*/
.hero {
  background: linear-gradient(180deg, var(--accent), #fff);
  padding: 64px 0;
}
.hero h2 {
  font-size: 42px;
  line-height: 1.1;
  margin: 0 0 12px;
}
.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 720px;
}
.hero-cta {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ------------------------------
     Yleiset osiot & kortit
  --------------------------------*/
.section {
  padding: 56px 0;
}
.section h3 {
  font-size: 28px;
  margin: 0 0 8px;
}
.section p.lead {
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.card {
  grid-column: span 6;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.card .img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: #e5efe9;
}
.card h4 {
  margin: 2px 0 6px;
  font-size: 18px;
}
.card p {
  margin: 0;
  color: var(--muted);
}

/* Musta strip */
/* Koko sivun levyinen tumma banneri – korkeampi ja keskitetty sisältö */
.strip--dark {
  background: #0b1720;
  color: #cbd5e1;
  padding: 8vh 0;
}
.strip--dark .container {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  text-align: center;
}
.strip--dark h3 {
  color: #fff;
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 48px);
  letter-spacing: 0.3px;
}
.strip--dark p {
  margin: 0;
  max-width: 900px;
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.6;
  opacity: 0.95;
}

.strip--dark .icon-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
  padding: 10px 20px;
  margin: 0; /* ei omaa keskitystä – container hoitaa */
  max-width: none; /* ei supista gridiä omalla maksimilla */
}

/* 3×2-korttiruudukko mustaan stripiin */
.icon-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* was 240px */
  gap: 14px;
  padding: 10px 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.icon-card {
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  color: #fff;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 600;
}

/* PALVELUMME */
/* Palvelut: täysleveä taustakuva + 2×2 grid, nollaväli */
.services {
  position: relative;
  color: #111;
  margin: 0;
  padding: 8vh 0 0;
}
.services::before {
  content: "";
  position: absolute;
  inset: 0;
  filter: brightness(0.9);
  z-index: -1;
}
/* Keskittää "Palvelumme" otsikon */
.services .title {
  display: block;
  margin: 0 auto 16px;
  text-align: center;
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: 100%;
}
.service-card {
  position: relative;
  background: transparent;
  overflow: hidden;
}
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* tummennus kuvan päälle */
  z-index: 0;
}
/* tekstialue kuvien päällä alareunassa */
.service-content {
  position: absolute;
  inset: 0; /* täyttää koko kortin */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* keskitys pystyyn */
  text-align: center; /* keskitys vaakaan */
  padding: 24px;
  color: #fff;
  z-index: 1; /* tekstin päälle */
  background: transparent; /* ei lisä-tummennusta */
}

.service-content h4 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: 0.2px;
  color: #fff;
}

.service-content p {
  margin: 0;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.65;
  opacity: 0.95;
  color: #fff;
}
.service-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/* RUOKIA-SUOMESTA-ULKOMAILTA – taustakuva + keskitetty ruudukko */
.foods {
  position: relative;
  margin: 0;
  padding: 8vh 0;
  color: #111;
}
.foods::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/g1.jpg") center/cover no-repeat;
  filter: brightness(0.9);
  z-index: -1;
}
.foods .title {
  display: block;
  text-align: center;
  margin: 0 auto 24px;
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
}
.foods-grid {
  display: grid;
  grid-template-columns: 1fr; /* mobiili: aina 1 sarake */
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.food-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.food-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.food-card h4 {
  margin: 0 0 8px;
  font-size: clamp(18px, 2.2vw, 24px);
}
.food-card p {
  margin: 0;
  line-height: 1.5;
  color: #4b5563;
  text-align: center;
}

/* Nosto-”strip” */
.strip {
  background: var(--bg-alt);
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.strip-box {
  grid-column: span 3;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.strip-box h5 {
  margin: 0 0 8px;
}
.strip-box p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Vuokraustuotteet */
.rental {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.product {
  grid-column: span 4;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.product .thumb {
  height: 150px;
  border-radius: 12px;
  background: #eef3ef;
  margin-bottom: 10px;
}
.product h6 {
  margin: 0 0 6px;
}
.product .price {
  font-weight: 700;
}

/* YHTEYDET JA LOMAKE */

/* Yksi logo keskelle laatikoiden yläpuolelle */
#yhteys .two-col::before {
  content: "";
  display: block;
  width: 100%;
  height: 140px; /* säädä tarvittaessa (esim. 100–140px) */
  margin: 0 auto 12px;
  background: url("images/RistonKeittio.png") center/contain no-repeat;
  grid-column: 1 / -1;
}

/* Kaksi palstaa (yhteys + lomake) */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.two-col .col {
  grid-column: span 6;
}
.well {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

/* Lomake */
form label {
  display: block;
  font-weight: 600;
  margin: 10px 0 6px;
}
input,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font: inherit;
}
textarea {
  min-height: 120px;
}

/* Alatunniste */
footer {
  background: #0b1720;
  color: #cbd5e1;
  padding: 32px 0;
  margin-top: 40px;
}
footer .container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
}

footer .container > div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}

footer p {
  margin: 0;
  width: 100%;
}

/* Evästebanneri */
.cookie {
  position: fixed;
  bottom: 18px;
  left: 18px;
  right: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  left: 12px;
  right: 12px;
  flex-wrap: wrap;
}
.cookie p {
  margin: 0;
  color: #4b5563;
  flex: 1 1 260px;
  min-width: 0;
}
.cookie > div {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.cookie .btn {
  white-space: nowrap;
}

/* ==============================
     HERO – koko näytön kuva (g2.jpg)
     ==============================*/
.hero-header {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  isolation: isolate;
  background: transparent !important;
  overflow: hidden;
}
/* Käytetään before-elementtiä, jotta saadaan blur ilman reunojen sahalaitaa */
.hero-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #0b1210; /* fallback, ettei teksti jää valkoiselle */
  background-image: url("images/g2.jpg"); /* suhteellinen polku */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(2.5px);
  transform: scale(1.03);
  z-index: -2;
}
/* Kevyt tumma kalvo kontrastiin */
.hero-header::after {
  content: "";
  position: absolute;
  inset: -3px; /* venytä muutama px yli reunan */
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.25));
  z-index: -1;
  transform: scale(1.02); /* + venytys */
  transform-origin: center bottom; /* + venytys alas */
}

/* Ylämenu hero-kuvan päällä */
/* Läpinäkyvä ylämenu hero-kuvan päällä – hieman tummempi kontrastin varmistamiseksi */
.hero-header .overlay {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: saturate(130%) blur(6px);
  -webkit-backdrop-filter: saturate(130%) blur(6px);
  color: #fff;
}
/* Läpinäkyvä tausta + blur menulle; fallbackina läpikuultava musta */
.hero-header .overlay {
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: saturate(130%) blur(6px);
  -webkit-backdrop-filter: saturate(130%) blur(6px);
  color: #fff;
}
.hero-header .brand h1 {
  color: #fff;
}
.hero-header nav a {
  color: #fff;
  font-size: clamp(18px, 2.2vw, 28px);
}
/* Soita-nappi */
.hero-header .overlay .btn.ghost {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.hero-header .overlay .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.3);
}
/* Vähän lisää tilaa linkkien väliin */
.hero-header .overlay nav ul {
  gap: clamp(12px, 2vw, 28px);
}

/* Hero-tekstilaatikko */
.hero-intro {
  position: absolute;
  left: 50%;
  bottom: 12vh;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  max-width: 900px;
  padding: 0 20px;
}
.hero-intro h2 {
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1.15;
  margin: 0 0 14px;
}
.hero-intro p {
  font-size: clamp(16px, 1.6vw, 20px);
  margin: 0 0 18px;
  opacity: 0.95;
}
.hero-intro .btn.primary {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.hero-intro .hero-logo {
  width: clamp(180px, 28vw, 420px);
  height: auto;
  margin: 0 auto 16px;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

/* RSPONSIIVISUUS */

/* === MOBILE (≤640px) */

@media (max-width: 640px) {
  /* Piilota navigaatio mobiilissa (myös hero-overlayssa) */
  header nav,
  .hero-header .overlay nav {
    display: none;
  }

  /* Yleiset ruudukot yhdeksi sarakkeeksi */
  .cards,
    .strip-grid,
    .rental,
    .two-col,
    .foods-grid,
    .services-grid,
     
    /* Grid-lapsille täysi leveys */
    .card,
    .strip-box,
    .product,
    .two-col .col {
    grid-column: 1 / -1;
  }

  /* Ikonikortit: yksi per rivi mobiilissa */
  .icon-grid {
    grid-template-columns: 1fr;
  }

  /* Hero: tiiviimpi asettelu */
  .hero-intro {
    padding: 0 16px;
    left: 50%;
    transform: translateX(-50%);
  }
  .hero h2 {
    font-size: 32px;
  }

  /* Palvelukuvat matalammaksi mobiilissa */
  .service-img {
    height: 220px;
  }

  .cookie {
    padding: 12px;
  }
  .cookie > div {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ≥640px: 2 saraketta */
@media (min-width: 640px) {
  .strip--dark .icon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ≥760px: 2 saraketta */
@media (min-width: 760px) {
  .foods-grid {
    grid-template-columns: 1fr 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ≥1024px: 3 saraketta */
@media (min-width: 1024px) {
  .strip--dark .icon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-col {
    grid-template-columns: repeat(12, 1fr);
  }
  .two-col .col {
    grid-column: span 6;        /* 2 vierekkäin */
  }
}
