/**
 * Section: Hero / Page Header — "Meridian" redesign
 *
 * @package Ortorodzina
 */

/* ═══════════════════════════════════════════════════════════
   Shell
   ═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-9);
  background: #fff;
  overflow: hidden;
}

/* Soft atmospheric circles — depth without distraction */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Accent bloom — top right */
.hero::before {
  top: -180px;
  right: -180px;
  width: 560px;
  height: 560px;
  background: var(--color-accent);
  opacity: 0.045;
}

/* Dark bloom — bottom left */
.hero::after {
  bottom: -120px;
  left: -120px;
  width: 400px;
  height: 400px;
  background: var(--color-dark);
  opacity: 0.03;
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   Layout grid
   ═══════════════════════════════════════════════════════════ */

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════
   Content column
   ═══════════════════════════════════════════════════════════ */

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0; /* prevent grid blowout on mobile */
}

/* ── Eyebrow badges ── */

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  line-height: 1;
  white-space: normal;
}

.hero__badge--local {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-soft);
}

/* Accent location dot */
.hero__badge--local::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}

.hero__badge--price {
  background: var(--color-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px rgba(255, 58, 45, 0.3);
}

/* ── Headline ── */

.hero__h1 {
  font-size: clamp(26px, 7vw, 46px);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Allow callers to wrap a keyword in <em> or <strong> for accent color */
.hero__h1 em,
.hero__h1 strong {
  color: var(--color-accent);
  font-style: normal;
  font-weight: inherit;
}

/* ── Lead text ── */

.hero__lead {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.75;
  color: var(--color-text-soft);
  margin: 0;
}

/* ── Benefits list ── */

.hero__benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero__benefit {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.45;
}

.hero__benefit::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(255, 58, 45, 0.1);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' fill='none' stroke='%23ff3a2d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 14 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l4 4L13 1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ── CTA actions ── */

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.hero__actions .button {
  white-space: normal;
}

.hero__actions .button:active {
  transform: scale(0.97);
}

/* ═══════════════════════════════════════════════════════════
   Media column
   ═══════════════════════════════════════════════════════════ */

.hero__media {
  position: relative;
  min-width: 0; /* prevent grid blowout on mobile */
}

/* Offset accent shadow — the "depth" signature */
.hero__media::before {
  content: "";
  position: absolute;
  inset: 20px -18px -22px 18px;
  border-radius: var(--radius-sm) var(--radius-lg) var(--radius-sm) var(--radius-lg);
  background: var(--color-accent);
  opacity: 0.12;
  z-index: 0;
}

/* Asymmetric-cornered image frame — the "twist" */
.hero__media-frame {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-sm) var(--radius-lg) var(--radius-sm) var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
}

.hero__media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   Center variant
   ═══════════════════════════════════════════════════════════ */

.hero--center .hero__inner {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.hero--center .hero__badges,
.hero--center .hero__actions,
.hero--center .hero__benefits {
  justify-content: center;
}

.hero--center .hero__media {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   Entry animations
   ═══════════════════════════════════════════════════════════ */

.hero__content {
  transition:
    opacity 500ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 500ms cubic-bezier(0.23, 1, 0.32, 1);
}

@starting-style {
  .hero__content {
    opacity: 0;
    transform: translateY(16px);
  }
}

.hero__media {
  transition:
    opacity 400ms cubic-bezier(0.23, 1, 0.32, 1) 200ms,
    transform 400ms cubic-bezier(0.23, 1, 0.32, 1) 200ms;
}

@starting-style {
  .hero__media {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ═══════════════════════════════════════════════════════════
   Responsive — mobile-first
   ═══════════════════════════════════════════════════════════ */

/* ── 480 px: benefits go 2-col ── */
@media (min-width: 480px) {
  .hero__benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px var(--space-4);
  }
}

/* ── 768 px: side-by-side layout ── */
@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  /* Image moves to right column */
  .hero__media {
    order: 1;
  }

  /* Taller frame on tablet */
  .hero__media-frame {
    aspect-ratio: 3 / 4;
  }

  /* Benefits back to single col inside the narrower content column */
  .hero__benefits {
    grid-template-columns: 1fr;
  }
}

/* ── 1024 px: full desktop ── */
@media (min-width: 1024px) {
  .hero {
    padding: var(--space-10) 0;
  }

  .hero__inner {
    grid-template-columns: 55fr 45fr;
    gap: clamp(var(--space-8), 6%, var(--space-12));
    align-items: start;
  }

  .hero__h1 {
    font-size: clamp(36px, 4vw, 52px);
  }

  /* Benefits back to 2-col at full desktop */
  .hero__benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px var(--space-5);
  }

  .hero__media-frame {
    aspect-ratio: 4 / 5;
  }

  .hero__media::before {
    inset: 24px -22px -26px 22px;
  }
}

/* ── 1280 px: wide desktop ── */
@media (min-width: 1280px) {
  .hero__inner {
    gap: var(--space-12);
  }
}

/* ── Hover: subtle zoom on image for pointer devices ── */
@media (hover: hover) and (pointer: fine) {
  .hero__media-frame img {
    transition: transform 550ms cubic-bezier(0.23, 1, 0.32, 1);
  }

  .hero__media-frame:hover img {
    transform: scale(1.04);
  }
}

/* ── Touch: no hover transitions ── */
@media (hover: none) {
  .hero__media-frame img {
    transition: none;
  }
}

/* ── Landscape phones (rotated) ── */
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    padding: var(--space-5) 0;
  }

  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    align-items: start;
  }

  .hero__media {
    order: 1;
  }

  .hero__media-frame {
    aspect-ratio: 16 / 9;
  }

  .hero__h1 {
    font-size: clamp(20px, 3.5vh, 28px);
  }

  .hero__lead {
    display: none;
  }

  .hero__benefits {
    grid-template-columns: 1fr;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero__media-frame img,
  .hero__content,
  .hero__media {
    transition: none;
  }
}

/* ── Small mobile: stack action buttons ── */
@media (max-width: 479px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .button {
    text-align: center;
    justify-content: center;
  }
}
