/* Core colors: birch base + copper accents */
:root {
  --birch: #f3efe7;       /* base filler */
  --birch-2: #ffffff;     /* card surface */
  --ink: #141414;         /* main text */
  --muted: #4a4a4a;       /* secondary text */
  --charcoal: #141a1f;    /* sidebar/footer */
  --charcoal-2: #1c242b;
  --copper: #b87333;      /* accent */
  --line: rgba(20, 20, 20, 0.12);
  --radius: 14px;

  /* Layout */
  --sidebar-w: 280px;     /* fixed sidebar width */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.5;

  background:
    linear-gradient(rgba(243, 239, 231, 0.28), rgba(243, 239, 231, 0.28)),
    url("img/koivubackground.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}


/* ===== PAGE LAYOUT (main column + sidebar column) ===== */
.page {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  align-items: start;
  min-height: 100vh;
}

.main-col {
  min-width: 0; /* prevents overflow from long content */
}

/* ===== HERO (uncursed) ===== */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);

  height: 380px;   /* pick your number */
  display: flex;
  align-items: center;
}

/* Background image */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("img/hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.40; /* adjust strength here */
  pointer-events: none;
  z-index: 0;
}

/* Birch -> white fade on top of image */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(243, 239, 231, 0.55) 0%,
    rgba(255, 255, 255, 0.65) 70%
  );
  pointer-events: none;
  z-index: 1;
}

/* Hero content box */
.hero-inner {
  position: relative;
  z-index: 2; /* above bg layers */
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 24px;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 850;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.10;
  font-weight: 650;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  margin: 0 auto 22px;
  max-width: 70ch;
  color: #3f3f3f;
  font-size: 1.05rem;
}

/* Copper button */
.btn {
  display: inline-block;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--copper);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}

.btn:focus {
  outline: 3px solid rgba(184, 115, 51, 0.35);
  outline-offset: 2px;
}

/* Middle layout */
.middle {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 16px;
  position: relative;
}

/* Main content area */
.content {
  padding-right: 0;
}



/* ===============================
   Miksi meidät
================================ */

.why {
  margin-top: 32px;
}

.why-inner {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 28px 28px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

/* Header block */
.why-inner h2 {
  margin: 0 0 8px 0;
  line-height: 1.15;
}

.why-lead {
  margin: 0 0 18px 0;
  max-width: 65ch;
  color: var(--muted);
}

/* List */
.why-list {
  display: grid;
  gap: 14px;
}

/* Cards */
.why-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--birch-2);
  transition: transform 0.15s ease,
              box-shadow 0.15s ease,
              border-color 0.15s ease;
}

.why-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: rgba(184, 115, 51, 0.25);
}

/* Icon tile */
.why-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(184, 115, 51, 0.1);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.why-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

/* Text */
.why-body h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
}

.why-body p {
  margin: 0;
  line-height: 1.5;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 520px) {
  .why-card {
    flex-direction: column;
    gap: 12px;
  }

  .why-icon {
    width: 60px;
    height: 60px;
  }
}

/* Card blocks */
.card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 18px 0;
}


.card h2 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

.lead {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 80ch;
}

/* Services grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Service cards (artisanal: subtle depth + copper signature) */
.service{
  position: relative;
  border: 1px solid rgba(20,20,20,0.08);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    rgba(243,239,231,0.55) 100%
  );
  box-shadow: 0 6px 18px rgba(20,20,20,0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.service:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20,20,20,0.08);
  border-color: rgba(184,115,51,0.35);
}

.service h3{
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.service h3::after{
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(184,115,51,0.8);
}

.service p{
  margin: 0;
  color: var(--muted);
}




/* ===============================
   Testimonials slider (styled)
================================ */
.testimonials {
  position: relative;
  display: flex;          /* NEW */
  align-items: stretch;   /* NEW: panel fills height */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 18px 0;
  min-height: 420px;
 aspect-ratio: 16 / 8;
 }

@media (max-width: 900px) {
  .testimonials { aspect-ratio: auto; min-height: 380px; }
}

.testimonials .t-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 40%, rgba(0,0,0,0.18), rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.0) 70%),
    linear-gradient(rgba(243,239,231,0.12), rgba(243,239,231,0.12)),
    url("img/testimonials-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: none
}

.testimonials .t-panel {
  position: relative;
  z-index: 1;

  width: clamp(320px, 42%, 520px);
  margin: 0;
  min-height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  background: rgba(184, 115, 51, 0.82);
  color: #fff;
  border-radius: 0;              /* crisp vertical edge */
  padding: 26px 26px 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}


/* Top row: title + stars */
.testimonials .t-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.testimonials h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: 0.2px;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* Stars */
.testimonials .t-stars {
  display: flex;
  gap: 6px;
  align-items: center;
  user-select: none;
}

.testimonials .t-star {
  font-size: 22px;
  line-height: 1;
  opacity: 0.25; /* default faded */
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.12));
}

.testimonials .t-star.is-on {
  opacity: 1;
}

/* Quote line */
.testimonials .t-quote-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  margin-top: 6px;
}

.testimonials .t-mark {
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  opacity: 0.95;
  transform: translateY(-4px);
}

.testimonials .t-text {
  margin: 0;
  max-width: 58ch;
  font-size: 20px;
  line-height: 1.75;
}

.testimonials .t-author {
  margin: 14px 0 0;
  font-weight: 800;
  position: relative;
    font-size: 25px;
  padding-left: 16px;
}

.testimonials .t-author::before {
  content: "–";
  position: absolute;
  left: 0;
  opacity: 0.9;
}

/* Controls: square buttons + square indicators */
.testimonials .t-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.testimonials .t-nav {
  display: none !important;

}

.testimonials .t-nav::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.95);
  border-radius: 3px;
  position: absolute;
  inset: 0;
  margin: auto;
}

.testimonials .t-nav:hover {
  background: rgba(255,255,255,0.18);
}

.testimonials .t-nav:focus {
  outline: 3px solid rgba(255,255,255,0.35);
  outline-offset: 2px;
}

.testimonials .t-squares {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.testimonials .t-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.9);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.testimonials .t-dot[aria-current="true"] {
  background: rgba(255,255,255,0.95);
}

/* Fade animation */
.testimonials .fade-out {
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.testimonials .fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

@media (max-width: 900px) {
  .testimonials {
    flex-direction: column;
    aspect-ratio: auto;
    min-height: 380px;
  }
}

@media (max-width: 900px) {
  .testimonials .t-panel{
    width: 100%;
    min-height: auto;
    border-radius: 0;
  }
}












/* === Big service sections inside Palvelut === */
.service-sections{
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.service-block{
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: stretch;

  border: 1px solid rgba(20,20,20,0.08);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(243,239,231,0.50) 100%);
  box-shadow: 0 8px 22px rgba(20,20,20,0.05);
  overflow: hidden;
}

/* Image placeholder area */
.service-media{
  background: rgba(20,20,20,0.06);
  min-height: 190px;
}

/* If you use an actual img tag inside */
.service-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-body{
  padding: 16px 16px 16px 0;
}

.service-block h3{
  margin: 14px 0 10px;
  font-size: 1.2rem;
  font-weight: 800;
}

.service-block h3::after{
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(184,115,51,0.85);
}

.service-block p{
  margin: 0 0 12px;
  color: var(--muted);
  max-width: 75ch;
}

.service-list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

/* Responsive */
@media (max-width: 900px){
  .service-block{
    grid-template-columns: 1fr;
  }
  .service-body{
    padding: 0 16px 16px;
  }
  .service-block h3{
    margin-top: 12px;
  }
}






/* Highlights */
.highlights {
  display: grid;
  gap: 12px;
}

.highlight {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}

.icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(184, 115, 51, 0.12);
}

.highlight h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.highlight p {
  margin: 0;
  color: var(--muted);
}

/* Testimonials */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quote {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.quote blockquote {
  margin: 0 0 10px;
  color: var(--muted);
}

.quote figcaption {
  font-weight: 700;
}

/* Contact section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-info h3,
.contact-form h3 {
  margin: 0 0 10px;
}

.contact-info a {
  color: var(--ink);
}

.contact-form label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(184, 115, 51, 0.25);
  border-color: rgba(184, 115, 51, 0.6);
}

.form-status {
  margin: 10px 0 0;
  font-weight: 700;
}

.small {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Fixed right sidebar */
.sidebar {
  position: sticky;
  top: 0;
  width: 280px;
  height: 100vh;
  background: var(--charcoal);
  color: #fff;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.side-nav a {
  display: block;
  padding: 12px 12px;
  border-radius: 0; /* engineered edges */
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 10px;
  font-weight: 700;
}

.side-nav a:hover {
  border-color: rgba(184, 115, 51, 0.75);
}



/* === Sidebar dropdown nav (auto) === */
.nav-group { margin-bottom: 10px; }

.nav-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 12px 12px;
  border-radius: 0;
  color: #fff;

  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);

  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: rgba(184, 115, 51, 0.75);
}

.nav-toggle:focus {
  outline: 3px solid rgba(184, 115, 51, 0.30);
  outline-offset: 2px;
}

.chev {
  transition: transform 160ms ease;
  opacity: 0.9;
}

.nav-group[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

.subnav {
  display: grid;
  gap: 8px;
  margin-top: 8px;

  padding-left: 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.10);

  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 200ms ease, opacity 200ms ease;
}

.subnav[aria-hidden="true"] {
  pointer-events: none;
}



.nav-group[aria-expanded="true"] .subnav {
  max-height: 420px; /* enough for items */
  opacity: 1;
}

.subnav a {
  display: block;
  padding: 10px 12px;

  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);

  color: #fff;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
}

.subnav a:hover {
  border-color: rgba(184, 115, 51, 0.6);
}
.sidebar-spacer {
  flex: 1; /* pushes contact block down */
}

/* Contact block bottom */
.sidebar-contact {
  background: var(--charcoal-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 12px;
}

.contact-link {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(184, 115, 51, 0.9);
  margin-bottom: 12px;
}

.contact-lines {
  display: grid;
  gap: 10px;
}

.label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.75;
}

.sidebar-contact a {
  color: #fff;
  text-decoration: none;
}

.sidebar-contact a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(184, 115, 51, 0.9);
}

/* Full-width footer */
.footer {
  background: var(--charcoal);
  color: #fff;
  padding: 26px 16px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-motto {
  margin: 0 0 6px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.footer-small {
  margin: 0;
  opacity: 0.7;
}

/* Responsive: collapse sidebar */
/* =================================
   Mobile slide-in nav (uses existing sidebar)
   Activates at <= 900px
================================= */

.mobile-menu-btn{
  display: none;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1200;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.mobile-menu-btn:focus{
  outline: 3px solid rgba(184, 115, 51, 0.35);
  outline-offset: 2px;
}

.mobile-menu-icon{
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  display: block;
  margin: 0 auto;
}
.mobile-menu-icon::before,
.mobile-menu-icon::after{
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
}
.mobile-menu-icon::before{ top: -6px; }
.mobile-menu-icon::after{ top: 6px; }

.mobile-menu-overlay{
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.45);
}

body.menu-open{
  overflow: hidden;
}


/* Hide hamburger while sidebar is open */
body.menu-open .mobile-menu-btn{
  opacity: 0;
  pointer-events: none;
}


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

  .mobile-menu-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Turn the existing sidebar into a slide-in panel from the RIGHT */
  .sidebar{
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    height: 100dvh;
    width: min(86vw, 320px);
    transform: translateX(110%);
    transition: transform 200ms ease;
    z-index: 1150;

    /* remove the mobile "drops below content" borders */
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.menu-open .sidebar{
    transform: translateX(0);
  }

  body.menu-open .mobile-menu-overlay{
    display: block;
  }

  .mobile-menu-overlay[hidden]{
    display: none;
  }

  .quotes { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}




/* Miksi meidät: make the images fill the icon tile (no more tiny stamps) */
.why-icon{
  overflow: hidden;              /* crops to rounded corners */
  background: transparent;       /* optional: removes the tinted box */
    width: 84px;
  height: 84px;
  border-radius: 18px;
  
}

.why-icon img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;             /* fills the tile */
  object-position: center;       /* keeps subject centered */
}

/* ===============================
   Yritysesittely (clean full-bleed image split)
   - Keeps ALL other .card styles intact
   - Only affects <section class="card yritys yritys--split" ...>
================================ */

#yritys .intro{
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 14px;
  border-left: 4px solid var(--copper);
  padding-left: 14px;
}

/* Make only this card lose padding so the image can touch the edge */
.card.yritys--split{
  padding: 0;
  overflow: hidden; /* clip image to rounded corners */
}

/* Keep heading padded inside the card */
.card.yritys--split > h2{
  margin: 0;
  padding: 22px 22px 0;
}

/* Two-column split (text left, image right) */
.card.yritys--split .yritys-grid{
  display: flex;
  gap: 0;
  align-items: stretch; /* equal height columns */
}

.card.yritys--split .yritys-text{
  flex: 0 0 60%;
  padding: 14px 22px 22px;
}

.card.yritys--split .yritys-media{
  flex: 1;            /* takes remaining width */
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  position: relative;
  overflow: hidden;
}

/* Absolute fill guarantees full height/width without relying on % height chains */
.card.yritys--split .yritys-media img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Mobile stack */
@media (max-width: 900px){
  .card.yritys--split .yritys-grid{ flex-direction: column; }
  .card.yritys--split .yritys-media{ height: 260px; }
}







/* === Yritysesittely: hog hits TOP of the card === */
.card.yritys--split{
  position: relative;   /* anchor for absolute hog */
}

/* Pin the image to the card's full height (top to bottom) */
.card.yritys--split .yritys-media{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;           /* adjust if you want more/less hog */
  overflow: hidden;
}

/* Fill that pinned area */
.card.yritys--split .yritys-media img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Make the content stay on the left and not under the hog */
.card.yritys--split > h2,
.card.yritys--split .yritys-grid{
  width: 60%;           /* must match 100% - hog width */
}

/* We don't need flex columns anymore because the hog is pinned */
.card.yritys--split .yritys-grid{
  display: block;
}

.card.yritys--split .yritys-text{
  padding: 14px 22px 22px;
}

/* Mobile: stack normally */
@media (max-width: 900px){
  .card.yritys--split .yritys-media{
    position: relative;
    top: auto; right: auto; bottom: auto;
    width: 100%;
    height: 260px;
  }

  .card.yritys--split > h2,
  .card.yritys--split .yritys-grid{
    width: 100%;
  }
}


