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

/* =========================================================================
   redesign.css  —  OVERRIDE LAYER on top of style.css
   -------------------------------------------------------------------------
   This file only adds visual overrides. It never replaces style.css.
   Remove the <link rel="stylesheet" href="css/redesign.css"> line from a
   page and that page returns to the original style.css design.

   Direction: square / "Neliö" motif, grid rhythm, confident type, premium
   spacing — adapted for a local Turku bike workshop. Sage-green palette only.
   Fonts: Founders Grotesk not present, so Inter Tight is used (per brief).
   No new colors, no blue/orange, no numbered labels, no emojis.
   ========================================================================= */

/* ---- Tokens: squarer corners + a couple of redesign-only shades ---------- */
:root {
  --radius: 6px;
  --radius-md: 5px;
  --radius-btn: 4px;

  --rd-font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --rd-line: #d6e0d6;            /* subtle green-grey border */
  --rd-charcoal: #1b2820;        /* charcoal-green for strong sections */
  --rd-shadow-lift: 0 10px 30px rgba(28, 40, 32, 0.14);
}

/* ---- Base typography ----------------------------------------------------- */
body { font-family: var(--rd-font); }
h1, h2, h3, .btn, .bike-toggle-opt, .site-nav a { font-family: var(--rd-font); }

h1 { letter-spacing: -0.03em; }
h2 { letter-spacing: -0.022em; }
h3 { letter-spacing: -0.012em; }

/* =========================================================================
   TEMPORARY: opening banner (remove after 20.7.2026)
   Red is used only for this announcement (same red as the hero announce).
   Sticky at the very top; js/script.js measures its height into
   --pn-banner-h so the sticky header sits right below it.
   ========================================================================= */
.opening-banner {
  position: sticky;
  top: 0;
  z-index: 9999;                  /* above everything, incl. Leaflet panes/controls (z ~200–800) */
  background: #c0392b;
  color: #fff;
  border-bottom: 1px solid #8f2a1f;
}
.opening-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
}
.opening-banner p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}
.opening-banner strong { font-weight: 800; }
.opening-banner-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  opacity: 0.8;
}
.opening-banner-close:hover,
.opening-banner-close:focus-visible { opacity: 1; }

@media (max-width: 640px) {
  .opening-banner p { font-size: 0.82rem; }
}

/* ---- Header: stronger, cleaner nav --------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--rd-line);
  /* stick below the temporary opening banner (0 when dismissed/absent) */
  top: var(--pn-banner-h, 0px);
}
.site-nav ul a {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---- Section heading ----------------------------------------------------- */
.section-head h2 { font-weight: 800; }

/* ---- Buttons: bold but square, still green ------------------------------- */
.btn {
  border-radius: var(--radius-btn);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn-secondary { border-color: var(--rd-line); }

/* =========================================================================
   HERO — square/grid composition, stronger type, geometric overlay
   ========================================================================= */
.hero-media {
  border-radius: var(--radius);
  background-position: 70% center;
}
/* subtle square grid overlay (sits above photo, below the text panel) */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 56px);
}
.hero-panel {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-md);
  border-left: 5px solid var(--color-primary);
}
.hero-panel h1 {
  font-size: 2.45rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
/* "Neliöstä pyöreäksi." — made more important with a square accent */
.hero-tagline {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 0 6px 14px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  border-left: 4px solid var(--color-primary);
}

@media (min-width: 900px) {
  .hero-panel h1 { font-size: 3.15rem; }
}

/* =========================================================================
   HUOLTOPAKETIT — premium square cards (functionality untouched)
   ========================================================================= */
.package-card {
  border-radius: var(--radius);
  border: 1px solid var(--rd-line);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.package-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--rd-shadow-lift);
  border-color: var(--color-primary-border);
}
/* featured Kausihuolto: stronger frame + a square top accent bar */
.package-card--featured {
  border: 2px solid var(--color-primary);
  box-shadow: var(--rd-shadow-lift);
}
.package-card--featured::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-primary);
}
/* Sähköpyörä mode: the featured accent bar must be blue too (no leftover green).
   Blue is used ONLY here, matching the existing electric-mode accents. */
.packages.is-electric .package-card--featured::before {
  background: #007BFF;
}
/* SUOSITUIN badge: square chip */
.package-badge {
  border-radius: 3px;
  letter-spacing: 0.14em;
  box-shadow: none;
}
/* price hierarchy */
.package-title { font-weight: 800; letter-spacing: 0.005em; }
.package-price { font-size: 1.9rem; font-weight: 800; }
.package-price--multi { font-weight: 800; }

/* bike/e-bike toggle: squarer chip (keeps JS classes + behaviour) */
.bike-toggle { border-radius: 6px; }
.bike-toggle-thumb { border-radius: 4px; }
.bike-toggle-opt { border-radius: 4px; font-weight: 600; }

/* includes accordion button: square, consistent */
.includes-toggle { border-radius: var(--radius-btn); }

/* =========================================================================
   STEPS — square checkpoints on a connecting route line
   ========================================================================= */
/* open modules instead of heavy cards so the route line reads cleanly */
.steps .step {
  background: transparent;
  border: none;
  box-shadow: none;
}
.steps .step-number {
  position: relative;
  z-index: 1;
  border: none;
  border-radius: var(--radius-btn);
  background: var(--color-primary);
  color: #fff;
}
.steps .step h3 { font-weight: 700; }

@media (min-width: 900px) {
  .steps .step-grid { position: relative; }
  /* horizontal connector behind the square checkpoints */
  .steps .step-grid::before {
    content: "";
    position: absolute;
    top: 54px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: var(--rd-line);
    z-index: 0;
  }
}

/* the "Etkö löytänyt…" helper card under the steps */
.steps-contact { border-radius: var(--radius); border: 1px solid var(--rd-line); }
.contact-link { border-radius: var(--radius-btn); }

/* =========================================================================
   COLOR CORRECTION — remove large pale-green section backgrounds
   Green stays an accent (buttons, borders, marker, active states); big
   washed-out sage panels become warm off-white. Small green accents
   (toggle track, hovers, contact chips, notice box) are left as-is.
   ========================================================================= */
/* "Miksi valita Pyörähuolto Neliö" section */
.trust { background: var(--bg); }
/* Reviews section blends into the same beige page background; cards stay white */
.reviews-section { background: var(--bg); }
/* Subpage hero bands (tietosuojaseloste, thank-you, etc.).
   background-color only, so the Hinnastot hero photo stays intact. */
.page-hero { background-color: var(--bg); }

/* =========================================================================
   TRUST — blocky square cards with a sage top accent
   ========================================================================= */
.trust-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  gap: 16px;
}
.trust-item {
  background: var(--surface);
  border: 1px solid var(--rd-line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.trust-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--rd-shadow-lift);
}
.trust-item h3 { font-weight: 800; }

/* =========================================================================
   REVIEWS — first review featured, rest as clean square cards
   ========================================================================= */
.review-card {
  border-radius: var(--radius);
  border: 1px solid var(--rd-line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.review-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rd-shadow-lift);
}
.review-name { font-weight: 700; }
/* keep the existing gold stars exactly as they are (no color change) */
/* all reviews share equal weight — no featured/oversized card (clean 3x3 grid) */

/* =========================================================================
   FAQ — squarer items, calm sage open state
   ========================================================================= */
.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--rd-line);
}
.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: none;
}
.faq-item summary { font-weight: 600; }

/* =========================================================================
   FINAL CTA — charcoal-green block with subtle square grid
   ========================================================================= */
.cta-final {
  position: relative;
  overflow: hidden;
  background: var(--rd-charcoal);
}
.cta-final::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 60px);
}
.cta-final-inner { position: relative; z-index: 1; }
.cta-final h2 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.025em; }
/* strong off-white booking button with dark-green text */
.cta-final .btn-primary {
  background: var(--bg);
  color: var(--color-primary-dark);
  border: 1px solid var(--bg);
  box-shadow: none;
}
.cta-final .btn-primary:hover { background: #fff; color: var(--color-primary-dark); }

@media (min-width: 900px) {
  .cta-final h2 { font-size: 2.8rem; }
}

/* =========================================================================
   Hinnastot hero — contain the photo like the KOTI hero
   (off-white space on the left/right, rounded corners; same crop position)
   ========================================================================= */
.hinnasto-hero {
  position: relative;
  max-width: var(--maxw);          /* same width as the KOTI hero container */
  margin: 24px auto 0;             /* centered → empty space left & right */
  border-radius: var(--radius);
  overflow: hidden;
  background-image: none;          /* photo moved to ::before so it can be greyscaled */
}
/* black-and-white photo layer (grayscale applies only here, not to text/buttons) */
.hinnasto-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(20, 22, 18, 0.55), rgba(20, 22, 18, 0.55)),
    url("../images/pyorahuoltonelio-hinnasto-5.jpeg");
  background-size: cover;
  background-position: 72% center;
  filter: grayscale(1) contrast(1.05);
}
/* keep the heading/buttons above the photo layer (and in colour) */
.hinnasto-hero > .container { position: relative; z-index: 1; }

@media (max-width: 1187px) {
  /* keep side gutters before the page reaches full max-width */
  .hinnasto-hero { margin-left: 20px; margin-right: 20px; }
}

/* =========================================================================
   Location map (homepage only) — futuristic monochrome Leaflet map
   ========================================================================= */
.location-map-section { background: var(--bg); }
.location-map-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}
.location-map-text { display: flex; flex-direction: column; justify-content: center; }
.location-map-text h2 { font-weight: 800; margin-bottom: 12px; }
.location-map-text p { color: var(--text-muted); margin-bottom: 22px; max-width: 42ch; }
.location-map-text .btn { align-self: flex-start; }

.location-map-frame {
  position: relative;
  /* New stacking context: keeps Leaflet's internal z-indexes (tiles, marker,
     popup, zoom controls) trapped inside the frame so they can never rise
     above the sticky header or the opening banner. */
  z-index: 0;
  border: 1px solid var(--rd-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--rd-shadow-lift);
  background: var(--rd-charcoal);
}
#location-map {
  width: 100%;
  height: 340px;
}

/* Monochrome / futuristic tiles — filter the tile pane only so the
   branded marker and popup keep their sage-green colour. */
#location-map .leaflet-tile-pane {
  filter: grayscale(1) contrast(1.08) brightness(0.9);
}

/* OSM attribution kept visible, just understated */
#location-map .leaflet-control-attribution {
  background: rgba(250, 248, 243, 0.85);
  color: #444;
  font-size: 0.7rem;
}
#location-map .leaflet-control-attribution a { color: var(--color-primary-dark); }

/* squared, on-brand zoom buttons */
#location-map .leaflet-bar a {
  border-radius: 0;
  color: var(--color-primary-dark);
}

@media (min-width: 860px) {
  .location-map-grid { grid-template-columns: 0.85fr 1.15fr; gap: 36px; }
  #location-map { height: 460px; }
}

/* ---- Regular green map pin (classic teardrop shape) ---- */
.nelio-pin-icon { background: transparent; border: none; }
.nelio-pin {
  box-sizing: border-box;
  display: block;
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;       /* teardrop: sharp corner points down */
  transform: rotate(-45deg);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.30);
  position: relative;
}
.nelio-pin::after {                    /* white centre dot */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* ---- Popup styled to match the site ---- */
.nelio-popup .leaflet-popup-content-wrapper {
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius-md);
  border: 1px solid var(--rd-line);
  box-shadow: var(--rd-shadow-lift);
}
.nelio-popup .leaflet-popup-content { font-family: var(--rd-font); line-height: 1.5; }
.nelio-popup .leaflet-popup-content a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 74, 53, 0.3);
}
.nelio-popup .leaflet-popup-tip { background: var(--bg); }

/* =========================================================================
   Booking form: live price summary
   ========================================================================= */
.price-summary {
  background: var(--surface);
  border: 1px solid var(--rd-line);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.price-summary-row,
.price-summary-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.price-summary-row { color: var(--text-muted); }
.price-summary-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rd-line);
  font-weight: 800;
  color: var(--text);
}
.price-summary-note {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.price-summary-empty {
  margin: 0;
  color: var(--text-muted);
}

/* Booking time-slot helper + calm limited-availability notice */
.form-help {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.form-warning {
  margin: 8px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* =========================================================================
   Hero opening-announcement box — the ONLY place red is used.
   Mobile-first: stacked below the hero panel (never covers text/buttons).
   Desktop: floated top-right over the hero image as a tilted sticker.
   ========================================================================= */
.hero-announce {
  position: relative;
  z-index: 3;
  order: 2;
  flex: 1 1 100%;                 /* full width → wraps below the panel on small screens */
  margin-top: 18px;
  text-align: center;
  background: #c0392b;            /* red — used only here */
  color: #fff;
  border: 2px solid #fff;        /* clean white sign border */
  outline: 1px solid #8f2a1f;
  border-radius: 6px;
  padding: 24px 28px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}
/* festive ribbon tails behind the box (sticking out each side) */
.hero-announce::before,
.hero-announce::after {
  content: "";
  position: absolute;
  top: 24px;
  width: 30px;
  height: 28px;
  background: #8f2a1f;           /* darker red */
  z-index: -1;
}
.hero-announce::before {
  left: -22px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 32% 50%);
}
.hero-announce::after {
  right: -22px;
  clip-path: polygon(0 0, 100% 0, 68% 50%, 100% 100%, 0 100%);
}
.hero-announce-kicker {
  display: block;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
}
.hero-announce p {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.5;
}
.hero-announce p:last-child { margin-bottom: 0; }

/* let the announce wrap onto its own line under the panel on small screens */
.hero-panel { order: 1; }
@media (max-width: 899px) {
  .hero-media { flex-wrap: wrap; }
  /* keep mobile clean: drop the side ribbon tails (would clip on a full-width box) */
  .hero-announce::before,
  .hero-announce::after { display: none; }
}

/* Desktop: on the right half (clear of the left hero text), vertically
   centered, bigger, slight party tilt */
@media (min-width: 900px) {
  .hero-announce {
    position: absolute;
    top: 50%;
    left: 72%;            /* centered between the left panel's right edge and the image's right edge */
    right: auto;
    flex: none;
    width: 360px;
    max-width: 42%;
    margin: 0;
    transform: translate(-50%, -50%) rotate(-2deg);
  }
}

/* =========================================================================
   Footer — square logo link area, subtle line
   ========================================================================= */
.site-footer { border-top: 3px solid var(--color-primary); }

/* =========================================================================
   Respect reduced motion — disable lifts/transitions
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .package-card, .trust-item, .review-card, .btn {
    transition: none;
  }
  .package-card:hover, .trust-item:hover, .review-card:hover {
    transform: none;
  }
}

/* =========================================================================
   Subtle permanent shine sweep on the main green buttons
   (uses ::after — independent of the hover shimmer in style.css ::before)
   ========================================================================= */
.btn-primary,
button[type="submit"],
.hero-actions .btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary::after,
button[type="submit"]::after,
.hero-actions .btn-primary::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -80%;
  width: 45%;
  height: 180%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.16) 45%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.16) 55%,
    transparent 100%
  );
  transform: rotate(18deg);
  animation: buttonShine 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.btn-primary > *,
button[type="submit"] > *,
.hero-actions .btn-primary > * {
  position: relative;
  z-index: 2;
}

@keyframes buttonShine {
  0% {
    left: -80%;
  }

  20% {
    left: -80%;
  }

  50% {
    left: 130%;
  }

  100% {
    left: 130%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary::after,
  button[type="submit"]::after,
  .hero-actions .btn-primary::after {
    animation: none;
  }
}
