/* =========================================================
   LIVINGSPACE — MEDIA 001
   BOFFI / ON-OFF ST

   HOME-INTEGRATED ARTICLE DESIGN

   Černé pozadí / bílá typografie.
   Článek je součástí existující HOME.

   home.js / home.css / main.js = BEZE ZMĚN
   ========================================================= */

/* =========================================================
   01 — TYPOGRAPHY
   ========================================================= */

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

/* =========================================================
   02 — VARIABLES
   ========================================================= */

.media1 {
  --media1-bg:#000000;
  --media1-color:#FFFFFF;
  --media1-muted:rgba(255,255,255,0.72);

  --media1-font:"Titillium Web",sans-serif;
  --media1-title-font:"Jost",sans-serif;

  --media1-content-gap:22px;
  --media1-text-padding:20px;
  --media1-text-max-width:760px;
  --media1-paragraph-max-width:680px;

  --media1-title-size:26px;
  --media1-title-weight:400;
  --media1-title-line-height:1.2;

  --media1-designer-size:15px;

  --media1-body-size:18px;
  --media1-body-weight:400;
  --media1-body-line-height:1.5;
  --media1-body-letter-spacing:normal;

  --media1-header-top-gap:8px;
  --media1-header-bottom-gap:8px;

  --media1-transition-duration:280ms;
  --media1-transition-ease:cubic-bezier(0.16,1,0.3,1);
}

/* =========================================================
   03 — HOME ARTICLE MODE

   Struktura podle home.js:

   .home-view__content
     .home-carousel
     .media1
     .home-social

   Otevřený článek:

   .media1
   .home-social

   Oba prvky jsou v normálním vertikálním toku.
   Sociální sekce se posouvá dolů podle výšky článku.
   ========================================================= */

.home-view.media1-is-open {
  background:#000000;
}

.home-view.media1-is-open .home-view__content {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  height:auto;
  min-height:0;
}

.home-view.media1-is-open .home-carousel {
  display:none !important;
}

.home-view.media1-is-open .home-view__content > .media1 {
  position:relative;
  display:block;
  flex:0 0 auto;
  order:0;
  height:auto;
  min-height:0;
}

.home-view.media1-is-open .home-view__content > .home-social {
  position:relative;
  display:flex;
  flex:0 0 auto;
  order:1;
  height:auto;
  min-height:0;
  clear:both;
  visibility:visible;
  opacity:1;
  pointer-events:auto;
}

/* =========================================================
   04 — ARTICLE ROOT
   ========================================================= */

.media1 {
  position:relative;
  display:block;
  width:100%;
  min-width:0;
  margin:0;
  padding:0;

  background:var(--media1-bg);
  color:var(--media1-color);

  font-family:var(--media1-font);
  font-size:var(--media1-body-size);
  font-weight:var(--media1-body-weight);
  line-height:var(--media1-body-line-height);

  opacity:0;
  transform:translate3d(0,12px,0);

  transition:
    opacity var(--media1-transition-duration) ease,
    transform var(--media1-transition-duration) var(--media1-transition-ease);

  pointer-events:none;
  box-sizing:border-box;
}

.media1 *,
.media1 *::before,
.media1 *::after {
  box-sizing:border-box;
}

.media1[hidden] {
  display:none !important;
}

.media1.is-visible {
  opacity:1;
  transform:translate3d(0,0,0);
  pointer-events:auto;
}

/* =========================================================
   05 — ARTICLE LAYOUT

   Kompenzace horizontálního odsazení HOME.
   Text i fotografie používají vlastní
   jednotné odsazení.
   ========================================================= */

.home-view .media1 {
  width:calc(100% + var(--menu-left,0px) + var(--menu-right,0px));
  margin-left:calc(-1 * var(--menu-left,0px));
}

.media1__content {
  display:flex;
  flex-direction:column;
  width:100%;
  min-width:0;
  margin:0;
  padding:0;
  gap:var(--media1-content-gap);
}

.media1__content > * {
  flex:0 0 auto;
  min-width:0;
}

/* =========================================================
   06 — ARTICLE HEADER

   ON-OFF ST
   Jost Regular 400
   26px
   ========================================================= */

.media1__header {
  display:block;
  width:100%;
  margin:0;
  padding:
    var(--media1-header-top-gap)
    var(--media1-text-padding)
    var(--media1-header-bottom-gap);

  color:var(--media1-color);
  text-align:center;
}

.media1__title {
  display:block;
  width:100%;
  margin:0;
  padding:0;

  color:var(--media1-color);

  font-family:var(--media1-title-font);
  font-size:var(--media1-title-size);
  font-weight:var(--media1-title-weight);
  font-style:normal;
  line-height:var(--media1-title-line-height);
  letter-spacing:0;

  text-align:center;
  text-transform:uppercase;
  overflow-wrap:anywhere;
}

.media1__designer {
  display:block;
  margin:10px 0 0;
  padding:0;

  color:var(--media1-muted);

  font-family:var(--media1-font);
  font-size:var(--media1-designer-size);
  font-weight:400;
  font-style:normal;
  line-height:1.4;
  letter-spacing:0;

  text-align:center;
}

/* =========================================================
   07 — PHOTOGRAPHY

   Ostré rohy.
   Žádné zaoblení.
   Původní poměr stran.
   ========================================================= */

.media1__figure {
  display:block;
  width:calc(100% - 2 * var(--media1-text-padding));
  max-width:var(--media1-text-max-width);
  min-width:0;

  margin:0 auto;
  padding:0;

  border:0;
  border-radius:0;
  background:var(--media1-bg);

  line-height:0;
  overflow:hidden;
}

.media1__image {
  display:block;
  width:100%;
  max-width:100%;
  height:auto;

  margin:0;
  padding:0;

  border:0;
  border-radius:0;

  object-fit:contain;
  object-position:center;

  user-select:none;
  -webkit-user-select:none;
  -webkit-user-drag:none;
  -webkit-touch-callout:none;

  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}

/* =========================================================
   08 — ARTICLE TEXT

   Titillium Web Regular 400.
   ========================================================= */

.media1__text {
  display:block;
  width:100%;
  min-width:0;

  margin:0;
  padding:0 var(--media1-text-padding);

  color:var(--media1-color);
}

.media1__paragraph {
  display:block;
  width:100%;
  max-width:var(--media1-paragraph-max-width);

  margin:0 auto;
  padding:0;

  color:var(--media1-color);

  font-family:var(--media1-font);
  font-size:var(--media1-body-size);
  font-weight:var(--media1-body-weight);
  font-style:normal;
  line-height:var(--media1-body-line-height);
  letter-spacing:var(--media1-body-letter-spacing);

  text-align:left;
  text-transform:none;
  text-wrap:pretty;

  hyphens:none;
  -webkit-hyphens:none;
  -ms-hyphens:none;
  word-break:normal;
  overflow-wrap:normal;
  white-space:normal;
}

/* =========================================================
   09 — ARTICLE SPACING
   ========================================================= */

.media1__content > .media1__figure,
.media1__content > .media1__text {
  margin-top:0;
  margin-bottom:0;
}

.media1__content > .media1__header + .media1__figure {
  margin-top:4px;
}

.media1__content > .media1__text + .media1__text {
  margin-top:-4px;
}

/* =========================================================
   10 — SOCIAL SECTION

   Původní sociální sekce z home.js.
   Vždy až pod celým článkem.

   Bez pevného posunu v pixelech.
   ========================================================= */

.home-view.media1-is-open .home-social {
  position:relative;
  top:auto;
  right:auto;
  bottom:auto;
  left:auto;

  display:flex;
  visibility:visible;
  opacity:1;

  transform:none;
  float:none;

  pointer-events:auto;
}

/* =========================================================
   11 — MENU COMPATIBILITY
   ========================================================= */

.main-view.is-menu-visible .home-view.media1-is-open .media1 {
  pointer-events:none;
}

.main-view.is-menu-visible .home-view.media1-is-open .home-view__content {
  display:none;
}

/* =========================================================
   12 — SMALL MOBILE
   ========================================================= */

@media (max-width:374px) {
  .media1 {
    --media1-text-padding:16px;
    --media1-body-size:17px;
    --media1-designer-size:13px;
  }
}

/* =========================================================
   13 — TABLET
   ========================================================= */

@media (min-width:768px) {
  .media1 {
    --media1-text-padding:40px;
    --media1-body-size:20px;
    --media1-designer-size:16px;
    --media1-content-gap:26px;
  }
}

/* =========================================================
   14 — DESKTOP
   ========================================================= */

@media (min-width:1200px) {
  .media1 {
    --media1-text-padding:60px;
    --media1-body-size:21px;
    --media1-designer-size:17px;
    --media1-content-gap:30px;
  }
}

/* =========================================================
   15 — REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion:reduce) {
  .media1 {
    transition-duration:0.01ms;
    transform:none;
  }
}
