/* =========================================================
   homepage_v2.css — TCM Harmony Homepage (v2) LIGHT theme
   - Designed for linen / paper background image
   - Keeps same hp-* class names as your Twig template
   - FIXED: Services 2-column stable layout (no jumping columns)
   ========================================================= */

/* -------------------------
   CSS Variables (LIGHT)
-------------------------- */
:root {
  --hp-bg: #f4efe8;
  --hp-surface: #f8f4ee;
  --hp-surface-2: #f1ece4;

  --hp-card: rgba(255, 255, 255, 0.75);
  --hp-card-strong: rgba(255, 255, 255, 0.88);
  --hp-border: rgba(0, 0, 0, 0.08);

  --hp-text: #2a2623;
  --hp-muted: #5e5751;
  --hp-dim: #7a736c;

  --hp-accent: #c96f2d;
  --hp-accent-2: #e08b3f;

  --hp-shadow: 0 18px 40px rgba(0,0,0,0.12);
  --hp-shadow-soft: 0 10px 26px rgba(0,0,0,0.10);

  --hp-radius: 18px;
  --hp-radius-lg: 26px;

  --hp-container: 1180px;
  --hp-pad: 22px;

  --hp-h1: clamp(2.2rem, 2.2vw + 1.4rem, 3.6rem);
  --hp-h2: clamp(1.6rem, 1.2vw + 1.2rem, 2.4rem);
  --hp-h3: 1.2rem;
  --hp-p: 1.0rem;

  --hp-line: 1.65;

  --base-headerH: 76px;
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--hp-bg);
  color: var(--hp-text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji","Segoe UI Emoji";
  line-height: var(--hp-line);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(201, 111, 45, 0.35);
  outline-offset: 3px;
  border-radius: 10px;
}

button { font-family: inherit; }

.hp { min-height: 100vh; }

.hp-container {
  width: min(var(--hp-container), calc(100% - 2 * var(--hp-pad)));
  margin: 0 auto;
}

.hp-main {
  background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0.0));
}

/* -------------------------
   Typography Helpers
-------------------------- */
.hp-h2 {
  font-size: var(--hp-h2);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 14px 0;
}

.hp-h3 {
  font-size: var(--hp-h3);
  margin: 0 0 10px 0;
  letter-spacing: -0.01em;
}

.hp-p {
  font-size: var(--hp-p);
  margin: 0 0 14px 0;
  color: var(--hp-text);
}

.hp-p--muted { color: var(--hp-muted); }

.hp-p--light,
.hp-h2--light { color: rgba(42, 38, 35, 0.96); }

.hp-ul,
.hp-ol {
  margin: 12px 0 0 0;
  padding-left: 18px;
  color: var(--hp-muted);
}

.hp-ul li,
.hp-ol li { margin: 8px 0; }

.hp-divider {
  height: 1px;
  background: rgba(0,0,0,0.10);
  margin: 18px 0;
  border-radius: 999px;
}

/* -------------------------
   Buttons / Links
-------------------------- */
.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  border: 1px solid transparent;
  user-select: none;
}

.hp-btn--primary {
  background: var(--hp-accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(201,111,45,0.22);
}

.hp-btn--primary:hover {
  background: var(--hp-accent-2);
  transform: translateY(-1px);
}

.hp-btn--ghost {
  background: rgba(255,255,255,0.70);
  border-color: rgba(0,0,0,0.10);
  color: rgba(42, 38, 35, 0.95);
}

.hp-btn--ghost:hover {
  background: rgba(255,255,255,0.88);
  transform: translateY(-1px);
}

.hp-btn--xl {
  padding: 14px 24px;
  font-size: 1.05rem;
}

.hp-btn--full { width: 100%; }

.hp-link {
  color: rgba(42,38,35,0.92);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(201,111,45,0.45);
  text-underline-offset: 3px;
}

.hp-link:hover { text-decoration-color: rgba(201,111,45,0.90); }

/* -------------------------
   Hero (Desktop default)
-------------------------- */
.hp-hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: center;
  padding: 22px 0 56px;
  overflow: hidden;
}

.hp-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hp-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 650px at 20% 20%, rgba(201,111,45,0.10), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(244,239,232,0.48), rgba(244,239,232,0.78));
  z-index: 2;
}

.hp-hero__content {
  position: relative;
  z-index: 3;
  padding-top: 78px;
  padding-bottom: 18px;
}

.hp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.80);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 999px;
  color: rgba(42,38,35,0.90);
  font-weight: 900;
  font-size: 0.9rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.hp-hero__title {
  font-size: var(--hp-h1);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 14px 0 14px;
  max-width: 20ch;
}

.hp-hero__subtitle {
  margin: 0 0 22px;
  max-width: 68ch;
  color: rgba(42,38,35,0.78);
  font-size: 1.05rem;
}

.hp-hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
}

.hp-hero__trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 880px;
}

.hp-trustItem {
  padding: 14px 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.hp-trustItem__k {
  font-weight: 950;
  letter-spacing: -0.01em;
  font-size: 0.95rem;
  color: rgba(42,38,35,0.94);
}

.hp-trustItem__v {
  margin-top: 2px;
  color: rgba(42,38,35,0.70);
  font-size: 0.92rem;
}

/* -------------------------
   Swiper inside Hero
-------------------------- */
.hp-swiper { width: 100%; height: 100%; }

.hp-swiper .swiper-wrapper,
.hp-swiper .swiper-slide { height: 100%; }

.hp-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.05) contrast(1.02);
}

.hp-hero__fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 600px at 30% 20%, rgba(201,111,45,0.12), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, #fbf7f0, #f4efe8);
}

.hp-hero__fallbackInner {
  text-align: center;
  padding: 40px 18px;
  max-width: 540px;
}

.hp-hero__fallbackTitle {
  font-size: 2.2rem;
  font-weight: 950;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  color: rgba(42,38,35,0.92);
}

.hp-hero__fallbackText { color: rgba(42,38,35,0.72); }

.hp-hero .swiper-button-next,
.hp-hero .swiper-button-prev {
  color: rgba(42,38,35,0.92);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
  opacity: 0.0;
}

.hp-hero:hover .swiper-button-next,
.hp-hero:hover .swiper-button-prev { opacity: 1.0; }

.hp-hero .swiper-button-next:hover,
.hp-hero .swiper-button-prev:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.92);
}

.hp-hero .swiper-button-next:after,
.hp-hero .swiper-button-prev:after {
  font-size: 18px;
  font-weight: 950;
}

.hp-hero .swiper-pagination-bullet {
  background: rgba(42,38,35,0.35);
  opacity: 1;
}

.hp-hero .swiper-pagination-bullet-active { background: var(--hp-accent); }

/* -------------------------
   Sections
-------------------------- */
.hp-section { padding: 84px 0; }

.hp-section--tint {
  background: rgba(255,255,255,0.55);
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.hp-sectionHead {
  margin-bottom: 26px;
  max-width: 720px;
}

/* Split layout */
.hp-split {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 26px;
  align-items: start;
}

.hp-quote {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--hp-radius);
  border: 1px solid rgba(201,111,45,0.24);
  background: rgba(201,111,45,0.10);
}

.hp-quote__text {
  color: rgba(42,38,35,0.92);
  font-weight: 950;
  letter-spacing: -0.01em;
}

/* Feature list */
.hp-featureList {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.hp-feature {
  padding: 16px 16px;
  border-radius: var(--hp-radius);
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 26px rgba(0,0,0,0.06);
}

.hp-feature__title {
  font-weight: 950;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: rgba(42,38,35,0.92);
}

.hp-feature__text { color: rgba(42,38,35,0.72); }

/* -------------------------
   Cards
-------------------------- */
.hp-card {
  border-radius: var(--hp-radius);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.75);
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
  padding: 18px;
}

.hp-card--soft {
  background: rgba(201,111,45,0.08);
  border-color: rgba(201,111,45,0.18);
}

.hp-card--plain { background: rgba(255,255,255,0.78); }

.hp-miniCta { margin-top: 12px; }

.hp-note__title {
  font-weight: 950;
  margin-bottom: 4px;
  color: rgba(42,38,35,0.90);
}

.hp-note__text { color: rgba(42,38,35,0.72); }

/* -------------------------
   Grid Utilities (other sections)
-------------------------- */
.hp-grid { display: grid; gap: 16px; }

.hp-grid--why { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-grid--team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hp-grid--prices { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hp-grid--contacts {
  grid-template-columns: 1fr 1.2fr;
  align-items: stretch;
}

/* =========================================================
   Services — STABLE 2 columns (NO columns/masonry)
   Requires HTML: .hp-servicesCols + .hp-servicesCol wrappers
========================================================= */
.hp-servicesCols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.hp-servicesCol{
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* -------------------------
   Services (Accordion Cards)
-------------------------- */
.hp-service{
  border-radius: var(--hp-radius);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.78);
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
}

.hp-service__head{
  width: 100%;
  text-align: left;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  border: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.00));
  color: rgba(42,38,35,0.95);
}

.hp-service__title{
  font-weight: 950;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
}

.hp-service__subtitle{
  color: rgba(42,38,35,0.68);
  font-size: 0.95rem;
  margin-top: 2px;
}

.hp-chevron{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,0.80);
  border: 1px solid rgba(0,0,0,0.10);
  transition: transform 0.18s ease;
  flex: 0 0 auto;
}

/* panel */
.hp-service__body{
  overflow: hidden;
  max-height: 0;
  padding: 0 18px;
  padding-bottom: 0;
  transition: max-height 0.26s ease, padding 0.26s ease;
  color: rgba(42,38,35,0.85);
}

.hp-service.is-open .hp-service__body{
  padding-bottom: 16px;
}

.hp-service.is-open .hp-chevron{ transform: rotate(180deg); }

.hp-service__body .hp-ul{ margin-top: 10px; }

/* -------------------------
   Why cards
-------------------------- */
.hp-infoCard {
  padding: 18px 18px;
  border-radius: var(--hp-radius);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
}

.hp-infoCard__title {
  font-weight: 950;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: rgba(42,38,35,0.92);
}

.hp-infoCard__text { color: rgba(42,38,35,0.72); }

/* -------------------------
   Team cards
-------------------------- */
.hp-person {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: var(--hp-radius);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.hp-person:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.92);
  border-color: rgba(201,111,45,0.22);
}

.hp-person__img {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.10);
}

.hp-person__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hp-person__name {
  font-weight: 950;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: rgba(42,38,35,0.92);
}

.hp-person__role { color: rgba(42,38,35,0.70); margin-top: 2px; }

.hp-person__cta {
  margin-top: 12px;
  color: rgba(201,111,45,0.95);
  font-weight: 900;
}

/* -------------------------
   Price cards (badge bottom-right)
-------------------------- */
.hp-priceCard {
  position: relative;
  padding: 18px;
  border-radius: var(--hp-radius);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.78);
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
}

.hp-grid--prices .hp-priceCard{ cursor: default; transition: none; }
.hp-grid--prices .hp-priceCard:hover{ transform: none; box-shadow: 0 12px 26px rgba(0,0,0,0.08); }

.hp-priceCard__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.hp-priceCard__name {
  font-weight: 950;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  color: rgba(42,38,35,0.92);
}

.hp-priceCard__price {
  font-weight: 950;
  color: #5e473a;
  font-size: 1.6rem;
  white-space: nowrap;
}

.hp-priceCard__time { margin-top: 8px; color: rgba(42,38,35,0.70); font-weight: 800; }

.hp-priceCard--featured {
  border-color: rgba(201,111,45,0.30);
  background: rgba(201,111,45,0.10);
  box-shadow: 0 18px 50px rgba(201,111,45,0.14);
  padding-bottom: 46px;
}

.hp-priceCard__tag {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(201,111,45,0.95);
  color: #fff;
  font-weight: 900;
  font-size: 0.78rem;
  line-height: 1;
  user-select: none;
  pointer-events: none;
  opacity: 0.95;
}

/* -------------------------
   CTA Section
-------------------------- */
.hp-section--cta {
  background:
    radial-gradient(1100px 600px at 25% 20%, rgba(201,111,45,0.18), rgba(0,0,0,0) 60%),
    linear-gradient(180deg, rgba(255,255,255,0.70), rgba(244,239,232,0.95));
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.hp-cta {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: var(--hp-radius-lg);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.72);
  box-shadow: var(--hp-shadow);
}

.hp-cta__action {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* -------------------------
   Contacts
-------------------------- */
.hp-contactLine {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 10px 0;
}

.hp-contactLabel { color: rgba(42,38,35,0.62); font-weight: 900; }
.hp-contactValue { color: rgba(42,38,35,0.92); font-weight: 900; }
.hp-contactValue:hover { color: rgba(201,111,45,0.95); }

.hp-mapCard { padding: 0; overflow: hidden; }

.hp-map {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  border-radius: var(--hp-radius);
}

/* -------------------------
   Footer
-------------------------- */
.hp-footer {
  padding: 34px 0 110px;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.55);
}

.hp-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(42,38,35,0.72);
}

.hp-footer__links { display: flex; gap: 14px; flex-wrap: wrap; }

.hp-footer__links a { color: rgba(42,38,35,0.74); font-weight: 900; }
.hp-footer__links a:hover { color: rgba(201,111,45,0.95); }

/* -------------------------
   Mobile Sticky CTA
-------------------------- */
.hp-stickyCta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 50;
  padding: 0 14px;
  display: none;
}

.hp-stickyCta .hp-btn--full { box-shadow: 0 18px 50px rgba(0,0,0,0.25); }

/* =========================================================
   Sticky header compatibility (Desktop)
========================================================= */
.hp .hp-hero {
  padding-top: var(--base-headerH);
  min-height: calc(92vh + var(--base-headerH));
}

.hp .hp-hero__content { padding-top: 26px; }

.base .base-content > .hp {
  margin-top: calc(-1 * (var(--base-headerH) + 18px));
}

/* -------------------------
   Responsive
-------------------------- */
@media (max-width: 1024px) {
  .hp-grid--why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-grid--prices { grid-template-columns: 1fr; }
  .hp-grid--contacts { grid-template-columns: 1fr; }
  .hp-split { grid-template-columns: 1fr; }
  .hp-cta { grid-template-columns: 1fr; }
  .hp-cta__action { justify-content: flex-start; }

  .hp-hero { min-height: 86vh; }

  .hp-hero__trust {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .hp-hero .swiper-button-next,
  .hp-hero .swiper-button-prev { opacity: 1; }

  .hp-priceCard--featured { padding-bottom: 18px; }
  .hp-priceCard__tag{
    position: static;
    display: inline-block;
    margin-top: 10px;
  }
}

@media (max-width: 768px) {
  .hp-section { padding: 64px 0; }

  /* Services: 1 column */
  .hp-servicesCols{ grid-template-columns: 1fr; }

  .hp-grid--team { grid-template-columns: 1fr; }

  .hp-person { grid-template-columns: 90px 1fr; }
  .hp-person__img { width: 90px; height: 90px; border-radius: 16px; }

  .hp-contactLine { grid-template-columns: 72px 1fr; }

  .hp-stickyCta { display: block; }
  .hp-footer { padding-bottom: 140px; }

  /* Mobile hero: slider on top, content below */
  .hp-hero{
    display: block;
    min-height: auto;
    padding: 0;
    overflow: hidden;
  }

  .hp-hero__media{
    position: relative;
    width: 100%;
    margin-top: var(--base-headerH);
    height: max(260px, calc(52vh - var(--base-headerH)));
    min-height: 280px;
    max-height: 520px;
  }

  .hp-swiper,
  .hp-swiper .swiper-wrapper,
  .hp-swiper .swiper-slide{ width: 100%; height: 100%; }

  .hp-swiper .swiper-slide img{ transform: none; filter: none; }

  .hp-hero__overlay{
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
      linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.10) 70%, rgba(0,0,0,0.18) 100%);
  }

  .hp-hero__content{ z-index: 3; position: relative; padding: 16px 0 20px; }

  .hp-badge{ font-size: 0.85rem; margin-bottom: 8px; }
  .hp-hero__title{ margin: 6px 0 10px; line-height: 1.1; max-width: 24ch; }
  .hp-hero__subtitle{ font-size: 0.98rem; line-height: 1.35; margin-bottom: 14px; }

  .hp-hero__actions{ gap: 10px; margin-bottom: 16px; }
  .hp-hero__actions .hp-btn{ width: 100%; justify-content: center; }

  .hp-hero__trust{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 100%;
  }

  .hp-trustItem{
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.70);
  }
}

@media (max-width: 420px) {
  :root { --hp-pad: 16px; }

  .hp-btn { width: 100%; }

  .hp-hero__actions { gap: 10px; }
  .hp-hero__subtitle { font-size: 1.0rem; }

  .hp-service__head { padding: 16px; }
  .hp-service__body { padding-left: 16px; padding-right: 16px; }

  .hp-hero__trust{ grid-template-columns: 1fr; }
}

/* -------------------------
   Reduced Motion
-------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
  .hp-swiper .swiper-slide img { transform: none; }
  .hp-btn:hover,
  .hp-person:hover { transform: none; }
}
