/**
 * Sencurio — stránka O nás (o-nas.php)
 * Doplňuje tokens + theme-ui + landing. Prémiové mezery, Z-pattern, karty týmu, kontakty.
 */

/* Hero sdílí padding/min-height s .hero--landing (jako index); nezahlucovat dvojitým paddingem */
.section-about-hero {
  background: inherit;
}

.section-about-vize,
.section-about-tym,
.section-about-kontakt {
  padding-top: clamp(5.5rem, 9vw, 6.5rem);
  padding-bottom: clamp(5.5rem, 9vw, 6.5rem);
}

.section-about-fakturace {
  background: var(--color-bg-base);
  padding-top: clamp(3rem, 5vw, 4rem);
  padding-bottom: clamp(4rem, 8vw, 5rem);
  border-top: 1px solid var(--color-border);
}

.section-about-vize {
  background: var(--color-bg-elevated);
}

.section-about-tym {
  background: var(--color-bg-surface);
}

.section-about-kontakt {
  background: var(--color-bg-base);
}

/* ─── Hero: dvousloupcová mřížka jako index (landing.css) — text vlevo, radar vpravo ─── */
.about-hero .hero__headline {
  max-width: 42rem;
  text-align: left;
  text-wrap: balance;
}

.about-hero .hero__headline .about-hero__title-accent {
  color: var(--color-cta);
}

/* Odstavec pod nadpisem: vlevo (sekce .hero dědí text-align: center z theme-ui) */
.about-hero .hero__subheadline,
.about-hero .hero-subheadline {
  text-align: left;
  width: 100%;
  max-width: 36rem;
  box-sizing: border-box;
}

/* Pulzující radar: pod obsahem hero, stejná mřížka jako .hero__inner — ne v rámečku */
.about-hero__radar-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 32px 24px 0;
  box-sizing: border-box;
}

.about-hero__radar-layer-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px clamp(2rem, 5vw, 2.75rem);
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: 48px;
  align-items: center;
  box-sizing: border-box;
}

.about-hero__radar-cell {
  --ah-radar-blue: var(--color-primary);
  --ah-radar-orange: var(--color-brand-i-dot);

  grid-column: 2;
  position: relative;
  justify-self: stretch;
  min-height: min(62vw, 460px);
  width: 100%;
}

.about-hero__radar-cell .hero-radar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, 90vw);
  height: min(480px, 90vw);
  max-width: 480px;
  max-height: 480px;
  margin: 0;
  opacity: 1;
  z-index: 0;
}

/* Větší kruhy + barva modrá ↔ oranžová (liché / sudé fáze) */
.about-hero__radar-cell .radar-ring {
  border-width: 3px;
  animation: about-hero-radar-ring 2.55s ease-out infinite backwards;
  opacity: 0;
}

.about-hero__radar-cell .radar-ring:nth-child(even) {
  animation-name: about-hero-radar-ring-alt;
}

.about-hero__radar-cell .radar-ring:nth-child(1) {
  width: 20%;
  height: 20%;
  animation-delay: 0s;
}
.about-hero__radar-cell .radar-ring:nth-child(2) {
  width: 36%;
  height: 36%;
  animation-delay: 0.28s;
}
.about-hero__radar-cell .radar-ring:nth-child(3) {
  width: 52%;
  height: 52%;
  animation-delay: 0.56s;
}
.about-hero__radar-cell .radar-ring:nth-child(4) {
  width: 68%;
  height: 68%;
  animation-delay: 0.84s;
}
.about-hero__radar-cell .radar-ring:nth-child(5) {
  width: 86%;
  height: 86%;
  animation-delay: 1.12s;
}

@keyframes about-hero-radar-ring {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    border-color: var(--ah-radar-blue);
  }
  10% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.88;
    border-color: var(--ah-radar-blue);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.04);
    opacity: 0.78;
    border-color: var(--ah-radar-orange);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
    border-color: var(--ah-radar-blue);
  }
}

@keyframes about-hero-radar-ring-alt {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    border-color: var(--ah-radar-orange);
  }
  10% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.88;
    border-color: var(--ah-radar-orange);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.04);
    opacity: 0.78;
    border-color: var(--ah-radar-blue);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
    border-color: var(--ah-radar-orange);
  }
}

@keyframes about-hero-radar-ring-reduced {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  12% {
    opacity: 0.72;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 0;
  }
}

/* Rozpad kruhu → kuličky (pozice + let řeší about-radar-burst.js) */
.about-hero__particles-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.about-hero__particle {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.92;
  box-shadow: 0 0 5px rgba(0, 98, 204, 0.22);
  transition:
    transform 1.12s cubic-bezier(0.1, 0.58, 0.18, 1),
    opacity 1.05s ease-out;
  will-change: transform, opacity;
}

.about-hero__particle--fly {
  transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, 0px)));
  opacity: 0;
}

[data-theme='dark'] .about-hero__particle {
  box-shadow: 0 0 8px rgba(74, 144, 240, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .about-hero__particles-layer {
    display: none;
  }
}

/* Izometrická budova: radar + dýchání (scale) + vertikální pohup (jako .hero-content / @keyframes float) */
.about-hero__radar-cell .about-hero__zlin-float {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: about-hero-zlin-drift 6s ease-in-out infinite;
}

/* Stejný střed jako .hero-radar (translate -50% / -50% vůči buňce) */
@keyframes about-hero-zlin-drift {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-10px);
  }
}

.about-hero__radar-cell .about-hero__zlin-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transform-origin: 50% 50%;
  animation: about-hero-zlin-breathe 5.5s ease-in-out infinite;
}

@keyframes about-hero-zlin-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

.about-hero__radar-cell .about-hero__zlin {
  position: relative;
  display: block;
  width: auto;
  height: clamp(11rem, 33vmin, 16rem);
  max-width: min(82%, 18rem);
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.12));
}

[data-theme='dark'] .about-hero__radar-cell .about-hero__zlin {
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.45));
}

@media (prefers-reduced-motion: reduce) {
  .about-hero__radar-cell .about-hero__zlin-float,
  .about-hero__radar-cell .about-hero__zlin-wrap {
    animation: none;
  }

  .about-hero__radar-cell .about-hero__zlin-wrap {
    transform: none;
  }

  .about-hero__radar-cell .radar-ring {
    animation: about-hero-radar-ring-reduced 3s ease-out infinite backwards;
    border-color: var(--color-primary);
  }

  .about-hero__radar-cell .radar-ring:nth-child(even) {
    animation-name: about-hero-radar-ring-reduced;
  }
}

/* Pravý sloupec layoutu — drží šířku mřížky i bez obrázku */
.about-hero .about-hero__visual {
  align-self: center;
  min-height: min(62vw, 460px);
  width: 100%;
}

@media (max-width: 1023px) {
  /* Radar + device nad textem (viz landing.css — vrstva je position:relative). */
  .about-hero__radar-layer-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 10px clamp(0.4rem, 1.6vw, 0.85rem);
    max-width: 100%;
  }

  /*
   * Mobil: PNG (zlin / device) musí být v dokumentovém toku — absolutní float + transform
   * na rodiči často na iOS/Safari vykreslí prázdný box nebo img pod vrstvou kruhů.
   */
  .about-hero__radar-cell {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    min-height: clamp(12rem, 52vw, 18rem);
    max-width: 22rem;
    margin: 0 auto;
    width: 100%;
  }

  .about-hero__radar-cell .about-hero__zlin-float {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    z-index: 2;
    animation: none;
  }

  .about-hero__radar-cell .about-hero__zlin-wrap {
    animation: none;
  }

  .about-hero__radar-cell .about-hero__zlin {
    display: block;
    position: relative;
    z-index: 1;
    width: min(9rem, 45vw);
    height: auto;
    max-height: 7.5rem;
    max-width: 100%;
    object-fit: contain;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  /* Prázdný slot v mřížce hero__inner — vizuál je v .about-hero__radar-layer výše. */
  .about-hero .about-hero__visual {
    display: none;
    min-height: 0;
    margin: 0;
  }

  .about-hero.hero--landing .hero-content {
    align-items: center;
    padding-top: 0;
  }

  .about-hero .hero__subheadline,
  .about-hero .hero-subheadline {
    margin-left: auto;
    margin-right: auto;
  }

  .about-hero .hero__headline {
    font-size: clamp(1.375rem, 5vw + 0.45rem, 2.75rem);
    line-height: 1.18;
  }

  .about-hero .hero__subheadline,
  .about-hero .hero-subheadline {
    font-size: clamp(0.9375rem, 3.1vw + 0.3rem, 1.125rem);
    line-height: 1.62;
    max-width: 36rem;
  }

  /* O nás (mobil): text na střed + menší mezera mezi objektem a textem. */
  #about-hero .about-hero__radar-layer-inner {
    padding-bottom: clamp(0.15rem, 1vw, 0.4rem);
  }

  #about-hero .about-hero__radar-cell {
    min-height: clamp(10rem, 44vw, 14rem);
  }

  #about-hero.hero--landing .hero-content {
    align-items: center;
    text-align: center;
    gap: 0.8rem;
  }

  #about-hero .hero__headline,
  #about-hero .hero__subheadline,
  #about-hero .hero-subheadline {
    text-align: center;
  }

  /* Mobilní hero: první CTA jako „O nás“ (desktop zůstává „Náš příběh“) */
  #about-hero .about-hero__cta-label--desktop {
    display: none;
  }

  #about-hero .about-hero__cta-label--mobile {
    display: inline;
  }

  #about-hero .about-hero__cta-row {
    flex-direction: row;
    flex-wrap: nowrap;
  }
}

/* O nás hero: výchozí popisek prvního tlačítka pro desktop */
.about-hero__cta-label--mobile {
  display: none;
}

.about-hero__cta-label--desktop {
  display: inline;
}

.about-hero__cta-row .about-hero__cta-label {
  white-space: nowrap;
}

/* landing.css zde dává oběma .btn flex:1 1 0 + min-width:0 — bez toho se „About us“ láme; první CTA drží šířku textu */
@media (max-width: 480px) {
  #about-hero.hero--landing .hero__cta .btn:first-of-type {
    flex: 0 1 auto;
    min-width: min-content;
  }

  #about-hero.hero--landing .hero__cta .btn:last-of-type {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (min-width: 1024px) {
  .about-hero.hero--landing .hero__inner {
    align-items: center;
  }

  .about-hero .hero__subheadline,
  .about-hero .hero-subheadline {
    max-width: 32rem;
  }
}

/* Mezera pod nadpisem sekce (dříve podnadpis .about-vize__intro) */
.section-about-vize > .landing-container > .section-title {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

/* Osobní příběh: text vlevo, kompaktní portrét vpravo (bez rámečkového panelu) */
.about-vize__layout {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.25rem);
  align-items: start;
}

@media (min-width: 768px) {
  .about-vize__layout {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 140px);
    column-gap: clamp(1.75rem, 4vw, 2.75rem);
    /* Portrét na střed výšky sloupce s odstavci */
    align-items: center;
  }
}

.about-vize__portrait {
  margin: 0;
  min-width: 0;
  width: 100%;
  max-width: min(140px, 36vw);
  border-radius: 0.5rem;
  overflow: hidden;
  justify-self: end;
}

@media (max-width: 767px) {
  .about-vize__portrait {
    justify-self: center;
  }
}

.about-vize__portrait-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.about-vize__prose {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.25rem);
}

.about-prose,
.about-vize__lead {
  margin: 0;
  max-width: none;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.about-contact__icon .cms-icon-slot {
  width: 100%;
  height: 100%;
}

.about-contact__icon .cms-icon-mask {
  display: block;
  width: 100%;
  height: 100%;
}

.about-team__linkedin .cms-icon-slot {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

/* ─── Tým ───────────────────────────────────────────────────────────────── */
.about-team__summary {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.about-team__summary p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.about-team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.25rem, 2vw, 1.75rem);
}

.about-team__photo-wrap {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-height: 14rem;
  max-width: 14rem;
  margin: 0 auto 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--color-bg-elevated);
  flex-shrink: 0;
}

.about-team__card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1.5rem;
  background: var(--color-bg-surface);
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, transparent);
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

[data-theme='dark'] .about-team__card {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.about-team__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
}

[data-theme='dark'] .about-team__card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.about-team__avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  border: none;
  margin: 0;
  padding: 1.25rem;
  box-sizing: border-box;
  background: var(--color-bg-elevated);
}

.about-team__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.about-team__name {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.about-team__role {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
}

.about-team__bio {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  flex: 1;
}

.about-team__linkedin {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  background: var(--color-bg-base);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.about-team__linkedin:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(0, 98, 204, 0.06);
}

[data-theme='dark'] .about-team__linkedin:hover {
  background: rgba(74, 144, 240, 0.12);
}

.about-team__linkedin svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ─── Kontakty ──────────────────────────────────────────────────────────── */
.about-contact__grid {
  display: grid;
  gap: clamp(1.25rem, 2vw, 1.75rem);
}

@media (min-width: 900px) {
  .about-contact__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-contact__card {
  position: relative;
  padding: 2rem 1.5rem 1.75rem;
  border-radius: 1rem;
  border: none;
  background: var(--color-bg-elevated);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  overflow: hidden;
}

.about-contact__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    color-mix(in srgb, var(--color-accent, #00a896) 80%, var(--color-primary))
  );
  opacity: 0.85;
}

.about-contact__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
}

.about-contact__icon svg {
  width: 100%;
  height: 100%;
}

.about-contact__card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.about-contact__card p {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  flex: 1;
  max-width: 22rem;
}

.about-contact__card a {
  display: block;
  margin-top: 0.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-primary);
  text-decoration: none;
  word-break: break-word;
}

.about-contact__card a:hover {
  text-decoration: underline;
}

/* ─── Fakturační údaje (ztlumené, bez krabičky) ──────────────────────────── */
.about-legal {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 0.25rem;
  border: none;
  background: transparent;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.about-legal h2 {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.about-legal h2:only-child {
  margin-bottom: 0;
  text-align: center;
}

.about-legal strong {
  font-weight: 600;
  color: var(--color-text-secondary);
}

.about-legal p {
  margin: 0 0 0.45rem;
}

.about-legal p:last-child {
  margin-bottom: 0;
}
